add gnome switch layout

plugins
papajoker 2019-11-24 19:08:24 +01:00
parent 7687a57279
commit 6c63bfe2a6
3 changed files with 17 additions and 1 deletions

View File

@ -2,7 +2,7 @@
# Script to generate mo files in a temp locale folder # Script to generate mo files in a temp locale folder
# Use it only for testing purpose # Use it only for testing purpose
export PLUGIN_HELLO=True 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 rm -rf locale
mkdir locale mkdir locale
cd po cd po

View File

@ -23,6 +23,7 @@ except ModuleNotFoundError as e:
APPS_PLUGIN = False APPS_PLUGIN = False
print(f"Warning: Application Browser plugin not found : {e}") print(f"Warning: Application Browser plugin not found : {e}")
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GdkPixbuf from gi.repository import Gtk, GdkPixbuf
@ -110,6 +111,13 @@ class Hello(Gtk.Window):
# create page install Applications # create page install Applications
self.builder.get_object("stack").add_named(app_browser, "appBrowserpage") self.builder.get_object("stack").add_named(app_browser, "appBrowserpage")
self.builder.get_object("appBrowser").set_visible(True) 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() self.window.show()

View File

@ -511,6 +511,14 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
<property name="tooltip_text" translatable="yes">Common application selection</property> <property name="tooltip_text" translatable="yes">Common application selection</property>
<signal name="clicked" handler="on_btn_clicked" swapped="no"/> <signal name="clicked" handler="on_btn_clicked" swapped="no"/>
</object> </object>
<object class="GtkButton" id="appLayouts">
<property name="label" translatable="yes">Layouts switcher</property>
<property name="name">appLayouts</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Manjaro Gnone config tool</property>
<signal name="clicked" handler="on_btn_clicked" swapped="no"/>
</object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="top_attach">8</property> <property name="top_attach">8</property>