patches: new gnome-control-center patchset
This commit is contained in:
parent
dcd563525c
commit
c2dbe644d3
1 changed files with 61 additions and 49 deletions
|
@ -1,9 +1,9 @@
|
||||||
diff --git a/panels/sound/cc-alert-chooser.c b/panels/sound/cc-alert-chooser.c
|
diff --git a/panels/sound/cc-alert-chooser.c b/panels/sound/cc-alert-chooser.c
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 0cdae3c..0000000
|
index 686d8c6..0000000
|
||||||
--- a/panels/sound/cc-alert-chooser.c
|
--- a/panels/sound/cc-alert-chooser.c
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,294 +0,0 @@
|
@@ -1,306 +0,0 @@
|
||||||
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
||||||
- *
|
- *
|
||||||
- * Copyright (C) 2018 Canonical Ltd.
|
- * Copyright (C) 2018 Canonical Ltd.
|
||||||
|
@ -35,10 +35,10 @@ index 0cdae3c..0000000
|
||||||
-{
|
-{
|
||||||
- GtkBox parent_instance;
|
- GtkBox parent_instance;
|
||||||
-
|
-
|
||||||
- GtkToggleButton *bark_button;
|
- GtkToggleButton *click_button;
|
||||||
- GtkToggleButton *drip_button;
|
- GtkToggleButton *hum_button;
|
||||||
- GtkToggleButton *glass_button;
|
- GtkToggleButton *string_button;
|
||||||
- GtkToggleButton *sonar_button;
|
- GtkToggleButton *swing_button;
|
||||||
-
|
-
|
||||||
- GSoundContext *context;
|
- GSoundContext *context;
|
||||||
- GSettings *sound_settings;
|
- GSettings *sound_settings;
|
||||||
|
@ -221,24 +221,24 @@ index 0cdae3c..0000000
|
||||||
-clicked_cb (CcAlertChooser *self,
|
-clicked_cb (CcAlertChooser *self,
|
||||||
- GtkToggleButton *button)
|
- GtkToggleButton *button)
|
||||||
-{
|
-{
|
||||||
- if (button == self->bark_button)
|
- if (button == self->click_button)
|
||||||
- select_sound (self, "bark");
|
- select_sound (self, "click");
|
||||||
- else if (button == self->drip_button)
|
- else if (button == self->hum_button)
|
||||||
- select_sound (self, "drip");
|
- select_sound (self, "hum");
|
||||||
- else if (button == self->glass_button)
|
- else if (button == self->string_button)
|
||||||
- select_sound (self, "glass");
|
- select_sound (self, "string");
|
||||||
- else if (button == self->sonar_button)
|
- else if (button == self->swing_button)
|
||||||
- select_sound (self, "sonar");
|
- select_sound (self, "swing");
|
||||||
-
|
-
|
||||||
- set_button (self, button, TRUE);
|
- set_button (self, button, TRUE);
|
||||||
- if (button != self->bark_button)
|
- if (button != self->click_button)
|
||||||
- set_button (self, self->bark_button, FALSE);
|
- set_button (self, self->click_button, FALSE);
|
||||||
- if (button != self->drip_button)
|
- if (button != self->hum_button)
|
||||||
- set_button (self, self->drip_button, FALSE);
|
- set_button (self, self->hum_button, FALSE);
|
||||||
- if (button != self->glass_button)
|
- if (button != self->string_button)
|
||||||
- set_button (self, self->glass_button, FALSE);
|
- set_button (self, self->string_button, FALSE);
|
||||||
- if (button != self->sonar_button)
|
- if (button != self->swing_button)
|
||||||
- set_button (self, self->sonar_button, FALSE);
|
- set_button (self, self->swing_button, FALSE);
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-static void
|
-static void
|
||||||
|
@ -262,10 +262,10 @@ index 0cdae3c..0000000
|
||||||
-
|
-
|
||||||
- gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/sound/cc-alert-chooser.ui");
|
- gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/sound/cc-alert-chooser.ui");
|
||||||
-
|
-
|
||||||
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, bark_button);
|
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, click_button);
|
||||||
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, drip_button);
|
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, hum_button);
|
||||||
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, glass_button);
|
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, string_button);
|
||||||
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, sonar_button);
|
- gtk_widget_class_bind_template_child (widget_class, CcAlertChooser, swing_button);
|
||||||
-
|
-
|
||||||
- gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
|
- gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
|
||||||
-}
|
-}
|
||||||
|
@ -287,14 +287,26 @@ index 0cdae3c..0000000
|
||||||
- self->sound_settings = g_settings_new (KEY_SOUNDS_SCHEMA);
|
- self->sound_settings = g_settings_new (KEY_SOUNDS_SCHEMA);
|
||||||
-
|
-
|
||||||
- alert_name = get_alert_name ();
|
- alert_name = get_alert_name ();
|
||||||
- if (g_strcmp0 (alert_name, "bark") == 0)
|
-
|
||||||
- set_button (self, self->bark_button, TRUE);
|
- /* If user has selected an old sound alert, migrate them to click. */
|
||||||
- else if (g_strcmp0 (alert_name, "drip") == 0)
|
- if (g_strcmp0 (alert_name, "click") != 0 &&
|
||||||
- set_button (self, self->drip_button, TRUE);
|
- g_strcmp0 (alert_name, "hum") != 0 &&
|
||||||
- else if (g_strcmp0 (alert_name, "glass") == 0)
|
- g_strcmp0 (alert_name, "string") != 0 &&
|
||||||
- set_button (self, self->glass_button, TRUE);
|
- g_strcmp0 (alert_name, "swing") != 0)
|
||||||
- else if (g_strcmp0 (alert_name, "sonar") == 0)
|
- {
|
||||||
- set_button (self, self->sonar_button, TRUE);
|
- set_custom_theme (self, "click");
|
||||||
|
- g_free (alert_name);
|
||||||
|
- alert_name = g_strdup ("click");
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (g_strcmp0 (alert_name, "click") == 0)
|
||||||
|
- set_button (self, self->click_button, TRUE);
|
||||||
|
- else if (g_strcmp0 (alert_name, "hum") == 0)
|
||||||
|
- set_button (self, self->hum_button, TRUE);
|
||||||
|
- else if (g_strcmp0 (alert_name, "string") == 0)
|
||||||
|
- set_button (self, self->string_button, TRUE);
|
||||||
|
- else if (g_strcmp0 (alert_name, "swing") == 0)
|
||||||
|
- set_button (self, self->swing_button, TRUE);
|
||||||
- else if (alert_name != NULL)
|
- else if (alert_name != NULL)
|
||||||
- g_warning ("Current alert sound has unknown name %s", alert_name);
|
- g_warning ("Current alert sound has unknown name %s", alert_name);
|
||||||
-}
|
-}
|
||||||
|
@ -334,7 +346,7 @@ index c6f4b87..0000000
|
||||||
-G_END_DECLS
|
-G_END_DECLS
|
||||||
diff --git a/panels/sound/cc-alert-chooser.ui b/panels/sound/cc-alert-chooser.ui
|
diff --git a/panels/sound/cc-alert-chooser.ui b/panels/sound/cc-alert-chooser.ui
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index d6933f9..0000000
|
index 603aff9..0000000
|
||||||
--- a/panels/sound/cc-alert-chooser.ui
|
--- a/panels/sound/cc-alert-chooser.ui
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,41 +0,0 @@
|
@@ -1,41 +0,0 @@
|
||||||
|
@ -347,33 +359,33 @@ index d6933f9..0000000
|
||||||
- <class name="linked"/>
|
- <class name="linked"/>
|
||||||
- </style>
|
- </style>
|
||||||
- <child>
|
- <child>
|
||||||
- <object class="GtkToggleButton" id="bark_button">
|
- <object class="GtkToggleButton" id="click_button">
|
||||||
- <property name="visible">True</property>
|
- <property name="visible">True</property>
|
||||||
- <property name="label" translatable="yes">Bark</property>
|
- <property name="label" translatable="yes">Click</property>
|
||||||
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
||||||
- </object>
|
- </object>
|
||||||
- </child>
|
- </child>
|
||||||
- <child>
|
- <child>
|
||||||
- <object class="GtkToggleButton" id="drip_button">
|
- <object class="GtkToggleButton" id="string_button">
|
||||||
- <property name="visible">True</property>
|
- <property name="visible">True</property>
|
||||||
- <property name="group">bark_button</property>
|
- <property name="group">click_button</property>
|
||||||
- <property name="label" translatable="yes">Drip</property>
|
- <property name="label" translatable="yes">String</property>
|
||||||
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
||||||
- </object>
|
- </object>
|
||||||
- </child>
|
- </child>
|
||||||
- <child>
|
- <child>
|
||||||
- <object class="GtkToggleButton" id="glass_button">
|
- <object class="GtkToggleButton" id="swing_button">
|
||||||
- <property name="visible">True</property>
|
- <property name="visible">True</property>
|
||||||
- <property name="group">bark_button</property>
|
- <property name="group">click_button</property>
|
||||||
- <property name="label" translatable="yes">Glass</property>
|
- <property name="label" translatable="yes">Swing</property>
|
||||||
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
||||||
- </object>
|
- </object>
|
||||||
- </child>
|
- </child>
|
||||||
- <child>
|
- <child>
|
||||||
- <object class="GtkToggleButton" id="sonar_button">
|
- <object class="GtkToggleButton" id="hum_button">
|
||||||
- <property name="visible">True</property>
|
- <property name="visible">True</property>
|
||||||
- <property name="group">bark_button</property>
|
- <property name="group">click_button</property>
|
||||||
- <property name="label" translatable="yes">Sonar</property>
|
- <property name="label" translatable="yes">Hum</property>
|
||||||
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
- <signal name="clicked" handler="clicked_cb" object="CcAlertChooser" swapped="yes"/>
|
||||||
- </object>
|
- </object>
|
||||||
- </child>
|
- </child>
|
||||||
|
@ -400,10 +412,10 @@ index 0de1ca9..9d9b9c7 100644
|
||||||
g_type_ensure (CC_TYPE_DEVICE_COMBO_BOX);
|
g_type_ensure (CC_TYPE_DEVICE_COMBO_BOX);
|
||||||
g_type_ensure (CC_TYPE_FADE_SLIDER);
|
g_type_ensure (CC_TYPE_FADE_SLIDER);
|
||||||
diff --git a/panels/sound/cc-sound-panel.ui b/panels/sound/cc-sound-panel.ui
|
diff --git a/panels/sound/cc-sound-panel.ui b/panels/sound/cc-sound-panel.ui
|
||||||
index dadf96a..b30b954 100644
|
index 33b6dbb..9fab184 100644
|
||||||
--- a/panels/sound/cc-sound-panel.ui
|
--- a/panels/sound/cc-sound-panel.ui
|
||||||
+++ b/panels/sound/cc-sound-panel.ui
|
+++ b/panels/sound/cc-sound-panel.ui
|
||||||
@@ -307,16 +307,6 @@
|
@@ -322,16 +322,6 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@ -421,7 +433,7 @@ index dadf96a..b30b954 100644
|
||||||
</child>
|
</child>
|
||||||
</template>
|
</template>
|
||||||
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
|
diff --git a/panels/sound/meson.build b/panels/sound/meson.build
|
||||||
index dd8d0b6..6367db2 100644
|
index 458377d..28149f6 100644
|
||||||
--- a/panels/sound/meson.build
|
--- a/panels/sound/meson.build
|
||||||
+++ b/panels/sound/meson.build
|
+++ b/panels/sound/meson.build
|
||||||
@@ -30,7 +30,6 @@ cflags += [
|
@@ -30,7 +30,6 @@ cflags += [
|
||||||
|
|
Loading…
Reference in a new issue