aboutsummaryrefslogtreecommitdiff
path: root/src/menubar.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-03-02 12:30:24 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-03-02 12:49:45 +0100
commitc68179729de67ad4879613141699dcba35073a26 (patch)
treef96da5f86e60a973d87853eaf817c027ec94277e /src/menubar.vala
parentf2eeb8a1bb87b3d055b602d7ee201785ba4f8db4 (diff)
downloadarctica-greeter-c68179729de67ad4879613141699dcba35073a26.tar.gz
arctica-greeter-c68179729de67ad4879613141699dcba35073a26.tar.bz2
arctica-greeter-c68179729de67ad4879613141699dcba35073a26.zip
OSK: Add OSK theme gsetting to individually configure the OSK theme used via ArcticaGreeter's settings.
Diffstat (limited to 'src/menubar.vala')
-rw-r--r--src/menubar.vala19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index 87e0bf7..d9dab66 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -538,14 +538,21 @@ public class MenuBar : Gtk.MenuBar
string[] argv;
string cmd;
int onboard_stdout_fd;
- var layout = AGSettings.get_string (AGSettings.KEY_ONSCREEN_KEYBOARD_LAYOUT);
- var file = File.new_for_path ("/usr/share/onboard/layouts/%s.onboard".printf (layout));
- if (file.query_exists ()) {
- cmd = "onboard --xid --layout='/usr/share/onboard/layouts/%s.onboard'".printf (layout);
+ var arg_layout = "";
+ var arg_theme = "";
+ var layout = AGSettings.get_string (AGSettings.KEY_ONSCREEN_KEYBOARD_LAYOUT);
+ var theme = AGSettings.get_string (AGSettings.KEY_ONSCREEN_KEYBOARD_THEME);
+ var fname_layout = "/usr/share/onboard/layouts/%s.onboard".printf (layout);
+ var fname_theme = "/usr/share/onboard/themes/%s.theme".printf (theme);
+ var file_layout = File.new_for_path (fname_layout);
+ var file_theme = File.new_for_path (fname_theme);
+ if (file_layout.query_exists ()) {
+ arg_layout = "--layout='%s'".printf (fname_layout);
}
- else {
- cmd = "onboard --xid";
+ if (file_theme.query_exists ()) {
+ arg_theme = "--theme='%s'".printf (fname_theme);
}
+ cmd = "onboard --xid %s %s".printf (arg_layout, arg_theme);
Shell.parse_argv (cmd, out argv);
Process.spawn_async_with_pipes (null,
argv,