From 6c63bfe2a613868e039c1c04d17429298dbd0653 Mon Sep 17 00:00:00 2001 From: papajoker Date: Sun, 24 Nov 2019 19:08:24 +0100 Subject: [PATCH] add gnome switch layout --- launch.sh | 2 +- src/manjaro_hello.py | 8 ++++++++ ui/manjaro-hello.glade | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/launch.sh b/launch.sh index 7200f96..243ae3e 100755 --- a/launch.sh +++ b/launch.sh @@ -2,7 +2,7 @@ # Script to generate mo files in a temp locale folder # Use it only for testing purpose export PLUGIN_HELLO=True -export PYTHONPATH="/home/fh/Data/projects/application-utility" +export PYTHONPATH="$HOME/test/gnome-layout-switcher/bin:$HOME/Data/projects/application-utility" rm -rf locale mkdir locale cd po diff --git a/src/manjaro_hello.py b/src/manjaro_hello.py index 0837857..af88ac8 100644 --- a/src/manjaro_hello.py +++ b/src/manjaro_hello.py @@ -23,6 +23,7 @@ except ModuleNotFoundError as e: APPS_PLUGIN = False print(f"Warning: Application Browser plugin not found : {e}") + gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GdkPixbuf @@ -110,6 +111,13 @@ class Hello(Gtk.Window): # create page install Applications self.builder.get_object("stack").add_named(app_browser, "appBrowserpage") self.builder.get_object("appBrowser").set_visible(True) + try: + from layoutswitcherlib.layoutsbox import LayoutBox + app_layout = LayoutBox(self, usehello=True) + self.builder.get_object("stack").add_named(app_layout, "appLayoutspage") + self.builder.get_object("appLayouts").set_visible(True) # show btn in UI + except ModuleNotFoundError as e: + print(f"Info: Application Gnome Layout Switcher plugin not found : {e}") self.window.show() diff --git a/ui/manjaro-hello.glade b/ui/manjaro-hello.glade index e06be9d..519b181 100644 --- a/ui/manjaro-hello.glade +++ b/ui/manjaro-hello.glade @@ -511,6 +511,14 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we Common application selection + + Layouts switcher + appLayouts + False + True + Manjaro Gnone config tool + + 1 8