[vinagre] Connect the bookmark menu item ‘activate’ signal



commit 5c1e9516597f103631dd9a6ff5665c6faa108c30
Author: David King <amigadave amigadave com>
Date:   Wed Aug 3 17:55:31 2011 +0200

    Connect the bookmark menu item âactivateâ signal
    
    When the side panel was removed in commit
    0914d8ccea6c70f8608203ed59e1ae5584668dee, the âactivateâ signal for
    bookmarks in the bookmark menu was no longer connected to a handler,
    causing the bookmarks to do nothing when activated. A small signal
    handler was necessary to replace the old vinagre_fav_bookmarks_open()
    functionality, fixing bug 655892.

 vinagre/vinagre-window.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-window.c b/vinagre/vinagre-window.c
index 746975c..63ed0ed 100644
--- a/vinagre/vinagre-window.c
+++ b/vinagre/vinagre-window.c
@@ -500,6 +500,15 @@ _escape_underscores (const gchar* text,
 }
 
 static void
+_open_bookmark (GtkAction *action, gpointer user_data)
+{
+    VinagreWindow *window = VINAGRE_WINDOW (user_data);
+    VinagreConnection *connection = VINAGRE_CONNECTION (g_object_get_data (G_OBJECT (action), "conn"));
+
+    vinagre_cmd_open_bookmark (window, connection);
+}
+
+static void
 vinagre_window_populate_bookmarks (VinagreWindow *window,
 				   const gchar   *group,
 				   GSList        *entries,
@@ -585,6 +594,8 @@ vinagre_window_populate_bookmarks (VinagreWindow *window,
 				   GTK_UI_MANAGER_MENUITEM,
 				   FALSE);
 
+            g_signal_connect (action, "activate", G_CALLBACK (_open_bookmark), window);
+
 	    g_object_unref (action);
 	    g_free (action_name);
 	    g_free (action_label);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]