[vinagre] Make Bookmarks sensible to protocol-[added, removed] signals
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Make Bookmarks sensible to protocol-[added, removed] signals
- Date: Wed, 13 Oct 2010 17:47:48 +0000 (UTC)
commit 6a82026cdeb5de6881237d22c55eb30baa768f6c
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Oct 13 14:49:00 2010 -0300
Make Bookmarks sensible to protocol-[added,removed] signals
vinagre/vinagre-bookmarks.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-bookmarks.c b/vinagre/vinagre-bookmarks.c
index ac3ebc8..c405cf0 100644
--- a/vinagre/vinagre-bookmarks.c
+++ b/vinagre/vinagre-bookmarks.c
@@ -58,10 +58,19 @@ static void vinagre_bookmarks_file_changed (GFileMonitor *monitor,
VinagreBookmarks *book);
static void
+protocol_added_removed_cb (VinagrePluginsEngine *engine,
+ VinagreProtocol *protocol,
+ VinagreBookmarks *book)
+{
+ vinagre_bookmarks_update_from_file (book);
+}
+
+static void
vinagre_bookmarks_init (VinagreBookmarks *book)
{
GFile *gfile;
gchar *dir;
+ VinagrePluginsEngine *engine;
book->priv = G_TYPE_INSTANCE_GET_PRIVATE (book, VINAGRE_TYPE_BOOKMARKS, VinagreBookmarksPrivate);
book->priv->entries = NULL;
@@ -88,6 +97,16 @@ vinagre_bookmarks_init (VinagreBookmarks *book)
"changed",
G_CALLBACK (vinagre_bookmarks_file_changed),
book);
+
+ engine = vinagre_plugins_engine_get_default ();
+ g_signal_connect (engine,
+ "protocol-added",
+ G_CALLBACK (protocol_added_removed_cb),
+ book);
+ g_signal_connect (engine,
+ "protocol-removed",
+ G_CALLBACK (protocol_added_removed_cb),
+ book);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]