diff options
author | Mihai Moldovan <ionic@ionic.de> | 2023-10-06 12:05:57 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2023-10-06 12:05:57 +0200 |
commit | fc424c81c3a4e305cdcd35c80a7b7cea800433c4 (patch) | |
tree | 9a58fc4673fad0e1d13f0cab47e701fe0d3c59dd /src | |
parent | adfa1f3b9b566127eb0dc5b1f96a8ddf1b4b5693 (diff) | |
parent | 975dafd6bd5e74cf983d6087765eeed14575b0c5 (diff) | |
download | arctica-greeter-fc424c81c3a4e305cdcd35c80a7b7cea800433c4.tar.gz arctica-greeter-fc424c81c3a4e305cdcd35c80a7b7cea800433c4.tar.bz2 arctica-greeter-fc424c81c3a4e305cdcd35c80a7b7cea800433c4.zip |
Merge branch 'sunweaver-mr/drop-big-font-code'
Attributes GH PR #82: https://github.com/ArcticaProject/arctica-greeter/pull/82
Diffstat (limited to 'src')
-rw-r--r-- | src/arctica-greeter.vala | 38 | ||||
-rw-r--r-- | src/settings.vala | 18 |
2 files changed, 6 insertions, 50 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 16b8a16..fc6f0cc 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -34,7 +34,6 @@ public class ArcticaGreeter : Object public Gtk.Window? pKeyboardWindow { get; set; default = null; } public bool test_mode { get; construct; default = false; } public bool test_highcontrast { get; construct; default = false; } - public bool test_bigfont { get; construct; default = false; } private string state_file; private KeyFile state; private DBusServer pServer; @@ -127,12 +126,10 @@ public class ArcticaGreeter : Object * additionally avoid changing it in later calls of our constructor. */ public ArcticaGreeter (bool test_mode_ = false, - bool test_highcontrast_ = false, - bool test_bigfont_ = false) + bool test_highcontrast_ = false) { Object (test_mode: test_mode_, - test_highcontrast: test_highcontrast_, - test_bigfont: test_bigfont_ + test_highcontrast: test_highcontrast_ ); } @@ -429,10 +426,8 @@ public class ArcticaGreeter : Object var agsettings = new AGSettings (); if (!test_mode) { agsettings.high_contrast = !(!(agsettings.high_contrast)); - agsettings.big_font = !(!(agsettings.big_font)); } else { agsettings.high_contrast = test_highcontrast; - agsettings.big_font = test_bigfont; } /* @@ -459,17 +454,6 @@ public class ArcticaGreeter : Object return true; }); - Timeout.add_full (GLib.Priority.HIGH_IDLE, 302, () => { - var agsettings_intimer = new AGSettings (); - /* - if (0 == GLib.Random.int_range (0, 10)) { - debug ("Syncing up big font value via timer: %s", agsettings_intimer.big_font.to_string ()); - } - */ - switch_font (agsettings_intimer.big_font); - - return true; - }); return false; } @@ -660,11 +644,6 @@ public class ArcticaGreeter : Object // debug ("Time passed: %" + int64.FORMAT + " s, %" + int64.FORMAT + " ms, %" + int64.FORMAT + " us", time_diff_sec, time_diff_msec, time_diff_usec); } - public void switch_font (bool big) - { - iterate_children_generic (main_window, switch_generic, "big_font", big); - } - private Gdk.FilterReturn focus_upon_map (Gdk.XEvent gxevent, Gdk.Event event) { var xevent = (X.Event*)gxevent; @@ -961,7 +940,6 @@ public class ArcticaGreeter : Object bool do_show_version = false; bool do_test_mode = false; bool do_test_highcontrast = false; - bool do_test_bigfont = false; OptionEntry versionOption = { "version", 'v', 0, OptionArg.NONE, ref do_show_version, /* Help string for command line --version flag */ @@ -972,17 +950,16 @@ public class ArcticaGreeter : Object OptionEntry highcontrastOption = { "test-highcontrast", 0, 0, OptionArg.NONE, ref do_test_highcontrast, /* Help string for command line --test-highcontrast flag */ N_("Run in test mode with a11y highcontrast theme enabled"), null }; - OptionEntry bigfontOption = { "test-bigfont", 0, 0, OptionArg.NONE, ref do_test_bigfont, - /* Help string for command line --test-bigfont flag */ - N_("Run in test mode with a11y big font feature enabled"), null }; OptionEntry nullOption = { null }; - OptionEntry[] options = { versionOption, testOption, highcontrastOption, bigfontOption, nullOption }; + OptionEntry[] options = { versionOption, testOption, highcontrastOption, nullOption }; debug ("Loading command line options"); var c = new OptionContext (/* Arguments and description for --help text */ _("- Arctica Greeter")); + c.add_main_entries (options, Config.GETTEXT_PACKAGE); c.add_group (Gtk.get_option_group (true)); + try { c.parse (ref args); @@ -1020,9 +997,6 @@ public class ArcticaGreeter : Object if (do_test_highcontrast) { debug ("Switching on highcontrast theme for test mode"); } - if (do_test_bigfont) { - debug ("Switching on big font feature for test mode"); - } } if (!do_test_mode) { @@ -1144,7 +1118,7 @@ public class ArcticaGreeter : Object settings.set ("gtk-xft-rgba", value, null); debug ("Creating Arctica Greeter"); - var greeter = new ArcticaGreeter (do_test_mode, do_test_highcontrast, do_test_bigfont); + var greeter = new ArcticaGreeter (do_test_mode, do_test_highcontrast); greeter.go(); Pid nmapplet_pid = 0; diff --git a/src/settings.vala b/src/settings.vala index efc72f2..c5d59ca 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -52,7 +52,6 @@ public class AGSettings : Object public const string KEY_ONSCREEN_KEYBOARD_THEME = "onscreen-keyboard-theme"; public const string KEY_HIGH_CONTRAST_ONSCREEN_KEYBOARD_THEME = "high-contrast-onscreen-keyboard-theme"; public const string KEY_HIGH_CONTRAST = "high-contrast"; - public const string KEY_BIG_FONT = "big-font"; public const string KEY_SCREEN_READER = "screen-reader"; public const string KEY_PLAY_READY_SOUND = "play-ready-sound"; public const string KEY_INDICATORS = "indicators"; @@ -202,23 +201,6 @@ public class AGSettings : Object } } - public bool big_font { - get { - return this.big_font_; - } - - set { - this.big_font_ = value; - - /* Also sync back to dconf, so that this state is persistent. */ - set_boolean (AGSettings.KEY_BIG_FONT, value); - - var greeter = new ArcticaGreeter (); - greeter.switch_font (value); - } - } - private const string SCHEMA = "org.ArcticaProject.arctica-greeter"; private bool high_contrast_ = AGSettings.get_boolean (AGSettings.KEY_HIGH_CONTRAST); - private bool big_font_ = AGSettings.get_boolean (AGSettings.KEY_BIG_FONT); } |