[gnome-calendar/calendar-editor] source-dialog: retrieve some useful widgets from the UI



commit 1b11706e5edf60e4ee3cad4808e3a36e547778ef
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Apr 7 16:40:30 2015 -0300

    source-dialog: retrieve some useful widgets from the UI

 data/ui/source-dialog.ui |    2 +-
 src/gcal-source-dialog.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/source-dialog.ui b/data/ui/source-dialog.ui
index 44d13c1..4a25f53 100644
--- a/data/ui/source-dialog.ui
+++ b/data/ui/source-dialog.ui
@@ -160,7 +160,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkMenuButton" id="add_calendar_ubutton">
+                              <object class="GtkMenuButton" id="add_calendar_menu_button">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 6b69e92..78ddc40 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -54,6 +54,11 @@ typedef struct
   gint                validate_url_resource_id;
   gint                calendar_address_id;
 
+  /* overview widgets */
+  GtkWidget          *add_calendar_menu_button;
+  GtkWidget          *calendars_listbox;
+  GtkWidget          *online_accounts_listbox;
+
   /* flags */
   GcalSourceDialogMode mode;
   ESource            *source;
@@ -956,9 +961,11 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
   gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), 
"/org/gnome/calendar/source-dialog.ui");
 
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, add_button);
+  gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, add_calendar_menu_button);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, author_label);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, calendar_address_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, calendar_color_button);
+  gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, calendars_listbox);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, cancel_button);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, default_check);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, edit_grid);
@@ -968,6 +975,7 @@ gcal_source_dialog_class_init (GcalSourceDialogClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, name_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, new_calendar_name_entry);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, notebook);
+  gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, online_accounts_listbox);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, remove_button);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, select_file_button);
   gtk_widget_class_bind_template_child_private (widget_class, GcalSourceDialog, stack);


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