summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/trg-main-window.c12
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);