[gnome-calendar/calendar-editor] source-dialog: add an action group
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] source-dialog: add an action group
- Date: Thu, 9 Apr 2015 02:48:46 +0000 (UTC)
commit 0e496bd56fc8ea048eaa2c2e2426c9ee36c1cb6a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Apr 8 19:43:16 2015 -0300
source-dialog: add an action group
src/gcal-source-dialog.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index c7ec4c2..e57817f 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -65,6 +65,9 @@ typedef struct
GBinding *title_bind;
gboolean *prompt_password;
+ /* auxiliary */
+ GSimpleActionGroup *action_group;
+
/* manager */
GcalManager *manager;
} GcalSourceDialogPrivate;
@@ -165,6 +168,12 @@ static void discover_sources_cb (GObject *so
G_DEFINE_TYPE_WITH_PRIVATE (GcalSourceDialog, gcal_source_dialog, GTK_TYPE_DIALOG)
+GActionEntry actions[] = {
+ {"file", NULL, NULL, NULL, NULL},
+ {"local", NULL, NULL, NULL, NULL},
+ {"web", NULL, NULL, NULL, NULL}
+};
+
static void
add_source (GcalManager *manager,
ESource *source,
@@ -1230,6 +1239,12 @@ gcal_source_dialog_constructed (GObject *object)
//gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->select_file_button), filter);
+ // Action group
+ priv->action_group = g_simple_action_group_new ();
+ gtk_widget_insert_action_group (GTK_WIDGET (object), "source", G_ACTION_GROUP (priv->action_group));
+
+ g_action_map_add_action_entries (G_ACTION_MAP (priv->action_group), actions, G_N_ELEMENTS (actions),
object);
+
/* setup titlebar */
gtk_window_set_titlebar (GTK_WINDOW (object), priv->headerbar);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]