[gnome-calendar/calendar-editor] window: show sources dialog
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] window: show sources dialog
- Date: Mon, 9 Feb 2015 14:10:02 +0000 (UTC)
commit e3855e853b802db264b2da114313f4c56feb4d33
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Feb 9 12:09:48 2015 -0200
window: show sources dialog
data/ui/window.ui | 1 +
src/gcal-window.c | 14 ++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index 4e1f7f7..d557a9a 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -363,6 +363,7 @@
<property name="can_focus">True</property>
<property name="relief">none</property>
<property name="receives_default">True</property>
+ <signal name="clicked" handler="open_source_dialog" object="GcalWindow" swapped="no" />
<child>
<object class="GtkBox" id="add_button_box">
<property name="visible">True</property>
diff --git a/src/gcal-window.c b/src/gcal-window.c
index e15e00c..a703f3f 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -191,6 +191,9 @@ static void remove_source (GcalManager *m
ESource *source,
gpointer user_data);
+static void show_source_dialog (GtkButton *button,
+ gpointer user_data);
+
static void on_calendar_toggled (GObject *object,
GParamSpec *pspec,
gpointer user_data);
@@ -810,6 +813,15 @@ remove_source (GcalManager *manager,
}
static void
+show_source_dialog (GtkButton *button,
+ gpointer user_data)
+{
+ GcalWindowPrivate *priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
+
+ gtk_window_present (GTK_WINDOW (priv->source_dialog));
+}
+
+static void
on_calendar_toggled (GObject *object,
GParamSpec *pspec,
gpointer user_data)
@@ -1265,6 +1277,8 @@ gcal_window_class_init(GcalWindowClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_action_button);
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_close_button);
+ gtk_widget_class_bind_template_callback (widget_class, show_source_dialog);
+
gtk_widget_class_bind_template_callback (widget_class, key_pressed);
gtk_widget_class_bind_template_callback (widget_class, search_toggled);
gtk_widget_class_bind_template_callback (widget_class, search_changed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]