gcal-window: datetime settings shortcut
Shortcut is added so that time-related system settings can be easily accessed. See #1023 The code is largely just a copy-paste of the code that opens the "Online Accounts…" menu. Fixes #1023
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
8afc4bd129
commit
3526cadcca
@@ -425,6 +425,16 @@ on_window_new_event_cb (GSimpleAction *action,
|
||||
gtk_widget_set_visible (GTK_WIDGET (self->event_editor), TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_window_open_date_time_settings_cb (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *application = g_application_get_default ();
|
||||
|
||||
gcal_utils_launch_date_time_settings_panel (g_application_get_dbus_connection (application), NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
on_window_open_online_accounts_cb (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
@@ -1095,6 +1105,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-date-time-settings", on_window_open_date_time_settings_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 },
|
||||
|
||||
@@ -302,6 +302,10 @@
|
||||
|
||||
<menu id='menu'>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Date & Time Settings…</attribute>
|
||||
<attribute name="action">win.open-date-time-settings</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Online Accounts…</attribute>
|
||||
<attribute name="action">win.open-online-accounts</attribute>
|
||||
|
||||
Reference in New Issue
Block a user