diff --git a/.gitignore b/.gitignore
index d039e80..ad9e557 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
**/locale/*/
-messagingmenu@lauinger-clan.de.zip*
+messagingmenu@lauinger-clan.de.zip
+messagingmenu@lauinger-clan.de.shell-extension.zip
gschemas.compiled
-messagingmenu\@lauinger-clan.de/.prettierrc
-
-
+.prettierrc
+*.mo
+*.po~
+.editorconfig
diff --git a/Makefile b/Makefile
index 382c766..ec34fb3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#=============================================================================
-UUID=messagingmenu@screenfreeze.net
+UUID=messagingmenu@lauinger-clan.de
# GitHub doesn't accept @ in filesnames:
-GHID=messagingmenu.screenfreeze.net
+GHID=messagingmenu.lauinger-clan.de
NAME=messagingmenu
FILES=metadata.json *.js stylesheet.css schemas icons locale/**/ LICENSE.txt
INSTALLDIR=$(HOME)/.local/share/gnome-shell/extensions
@@ -23,17 +23,14 @@ install: zip
uninstall:
rm -r $(INSTALLDIR)/$(UUID)
-all: clean locales schemas
+all: schemas pack
clean:
rm -f $(GHID).zip* $(UUID)/schemas/gschemas.compiled $(UUID)/LICENSE.txt
rm -rf $(UUID)/locale/**/
-locales: $(MSGOBJS)
-
-$(UUID)/locale/%/LC_MESSAGES/$(NAME).mo: po/%.po
- mkdir -p $(dir $@)
- msgfmt -c -o $@ po/$*.po
+locales:
+ sh update-translation-po-files.sh
schemas: $(UUID)/schemas/
glib-compile-schemas $(UUID)/schemas
@@ -43,3 +40,6 @@ $(UUID)/LICENSE.txt: LICENSE.txt
zip: all $(UUID)/LICENSE.txt
cd $(UUID); zip -rq ../$(GHID).zip $(FILES:%=./%)
+
+pack: $(UUID)
+ cd $(UUID);gnome-extensions pack --podir=../po/ --out-dir=../ --extra-source=prefs.ui --extra-source=\icons;cd ..;mv messagingmenu@lauinger-clan.de.shell-extension.zip messagingmenu\@lauinger-clan.de.zip
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..4c0e2f3
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+glib-compile-schemas messagingmenu\@lauinger-clan.de/schemas/
+
+cd messagingmenu\@lauinger-clan.de
+gnome-extensions pack --podir=../po/ --out-dir=../ --extra-source=prefs.ui --extra-source=\icons
+cd ..
+mv messagingmenu@lauinger-clan.de.shell-extension.zip messagingmenu@lauinger-clan.de.zip
+gnome-extensions install messagingmenu\@lauinger-clan.de.zip --force
+gnome-extensions enable messagingmenu\@lauinger-clan.de
diff --git a/menu_screenshot.png b/menu_screenshot.png
index fd1806c..bc97c99 100644
Binary files a/menu_screenshot.png and b/menu_screenshot.png differ
diff --git a/messagingmenu@lauinger-clan.de/extension.js b/messagingmenu@lauinger-clan.de/extension.js
index 8255285..6be7877 100644
--- a/messagingmenu@lauinger-clan.de/extension.js
+++ b/messagingmenu@lauinger-clan.de/extension.js
@@ -292,6 +292,15 @@ const MessageMenu = GObject.registerClass(
let newLauncher = new MessageMenuItem(mb_app);
this.menu.addMenuItem(newLauncher);
}
+
+ // Add an entry-point for settings
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ const settingsItem = this.menu.addAction(_("Settings"), () =>
+ ExtensionUtils.openPrefs()
+ );
+ // Ensure the settings are unavailable when the screen is locked
+ settingsItem.visible = Main.sessionMode.allowSettings;
+ this.menu._settingsActions[Me.uuid] = settingsItem;
}
_getAppsEMAIL(appsys) {
diff --git a/messagingmenu@lauinger-clan.de/metadata.json b/messagingmenu@lauinger-clan.de/metadata.json
index 3b98e88..eeff89b 100644
--- a/messagingmenu@lauinger-clan.de/metadata.json
+++ b/messagingmenu@lauinger-clan.de/metadata.json
@@ -11,6 +11,6 @@
"gettext-domain": "messagingmenu",
"description": "A Messaging Menu for the Gnome Shell. All Email and Chat Applications in one Place.",
"url": "https://github.com/ChrisLauinger77/messagingmenu",
-"version": 27,
+"version": 28,
"settings-schema": "org.gnome.shell.extensions.messagingmenu"
}
diff --git a/messagingmenu@lauinger-clan.de/prefs.js b/messagingmenu@lauinger-clan.de/prefs.js
index e32f0af..4d69ecc 100644
--- a/messagingmenu@lauinger-clan.de/prefs.js
+++ b/messagingmenu@lauinger-clan.de/prefs.js
@@ -1,11 +1,9 @@
const ExtensionUtils = imports.misc.extensionUtils;
const GObject = imports.gi.GObject;
-const Gtk = imports.gi.Gtk;
-
-const Gettext = imports.gettext.domain("gnome-shell-extensions");
-const _ = Gettext.gettext;
-
+const { Gtk } = imports.gi;
const Me = ExtensionUtils.getCurrentExtension();
+const Gettext = imports.gettext.domain("messagingmenu");
+const _ = Gettext.gettext;
let settings;
@@ -112,6 +110,7 @@ function createNotificationSettingsWidget() {
return vbox;
}
+// used until GNOME 42 (41 and before)
function buildPrefsWidget() {
let frame = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL,
@@ -131,6 +130,38 @@ function buildPrefsWidget() {
return frame;
}
+// used starting with GNOME 42
+function fillPreferencesWindow(window) {
+ let builder = Gtk.Builder.new();
+ builder.add_from_file(Me.path + "/prefs.ui");
+ let page = builder.get_object("messagingmenu_page");
+ window.add(page);
+
+ let email_setting_switch = builder.get_object("email_setting_switch");
+ email_setting_switch.set_active(settings.get_boolean("notify-email"));
+ email_setting_switch.connect("notify::active", function (button1) {
+ settings.set_boolean("notify-email", button1.active);
+ });
+ let chat_setting_switch = builder.get_object("chat_setting_switch");
+ chat_setting_switch.set_active(settings.get_boolean("notify-chat"));
+ chat_setting_switch.connect("notify::active", function (button2) {
+ settings.set_boolean("notify-chat", button2.active);
+ });
+ let mblogging_setting_switch = builder.get_object("mblogging_setting_switch");
+ mblogging_setting_switch.set_active(settings.get_boolean("notify-mblogging"));
+ mblogging_setting_switch.connect("notify::active", function (button3) {
+ settings.set_boolean("notify-mblogging", button3.active);
+ });
+ let color_setting_string = builder.get_object("color_setting_string");
+ color_setting_string.set_text(settings.get_string("color"));
+ color_setting_string.connect("notify::text", function (entry) {
+ // only save correct color hexcode
+ if (entry.text.length == 7 && entry.text.charAt(0) == "#") {
+ settings.set_string("color", entry.text);
+ }
+ });
+}
+
function init() {
ExtensionUtils.initTranslations("messagingmenu");
settings = ExtensionUtils.getSettings(
diff --git a/messagingmenu@lauinger-clan.de/prefs.ui b/messagingmenu@lauinger-clan.de/prefs.ui
new file mode 100644
index 0000000..58d10f3
--- /dev/null
+++ b/messagingmenu@lauinger-clan.de/prefs.ui
@@ -0,0 +1,57 @@
+
+
+
+
\ No newline at end of file
diff --git a/messagingmenu@lauinger-clan.de/schemas/org.gnome.shell.extensions.messagingmenu.gschema.xml b/messagingmenu@lauinger-clan.de/schemas/org.gnome.shell.extensions.messagingmenu.gschema.xml
index d88132b..29538de 100644
--- a/messagingmenu@lauinger-clan.de/schemas/org.gnome.shell.extensions.messagingmenu.gschema.xml
+++ b/messagingmenu@lauinger-clan.de/schemas/org.gnome.shell.extensions.messagingmenu.gschema.xml
@@ -1,40 +1,30 @@
-
-
-