diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-01-26 13:31:26 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-01-26 16:41:19 +0100 |
commit | a784629f446f024bc585a9484fd0e119f7f28fcb (patch) | |
tree | 01ce54eacee5aa70a63df07fcd16fea99c60fc7a /src | |
parent | 8da5343ae62b49cea4d1c831946e3fe3efc5595d (diff) | |
download | totem-a784629f446f024bc585a9484fd0e119f7f28fcb.tar.gz |
main: Only force dark style after options are parsed
And the application is registered.
Diffstat (limited to 'src')
-rw-r--r-- | src/totem-object.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/totem-object.c b/src/totem-object.c index 98fa654a5..bd8fde913 100644 --- a/src/totem-object.c +++ b/src/totem-object.c @@ -257,12 +257,18 @@ totem_object_app_handle_local_options (GApplication *application, GVariantDict *options) { GError *error = NULL; + HdyStyleManager *style_manager; if (!g_application_register (application, NULL, &error)) { g_warning ("Failed to register application: %s", error->message); g_error_free (error); return 1; } + + hdy_init (); + style_manager = hdy_style_manager_get_default (); + hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_FORCE_DARK); + totem_options_process_for_server (TOTEM_OBJECT (application), &optionstate); return 0; } @@ -497,15 +503,9 @@ totem_object_class_init (TotemObjectClass *klass) static void totem_object_init (TotemObject *totem) { - HdyStyleManager *style_manager; - if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) g_warning ("gtk-clutter failed to initialise, expect problems from here on."); - hdy_init (); - style_manager = hdy_style_manager_get_default (); - hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_FORCE_DARK); - totem->settings = g_settings_new (TOTEM_GSETTINGS_SCHEMA); g_application_add_main_option_entries (G_APPLICATION (totem), all_options); |