gnome-shell-extensions tweak

This commit is contained in:
davedatum 2019-12-15 05:56:41 +00:00
parent 1bdbb49cc3
commit 8d0528ae57
32 changed files with 220 additions and 84 deletions

View File

@ -22,6 +22,7 @@
*
*/
const { Clutter, St } = imports.gi;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
@ -33,7 +34,10 @@ const Me = ExtensionUtils.getCurrentExtension();
const Lib = Me.imports.lib;
const SETTING_BLINK_RATE = 'blinkrate';
const SETTING_USECOLOR = 'usecolor';
const SETTING_COLOR = 'color';
const SETTING_USEBACKGROUNDCOLOR = 'usebackgroundcolor';
const SETTING_BACKGROUNDCOLOR = 'backgroundcolor';
const SETTING_CHAT_ONLY = 'chatonly';
const SETTING_FORCE = 'force';
const SETTING_BLACKLIST = 'application-list';
@ -73,7 +77,10 @@ function _MessageStyleHandler() {
// Connect settings change events, so we can update message style
// as soon as the user makes the change
this._connectSetting(SETTING_USECOLOR);
this._connectSetting(SETTING_COLOR);
this._connectSetting(SETTING_BACKGROUNDCOLOR);
this._connectSetting(SETTING_USEBACKGROUNDCOLOR);
this._connectSetting(SETTING_CHAT_ONLY);
this._connectSetting(SETTING_FORCE);
this._connectSetting(SETTING_BLINK_RATE);
@ -163,13 +170,18 @@ function _MessageStyleHandler() {
}
let dateMenu = Main.panel.statusArea.dateMenu;
let actualStyle = (dateMenu.actor.style) ? dateMenu.actor.style : "";
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
let actualStyle = (actor.style) ? actor.style : "";
let userStyle = "color: " + settings.get_string(SETTING_COLOR) + ";";
dateMenu.actor.style = (dateMenu.actor.style == this._oldStyle) ?
actualStyle.concat(userStyle) : this._oldStyle;
let userStyle = "";
if (settings.get_boolean(SETTING_USECOLOR)) {
userStyle += "color: " + settings.get_string(SETTING_COLOR) + ";";
}
if (settings.get_boolean(SETTING_USEBACKGROUNDCOLOR)) {
userStyle += "background-color: " + settings.get_string(SETTING_BACKGROUNDCOLOR) + ";";
}
actor.style = (actor.style == this._oldStyle) ? actualStyle.concat(userStyle) : this._oldStyle;
// keep looping
return true;
@ -183,7 +195,8 @@ function _MessageStyleHandler() {
let dateMenu = Main.panel.statusArea.dateMenu;
let loopDelay = settings.get_int(SETTING_BLINK_RATE);
this._oldStyle = dateMenu.actor.style;
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
this._oldStyle = actor.style;
this._hasStyleAdded = true;
if (loopDelay > 0) {
@ -207,7 +220,8 @@ function _MessageStyleHandler() {
}
let dateMenu = Main.panel.statusArea.dateMenu;
dateMenu.actor.style = this._oldStyle;
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
actor.style = this._oldStyle;
this._oldStyle = null;
}
@ -253,6 +267,9 @@ function init() {
}
function enable() {
if (MessageTray.Source.prototype.countUpdated == _countUpdated) {
return;
}
originalCountUpdated = MessageTray.Source.prototype.countUpdated;
originalDestroy = MessageTray.Source.prototype.destroy;

View File

@ -9,17 +9,15 @@ msgstr ""
"Project-Id-Version: gnome-shell-notifications-alert\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-15 11:35-0300\n"
"PO-Revision-Date: 2019-06-16 18:07+0200\n"
"PO-Revision-Date: 2019-11-15 20:45+0100\n"
"Last-Translator: Onno Giesmann <nutzer3105@gmail.com>\n"
"Language-Team: German <--->\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Generator: Gtranslator 3.32.1\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.4\n"
#: src/prefs.js:264
msgid "Add"
@ -36,7 +34,7 @@ msgstr "Benachrichtigungsfarbe"
#: src/prefs.js:195
msgid "Alert even if you set notifications to OFF on user menu (default: OFF)"
msgstr ""
"Benachrichtigen trotzdem anzeigen, auch wenn sie im Nutzermenü ausgeschaltet "
"Benachrichtigungen auch dann anzeigen, wenn sie im Nutzermenü ausgeschaltet "
"sind (Vorgabe: AUS)"
#: src/prefs.js:229
@ -53,7 +51,7 @@ msgstr "Anwendung für schwarze Liste"
#: src/prefs.js:180
msgid "Blink rate (in ms)"
msgstr "Blinkrate (in ms)"
msgstr "Blinkgeschwindigkeit (in ms)"
#: src/prefs.js:269
msgid "Choose an application to blacklist:"
@ -87,7 +85,9 @@ msgstr "Farbe, in der die Benachrichtigung im Nutzermenü erscheint"
#: src/prefs.js:181
msgid "The rate that the alert blinks, in ms. 0 means no blink (default: 800)"
msgstr "Rate des Blinkens in ms. Wert 0 bedeutet kein Blinken (Vorgabe: 800)"
msgstr ""
"Gibt an, mit welcher Geschwindigkeit der Alarm blinkt (in ms). Wert 0 "
"bedeutet kein Blinken (Vorgabe: 800)"
#: src/prefs.js:141
msgid "Whitelist"

View File

@ -1,22 +1,23 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Whenever there is an unread notification (e.g. chat messages), blinks the message in the user's menu with a color chosen by the user.\n\nNow configurable (3.4+ only)!! Alert color and blink rate can be changed on settings ;)\n\nIf you have any question, be sure to take a look at the FAQ:\nhttp://goo.gl/lmwtW\n\nCredits: The idea of painting the message on user's menu was borrowed from 'Pidgin Persistent Notification' extension by nemo. The code itself has some parts forked from 'Message Notifier' extension by barisione, 'Media player indicator' extension by eon and convenience.js from git.gnome.org/gnome-shell-extensions. The blink idea and it's initial code was written by hossman. The initial gnome 3.10 support was done by Anthony25. The filtering support was done by ilgarmehmetali",
"name": "Notifications Alert",
"_generated": "Generated by SweetTooth, do not edit",
"description": "Whenever there is an unread notification (e.g. chat messages), blinks the message in the user's menu with a color chosen by the user.\n\nNow configurable (3.4+ only)!! Alert color and blink rate can be changed on settings ;)\n\nIf you have any question, be sure to take a look at the FAQ:\nhttp://goo.gl/lmwtW\n\nCredits: The idea of painting the message on user's menu was borrowed from 'Pidgin Persistent Notification' extension by nemo. The code itself has some parts forked from 'Message Notifier' extension by barisione, 'Media player indicator' extension by eon and convenience.js from git.gnome.org/gnome-shell-extensions. The blink idea and it's initial code was written by hossman. The initial gnome 3.10 support was done by Anthony25. The filtering support was done by ilgarmehmetali",
"name": "Notifications Alert",
"original-authors": [
"Thiago Bellini"
],
],
"shell-version": [
"3.16",
"3.18",
"3.20",
"3.22",
"3.24",
"3.26",
"3.28",
"3.30",
"3.16",
"3.18",
"3.20",
"3.22",
"3.24",
"3.26",
"3.28",
"3.30",
"3.34",
"3.32"
],
"url": "https://github.com/hackedbellini/Gnome-Shell-Notifications-Alert",
"uuid": "notifications-alert-on-user-menu@hackedbellini.gmail.com",
"version": 38
],
"url": "https://github.com/bellini666/gnome-shell-notifications-alert",
"uuid": "notifications-alert-on-user-menu@hackedbellini.gmail.com",
"version": 41
}

