summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-02-26 16:50:01 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-02-26 16:50:01 +0000
commit538591d49d0f586005a79a077ff3c41b651b7d0d (patch)
tree5238f69d449df7b47578a3d5ab27a520a5569617
parent0d66230882f4fdf1e1435827236a49ac232420e4 (diff)
issue 185 - change .desktop to add magnet uri handler
-rw-r--r--README10
-rw-r--r--src/Makefile.am2
-rw-r--r--src/main.c1
-rw-r--r--src/transmission-remote-gtk.desktop.in6
-rw-r--r--src/trg-client.c15
-rw-r--r--src/trg-general-panel.c4
-rw-r--r--src/trg-main-window.c12
-rw-r--r--src/trg-menu-bar.c2
-rw-r--r--src/trg-tree-view.c2
9 files changed, 25 insertions, 29 deletions
diff --git a/README b/README
index 8334967..12ab375 100644
--- a/README
+++ b/README
@@ -8,18 +8,18 @@ BUILDING
* To optionally see which country peers are located in,
install libgeoip and its headers when building.
- Building a Transmission release from the command line:
+ Building a transmission-remote-gtk release from the command line:
$ tar zxfv transmission-remote-gtk-1.0.tar.gz
$ cd transmission-remote-gtk-1.0
$ ./configure
$ make
- $ sudo make install
+ # make install
- Building from subversion checkout:
+ Building from git clone:
- $ svn co <repository URL>
+ $ git clone https://code.google.com/p/transmission-remote-gtk/
$ ./autogen.sh
$ ./configure
$ make
- $ sudo make install
+ # make install
diff --git a/src/Makefile.am b/src/Makefile.am
index 1d725a4..4886e3f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,7 +44,7 @@ desktop_DATA = transmission-remote-gtk.desktop
endif
bin_PROGRAMS = transmission-remote-gtk
-INCLUDES = --pedantic -Wall -Wno-format -Wno-overflow -I.. -DTRGLICENSE=\""$(trglicense)"\" $(libcurl_CFLAGS) $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) $(libproxy_CFLAGS) $(libappindicator_CFLAGS)
+INCLUDES = --pedantic -Wall -I.. -Wno-overflow -DTRGLICENSE=\""$(trglicense)"\" $(libcurl_CFLAGS) $(jsonglib_CFLAGS) $(gthread_CFLAGS) $(gtk_CFLAGS) $(gio_CFLAGS) $(unique_CFLAGS) $(notify_CFLAGS) $(libproxy_CFLAGS) $(libappindicator_CFLAGS)
transmission_remote_gtk_SOURCES = main.c \
requests.c \
diff --git a/src/main.c b/src/main.c
index aca0276..dbc2896 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,6 +30,7 @@
#include <glib-object.h>
#include <gtk/gtk.h>
#include <json-glib/json-glib.h>
+#include <fontconfig/fontconfig.h>
#if !GTK_CHECK_VERSION( 3, 0, 0 ) && HAVE_LIBUNIQUE
#include <unique/unique.h>
diff --git a/src/transmission-remote-gtk.desktop.in b/src/transmission-remote-gtk.desktop.in
index b25f5e8..30a9a5d 100644
--- a/src/transmission-remote-gtk.desktop.in
+++ b/src/transmission-remote-gtk.desktop.in
@@ -1,12 +1,10 @@
[Desktop Entry]
Name=Transmission Remote
-GenericName=Transmission Remote
-X-GNOME-FullName=Transmission Remote
Comment=Remotely manage the Transmission BitTorrent client
-Exec=@bindir@/transmission-remote-gtk %F
+Exec=@bindir@/transmission-remote-gtk %U
Icon=transmission-remote-gtk
Terminal=false
TryExec=transmission-remote-gtk
Type=Application
-MimeType=application/x-bittorrent;
+MimeType=application/x-bittorrent;x-scheme-handler/magnet;
Categories=Network;FileTransfer;P2P;GTK;
diff --git a/src/trg-client.c b/src/trg-client.c
index b3bc374..87110d7 100644
--- a/src/trg-client.c
+++ b/src/trg-client.c
@@ -399,14 +399,12 @@ void trg_client_updatelock(TrgClient * tc)
void trg_client_configlock(TrgClient * tc)
{
- TrgClientPrivate *priv = tc->priv;
- g_mutex_lock(priv->configMutex);
+ g_mutex_lock(tc->priv->configMutex);
}
guint trg_client_get_failcount(TrgClient * tc)
{
- TrgClientPrivate *priv = tc->priv;
- return priv->failCount;
+ return tc->priv->failCount;
}
guint trg_client_inc_failcount(TrgClient * tc)
@@ -417,20 +415,17 @@ guint trg_client_inc_failcount(TrgClient * tc)
void trg_client_reset_failcount(TrgClient * tc)
{
- TrgClientPrivate *priv = tc->priv;
- priv->failCount = 0;
+ tc->priv->failCount = 0;
}
void trg_client_updateunlock(TrgClient * tc)
{
- TrgClientPrivate *priv = tc->priv;
- g_mutex_unlock(priv->updateMutex);
+ g_mutex_unlock(tc->priv->updateMutex);
}
void trg_client_configunlock(TrgClient * tc)
{
- TrgClientPrivate *priv = tc->priv;
- g_mutex_unlock(priv->configMutex);
+ g_mutex_unlock(tc->priv->configMutex);
}
/* formerly http.c */
diff --git a/src/trg-general-panel.c b/src/trg-general-panel.c
index 5d2337d..81efffc 100644
--- a/src/trg-general-panel.c
+++ b/src/trg-general-panel.c
@@ -193,9 +193,9 @@ trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t,
gtk_label_set_text(GTK_LABEL(priv->gen_eta_label), _("N/A"));
}
- snprintf(buf, sizeof(buf), "%d", seeders >= 0 ? seeders : 0);
+ snprintf(buf, sizeof(buf), "%ld", seeders >= 0 ? seeders : 0);
gtk_label_set_text(GTK_LABEL(priv->gen_seeders_label), buf);
- snprintf(buf, sizeof(buf), "%d", leechers >= 0 ? leechers : 0);
+ snprintf(buf, sizeof(buf), "%ld", leechers >= 0 ? leechers : 0);
gtk_label_set_text(GTK_LABEL(priv->gen_leechers_label), buf);
}
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index f9d53ee..7b415ea 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -125,9 +125,9 @@ static void delete_cb(GtkWidget * w, TrgMainWindow * win);
static void open_props_cb(GtkWidget * w, TrgMainWindow * win);
static gint confirm_action_dialog(GtkWindow * gtk_win,
GtkTreeSelection * selection,
- gchar * question_single,
- gchar * question_multi,
- gchar * action_stock);
+ const gchar * question_single,
+ const gchar * question_multi,
+ const gchar * action_stock);
static void view_stats_toggled_cb(GtkWidget * w, gpointer data);
static void view_states_toggled_cb(GtkCheckMenuItem * w,
TrgMainWindow * win);
@@ -763,8 +763,8 @@ static void down_queue_cb(GtkWidget * w G_GNUC_UNUSED, TrgMainWindow * win)
static gint
confirm_action_dialog(GtkWindow * gtk_win,
GtkTreeSelection * selection,
- gchar * question_single,
- gchar * question_multi, gchar * action_stock)
+ const gchar * question_single,
+ const gchar * question_multi, const gchar * action_stock)
{
TrgMainWindow *win = TRG_MAIN_WINDOW(gtk_win);
TrgMainWindowPrivate *priv = win->priv;
@@ -1220,7 +1220,7 @@ static gboolean on_torrent_get(gpointer data, int mode)
gchar *statusBarMsg =
g_strdup_printf(_("Request %d/%d failed: %s"),
trg_client_get_failcount(client),
- max_retries, msg);
+ (gint)max_retries, msg);
trg_status_bar_push_connection_msg(priv->statusBar,
statusBarMsg);
g_free(msg);
diff --git a/src/trg-menu-bar.c b/src/trg-menu-bar.c
index 0502092..aa8b797 100644
--- a/src/trg-menu-bar.c
+++ b/src/trg-menu-bar.c
@@ -588,6 +588,8 @@ static GtkWidget *trg_menu_bar_torrent_menu_new(TrgMenuBar * menu)
priv->mb_reannounce =
trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu),
_("Re-_announce"), GTK_STOCK_REFRESH, FALSE);
+ trg_menu_bar_accel_add(menu, priv->mb_reannounce, GDK_q,
+ GDK_CONTROL_MASK);
priv->mb_move =
trg_menu_bar_item_new(GTK_MENU_SHELL(torrentMenu), _("_Move"),
diff --git a/src/trg-tree-view.c b/src/trg-tree-view.c
index 077274e..2e3e78e 100644
--- a/src/trg-tree-view.c
+++ b/src/trg-tree-view.c
@@ -38,7 +38,7 @@
* by right clicking on any column for a menu to hide the clicked column, or
* insert any hidden column after.
*
- * This class persists these choices to TrgConf, and restores them when it is
+ * This class persists these choices to TrgPrefs, and restores them when it is
* initialised. Column widths are also saved/restored.
*
* All the columns must be preregistered so it knows what model column,