From dabde43a5364dc5ded1751c7a80afcea03ae51ad Mon Sep 17 00:00:00 2001 From: PhilDevProg <91820316+PhilDevProg@users.noreply.github.com> Date: Sun, 10 Oct 2021 10:25:19 +0200 Subject: [PATCH 1/3] Add German translation --- locale/de/notification-center.po | 611 +++++++++++++++++++++++++++++++ 1 file changed, 611 insertions(+) create mode 100644 locale/de/notification-center.po diff --git a/locale/de/notification-center.po b/locale/de/notification-center.po new file mode 100644 index 0000000..9b7ec03 --- /dev/null +++ b/locale/de/notification-center.po @@ -0,0 +1,611 @@ +# German translations for PACKAGE package. +# Copyright (C) 2021 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Phil, 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-05-31 12:04+0530\n" +"PO-Revision-Date: 2021-10-10 10:03+0200\n" +"Last-Translator: Phil\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-Generator: Poedit 3.0\n" + +#: notification-center@Selenium-H/extension.js:100 +#: notification-center@Selenium-H/prefsGtk3.js:556 +#: notification-center@Selenium-H/prefsGtk4.js:550 +msgid "Clear" +msgstr "Leeren" + +#: notification-center@Selenium-H/extension.js:102 +msgid "No Notifications" +msgstr "Keine Benachrichtigungen" + +#: notification-center@Selenium-H/extension.js:440 +msgid "No Events" +msgstr "Keine Termine" + +#: notification-center@Selenium-H/prefsGtk3.js:68 +#: notification-center@Selenium-H/prefsGtk3.js:77 +#: notification-center@Selenium-H/prefsGtk4.js:66 +#: notification-center@Selenium-H/prefsGtk4.js:78 +msgid "Preferences" +msgstr "Einstellungen" + +#: notification-center@Selenium-H/prefsGtk3.js:69 +#: notification-center@Selenium-H/prefsGtk3.js:87 +#: notification-center@Selenium-H/prefsGtk4.js:67 +#: notification-center@Selenium-H/prefsGtk4.js:87 +msgid "Help" +msgstr "Hilfe" + +#: notification-center@Selenium-H/prefsGtk3.js:70 +#: notification-center@Selenium-H/prefsGtk4.js:68 +msgid "About" +msgstr "Über" + +#: notification-center@Selenium-H/prefsGtk3.js:126 +#: notification-center@Selenium-H/prefsGtk4.js:121 +msgid "Reset Notification Center Extension" +msgstr "Erweiterung zurücksetzen" + +#: notification-center@Selenium-H/prefsGtk3.js:138 +#: notification-center@Selenium-H/prefsGtk4.js:133 +msgid "Reset Notification Center to defaults?" +msgstr "" +"Soll die Benachrichtigungszentrale auf die Standarteinstellungen zurückgesetzt " +"werden?" + +#: notification-center@Selenium-H/prefsGtk3.js:139 +#: notification-center@Selenium-H/prefsGtk4.js:134 +msgid "" +"Resetting the extension will discard the current preferences configuration " +"and restore default one." +msgstr "" +"Das Zurücksetzen wird alle aktuellen Einstellungen zurücksetzenund die " +"Standarteinstellungen wiederherstellen." + +#: notification-center@Selenium-H/prefsGtk3.js:214 +#: notification-center@Selenium-H/prefsGtk4.js:209 +msgid "Update" +msgstr "Update" + +#: notification-center@Selenium-H/prefsGtk3.js:218 +#: notification-center@Selenium-H/prefsGtk4.js:213 +msgid "Notifications" +msgstr "Benachrichtigungen" + +#: notification-center@Selenium-H/prefsGtk3.js:219 +#: notification-center@Selenium-H/prefsGtk4.js:214 +msgid "Calendar" +msgstr "Kalender" + +#: notification-center@Selenium-H/prefsGtk3.js:220 +#: notification-center@Selenium-H/prefsGtk4.js:215 +msgid "Indicator" +msgstr "Indikator" + +#: notification-center@Selenium-H/prefsGtk3.js:221 +#: notification-center@Selenium-H/prefsGtk4.js:216 +msgid "Profiles" +msgstr "Profile" + +#: notification-center@Selenium-H/prefsGtk3.js:352 +#: notification-center@Selenium-H/prefsGtk4.js:346 +msgid "Custom script location for" +msgstr "Skript-Speicherort für" + +#: notification-center@Selenium-H/prefsGtk3.js:375 +#: notification-center@Selenium-H/prefsGtk4.js:369 +msgid "Choose an application" +msgstr "Wähle eine App" + +#: notification-center@Selenium-H/prefsGtk3.js:433 +#: notification-center@Selenium-H/prefsGtk4.js:427 +msgid "Application List" +msgstr "Appliste" + +#: notification-center@Selenium-H/prefsGtk3.js:532 +#: notification-center@Selenium-H/prefsGtk4.js:526 +msgid "Choose a Script file" +msgstr "Wähle ein Skript" + +#: notification-center@Selenium-H/prefsGtk3.js:533 +#: notification-center@Selenium-H/prefsGtk3.js:555 +#: notification-center@Selenium-H/prefsGtk4.js:527 +#: notification-center@Selenium-H/prefsGtk4.js:549 +msgid "Set" +msgstr "Setzen" + +#: notification-center@Selenium-H/prefsGtk3.js:552 +#: notification-center@Selenium-H/prefsGtk4.js:546 +msgid " Add " +msgstr " Hinzufügen " + +#: notification-center@Selenium-H/prefsGtk3.js:553 +#: notification-center@Selenium-H/prefsGtk4.js:547 +msgid " Remove " +msgstr " Entfernen " + +#: notification-center@Selenium-H/prefsGtk3.js:557 +#: notification-center@Selenium-H/prefsGtk4.js:551 +msgid "Browse" +msgstr "Öffnen" + +#: notification-center@Selenium-H/prefsGtk3.js:564 +#: notification-center@Selenium-H/prefsGtk4.js:558 +msgid "No application selected" +msgstr "Keine App ausgewählt" + +#: notification-center@Selenium-H/prefsGtk3.js:599 +#: notification-center@Selenium-H/prefsGtk4.js:593 +msgid "For All Applications on the List" +msgstr "Für Apps in dieser Liste" + +#: notification-center@Selenium-H/prefsGtk3.js:601 +#: notification-center@Selenium-H/prefsGtk4.js:595 +msgid "Show them" +msgstr "Zeige sie" + +#: notification-center@Selenium-H/prefsGtk3.js:601 +#: notification-center@Selenium-H/prefsGtk4.js:595 +msgid "Show counts only" +msgstr "Zeige nur Zahl" + +#: notification-center@Selenium-H/prefsGtk3.js:601 +#: notification-center@Selenium-H/prefsGtk4.js:595 +msgid "Show banner only" +msgstr "Zeige nur Banner" + +#: notification-center@Selenium-H/prefsGtk3.js:601 +#: notification-center@Selenium-H/prefsGtk4.js:595 +msgid "Ignore them" +msgstr "Ignoriere sie" + +#: notification-center@Selenium-H/prefsGtk3.js:604 +#: notification-center@Selenium-H/prefsGtk4.js:598 +msgid "For Selected Application" +msgstr "Für ausgewählte Apps" + +#: notification-center@Selenium-H/prefsGtk3.js:645 +#: notification-center@Selenium-H/prefsGtk4.js:639 +msgid "Only In Notification Center" +msgstr "Nur in der Benachrichtigungszentrale" + +#: notification-center@Selenium-H/prefsGtk3.js:645 +#: notification-center@Selenium-H/prefsGtk4.js:639 +msgid "Below Calendar" +msgstr "Unter dem Kalender" + +#: notification-center@Selenium-H/prefsGtk3.js:645 +#: notification-center@Selenium-H/prefsGtk4.js:639 +msgid "Beside Calendar" +msgstr "Neben dem Kalender" + +#: notification-center@Selenium-H/prefsGtk3.js:684 +#: notification-center@Selenium-H/prefsGtk3.js:784 +#: notification-center@Selenium-H/prefsGtk4.js:677 +#: notification-center@Selenium-H/prefsGtk4.js:776 +msgid "Left" +msgstr "Links" + +#: notification-center@Selenium-H/prefsGtk3.js:684 +#: notification-center@Selenium-H/prefsGtk3.js:784 +#: notification-center@Selenium-H/prefsGtk4.js:677 +#: notification-center@Selenium-H/prefsGtk4.js:776 +msgid "Center" +msgstr "Mitte" + +#: notification-center@Selenium-H/prefsGtk3.js:684 +#: notification-center@Selenium-H/prefsGtk3.js:784 +#: notification-center@Selenium-H/prefsGtk4.js:677 +#: notification-center@Selenium-H/prefsGtk4.js:776 +msgid "Right" +msgstr "Rechts" + +#: notification-center@Selenium-H/prefsGtk3.js:688 +#: notification-center@Selenium-H/prefsGtk4.js:681 +msgid "No" +msgstr "Nein" + +#: notification-center@Selenium-H/prefsGtk3.js:688 +#: notification-center@Selenium-H/prefsGtk4.js:681 +msgid "Yes" +msgstr "Ja" + +#: notification-center@Selenium-H/prefsGtk3.js:688 +#: notification-center@Selenium-H/prefsGtk4.js:681 +msgid "If Do Not Disturb is Off" +msgstr "Wenn Nicht stören aus ist" + +#: notification-center@Selenium-H/prefsGtk3.js:689 +#: notification-center@Selenium-H/prefsGtk4.js:682 +msgid "Show Nothing" +msgstr "Zeige nichts" + +#: notification-center@Selenium-H/prefsGtk3.js:689 +#: notification-center@Selenium-H/prefsGtk4.js:682 +msgid "Show Dot" +msgstr "Zeige Punkt" + +#: notification-center@Selenium-H/prefsGtk3.js:689 +#: notification-center@Selenium-H/prefsGtk4.js:682 +msgid "Show Count" +msgstr "Zeige Zahl" + +#: notification-center@Selenium-H/prefsGtk3.js:780 +#: notification-center@Selenium-H/prefsGtk3.js:781 +#: notification-center@Selenium-H/prefsGtk3.js:782 +#: notification-center@Selenium-H/prefsGtk3.js:783 +#: notification-center@Selenium-H/prefsGtk3.js:784 +#: notification-center@Selenium-H/prefsGtk4.js:772 +#: notification-center@Selenium-H/prefsGtk4.js:773 +#: notification-center@Selenium-H/prefsGtk4.js:774 +#: notification-center@Selenium-H/prefsGtk4.js:775 +#: notification-center@Selenium-H/prefsGtk4.js:776 +msgid "Don't Show" +msgstr "Nicht zeigen" + +#: notification-center@Selenium-H/prefsGtk3.js:780 +#: notification-center@Selenium-H/prefsGtk3.js:781 +#: notification-center@Selenium-H/prefsGtk3.js:782 +#: notification-center@Selenium-H/prefsGtk4.js:772 +#: notification-center@Selenium-H/prefsGtk4.js:773 +#: notification-center@Selenium-H/prefsGtk4.js:774 +msgid "At The Top" +msgstr "Oben" + +#: notification-center@Selenium-H/prefsGtk3.js:780 +#: notification-center@Selenium-H/prefsGtk3.js:781 +#: notification-center@Selenium-H/prefsGtk3.js:782 +#: notification-center@Selenium-H/prefsGtk4.js:772 +#: notification-center@Selenium-H/prefsGtk4.js:773 +#: notification-center@Selenium-H/prefsGtk4.js:774 +msgid "In The Middle" +msgstr "In der Mitte" + +#: notification-center@Selenium-H/prefsGtk3.js:780 +#: notification-center@Selenium-H/prefsGtk3.js:781 +#: notification-center@Selenium-H/prefsGtk3.js:782 +#: notification-center@Selenium-H/prefsGtk4.js:772 +#: notification-center@Selenium-H/prefsGtk4.js:773 +#: notification-center@Selenium-H/prefsGtk4.js:774 +msgid "At The Bottom" +msgstr "Unten" + +#: notification-center@Selenium-H/prefsGtk3.js:783 +#: notification-center@Selenium-H/prefsGtk4.js:775 +msgid "On Top" +msgstr "Oben" + +#: notification-center@Selenium-H/prefsGtk3.js:783 +#: notification-center@Selenium-H/prefsGtk4.js:775 +msgid "At Bottom" +msgstr "Unten" + +#: notification-center@Selenium-H/prefsGtk3.js:786 +#: notification-center@Selenium-H/prefsGtk4.js:778 +msgid "Alt Key" +msgstr "Alt" + +#: notification-center@Selenium-H/prefsGtk3.js:786 +#: notification-center@Selenium-H/prefsGtk4.js:778 +msgid "Ctrl Key" +msgstr "Strg" + +#: notification-center@Selenium-H/prefsGtk3.js:786 +#: notification-center@Selenium-H/prefsGtk4.js:778 +msgid "Shift Key" +msgstr "Shift" + +#: notification-center@Selenium-H/prefsGtk3.js:786 +#: notification-center@Selenium-H/prefsGtk4.js:778 +msgid "Super Key" +msgstr "Super" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Top Left" +msgstr "Oben links" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Top Center" +msgstr "Oben mittig" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Top Right" +msgstr "Oben rechts" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Middle Left" +msgstr "Mitte links" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Middle Center" +msgstr "Mitte mittig" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Middle Right" +msgstr "Mitte rechts" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Bottom Left" +msgstr "Unten links" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Bottom Center" +msgstr "Unten mittig" + +#: notification-center@Selenium-H/prefsGtk3.js:788 +#: notification-center@Selenium-H/prefsGtk4.js:780 +msgid "Bottom Right" +msgstr "Unten rechts" + +#: notification-center@Selenium-H/prefsGtk3.js:864 +#: notification-center@Selenium-H/prefsGtk4.js:856 +msgid "Extension is upgraded to Version " +msgstr "Erweiterung wurde geupdatet auf Version " + +#: notification-center@Selenium-H/prefsGtk3.js:865 +#: notification-center@Selenium-H/prefsGtk4.js:857 +msgid "" +"A Reset to default preferences is needed for upgrading to this version. " +"Please Reset the extension by clicking the button below." +msgstr "" +"Für das Upgrade auf diese Version ist ein Zurücksetzen auf die " +"Standardeinstellungen erforderlich. Bitte setzen Sie die Erweiterung zurück, " +"indem Sie auf die Schaltfläche unten klicken." + +#: notification-center@Selenium-H/prefsGtk3.js:883 +#: notification-center@Selenium-H/prefsGtk4.js:875 +msgid "Upgraded Successfully" +msgstr "Update fertig" + +#: notification-center@Selenium-H/prefsGtk3.js:884 +#: notification-center@Selenium-H/prefsGtk4.js:876 +msgid "Version" +msgstr "Version" + +#: notification-center@Selenium-H/prefsGtk4.js:373 +msgid "Add" +msgstr "Hinzufügen" + +#: notification-center@Selenium-H/prefsGtk4.js:530 +msgid "Cancel" +msgstr "Abbrechen" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:57 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:58 +msgid "Show Media Section on Notification Center" +msgstr "Zeige Medienabschnitt in der Benachrichtigungszentrale" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:63 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:64 +msgid "Show Notifications list on Notification Center" +msgstr "Zeige Benachrichtigungen in der Benachrichtigungszentrale" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:69 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:70 +msgid "Show Events list on Notification Center" +msgstr "Zeige Termine in der Benachrichtigungszentrale" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:75 +msgid "Also, Show Events List" +msgstr "Zeige auch die Termine" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:76 +msgid "Also, show Events List" +msgstr "Zeige auch die Termine" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:81 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:82 +msgid "Hide space beside Calendar if empty" +msgstr "Verstecke Platz neben dem Kalender wenn leer" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:87 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:88 +msgid "Show Calendar on Left" +msgstr "Zeige den Kalendar links" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:93 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:94 +msgid "Hide Events List If Empty" +msgstr "Verstecke Terminliste wenn leer" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:99 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:100 +msgid "Order of sections in Notification Center" +msgstr "Reihenfolge der Abschnitte in der Benachrichtigungszentrale" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:105 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:106 +msgid "Do Not Disturb menu position" +msgstr "Position von Nicht stören" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:111 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:112 +msgid "Clear All Button position" +msgstr "Position von Leeren" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:117 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:118 +msgid "Close Notification Center when focus is switched" +msgstr "Schließe die Benachrichtigungszentrale wenn der Fokus wechselt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:125 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:126 +msgid "Shortcut key combiation to show Notification Center" +msgstr "Tastenkombination um die Benachrichtigungszentrale zu zeigen" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:131 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:132 +msgid "Maximum height of Notification Center ( in % )" +msgstr "Maximale Höhe der Benachrichtigungszentrale (in %)" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:137 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:138 +msgid "Hide Clock Section" +msgstr "Verstecke Zeitabschnitt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:143 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:144 +msgid "Hide Weather Section" +msgstr "Verstecke Wetterabschnitt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:149 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:150 +msgid "Hide Date Section" +msgstr "Verstecke Datumsabschnitt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:155 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:156 +msgid "Notification Banner position" +msgstr "Position von Benachrichtigungs-Bannern" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:161 +msgid "Notification Center icon position on panel" +msgstr "Icon-Position der Benachrichtigungszentrale im Panel" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:162 +msgid "Notifications Center icon position" +msgstr "Position vom Notification-Center-Icon" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:167 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:168 +msgid "Position of notification icon in panel box" +msgstr "Icon-Position der Benachrichtigungszentrale im Panelabschnitt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:173 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:174 +msgid "Show individual icons for each section on panel" +msgstr "Zeige individuelle Icons für jeden Abschnitt im Panel" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:179 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:180 +msgid "Change icons depending if there is notification or not" +msgstr "Verändere Icons wenn eine Benachrichtigung da ist oder nicht" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:185 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:186 +msgid "AutoHide notification indicator on panel" +msgstr "Verstecke Benachrichtigungs-Icon automatisch im Panel" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:191 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:192 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:251 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:252 +msgid "When new notification arrives" +msgstr "Wenn eine neue Benachrichtigung kommt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:197 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:198 +msgid "Include events in above case" +msgstr "Schließe Termine im oberigen Fall mit ein" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:203 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:204 +msgid "Number of times panel icon blinks on new notification" +msgstr "Wie oft das Icon bei einer neuen Benachrichtigung blinkt" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:209 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:210 +msgid "Blink Time Interval ( in milliseconds )" +msgstr "Blinkzeitintervall (in Millisekunden)" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:215 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:216 +msgid "Animate icon when new notification arrives" +msgstr "Animiere Icon wenn eine neue Benachrichtigung eintrifft" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:221 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:222 +msgid "Show Dots or Counts till all notifications are cleared" +msgstr "Zeige Punkte oder Zahl bis alle Benachrichtigungen gelöscht sind" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:227 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:228 +msgid "Middle click panel icon to toggle Do Not Disturb" +msgstr "Aktiviere Nicht stören mit einem Mittleklick auf das Icon" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:233 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:234 +msgid "List of applications" +msgstr "Appliste" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:239 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:240 +msgid "List of Names of application to ignore notifications from" +msgstr "" +"Liste der Namen der Apps von denen Benachrichtigungen ignoriert werden sollen" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:245 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:246 +msgid "List of Scripts for applications" +msgstr "Liste der Skripte für Apps" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:257 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:258 +msgid "Run scripts on new notification" +msgstr "Starte Skript bei neuer Benachrichtigung" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:265 +msgid "Version of Current Extension" +msgstr "Aktuelle Version" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:266 +msgid "" +"Provided to ensure that extension is stopped incase of autoupdate from " +"previous version to prevent unwanted effects" +msgstr "" +"Vorausgesetzt, um sicherzustellen, dass die Erweiterung gestoppt wird, falls " +"die automatische Aktualisierung der vorherigen Version erfolgt, um " +"unerwünschte Effekte zu vermeiden" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:271 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:272 +msgid "Signals the extension to reload" +msgstr "Signalisiert der Erweiterung sich neu zu starten" + +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:277 +#: schemas/org.gnome.shell.extensions.notification-center.gschema.xml:278 +msgid "Signals the extension to reload Application Profiles" +msgstr "Signalisiert der Erweiterung die App-Profile neu zu laden" + +msgid "" +"Detach notification center to top panel and customizations.Please reset the " +"extension after updating.\n" +"The Extension will stop when upgraded to an incompatible version.\n" +"In that case an Update tab is created to easily reset the extension.\n" +"A Reset button is also always present in Preferences option in the Top Right " +"Application menu of the extension preferences window." +msgstr "" +"Trennen Sie die Benachrichtigungszentrale vom oberen Bedienfeld und passen " +"Sie sie an. Bitte setzen Sie die Erweiterung nach der Aktualisierung " +"zurück.\n" +"Die Erweiterung wird beendet, wenn auf eine inkompatible Version " +"aktualisiert wird.\n" +"In diesem Fall wird ein Update-Tab erstellt, um die Erweiterung einfach " +"zurückzusetzen.\n" +"Eine Zurücksetz-Möglichkeit ist auch immer in der Option Einstellungen im " +"oberen rechten Anwendungsmenü des Fensters mit den Erweiterungseinstellungen " +"vorhanden." + +msgid "Detach notification center to top panel and customizations." +msgstr "" +"Trennen Sie die Benachrichtigungszentrale vom oberen Bedienfeld und passen " +"Sie sie an." + From 8c045e56b9e8423271eebf048a1b2ce6fb720d31 Mon Sep 17 00:00:00 2001 From: D Paul <46006930+Selenium-H@users.noreply.github.com> Date: Sun, 21 Nov 2021 00:12:13 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0b81acd..6420784 100644 --- a/README.md +++ b/README.md @@ -42,20 +42,37 @@ A GNOME Shell extension for detaching notification center and customization. Installations -

