Merge branch 'master' into 'master'
Fix 41/42 Closes #41 e #42 See merge request applications/manjaro-hello!96
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
"style_path": "/usr/share/manjaro-hello/ui/style.css",
|
"style_path": "/usr/share/manjaro-hello/ui/style.css",
|
||||||
"urls": {
|
"urls": {
|
||||||
"development": "https://gitlab.manjaro.org",
|
"development": "https://gitlab.manjaro.org",
|
||||||
"software": "https://software.manjaro.org/",
|
|
||||||
"donate": "https://manjaro.org/donate",
|
"donate": "https://manjaro.org/donate",
|
||||||
"facebook": "https://www.facebook.com/ManjaroLinux",
|
"facebook": "https://www.facebook.com/ManjaroLinux",
|
||||||
"forum": "https://forum.manjaro.org",
|
"forum": "https://forum.manjaro.org",
|
||||||
|
|||||||
@@ -69,10 +69,6 @@ msgstr ""
|
|||||||
msgid "Forums"
|
msgid "Forums"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../ui/manjaro-hello.glade:207
|
|
||||||
msgid "Software"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../ui/manjaro-hello.glade:224
|
#: ../ui/manjaro-hello.glade:224
|
||||||
msgid "Mailing lists"
|
msgid "Mailing lists"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
Regular → Executable
+12
-10
@@ -119,17 +119,21 @@ class Hello(Gtk.Window):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
Gtk.Window.__init__(self, title="Manjaro Hello", border_width=6)
|
Gtk.Window.__init__(self, title="Manjaro Hello", border_width=6)
|
||||||
self.app = "manjaro-hello"
|
self.app = "manjaro-hello"
|
||||||
self.dev = "--dev" in sys.argv # Dev mode activated ?
|
|
||||||
screen = Gdk.Screen.get_default()
|
screen = Gdk.Screen.get_default()
|
||||||
|
|
||||||
# Load preferences
|
self.dev = "--dev" in sys.argv
|
||||||
if self.dev:
|
if self.dev:
|
||||||
self.preferences = read_json("data/preferences.json")
|
# dont load hardcoded path in devmode
|
||||||
self.preferences["data_path"] = "data/"
|
path = os.getcwd()
|
||||||
self.preferences["desktop_path"] = os.getcwd() + f"/{self.app}.desktop"
|
parent = os.path.abspath(os.path.join(path, os.pardir))
|
||||||
self.preferences["locale_path"] = "locale/"
|
data = f"{parent}/data/"
|
||||||
self.preferences["ui_path"] = f"ui/{self.app}.glade"
|
ui = f"{parent}/ui/"
|
||||||
self.preferences["style_path"] = f"ui/style.css"
|
self.preferences = read_json(f"{data}preferences.json")
|
||||||
|
self.preferences["data_path"] = f"{data}"
|
||||||
|
self.preferences["desktop_path"] = f"{parent}/{self.app}.desktop"
|
||||||
|
self.preferences["locale_path"] = f"{parent}/locale/"
|
||||||
|
self.preferences["ui_path"] = f"{ui}{self.app}.glade"
|
||||||
|
self.preferences["style_path"] = f"{ui}style.css"
|
||||||
else:
|
else:
|
||||||
self.preferences = read_json(f"/usr/share/{self.app}/data/preferences.json")
|
self.preferences = read_json(f"/usr/share/{self.app}/data/preferences.json")
|
||||||
# Get saved infos
|
# Get saved infos
|
||||||
@@ -266,7 +270,6 @@ class Hello(Gtk.Window):
|
|||||||
"label": {
|
"label": {
|
||||||
"autostartlabel",
|
"autostartlabel",
|
||||||
"development",
|
"development",
|
||||||
"software",
|
|
||||||
"donate",
|
"donate",
|
||||||
"firstcategory",
|
"firstcategory",
|
||||||
"forum",
|
"forum",
|
||||||
@@ -286,7 +289,6 @@ class Hello(Gtk.Window):
|
|||||||
"tooltip_text": {
|
"tooltip_text": {
|
||||||
"about",
|
"about",
|
||||||
"development",
|
"development",
|
||||||
"software",
|
|
||||||
"donate",
|
"donate",
|
||||||
"forum",
|
"forum",
|
||||||
"mailling",
|
"mailling",
|
||||||
|
|||||||
+3
-20
@@ -198,23 +198,6 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
|||||||
<property name="top-attach">5</property>
|
<property name="top-attach">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="software">
|
|
||||||
<property name="always-show-image">True</property>
|
|
||||||
<property name="can-focus">False</property>
|
|
||||||
<property name="image-position">right</property>
|
|
||||||
<property name="label" translatable="yes">Software</property>
|
|
||||||
<property name="name">software</property>
|
|
||||||
<property name="receives-default">True</property>
|
|
||||||
<property name="tooltip-text" translatable="yes">Web resource</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<signal name="clicked" handler="on_link_clicked" swapped="yes"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">6</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="mailling">
|
<object class="GtkButton" id="mailling">
|
||||||
<property name="always-show-image">True</property>
|
<property name="always-show-image">True</property>
|
||||||
@@ -228,7 +211,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
|||||||
<signal name="clicked" handler="on_link_clicked" swapped="yes"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="yes"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">1</property>
|
<property name="left-attach">2</property>
|
||||||
<property name="top-attach">7</property>
|
<property name="top-attach">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@@ -262,8 +245,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
|||||||
<signal name="clicked" handler="on_link_clicked" swapped="yes"/>
|
<signal name="clicked" handler="on_link_clicked" swapped="yes"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left-attach">2</property>
|
<property name="left-attach">1</property>
|
||||||
<property name="top-attach">7</property>
|
<property name="top-attach">6</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|||||||
Reference in New Issue
Block a user