[gnome-calendar] window: show sources dialog
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: show sources dialog
- Date: Mon, 25 May 2015 16:46:24 +0000 (UTC)
commit 6dccbfe431c2efabaeebf2f370e7e3e87453477f
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 cf1d68d..811a38f 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -364,6 +364,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 75885c5..76b4277 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -196,6 +196,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);
@@ -853,6 +856,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)
@@ -1313,6 +1325,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]