gcal-utils: Combine GNOME Settings launchers
This refactor combines the functions gcal_utils_launch_online_accounts_panel and gcal_utils_launch_datetime_settings_panel into a single function that takes a panel ID as an argument.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
3526cadcca
commit
aec45594f9
@@ -259,9 +259,9 @@ on_settings_button_clicked_cb (GtkWidget *button,
|
||||
goa = e_source_get_extension (parent, E_SOURCE_EXTENSION_GOA);
|
||||
|
||||
app = g_application_get_default ();
|
||||
gcal_utils_launch_online_accounts_panel (g_application_get_dbus_connection (app),
|
||||
e_source_goa_get_account_id (goa),
|
||||
NULL);
|
||||
gcal_utils_launch_gnome_settings (g_application_get_dbus_connection (app),
|
||||
"online-accounts",
|
||||
e_source_goa_get_account_id (goa));
|
||||
|
||||
GCAL_EXIT;
|
||||
}
|
||||
|
||||
@@ -513,7 +513,7 @@ on_web_description_label_link_activated_cb (GtkLabel *label,
|
||||
{
|
||||
GDBusConnection *connection = g_application_get_dbus_connection (g_application_get_default ());
|
||||
|
||||
gcal_utils_launch_online_accounts_panel (connection, NULL, NULL);
|
||||
gcal_utils_launch_gnome_settings (connection, "online-accounts", NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -430,9 +430,9 @@ on_window_open_date_time_settings_cb (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *application = g_application_get_default ();
|
||||
GDBusConnection *connection = g_application_get_dbus_connection (g_application_get_default ());
|
||||
|
||||
gcal_utils_launch_date_time_settings_panel (g_application_get_dbus_connection (application), NULL, NULL);
|
||||
gcal_utils_launch_gnome_settings (connection, "datetime", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -440,9 +440,9 @@ on_window_open_online_accounts_cb (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *application = g_application_get_default ();
|
||||
GDBusConnection *connection = g_application_get_dbus_connection (g_application_get_default ());
|
||||
|
||||
gcal_utils_launch_online_accounts_panel (g_application_get_dbus_connection (application), NULL, NULL);
|
||||
gcal_utils_launch_gnome_settings (connection, "online-accounts", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user