patches: new gnome-control-center patchset
This commit is contained in:
parent
bb6b84ece9
commit
610c5e572d
1 changed files with 25 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
|||
diff --git a/panels/sound/cc-alert-chooser.c b/panels/sound/cc-alert-chooser.c
|
||||
deleted file mode 100644
|
||||
index 4d56f58..0000000
|
||||
index 0cdae3c..0000000
|
||||
--- a/panels/sound/cc-alert-chooser.c
|
||||
+++ /dev/null
|
||||
@@ -1,275 +0,0 @@
|
||||
@@ -1,294 +0,0 @@
|
||||
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
||||
- *
|
||||
- * Copyright (C) 2018 Canonical Ltd.
|
||||
|
@ -133,17 +133,20 @@ index 4d56f58..0000000
|
|||
-set_custom_theme (CcAlertChooser *self,
|
||||
- const gchar *name)
|
||||
-{
|
||||
- g_autofree gchar *dir = NULL;
|
||||
- g_autofree gchar *dir_path = NULL;
|
||||
- g_autofree gchar *theme_path = NULL;
|
||||
- g_autoptr(GDateTime) now = NULL;
|
||||
- g_autoptr(GFile) dir = NULL;
|
||||
- g_autoptr(GKeyFile) theme_file = NULL;
|
||||
- g_autoptr(GVariant) default_theme = NULL;
|
||||
- g_autoptr(GError) load_error = NULL;
|
||||
- g_autoptr(GError) save_error = NULL;
|
||||
- g_autoptr(GError) mtime_error = NULL;
|
||||
-
|
||||
- dir = get_theme_dir ();
|
||||
- g_mkdir_with_parents (dir, USER_DIR_MODE);
|
||||
- dir_path = get_theme_dir ();
|
||||
- g_mkdir_with_parents (dir_path, USER_DIR_MODE);
|
||||
-
|
||||
- theme_path = g_build_filename (dir, "index.theme", NULL);
|
||||
- theme_path = g_build_filename (dir_path, "index.theme", NULL);
|
||||
-
|
||||
- default_theme = g_settings_get_default_value (self->sound_settings, "theme-name");
|
||||
-
|
||||
|
@ -166,6 +169,22 @@ index 4d56f58..0000000
|
|||
- set_sound_symlink ("bell-terminal", name);
|
||||
- set_sound_symlink ("bell-window-system", name);
|
||||
-
|
||||
- /* Ensure the g-s-d sound plugin which does non-recursive monitoring
|
||||
- * notices the change even if the theme directory already existed.
|
||||
- */
|
||||
- now = g_date_time_new_now_utc ();
|
||||
- dir = g_file_new_for_path (dir_path);
|
||||
- if (!g_file_set_attribute_uint64 (dir,
|
||||
- G_FILE_ATTRIBUTE_TIME_MODIFIED,
|
||||
- g_date_time_to_unix (now),
|
||||
- G_FILE_QUERY_INFO_NONE,
|
||||
- NULL,
|
||||
- &mtime_error))
|
||||
- {
|
||||
- g_warning ("Failed to update theme directory modification time for %s: %s",
|
||||
- dir_path, mtime_error->message);
|
||||
- }
|
||||
-
|
||||
- g_settings_set_boolean (self->sound_settings, "event-sounds", TRUE);
|
||||
- g_settings_set_string (self->sound_settings, "theme-name", CUSTOM_THEME_NAME);
|
||||
-}
|
||||
|
|
Loading…
Reference in a new issue