aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 03:05:54 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-06-09 17:20:09 +0800
commit523e8030211e4a0c84e3c5bec0c705818ca3c669 (patch)
treeacd4ff3d52acf183b6bc2d5bd1ca141593bba25f
parentd78ac0b3ee0d22b0b670216373e8b0db0b0479b0 (diff)
downloadgsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar.gz
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar.bz2
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar.lz
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar.xz
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.tar.zst
gsoc2013-empathy-523e8030211e4a0c84e3c5bec0c705818ca3c669.zip
EvSidebar: add a changed signal
-rw-r--r--src/ev-sidebar.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ev-sidebar.c b/src/ev-sidebar.c
index 9c805372d..56e5cf982 100644
--- a/src/ev-sidebar.c
+++ b/src/ev-sidebar.c
@@ -50,6 +50,7 @@ struct _EvSidebarPrivate {
enum {
CLOSED,
+ CHANGED,
LAST_SIGNAL
};
@@ -78,6 +79,15 @@ ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ ev_sidebar_table_signals[CHANGED] =
+ g_signal_new ("changed",
+ G_TYPE_FROM_CLASS (g_object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EvSidebarClass, closed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
}
static void
@@ -109,11 +119,17 @@ ev_sidebar_combobox_changed_cb (GtkComboBox *combo_box,
indices = gtk_tree_path_get_indices (path);
if (indices != NULL) {
+ gchar *page;
+
gtk_notebook_set_current_page (GTK_NOTEBOOK (ev_sidebar->priv->notebook), indices[0]);
+ gtk_tree_model_get (model, &iter, PAGE_COLUMN_ID, &page, -1);
+ g_signal_emit (G_OBJECT (ev_sidebar), ev_sidebar_table_signals[CHANGED], 0, page);
+ g_free (page);
}
gtk_tree_path_free (path);
}
+
}
static void