[empathy: 91/99] EvSidebar: add a changed signal
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 91/99] EvSidebar: add a changed signal
- Date: Thu, 9 Jun 2011 09:56:59 +0000 (UTC)
commit 523e8030211e4a0c84e3c5bec0c705818ca3c669
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Wed Jun 8 20:05:54 2011 +0100
EvSidebar: add a changed signal
src/ev-sidebar.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/ev-sidebar.c b/src/ev-sidebar.c
index 9c80537..56e5cf9 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]