diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-02-09 21:06:51 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-02-09 21:06:51 +0000 |
commit | 1013b9b4b6a246ee7a08a1c1df280e2e05e7947f (patch) | |
tree | 66a2bdd784427001bb5d1e544bca8e42a9f12b3e | |
parent | fa48a582fab3245547c72f2ed6380e6f21f3c1b1 (diff) |
torrent props on double click
-rw-r--r-- | src/trg-main-window.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c index 207050c..6826c8c 100644 --- a/src/trg-main-window.c +++ b/src/trg-main-window.c @@ -273,7 +273,7 @@ static const gchar *make_error_message(JsonObject * response, int status) } } -static void open_props_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) +static void open_props_cb(GtkWidget * w, gpointer data) { TrgMainWindowPrivate *priv = TRG_MAIN_WINDOW_GET_PRIVATE(data); TrgTorrentPropsDialog *dialog = @@ -284,6 +284,15 @@ static void open_props_cb(GtkWidget * w G_GNUC_UNUSED, gpointer data) gtk_widget_show_all(GTK_WIDGET(dialog)); } +void +torrent_tv_onRowActivated (GtkTreeView *treeview, + GtkTreePath *path G_GNUC_UNUSED, + GtkTreeViewColumn *col G_GNUC_UNUSED, + gpointer userdata) +{ + open_props_cb(GTK_WIDGET(treeview), userdata); +} + /* Use synchronous dispatch() in our dedicated thread function. * This means torrents are added in sequence, instead of dispatch_async() * working concurrently for each upload. @@ -1392,6 +1401,7 @@ static GObject *trg_main_window_constructor(GType type, G_CALLBACK(torrent_tv_popup_menu_cb), self); g_signal_connect(priv->torrentTreeView, "button-press-event", G_CALLBACK(torrent_tv_button_pressed_cb), self); + g_signal_connect(priv->torrentTreeView, "row-activated", G_CALLBACK(torrent_tv_onRowActivated), self); outerVbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(self), outerVbox); |