View File

@ -173,6 +173,10 @@ function init() {
label: _("Alert color"),
help: _("The color used to paint the message on user's menu")
},
backgroundcolor: {
label: _("Alert background color"),
help: _("The background color used to paint the message on user's menu")
},
};
intSettings = {
@ -186,6 +190,14 @@ function init() {
};
boolSettings = {
usecolor: {
label: _("Use alert color"),
help: _("Use the alert color for alert blinks (default: ON)")
},
usebackgroundcolor: {
label: _("Use alert background color"),
help: _("Use the alert background color for alert blinks (default: OFF)")
},
chatonly: {
label: _("Only alert for chat notifications"),
help: _("Only chat notifications (like Empathy ones) will get alerted (default: OFF)")

View File

@ -16,11 +16,26 @@
<summary>Blink rate</summary>
<description>The rate that the alert blinks, in ms. 0 means no blink</description>
</key>
<key name="usecolor" type="b">
<default>true</default>
<summary>Use alert color</summary>
<description>Use the alert color for alert blinks</description>
</key>
<key name="color" type="s">
<default>'#ff0000'</default>
<summary>Alert color</summary>
<description>The color used to paint the message on user's menu</description>
</key>
<key name="usebackgroundcolor" type="b">
<default>false</default>
<summary>Use alert background color</summary>
<description>Use the alert background color for alert blinks</description>
</key>
<key name="backgroundcolor" type="s">
<default>'#ff0000'</default>
<summary>Alert background color</summary>
<description>The background color used to paint the message on user's menu</description>
</key>
<key name="application-list" type="as">
<default>[ ]</default>
<summary>Blacklist</summary>

View File

@ -1,3 +1,26 @@
3.34.2
======
* window-list, workspace-indicator: Exclude DESKTOP windows from previews
[Florian; !93]
* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97]
Contributors:
Florian Müllner, Willy Stadnick
Translators:
Stas Solovey [ru], Umarzuki Bin Mochlis Moktar [ms]
3.34.1
======
* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94]
Contributors:
Florian Müllner, Xiaoguang Wang
Translators:
Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da],
Yi-Jyun Pan [zh_TW]
3.34.0
======

