Merge branch 'master' into 'master'

Fix 41/42

Closes #41 e #42

See merge request applications/manjaro-hello!96
This commit is contained in:
Stefano Capitani
2024-05-01 20:01:14 +00:00
4 changed files with 16 additions and 36 deletions
-1
View File
@@ -15,7 +15,6 @@
"style_path": "/usr/share/manjaro-hello/ui/style.css",
"urls": {
"development": "https://gitlab.manjaro.org",
"software": "https://software.manjaro.org/",
"donate": "https://manjaro.org/donate",
"facebook": "https://www.facebook.com/ManjaroLinux",
"forum": "https://forum.manjaro.org",
-4
View File
@@ -69,10 +69,6 @@ msgstr ""
msgid "Forums"
msgstr ""
#: ../ui/manjaro-hello.glade:207
msgid "Software"
msgstr ""
#: ../ui/manjaro-hello.glade:224
msgid "Mailing lists"
msgstr ""
Regular → Executable
+13 -11
View File
@@ -119,17 +119,21 @@ class Hello(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Manjaro Hello", border_width=6)
self.app = "manjaro-hello"
self.dev = "--dev" in sys.argv # Dev mode activated ?
screen = Gdk.Screen.get_default()
# Load preferences
self.dev = "--dev" in sys.argv
if self.dev:
self.preferences = read_json("data/preferences.json")
self.preferences["data_path"] = "data/"
self.preferences["desktop_path"] = os.getcwd() + f"/{self.app}.desktop"
self.preferences["locale_path"] = "locale/"
self.preferences["ui_path"] = f"ui/{self.app}.glade"
self.preferences["style_path"] = f"ui/style.css"
# dont load hardcoded path in devmode
path = os.getcwd()
parent = os.path.abspath(os.path.join(path, os.pardir))
data = f"{parent}/data/"
ui = f"{parent}/ui/"
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:
self.preferences = read_json(f"/usr/share/{self.app}/data/preferences.json")
# Get saved infos
@@ -266,13 +270,12 @@ class Hello(Gtk.Window):
"label": {
"autostartlabel",
"development",
"software",
"donate",
"firstcategory",
"forum",
"install",
"installlabel",
"rescue" ,
"rescue",
"involved",
"mailling",
"readme",
@@ -286,7 +289,6 @@ class Hello(Gtk.Window):
"tooltip_text": {
"about",
"development",
"software",
"donate",
"forum",
"mailling",
+3 -20
View File
@@ -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>
</packing>
</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>
<object class="GtkButton" id="mailling">
<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"/>
</object>
<packing>
<property name="left-attach">1</property>
<property name="left-attach">2</property>
<property name="top-attach">7</property>
</packing>
</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"/>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">7</property>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>