[gnome-calendar] window: Add "Online Accounts..." button
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: Add "Online Accounts..." button
- Date: Tue, 25 Jun 2019 00:33:24 +0000 (UTC)
commit 7217f9fa53c06d959f7c07b07fef3c4895cec3ef
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon May 27 19:53:07 2019 -0300
window: Add "Online Accounts..." button
data/ui/window.ui | 9 +++++++++
src/gui/gcal-window.c | 11 +++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/data/ui/window.ui b/data/ui/window.ui
index efda7860..1d726ebc 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -301,6 +301,15 @@
<property name="margin">12</property>
<property name="orientation">vertical</property>
+ <!-- About -->
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">True</property>
+ <property name="action-name">win.open-online-accounts</property>
+ <property name="text" translatable="yes">_Online Accounts…</property>
+ </object>
+ </child>
+
<!-- Weather -->
<child>
<object class="GtkModelButton">
diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c
index 2b13c34e..495986ee 100644
--- a/src/gui/gcal-window.c
+++ b/src/gui/gcal-window.c
@@ -391,6 +391,16 @@ on_window_new_event_cb (GSimpleAction *action,
gtk_widget_show (self->edit_dialog);
}
+static void
+on_window_open_online_accounts_cb (GSimpleAction *action,
+ GVariant *param,
+ gpointer user_data)
+{
+ GApplication *application = g_application_get_default ();
+
+ gcal_utils_launch_online_accounts_panel (g_application_get_dbus_connection (application), NULL, NULL);
+}
+
static void
on_window_previous_date_activated_cb (GSimpleAction *action,
GVariant *param,
@@ -1084,6 +1094,7 @@ gcal_window_init (GcalWindow *self)
{"change-view", on_view_action_activated, "i" },
{"next-date", on_window_next_date_activated_cb },
{"new-event", on_window_new_event_cb },
+ {"open-online-accounts", on_window_open_online_accounts_cb },
{"previous-date", on_window_previous_date_activated_cb },
{"show-calendars", on_show_calendars_action_activated },
{"today", on_window_today_activated_cb }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]