View File

@ -1,17 +1,17 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Load shell themes from user directory.",
"extension-id": "user-theme",
"gettext-domain": "gnome-shell-extensions",
"name": "User Themes",
"_generated": "Generated by SweetTooth, do not edit",
"description": "Load shell themes from user directory.",
"extension-id": "user-theme",
"gettext-domain": "gnome-shell-extensions",
"name": "User Themes",
"original-authors": [
"john.stowers@gmail.com"
],
"settings-schema": "org.gnome.shell.extensions.user-theme",
],
"settings-schema": "org.gnome.shell.extensions.user-theme",
"shell-version": [
"3.34"
],
"url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions",
"uuid": "user-theme@gnome-shell-extensions.gcampax.github.com",
"version": 38
],
"url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions",
"uuid": "user-theme@gnome-shell-extensions.gcampax.github.com",
"version": 39
}

View File

@ -22,6 +22,7 @@
*
*/
const { Clutter, St } = imports.gi;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Main = imports.ui.main;
@ -33,7 +34,10 @@ const Me = ExtensionUtils.getCurrentExtension();
const Lib = Me.imports.lib;
const SETTING_BLINK_RATE = 'blinkrate';
const SETTING_USECOLOR = 'usecolor';
const SETTING_COLOR = 'color';
const SETTING_USEBACKGROUNDCOLOR = 'usebackgroundcolor';
const SETTING_BACKGROUNDCOLOR = 'backgroundcolor';
const SETTING_CHAT_ONLY = 'chatonly';
const SETTING_FORCE = 'force';
const SETTING_BLACKLIST = 'application-list';
@ -73,7 +77,10 @@ function _MessageStyleHandler() {
// Connect settings change events, so we can update message style
// as soon as the user makes the change
this._connectSetting(SETTING_USECOLOR);
this._connectSetting(SETTING_COLOR);
this._connectSetting(SETTING_BACKGROUNDCOLOR);
this._connectSetting(SETTING_USEBACKGROUNDCOLOR);
this._connectSetting(SETTING_CHAT_ONLY);
this._connectSetting(SETTING_FORCE);
this._connectSetting(SETTING_BLINK_RATE);
@ -163,13 +170,18 @@ function _MessageStyleHandler() {
}
let dateMenu = Main.panel.statusArea.dateMenu;
let actualStyle = (dateMenu.actor.style) ? dateMenu.actor.style : "";
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
let actualStyle = (actor.style) ? actor.style : "";
let userStyle = "color: " + settings.get_string(SETTING_COLOR) + ";";
dateMenu.actor.style = (dateMenu.actor.style == this._oldStyle) ?
actualStyle.concat(userStyle) : this._oldStyle;
let userStyle = "";
if (settings.get_boolean(SETTING_USECOLOR)) {
userStyle += "color: " + settings.get_string(SETTING_COLOR) + ";";
}
if (settings.get_boolean(SETTING_USEBACKGROUNDCOLOR)) {
userStyle += "background-color: " + settings.get_string(SETTING_BACKGROUNDCOLOR) + ";";
}
actor.style = (actor.style == this._oldStyle) ? actualStyle.concat(userStyle) : this._oldStyle;
// keep looping
return true;
@ -183,7 +195,8 @@ function _MessageStyleHandler() {
let dateMenu = Main.panel.statusArea.dateMenu;
let loopDelay = settings.get_int(SETTING_BLINK_RATE);
this._oldStyle = dateMenu.actor.style;
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
this._oldStyle = actor.style;
this._hasStyleAdded = true;
if (loopDelay > 0) {
@ -207,7 +220,8 @@ function _MessageStyleHandler() {
}
let dateMenu = Main.panel.statusArea.dateMenu;
dateMenu.actor.style = this._oldStyle;
let actor = dateMenu instanceof Clutter.Actor ? dateMenu : dateMenu.actor;
actor.style = this._oldStyle;
this._oldStyle = null;
}
@ -253,6 +267,9 @@ function init() {
}
function enable() {
if (MessageTray.Source.prototype.countUpdated == _countUpdated) {
return;
}
originalCountUpdated = MessageTray.Source.prototype.countUpdated;
originalDestroy = MessageTray.Source.prototype.destroy;

View File

@ -9,17 +9,15 @@ msgstr ""
"Project-Id-Version: gnome-shell-notifications-alert\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-15 11:35-0300\n"
"PO-Revision-Date: 2019-06-16 18:07+0200\n"
"PO-Revision-Date: 2019-11-15 20:45+0100\n"
"Last-Translator: Onno Giesmann <nutzer3105@gmail.com>\n"
"Language-Team: German <--->\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Generator: Gtranslator 3.32.1\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.4\n"
#: src/prefs.js:264
msgid "Add"
@ -36,7 +34,7 @@ msgstr "Benachrichtigungsfarbe"
#: src/prefs.js:195
msgid "Alert even if you set notifications to OFF on user menu (default: OFF)"
msgstr ""
"Benachrichtigen trotzdem anzeigen, auch wenn sie im Nutzermenü ausgeschaltet "
"Benachrichtigungen auch dann anzeigen, wenn sie im Nutzermenü ausgeschaltet "
"sind (Vorgabe: AUS)"
#: src/prefs.js:229
@ -53,7 +51,7 @@ msgstr "Anwendung für schwarze Liste"
#: src/prefs.js:180
msgid "Blink rate (in ms)"
msgstr "Blinkrate (in ms)"
msgstr "Blinkgeschwindigkeit (in ms)"
#: src/prefs.js:269
msgid "Choose an application to blacklist:"
@ -87,7 +85,9 @@ msgstr "Farbe, in der die Benachrichtigung im Nutzermenü erscheint"
#: src/prefs.js:181
msgid "The rate that the alert blinks, in ms. 0 means no blink (default: 800)"
msgstr "Rate des Blinkens in ms. Wert 0 bedeutet kein Blinken (Vorgabe: 800)"
msgstr ""
"Gibt an, mit welcher Geschwindigkeit der Alarm blinkt (in ms). Wert 0 "
"bedeutet kein Blinken (Vorgabe: 800)"
#: src/prefs.js:141
msgid "Whitelist"

View File

@ -1,22 +1,23 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Whenever there is an unread notification (e.g. chat messages), blinks the message in the user's menu with a color chosen by the user.\n\nNow configurable (3.4+ only)!! Alert color and blink rate can be changed on settings ;)\n\nIf you have any question, be sure to take a look at the FAQ:\nhttp://goo.gl/lmwtW\n\nCredits: The idea of painting the message on user's menu was borrowed from 'Pidgin Persistent Notification' extension by nemo. The code itself has some parts forked from 'Message Notifier' extension by barisione, 'Media player indicator' extension by eon and convenience.js from git.gnome.org/gnome-shell-extensions. The blink idea and it's initial code was written by hossman. The initial gnome 3.10 support was done by Anthony25. The filtering support was done by ilgarmehmetali",
"name": "Notifications Alert",
"_generated": "Generated by SweetTooth, do not edit",
"description": "Whenever there is an unread notification (e.g. chat messages), blinks the message in the user's menu with a color chosen by the user.\n\nNow configurable (3.4+ only)!! Alert color and blink rate can be changed on settings ;)\n\nIf you have any question, be sure to take a look at the FAQ:\nhttp://goo.gl/lmwtW\n\nCredits: The idea of painting the message on user's menu was borrowed from 'Pidgin Persistent Notification' extension by nemo. The code itself has some parts forked from 'Message Notifier' extension by barisione, 'Media player indicator' extension by eon and convenience.js from git.gnome.org/gnome-shell-extensions. The blink idea and it's initial code was written by hossman. The initial gnome 3.10 support was done by Anthony25. The filtering support was done by ilgarmehmetali",
"name": "Notifications Alert",
"original-authors": [
"Thiago Bellini"
],
],
"shell-version": [
"3.16",
"3.18",
"3.20",
"3.22",
"3.24",
"3.26",
"3.28",
"3.30",
"3.16",
"3.18",
"3.20",
"3.22",
"3.24",
"3.26",
"3.28",
"3.30",
"3.34",
"3.32"
],
"url": "https://github.com/hackedbellini/Gnome-Shell-Notifications-Alert",
"uuid": "notifications-alert-on-user-menu@hackedbellini.gmail.com",
"version": 38
],
"url": "https://github.com/bellini666/gnome-shell-notifications-alert",
"uuid": "notifications-alert-on-user-menu@hackedbellini.gmail.com",
"version": 41
}

