From 7217f9fa53c06d959f7c07b07fef3c4895cec3ef Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 27 May 2019 19:53:07 -0300 Subject: [PATCH] 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 @@ 12 vertical + + + + True + win.open-online-accounts + _Online Accounts… + + + 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 }