[dconf-editor] Add an unused signal.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Add an unused signal.
- Date: Sun, 4 Aug 2019 10:33:47 +0000 (UTC)
commit 6f42a7af7ff39b60c2577f1eab22fbf03d425a69
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun Aug 4 12:32:44 2019 +0200
Add an unused signal.
Sync a bit with Taquin.
editor/adaptative-window.vala | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/editor/adaptative-window.vala b/editor/adaptative-window.vala
index 7f60d13..b33e679 100644
--- a/editor/adaptative-window.vala
+++ b/editor/adaptative-window.vala
@@ -412,6 +412,8 @@ private abstract class AdaptativeWindow : ApplicationWindow
* * manage high-constrast
\*/
+ internal signal void gtk_theme_changed ();
+
private void manage_high_contrast ()
{
Gtk.Settings? nullable_gtk_settings = Gtk.Settings.get_default ();
@@ -420,18 +422,19 @@ private abstract class AdaptativeWindow : ApplicationWindow
Gtk.Settings gtk_settings = (!) nullable_gtk_settings;
gtk_settings.notify ["gtk-theme-name"].connect (update_highcontrast_state);
- _update_highcontrast_state (gtk_settings);
+ _update_highcontrast_state (gtk_settings.gtk_theme_name);
}
private void update_highcontrast_state (Object gtk_settings, ParamSpec unused)
{
- _update_highcontrast_state ((Gtk.Settings) gtk_settings);
+ _update_highcontrast_state (((Gtk.Settings) gtk_settings).gtk_theme_name);
+ gtk_theme_changed ();
}
private bool highcontrast_state = false;
- private void _update_highcontrast_state (Gtk.Settings gtk_settings)
+ private void _update_highcontrast_state (string theme_name)
{
- bool highcontrast_new_state = "HighContrast" in gtk_settings.gtk_theme_name;
+ bool highcontrast_new_state = "HighContrast" in theme_name;
if (highcontrast_new_state == highcontrast_state)
return;
highcontrast_state = highcontrast_new_state;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]