View File

@ -173,6 +173,10 @@ function init() {
label: _("Alert color"),
help: _("The color used to paint the message on user's menu")
},
backgroundcolor: {
label: _("Alert background color"),
help: _("The background color used to paint the message on user's menu")
},
};
intSettings = {
@ -186,6 +190,14 @@ function init() {
};
boolSettings = {
usecolor: {
label: _("Use alert color"),
help: _("Use the alert color for alert blinks (default: ON)")
},
usebackgroundcolor: {
label: _("Use alert background color"),
help: _("Use the alert background color for alert blinks (default: OFF)")
},
chatonly: {
label: _("Only alert for chat notifications"),
help: _("Only chat notifications (like Empathy ones) will get alerted (default: OFF)")

View File

@ -16,11 +16,26 @@
<summary>Blink rate</summary>
<description>The rate that the alert blinks, in ms. 0 means no blink</description>
</key>
<key name="usecolor" type="b">
<default>true</default>
<summary>Use alert color</summary>
<description>Use the alert color for alert blinks</description>
</key>
<key name="color" type="s">
<default>'#ff0000'</default>
<summary>Alert color</summary>
<description>The color used to paint the message on user's menu</description>
</key>
<key name="usebackgroundcolor" type="b">
<default>false</default>
<summary>Use alert background color</summary>
<description>Use the alert background color for alert blinks</description>
</key>
<key name="backgroundcolor" type="s">
<default>'#ff0000'</default>
<summary>Alert background color</summary>
<description>The background color used to paint the message on user's menu</description>
</key>
<key name="application-list" type="as">
<default>[ ]</default>
<summary>Blacklist</summary>

View File

@ -1,3 +1,26 @@
3.34.2
======
* window-list, workspace-indicator: Exclude DESKTOP windows from previews
[Florian; !93]
* screenshot-window-sizer: Fix cycling through all valid sizes [Willy; !97]
Contributors:
Florian Müllner, Willy Stadnick
Translators:
Stas Solovey [ru], Umarzuki Bin Mochlis Moktar [ms]
3.34.1
======
* Adjust to gnome-settings-daemon plugin removals [Xiaoguang; !94]
Contributors:
Florian Müllner, Xiaoguang Wang
Translators:
Nathan Follens [nl], Dušan Kazik [sk], Ask Hjorth Larsen [da],
Yi-Jyun Pan [zh_TW]
3.34.0
======

View File

@ -1,17 +1,17 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Load shell themes from user directory.",
"extension-id": "user-theme",
"gettext-domain": "gnome-shell-extensions",
"name": "User Themes",
"_generated": "Generated by SweetTooth, do not edit",
"description": "Load shell themes from user directory.",
"extension-id": "user-theme",
"gettext-domain": "gnome-shell-extensions",
"name": "User Themes",
"original-authors": [
"john.stowers@gmail.com"
],
"settings-schema": "org.gnome.shell.extensions.user-theme",
],
"settings-schema": "org.gnome.shell.extensions.user-theme",
"shell-version": [
"3.34"
],
"url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions",
"uuid": "user-theme@gnome-shell-extensions.gcampax.github.com",
"version": 38
],
"url": "https://gitlab.gnome.org/GNOME/gnome-shell-extensions",
"uuid": "user-theme@gnome-shell-extensions.gcampax.github.com",
"version": 39
}