Github                                         GNOME Shell Extension Website

- -Download or clone the repository and extract the zip file. - -Open terminal in extracted folder and run - -`chmod +x INSTALL.sh && ./INSTALL.sh` - -

Get this extension from here                          -

- -Restart Gnome Shell ( Alt + F2 , Press r , Press Enter ) . - -Enable it using GNOME Tweak Tool. +
+ + + + + + + + + +
+

GitHub

+
+

GNOME Shell Extension Website

+
+
Download/clone this repository and extract .zip file.
+
Open Terminal in extracted folder and run
+
    + chmod +x INSTALL.sh && ./INSTALL.sh +
+
Restart GNOME Shell.
+
    +
  • In Xorg, press Alt+F2, press r, press Enter.
  • +
  • In Wayland, log out and log in back.
  • +
+
Enable it in GNOME Tweaks or Extensions application.
+
+ Get this extension from here +
+
Also, please check the experimental branch of this project for most recently updated version.

+

Credits From 8a3dae83bb0cac7c463a208795a7499f4113345b Mon Sep 17 00:00:00 2001 From: TheRedDev Date: Tue, 19 Apr 2022 14:53:51 -0400 Subject: [PATCH 3/3] gnome 42 support --- extension.js | 711 +++++++++++++++++++ metadata.json | 17 + notification-center@Selenium-H/extension.js | 99 ++- notification-center@Selenium-H/metadata.json | 30 +- 4 files changed, 794 insertions(+), 63 deletions(-) create mode 100644 extension.js create mode 100644 metadata.json diff --git a/extension.js b/extension.js new file mode 100644 index 0000000..3817c1e --- /dev/null +++ b/extension.js @@ -0,0 +1,711 @@ + +/* +Version 24.02 +============= + +*/ + +const ExtensionUtils = imports.misc.extensionUtils; +const Gtk = imports.gi.Gtk; +const GObject = imports.gi.GObject; +const LangClass = imports.lang.Class; +const Main = imports.ui.main; +const MetaKeyBindingFlags = imports.gi.Meta.KeyBindingFlags; +const PanelMenu = imports.ui.panelMenu; +const PopupMenu = imports.ui.popupMenu; +const ShellActionMode = imports.gi.Shell.ActionMode; +const St = imports.gi.St; +const utilSpawn = imports.misc.util.spawn; +const _ = imports.gettext.domain("notification-center").gettext; + +let notificationCenter = null; + +function enable() { + + notificationCenter = new NotificationCenter(); + notificationCenter.startNotificationCenter(); + reloadExtensionOnPrefsChange(); + reloadApplicationProfilesOnPrefsChange(); + +} + +function disable() { + + notificationCenter.undoChanges(); + notificationCenter.destroy(); + +} + +function reloadApplicationProfilesOnPrefsChange() { + + // Reloads Application Profiles when preferences are changed. + notificationCenter.reloadProfilesSignal = notificationCenter.prefs.connect("changed::reload-profiles-signal", () => notificationCenter.loadPreferences()); + +} + +function reloadExtensionOnPrefsChange() { + + // Reloads the Extension when preferences are changed. + notificationCenter.reloadSignal = notificationCenter.prefs.connect("changed::reload-signal", () => { + disable(); + enable(); + }); + +} + +const NotificationCenter = GObject.registerClass( +class NotificationCenter extends PanelMenu.Button { + + _init() { + + ExtensionUtils.initTranslations("notification-center"); + this.prefs = ExtensionUtils.getSettings("org.gnome.shell.extensions.notification-center"); + super._init(1-0.5*this.prefs.get_enum('indicator-pos'), "NotificationCenter"); + this._messageList = Main.panel.statusArea.dateMenu._messageList; + this._messageListParent = this._messageList.get_parent(); + this.mediaSection = this._messageList._mediaSection; + this.notificationSection = this._messageList._notificationSection; + this.eventsSection = Main.panel.statusArea.dateMenu._eventsItem; + this.newEventsSectionParent = this.eventsSection.get_parent(); + this.originalEventsSectionParent = this.newEventsSectionParent; + this.dateMenuVbox = this._messageListParent.get_children()[1]; + + this.loadPreferences(); + this.connectedSignals = []; + this.dmsig = null; + this.cmsig = null; + this.dndSig = null; + this.reloadSignal = null; + this.reloadProfilesSignal = null; + + this.textureCache = St.TextureCache.get_default(); + this.iconThemeChangeSig = null; + this.notificationIconName = null; + + this.notificationCount = 0; + this.eventsCount = 0; + this.mediaCount = 0; + this.seenEvents = false; + this.isDndOff = true; + this.dndpref = Main.panel.statusArea.dateMenu._indicator._settings; + + this.eventsIcon = new St.Icon({style_class:'system-status-icon', visible:false, icon_name: "x-office-calendar-symbolic"}); + this.mediaIcon = new St.Icon({style_class:'system-status-icon', visible:false, icon_name: "audio-x-generic-symbolic" }); + this.notificationIcon = new St.Icon({style_class:'system-status-icon', visible:false }); + this.eventsLabel = new St.Label({text: "•", visible:false, style_class:"notification-center-events-label"}); + this.notificationLabel = new St.Label({text: "•", visible:false, style_class:"notification-center-notification-label"}); + this._indicator = new St.BoxLayout({style_class: 'panel-status-menu-box'}); + this.box = new St.BoxLayout({style_class: "notification-center-message-list", vertical: true}); + this.clearButton = new St.Button({style_class: "notification-center-clear-button button", label: _("Clear"),can_focus: true,visible:false}); + this.dndItem = new PopupMenu.PopupSwitchMenuItem(this._messageList._dndButton.label_actor.text,true,{}); + this.noNotificationLabel = new St.Label({text: _("No Notifications"), x_align:2, y_align:3, style:"margin-top: 96px"}); + + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; + this.scrollView = new St.ScrollView({hscrollbar_policy:2, style:"min-width:"+(this._messageList.width/scaleFactor)+"px;max-height: "+0.01*this.prefs.get_int("max-height")*Main.layoutManager.monitors[0].height+"px; max-width: "+(this._messageList.width/scaleFactor)+"px; padding: 0px;"}) + Main.panel.statusArea.dateMenu.menu.box.style = "max-height: "+(0.01*this.prefs.get_int("max-height")*Main.layoutManager.monitors[0].height)+"px;"; + + this.add_style_class_name('notification-center-panel-button'); + this.notificationIcon.set_pivot_point(0.5, 0); + + } + + _onOpenStateChanged(menu,open) { + + if(!open) { + this.resetIndicator(); + this.remove_style_pseudo_class('active'); + return ; + } + Main.panel.statusArea.dateMenu._calendar.setDate(new Date()); + this.add_style_pseudo_class('active'); + this.manageEvents(0); + [ this.mediaSection.visible, this.notificationSection.visible ] = [ this.mediaSection._shouldShow(), this.notificationSection._list.get_children().length ]; + this.blinkIconStopIfBlinking(); + + if(!this.showLabel) { + this.notificationCount=0; + this.eventsCount=0; + } + this.seenEvents = true; + this.resetIndicator(); + + } + + animateOnNewNotification( times, op=254, angle=3 ) { + + [ this.visible, this.notificationIcon.visible ] = [ true, true ]; + if(times == 0 || this.notAnimateIcon) { + this.notificationIcon.ease({ + duration: 150, + scale_x: 1.0, + scale_y: 1.0, + translation_y: 0, + opacity: 255, + rotation_angle_z: 0, + onComplete: ()=> this.blinkIcon(!this.menu.isOpen*this.blinkCount, this.blinkTime, 100) + }); + return; + } + + this.notificationIcon.ease({ + duration: 150, + scale_x: 1.2, + scale_y: 1.2, + translation_y: -4, + opacity: op, + rotation_angle_z: angle, + onComplete: ()=> this.animateOnNewNotification(--times, op-1, -angle) + }); + + } + + blinkIcon( blinkTimes, interval, opacity ) { + + this.manageAutohide(); + if(blinkTimes > 0) { + this.notificationIcon.ease({ + duration: interval, + opacity: opacity, + onComplete: ()=> this.blinkIcon(--blinkTimes,interval,(opacity==255)?100:255) + }); + } + + } + + blinkIconStopIfBlinking() { + + this.notificationIcon.remove_all_transitions(); + this.notificationIcon.set_opacity(255); + + } + + dndToggle() { + + this.dndpref.set_boolean('show-banners',!this.dndpref.get_boolean('show-banners')); + + } + + loadDndStatus() { + + this.isDndOff = this.dndpref.get_boolean("show-banners"); + this.dndItem.setToggleState(!this.isDndOff); + + this.blinkIconStopIfBlinking(); + this.manageAutohide(); + + this.notificationIcon.icon_name = this.notificationIconName; + + if(this.isDndOff) { + this.notificationIcon.set_opacity(255); + this.manageLabel(); + return false; + } + + if(Gtk.IconTheme.get_default()) { + if(Gtk.IconTheme.get_default().has_icon("notifications-disabled-symbolic")) { + this.notificationIcon.icon_name = "notifications-disabled-symbolic"; + } + } + else { + this.notificationIcon.set_opacity(150); + } + + [ this.notificationLabel.visible, this.eventsLabel.visible] = [ false, false ]; + + return true; + + } + + loadPreferences() { + + this.autohide = this.prefs.get_int("autohide"); + this.mediaSectionToBeShown = (this.prefs.get_int("show-media")>0)?true:false; + this.notificationSectionToBeShown = (this.prefs.get_int("show-notification")>0)?true:false; + this.eventsSectionToBeShown = (this.prefs.get_int("show-events")>0)?true:false; + this.eventsSectionPosition = this.prefs.get_enum("events-position"); // 0 = below, 1 = dont show, 2 = beside + this.hideEmptySpace = this.prefs.get_boolean("autohide-space-beside-calendar"); + this.showEventsInCalendarAlso = (this.eventsSectionToBeShown && this.eventsSectionPosition != 1) ? true: false; + this.showEventsSectionIfEmpty = this.prefs.get_boolean("show-events-section-if-empty"); + this.showThreeIcons = this.prefs.get_boolean("individual-icons"); + this.includeEventsCount = this.prefs.get_boolean("include-events-count"); + this.newNotificationAction = this.prefs.get_enum("new-notification"); + this.eventsSectionhere = this.showEventsInCalendarAlso; + this.showingSections = this.prefs.get_strv("sections-order"); + this.appBlackList = this.prefs.get_strv("name-list"); + this.scriptList = this.prefs.get_strv("script-list"); + this.allowRunningScript = this.prefs.get_boolean("run-script"); + this.blackListAction = this.prefs.get_enum("for-list"); + this.notAnimateIcon = !this.prefs.get_boolean("animate-icon"); + this.blinkTime = this.prefs.get_int("blink-time"); + this.blinkCount = this.prefs.get_int("blink-icon")*2; + this.showLabel = this.prefs.get_boolean("show-label"); + this.changeIcons = this.prefs.get_boolean("change-icons"); + + } + + manageAutohide() { + + if(!this.menu.isOpen) { + this.mediaIcon.visible = this.mediaSection._shouldShow() && this.showThreeIcons && this.mediaSectionToBeShown; + this.eventsIcon.visible = (this.shouldShowEventsSection()) && this.showThreeIcons && this.eventsSectionToBeShown; + this.notificationIcon.visible = (this.notificationSection._list.get_children().length && this.notificationSectionToBeShown) || + (this.mediaSection._shouldShow() && this.mediaSectionToBeShown && !this.showThreeIcons) || + ((this.shouldShowEventsSection()) && this.eventsSectionToBeShown && !this.showThreeIcons) || + ((!this.isDndOff)*this.autohide > 1); + if(this.mediaIcon.visible || this.eventsIcon.visible || this.notificationIcon.visible || !this.autohide) { + this.visible = true; + this.notificationIcon.visible = (this.mediaIcon.visible || this.eventsIcon.visible) ? this.notificationIcon.visible : true; + return; + } + this.visible = false; + } + else { + this.noNotificationLabel.visible = !((this.mediaSection._shouldShow() && this.mediaSectionToBeShown) || (this.notificationSection._list.get_children().length && this.notificationSectionToBeShown) || ((this.shouldShowEventsSection() || this.showEventsSectionIfEmpty) && this.eventsSectionToBeShown)) + this.box.style_class = (this.noNotificationLabel.visible) ? "notification-center-message-list-empty" : "notification-center-message-list"; + } + + } + + manageEvents(action) { + + this.eventsSection.visible = this.showEventsSectionIfEmpty || this.shouldShowEventsSection() ; + if(this.showEventsInCalendarAlso == true) { + switch(action) { + case 0: + if(this.eventsSectionhere == true) { + return; + } + this.removeSection(this.eventsSection); + this.box.insert_child_at_index(this.eventsSection,this.showingSections.indexOf("events")); + this.eventsSectionhere = true; + return; + case 1: + if(this.eventsSectionhere == false) { + return; + } + this.box.remove_child(this.box.get_children()[this.showingSections.indexOf("events")]); + this.newEventsSectionParent.insert_child_at_index(this.eventsSection, this.eventsSectionPosition); + this.eventsSectionhere = false; + return; + } + } + } + + manageLabel(nCount,eCount) { + + this.notificationLabel.visible = nCount*this.newNotificationAction; + this.eventsLabel.visible = eCount*this.newNotificationAction && (this.shouldShowEventsSection() > 0); + + if (this.changeIcons) { + this.manageIconChange(nCount > 0 || eCount > 0); + } + + if(this.newNotificationAction == 2) { + if(nCount>0) { + this.notificationLabel.text=nCount.toString(); + } + if(eCount > 0 ) { + this.eventsLabel.text=eCount.toString(); + } + } + + } + + manageIconChange(statusIcon) { + + let iconName = statusIcon ? "notification-center-full" : "notification-center-empty"; + this.notificationIcon.icon_name = iconName; + + } + + middleClickDndToggle(actor, event) { + + switch(event.get_button()) { + + case 2: // if middle click + + // close the menu, since it gets open on any click + if (this.menu.isOpen) { + this.menu.actor.visible = false; + } + // toggle DND state + this.dndToggle(); + // reload dnd status + this.loadDndStatus(); + + return; + + } + + } + + newNotif(messageType) { + + switch(messageType) { + case "media": + this.mediaCount++; + break; + case "notification" : + this.notificationCount = this.notificationCount+ !this.menu.isOpen; + //this.filterNotifications(); + let source = Main.messageTray.getSources(); + let applicationIndex = this.appBlackList.indexOf(source[source.length-1].title); + if(this.allowRunningScript && applicationIndex > 0 && this.scriptList[applicationIndex]!="") { + utilspawn(["sh", this.scriptList[applicationIndex]]); + } + if(this.isDndOff) { + if(applicationIndex > -1) { + switch(this.blackListAction) { + case 3: + case 2: + this.notificationCount--; + } + } + this.animateOnNewNotification(5); + } + break; + case "events" : + [ this.seenEvents, this.eventsCount ] = [ (Main.panel.statusArea.dateMenu.menu.isOpen)? this.seenEvents: false, this.shouldShowEventsSection()*(!this.menu.isOpen) ]; + break; + } + this.resetIndicator(); + + } + + remNotif(messageType) { + + switch(messageType) { + case "media" : + this.mediaCount--; + break; + case "notification" : + (this.notificationCount>0)? this.notificationCount-- : 0; + break; + case "events" : + this.eventsCount = this.shouldShowEventsSection(); + break; + } + this.resetIndicator(); + + } + + removeSection(section) { + + if(section == this.eventsSection) { + this.newEventsSectionParent.remove_actor(this.eventsSection); + return ; + } + + this._messageList._sectionList.remove_actor(section); + this._messageList._sync(); + + } + + resetIndicator() { + + this.manageAutohide(); + this.clearButton.visible = this.notificationSection._canClear && this.notificationSectionToBeShown; + this.eventsCount = this.eventsCount*this.includeEventsCount; + if(this.isDndOff ) { + this.manageLabel((this.notificationCount + (!this.showThreeIcons)*this.eventsCount) ,(this.showThreeIcons)*this.eventsCount); + } + + } + + setNotificationIconName() { + + if(Gtk.IconTheme.get_default()) { + this.notificationIconName = Gtk.IconTheme.get_default().has_icon("notification-symbolic")?"notification-symbolic":"preferences-system-notifications-symbolic"; + } + else { + this.notificationIconName = "preferences-system-notifications-symbolic"; + } + + } + + iconThemeChanged() { + + this.setNotificationIconName(); + this.loadDndStatus(); + + } + + shouldShowEventsSection() { + + switch(this.eventsSection._eventsList.get_children().length) { + case 0: + return 0; + default: + return (this.eventsSection._eventsList.get_children()[0].text == _("No Events")) ? 0: this.eventsSection._eventsList.get_children().length; + } + + } + + startNotificationCenter() { + + if(this.prefs.get_double("current-version") < 23.03) { + Main.notify("Notification Center","Extension is updated. Please Complete the update process in the extension preferences."); + return; + } + + this._indicator.add_child(this.eventsIcon); + this._indicator.add_child(this.eventsLabel); + this._indicator.add_child(this.mediaIcon); + this._indicator.add_child(this.notificationIcon); + this._indicator.add_child(this.notificationLabel); + + this.setNotificationIconName(); + this.iconThemeChangeSig = this.textureCache.connect('icon-theme-changed', this.iconThemeChanged.bind(this)); + + this.add_child(this._indicator); + Main.panel.addToStatusArea("NotificationCenter", this, this.prefs.get_int('indicator-index'), this.prefs.get_string('indicator-pos')); + + this.eventsSection.allowed = true; // Compatibility with this._messageList + if(this.eventsSectionPosition == 2) { // Shows Events Section beside Calendar + this.newEventsSectionParent.remove_actor(this.eventsSection); + this.newEventsSectionParent = this._messageList._sectionList; + this.newEventsSectionParent.insert_child_at_index(this.eventsSection, 2); + } + //this.rebuildMessageList(); + if(this.showingSections.length == 3 && !this.showEventsInCalendarAlso) { + this.dateMenuVbox.style = "border-width: 0px"; + } + this._messageListParent.remove_actor(this._messageList); + if(this.prefs.get_boolean("calendar-on-left")) { + this._messageListParent.insert_child_at_index(this._messageList, 1) + this.dateMenuVbox.add_style_class_name("notification-center-datemenu-vbox"); + } + else { + this._messageListParent.insert_child_at_index(this._messageList, 0); + } + for(let i=0;i this.newNotif(this.showingSections[i]) )); + this.connectedSignals.push(this.eventsSection._eventsList.connect('actor-removed' ,()=> this.remNotif(this.showingSections[i]) )); + this.eventsSection.setDate(new Date()); + } + else { + this.removeSection(this[this.showingSections[i]+"Section"]); + this.box.add(this[this.showingSections[i]+"Section"]); + this.connectedSignals.push(this[this.showingSections[i]+"Section"]._list.connect('actor-added' ,()=> this.newNotif(this.showingSections[i]) )); + this.connectedSignals.push(this[this.showingSections[i]+"Section"]._list.connect('actor-removed' ,()=> this.remNotif(this.showingSections[i]) )); + this[this.showingSections[i]+"Section"].add_style_class_name('notification-center-message-list-section'); + } + } + + //this.arrangeItems(); + this.scrollView._delegate = this; + this.scrollView.add_actor(this.box); + this.box.add_child(this.noNotificationLabel); + this.menu.box.add_child(this.scrollView); + //this.addClearButton() + let clearButtonPos = this.prefs.get_enum("clear-button-alignment"); + if(clearButtonPos!=3){ + this.clearButton.connect('clicked', ()=> { + this.notificationSection.clear(); + }); + this.clearButton.set_x_align(1+clearButtonPos); + this.menu.box.add_child(this.clearButton); + } + this._messageList._clearButton.opacity = 255*(!this.notificationSectionToBeShown); + + switch(this.prefs.get_enum("dnd-position")) { + case 1: + this.dndItem._delegate = this; + this.dndItem.connect("toggled", ()=>this.dndToggle()); + this._messageList._dndSwitch.visible = false; + this._messageList._dndButton.label_actor.visible = false; + this.menu.box.insert_child_at_index(new PopupMenu.PopupSeparatorMenuItem(), 0); + this.menu.box.insert_child_at_index(this.dndItem, 0); + break; + case 2: + this.dndItem.connect("toggled", ()=>this.dndToggle()); + this._messageList._dndSwitch.visible = false + this._messageList._dndButton.label_actor.visible = false + this.menu.box.add_child(new PopupMenu.PopupSeparatorMenuItem()); + this.menu.box.add_child(this.dndItem); + } + + this.loadDndStatus(); + this.resetIndicator(); + + let bannerPos = this.prefs.get_string('banner-pos'); + Main.messageTray._bannerBin.set_y_align(bannerPos[0]); + Main.messageTray.bannerAlignment = bannerPos[1]; + //this.removeDotAndBorderFromDateMenu(); + Main.panel.statusArea.dateMenu.get_children()[0].remove_actor(Main.panel.statusArea.dateMenu._indicator) + this.dtActors=Main.panel.statusArea.dateMenu.get_children()[0].get_children(); + Main.panel.statusArea.dateMenu.get_children()[0].remove_actor(this.dtActors[0]); + //this.indicatorViewShortcut(); + Main.wm.addKeybinding( + 'indicator-shortcut', + this.prefs, + MetaKeyBindingFlags.NONE, + ShellActionMode.NORMAL | ShellActionMode.OVERVIEW | ShellActionMode.POPUP, + () => { + this.notificationIcon.visible = !(this.mediaIcon.visible || this.eventsIcon.visible); + this.visible = true; + this.menu.toggle(); + } + ); + + this.dndSig = this.dndpref.connect("changed::show-banners", () => { + this.loadDndStatus(); + }); + + if(this.prefs.get_boolean("middle-click-dnd")) { + this.connect("button-press-event", (actor, event)=>this.middleClickDndToggle(actor, event)); + } + + this.unFreezeSig = Main.panel.statusArea.dateMenu._calendar.connect('selected-date-changed', (calendar, datetime) => { + this._messageList.get_parent().get_parent().layout_manager.frozen = false; + switch(this.eventsSectionPosition) { + case 2: + [ this.eventsSection.visible, this.dateMenuVbox.style ] = [ ( this.showEventsSectionIfEmpty || this.shouldShowEventsSection()), "" ]; + this._messageList._sync(); + return; + case 0: + this.eventsSection.visible = (this.showEventsSectionIfEmpty || this.shouldShowEventsSection()); + } + }); + + this.dmSig = Main.panel.statusArea.dateMenu.menu.connect("open-state-changed",()=> { + if (Main.panel.statusArea.dateMenu.menu.isOpen) { + if(this.eventsSectionPosition != 1) { // Also show Events Section in Calendar menu + this.manageEvents(1); + if(this.showLabel==false) { + this.eventsCount=0; + } + this.resetIndicator(); + } + this._messageList._sync(); + if(this.hideEmptySpace) { // Autohide Empty Space beside Calendar + this._messageList.visible = !this._messageList._placeholder.visible; + } + this.dateMenuVbox.style = (this._messageList.visible) ? "" : "border-width: 0px"; + } + else { + Main.panel.statusArea.dateMenu._calendar.setDate(new Date()); + this.eventsCount = (this.seenEvents) ? 0 : this.eventsCount; + this.resetIndicator(); + } + }); + + if(this.prefs.get_boolean("autoclose-menu")) { + this.cmsig = global.display.connect('notify::focus-window', () => { + if(global.display.focus_window!= null && this.menu.isOpen) { + this.menu.close(1); + } + }); + } + + Main.panel.statusArea.dateMenu._date.visible = !this.prefs.get_boolean("hide-date-section"); + if(this.prefs.get_boolean("hide-weather-section")) { + this.originalEventsSectionParent.remove_actor(Main.panel.statusArea.dateMenu._weatherItem); + } + if(this.prefs.get_boolean("hide-clock-section")) { + this.originalEventsSectionParent.remove_actor(Main.panel.statusArea.dateMenu._clocksItem); + } + + } + + undoChanges() { + + if(this._indicator.get_children().length == 0) { + return; + } + + this.blinkIconStopIfBlinking(); + this._messageListParent.remove_actor(this._messageList); + this._messageListParent.insert_child_at_index(this._messageList,0); + this.dateMenuVbox.style=""; + this.dateMenuVbox.remove_style_class_name("notification-center-datemenu-vbox"); + [ this._messageList._dndSwitch.visible, this._messageList._dndButton.label_actor.visible ] = [ true, true ]; + + this.manageEvents(0); + //this.removeAndDisconnectSections(); + let len=this.showingSections.length; + while(len!=0) { + + if(this.showingSections[len-1] == "events") { + this[this.showingSections[len-1]+"Section"]._eventsList.disconnect(this.connectedSignals[2*len-1]); + this[this.showingSections[len-1]+"Section"]._eventsList.disconnect(this.connectedSignals[2*len-2]); + + this.box.remove_child(this.box.get_children()[len-1]); + this.newEventsSectionParent.add_actor(this.eventsSection); + } + else { + this[this.showingSections[len-1]+"Section"]._list.disconnect(this.connectedSignals[2*len-1]); + this[this.showingSections[len-1]+"Section"]._list.disconnect(this.connectedSignals[2*len-2]); + + this.box.remove_child(this.box.get_children()[len-1]); + this._messageList._addSection(this[this.showingSections[len-1]+"Section"]); + } + this[this.showingSections[len-1]+"Section"].remove_style_class_name('notification-center-message-list-section'); + this.connectedSignals.pop(); + this.connectedSignals.pop(); + len--; + } + + this.eventsSection.allowed = false; + [ this.mediaSection.visible, this.notificationSection.visible, this.eventsSection.visible ] = [ true, true, true ]; + this.removeSection(this.mediaSection); + this.removeSection(this.notificationSection); + this.removeSection(this.eventsSection); + + this._messageList._addSection(this.mediaSection); + this._messageList._addSection(this.notificationSection); + this.originalEventsSectionParent.insert_child_at_index(this.eventsSection,0); // Using this.originalEventsSectionParent since original this.newEventsSectionParent may be changed due to this.eventsSectionPosition. + this._messageList._clearButton.opacity = 255; + Main.messageTray.bannerAlignment = 2; + Main.messageTray._bannerBin.set_y_align(1); + + Main.panel.statusArea.dateMenu.menu.disconnect(this.dmSig); + Main.panel.statusArea.dateMenu._calendar.disconnect(this.unFreezeSig); + + if(this.cmsig != null) { + global.display.disconnect(this.cmsig); + } + + if(this.dndSig != null){ + this.dndpref.disconnect(this.dndSig); + this.dndItem.destroy(); + } + + if(this.iconThemeChangeSig!=null){ + this.textureCache.disconnect(this.iconThemeChangeSig); + } + + Main.panel.statusArea.dateMenu.get_children()[0].insert_child_at_index(this.dtActors[0],0); + Main.panel.statusArea.dateMenu.get_children()[0].insert_child_at_index(Main.panel.statusArea.dateMenu._indicator, 2); + + if(Main.panel.statusArea.dateMenu._clocksItem.get_parent() == null) { + this.originalEventsSectionParent.insert_child_at_index(Main.panel.statusArea.dateMenu._clocksItem, 1); + } + if(Main.panel.statusArea.dateMenu._weatherItem.get_parent() == null) { + this.originalEventsSectionParent.insert_child_at_index(Main.panel.statusArea.dateMenu._weatherItem, 2); + } + Main.panel.statusArea.dateMenu._date.visible = true; + Main.wm.removeKeybinding('indicator-shortcut'); + + this.eventsIcon.destroy(); + this.eventsLabel.destroy(); + this.mediaIcon.destroy(); + this.notificationIcon.destroy(); + this.notificationLabel.destroy(); + this._indicator.destroy(); + + this.clearButton.destroy(); + this.box.destroy(); + this.scrollView.destroy(); + + this.prefs.disconnect(this.reloadSignal); + this.prefs.disconnect(this.reloadProfilesSignal); + + } + +}); + + diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..479cd15 --- /dev/null +++ b/metadata.json @@ -0,0 +1,17 @@ +{ + "_generated": "Generated by SweetTooth, do not edit", + "comment": "Detach notification center to top panel and customizations.", + "description": "Detach notification center to top panel and customizations.Please reset the extension after updating.\nThe Extension will stop when upgraded to an incompatible version.\nIn that case an Update tab is created to easily reset the extension.\nA Reset button is also always present in Preferences option in the Top Right Application menu of the extension preferences window.", + "name": "Notification Center", + "settings-schema": "org.gnome.shell.extensions.notification-center", + "shell-version": [ + "3.38", + "40", + "41", + "42" + ], + "status": "", + "url": "https://github.com/Selenium-H/Notification-Center", + "uuid": "notification-center@Selenium-H", + "version": 24 +} diff --git a/notification-center@Selenium-H/extension.js b/notification-center@Selenium-H/extension.js index 110ee99..3817c1e 100644 --- a/notification-center@Selenium-H/extension.js +++ b/notification-center@Selenium-H/extension.js @@ -7,10 +7,11 @@ Version 24.02 const ExtensionUtils = imports.misc.extensionUtils; const Gtk = imports.gi.Gtk; +const GObject = imports.gi.GObject; const LangClass = imports.lang.Class; const Main = imports.ui.main; const MetaKeyBindingFlags = imports.gi.Meta.KeyBindingFlags; -const PanelMenuButton = imports.ui.panelMenu.Button; +const PanelMenu = imports.ui.panelMenu; const PopupMenu = imports.ui.popupMenu; const ShellActionMode = imports.gi.Shell.ActionMode; const St = imports.gi.St; @@ -52,16 +53,14 @@ function reloadExtensionOnPrefsChange() { } -const NotificationCenter = new LangClass({ +const NotificationCenter = GObject.registerClass( +class NotificationCenter extends PanelMenu.Button { - Name: "NotificationCenter", - Extends: PanelMenuButton, - - _init: function () { + _init() { ExtensionUtils.initTranslations("notification-center"); this.prefs = ExtensionUtils.getSettings("org.gnome.shell.extensions.notification-center"); - this.parent(1-0.5*this.prefs.get_enum('indicator-pos'), "NotificationCenter"); + super._init(1-0.5*this.prefs.get_enum('indicator-pos'), "NotificationCenter"); this._messageList = Main.panel.statusArea.dateMenu._messageList; this._messageListParent = this._messageList.get_parent(); this.mediaSection = this._messageList._mediaSection; @@ -108,9 +107,9 @@ const NotificationCenter = new LangClass({ this.add_style_class_name('notification-center-panel-button'); this.notificationIcon.set_pivot_point(0.5, 0); - }, + } - _onOpenStateChanged: function(menu,open) { + _onOpenStateChanged(menu,open) { if(!open) { this.resetIndicator(); @@ -130,9 +129,9 @@ const NotificationCenter = new LangClass({ this.seenEvents = true; this.resetIndicator(); - }, + } - animateOnNewNotification: function( times, op=254, angle=3 ) { + animateOnNewNotification( times, op=254, angle=3 ) { [ this.visible, this.notificationIcon.visible ] = [ true, true ]; if(times == 0 || this.notAnimateIcon) { @@ -158,9 +157,9 @@ const NotificationCenter = new LangClass({ onComplete: ()=> this.animateOnNewNotification(--times, op-1, -angle) }); - }, + } - blinkIcon: function( blinkTimes, interval, opacity ) { + blinkIcon( blinkTimes, interval, opacity ) { this.manageAutohide(); if(blinkTimes > 0) { @@ -171,22 +170,22 @@ const NotificationCenter = new LangClass({ }); } - }, + } - blinkIconStopIfBlinking: function() { + blinkIconStopIfBlinking() { this.notificationIcon.remove_all_transitions(); this.notificationIcon.set_opacity(255); - }, + } - dndToggle: function() { + dndToggle() { this.dndpref.set_boolean('show-banners',!this.dndpref.get_boolean('show-banners')); - }, + } - loadDndStatus: function () { + loadDndStatus() { this.isDndOff = this.dndpref.get_boolean("show-banners"); this.dndItem.setToggleState(!this.isDndOff); @@ -215,9 +214,9 @@ const NotificationCenter = new LangClass({ return true; - }, + } - loadPreferences: function() { + loadPreferences() { this.autohide = this.prefs.get_int("autohide"); this.mediaSectionToBeShown = (this.prefs.get_int("show-media")>0)?true:false; @@ -242,9 +241,9 @@ const NotificationCenter = new LangClass({ this.showLabel = this.prefs.get_boolean("show-label"); this.changeIcons = this.prefs.get_boolean("change-icons"); - }, + } - manageAutohide: function() { + manageAutohide() { if(!this.menu.isOpen) { this.mediaIcon.visible = this.mediaSection._shouldShow() && this.showThreeIcons && this.mediaSectionToBeShown; @@ -265,9 +264,9 @@ const NotificationCenter = new LangClass({ this.box.style_class = (this.noNotificationLabel.visible) ? "notification-center-message-list-empty" : "notification-center-message-list"; } - }, + } - manageEvents: function(action) { + manageEvents(action) { this.eventsSection.visible = this.showEventsSectionIfEmpty || this.shouldShowEventsSection() ; if(this.showEventsInCalendarAlso == true) { @@ -290,9 +289,9 @@ const NotificationCenter = new LangClass({ return; } } - }, + } - manageLabel:function(nCount,eCount) { + manageLabel(nCount,eCount) { this.notificationLabel.visible = nCount*this.newNotificationAction; this.eventsLabel.visible = eCount*this.newNotificationAction && (this.shouldShowEventsSection() > 0); @@ -310,16 +309,16 @@ const NotificationCenter = new LangClass({ } } - }, + } - manageIconChange: function(statusIcon) { + manageIconChange(statusIcon) { let iconName = statusIcon ? "notification-center-full" : "notification-center-empty"; this.notificationIcon.icon_name = iconName; - }, + } - middleClickDndToggle: function (actor, event) { + middleClickDndToggle(actor, event) { switch(event.get_button()) { @@ -338,9 +337,9 @@ const NotificationCenter = new LangClass({ } - }, + } - newNotif: function(messageType) { + newNotif(messageType) { switch(messageType) { case "media": @@ -371,9 +370,9 @@ const NotificationCenter = new LangClass({ } this.resetIndicator(); - }, + } - remNotif: function(messageType) { + remNotif(messageType) { switch(messageType) { case "media" : @@ -388,7 +387,7 @@ const NotificationCenter = new LangClass({ } this.resetIndicator(); - }, + } removeSection(section) { @@ -400,9 +399,9 @@ const NotificationCenter = new LangClass({ this._messageList._sectionList.remove_actor(section); this._messageList._sync(); - }, + } - resetIndicator: function() { + resetIndicator() { this.manageAutohide(); this.clearButton.visible = this.notificationSection._canClear && this.notificationSectionToBeShown; @@ -411,9 +410,9 @@ const NotificationCenter = new LangClass({ this.manageLabel((this.notificationCount + (!this.showThreeIcons)*this.eventsCount) ,(this.showThreeIcons)*this.eventsCount); } - }, + } - setNotificationIconName: function () { + setNotificationIconName() { if(Gtk.IconTheme.get_default()) { this.notificationIconName = Gtk.IconTheme.get_default().has_icon("notification-symbolic")?"notification-symbolic":"preferences-system-notifications-symbolic"; @@ -422,27 +421,27 @@ const NotificationCenter = new LangClass({ this.notificationIconName = "preferences-system-notifications-symbolic"; } - }, + } - iconThemeChanged: function() { + iconThemeChanged() { this.setNotificationIconName(); this.loadDndStatus(); - }, + } - shouldShowEventsSection: function() { + shouldShowEventsSection() { switch(this.eventsSection._eventsList.get_children().length) { case 0: return 0; default: - return (this.eventsSection._eventsList.get_children()[0].style_class == 'event-placeholder') ? 0: this.eventsSection._eventsList.get_children().length; + return (this.eventsSection._eventsList.get_children()[0].text == _("No Events")) ? 0: this.eventsSection._eventsList.get_children().length; } - }, + } - startNotificationCenter: function() { + startNotificationCenter() { if(this.prefs.get_double("current-version") < 23.03) { Main.notify("Notification Center","Extension is updated. Please Complete the update process in the extension preferences."); @@ -610,9 +609,9 @@ const NotificationCenter = new LangClass({ this.originalEventsSectionParent.remove_actor(Main.panel.statusArea.dateMenu._clocksItem); } - }, + } - undoChanges: function () { + undoChanges() { if(this._indicator.get_children().length == 0) { return; @@ -705,7 +704,7 @@ const NotificationCenter = new LangClass({ this.prefs.disconnect(this.reloadSignal); this.prefs.disconnect(this.reloadProfilesSignal); - }, + } }); diff --git a/notification-center@Selenium-H/metadata.json b/notification-center@Selenium-H/metadata.json index b03deae..5442328 100644 --- a/notification-center@Selenium-H/metadata.json +++ b/notification-center@Selenium-H/metadata.json @@ -1,14 +1,18 @@ { -"name": "Notification Center", -"description": "Detach notification center to top panel and customizations.Please reset the extension after updating.\nThe Extension will stop when upgraded to an incompatible version.\nIn that case an Update tab is created to easily reset the extension.\nA Reset button is also always present in Preferences option in the Top Right Application menu of the extension preferences window.", -"comment": "Detach notification center to top panel and customizations.", -"uuid": "notification-center@Selenium-H", -"settings-schema": "org.gnome.shell.extensions.notification-center", -"shell-version": [ - "3.38", - "40" -], -"status" : "", -"url": "https://github.com/Selenium-H/Notification-Center", -"version": 24.02 -} + "_generated": "Generated by SweetTooth, do not edit", + "comment": "Detach notification center to top panel and customizations.", + "description": "Detach notification center to top panel and customizations.Please reset the extension after updating.\nThe Extension will stop when upgraded to an incompatible version.\nIn that case an Update tab is created to easily reset the extension.\nA Reset button is also always present in Preferences option in the Top Right Application menu of the extension preferences window.", + "name": "Notification Center", + "settings-schema": "org.gnome.shell.extensions.notification-center", + "shell-version": [ + "3.38", + "40", + "41", + "42" + ], + "status": "", + "url": "https://github.com/Selenium-H/Notification-Center", + "uuid": "notification-center@Selenium-H", + "version": 24 + } + \ No newline at end of file