├── locale
├── meson.build
├── LINGUAS
├── bigSur-StatusArea.pot
├── ru.po
├── pl.po
├── pt_BR.po
├── pt_PT.po
├── sv.po
├── es.po
├── de.po
├── it.po
└── fr.po
├── schemas
├── gschemas.compiled
├── meson.build
└── org.gnome.shell.extensions.bigsur-statusarea.gschema.xml
├── icons
├── meson.build
├── notification-symbolic.svg
├── notification-disabled-symbolic.svg
├── notification-new-symbolic.svg
├── bluetooth-paired-symbolic.svg
├── notifications-symbolic.svg
└── logo.svg
├── indicators
├── meson.build
├── light.js
├── button.js
├── volume.js
├── power.js
├── bluetooth.js
├── nightlight.js
├── network.js
├── calendar.js
├── system.js
└── notification.js
├── meson_post_install.py
├── metadata.json
├── meson.build
├── stylesheet.css
├── README.md
├── export-zip.sh
├── convenience.js
├── menuItems.js
├── extension.js
└── prefs.js
/locale/meson.build:
--------------------------------------------------------------------------------
1 | i18n.gettext (meson.project_name (), preset: 'glib')
--------------------------------------------------------------------------------
/locale/LINGUAS:
--------------------------------------------------------------------------------
1 | de
2 | fr
3 | it
4 | pt_PT
5 | pt_BR
6 | pl
7 | ru
8 | sv
9 | es
10 |
--------------------------------------------------------------------------------
/schemas/gschemas.compiled:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThierryHFR/Big-Sur-StatusArea/HEAD/schemas/gschemas.compiled
--------------------------------------------------------------------------------
/schemas/meson.build:
--------------------------------------------------------------------------------
1 | gnome.compile_schemas()
2 |
3 | install_data(
4 | 'org.gnome.shell.extensions.bigsur-statusarea.gschema.xml',
5 | install_dir : schema_dir
6 | )
7 |
--------------------------------------------------------------------------------
/icons/meson.build:
--------------------------------------------------------------------------------
1 | install_data([
2 | 'logo.svg',
3 | 'notification-disabled-symbolic.svg',
4 | 'notification-new-symbolic.svg',
5 | 'notification-symbolic.svg',
6 | 'notifications-symbolic.svg',
7 | 'bluetooth-paired-symbolic.svg'
8 | ],
9 | install_dir : icons_dir
10 | )
11 |
12 |
--------------------------------------------------------------------------------
/indicators/meson.build:
--------------------------------------------------------------------------------
1 | install_data([
2 | 'bluetooth.js',
3 | 'button.js',
4 | 'calendar.js',
5 | 'network.js',
6 | 'nightlight.js',
7 | 'light.js',
8 | 'notification.js',
9 | 'power.js',
10 | 'system.js',
11 | 'volume.js'
12 | ],
13 | install_dir : indicators_dir
14 | )
15 |
16 |
--------------------------------------------------------------------------------
/meson_post_install.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | import os
4 | import subprocess
5 |
6 | prefix = os.environ['MESON_INSTALL_DESTDIR_PREFIX']
7 | schemadir = os.path.join(prefix, 'share', 'glib-2.0', 'schemas')
8 |
9 | # Packaging tools define DESTDIR and this isn't needed for them
10 | if 'DESTDIR' not in os.environ:
11 | print('Compiling GSettings schemas...')
12 | subprocess.call(['glib-compile-schemas', schemadir])
13 |
--------------------------------------------------------------------------------
/metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "_generated": "Generated by SweetTooth, do not edit",
3 | "description": "Move the Power/Network/Volume/User/Date/Notifications menus to the status area. It is a fork of :https://github.com/Fausto-Korpsvart/Big-Sur-StatusArea",
4 | "name": "Big Sur Status Area",
5 | "shell-version": [
6 | "42"
7 | ],
8 | "url": "https://github.com/Ordissimo/Big-Sur-StatusArea",
9 | "uuid": "bigSur-StatusArea@ordissimo.com",
10 | "version": 99
11 | }
12 |
--------------------------------------------------------------------------------
/icons/notification-symbolic.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/notification-disabled-symbolic.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/icons/notification-new-symbolic.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/icons/bluetooth-paired-symbolic.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/meson.build:
--------------------------------------------------------------------------------
1 | project('bigSur-StatusArea',
2 | version: '19.10.0',
3 | license: 'GPL3'
4 | )
5 |
6 | gnome = import ('gnome')
7 | i18n = import('i18n')
8 |
9 | prefix = get_option('prefix')
10 | datadir = join_paths (prefix, get_option('datadir'))
11 | schema_dir = join_paths(datadir, 'glib-2.0', 'schemas')
12 |
13 | extensions_dir = join_paths(prefix, 'share', 'gnome-shell', 'extensions', 'bigSur-StatusArea@ordissimo.com')
14 |
15 | icons_dir = join_paths(extensions_dir, 'icons')
16 | indicators_dir = join_paths(extensions_dir, 'indicators')
17 |
18 | install_data([
19 | 'convenience.js',
20 | 'menuItems.js',
21 | 'prefs.js',
22 | 'extension.js',
23 | 'metadata.json',
24 | 'stylesheet.css'
25 | ],
26 | install_dir: extensions_dir
27 | )
28 |
29 | subdir(
30 | 'icons'
31 | )
32 | subdir(
33 | 'indicators'
34 | )
35 | subdir(
36 | 'locale'
37 | )
38 | subdir(
39 | 'schemas'
40 | )
41 |
42 | meson.add_install_script('meson_post_install.py')
43 |
--------------------------------------------------------------------------------
/stylesheet.css:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | .label-menu {
20 | margin: 10px;
21 | padding-left: 20px;
22 | }
23 |
24 | /* .datemenu-calendar-column {
25 | border-left-width: 0;
26 | border-right-width: 1px;
27 | height: 23.0em;
28 | } */
29 |
30 | .remove-menubutton {
31 | border-radius: 10px;
32 | padding: 0px 4px;
33 | }
34 |
35 | .remove-menubutton:hover,
36 | .remove-menubutton:focus {
37 | padding: 1px 5px;
38 | }
39 |
40 | .remove-menubutton>StIcon {
41 | icon-size: 16px;
42 | }
43 |
44 | /* Message list */
45 | /* .message-list {
46 | width: 22.5em;
47 | max-height: 350px;
48 | } */
49 |
50 | .panel-status-menu-box>StIcon {
51 | icons-size: 16px; padding: 5px;
52 | }
53 |
--------------------------------------------------------------------------------
/schemas/org.gnome.shell.extensions.bigsur-statusarea.gschema.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | Separate date and notification
6 |
7 |
8 | false
9 | Activate spacing
10 |
11 |
12 | true
13 | Show an icon instead of name
14 |
15 |
16 | ""
17 | Date format
18 |
19 |
20 | 9
21 | Horizontal Spacing
22 |
23 |
24 |
25 | ""
26 | MPRIS2 Capable Media Players
27 |
28 |
29 | "Calendar;1;1;calendar|Light;1;0;light|Night Light;1;0;nightlight|Volume;1;0;volume|Network;1;0;network|Bluetooth;1;0;bluetooth|Power;1;0;power|Notification;1;0;notification|User;1;0;user"
30 | Indicators
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Big Sur StatusArea
2 |
3 | ## What is it
4 |
5 | A GNOME Shell extension for move the Power/Network/Volume/User/Date/Notifications menus to the status area.
6 |
7 | This project is a fork of https://github.com/Fausto-Korpsvart/Big-Sur-StatusArea
8 |
9 | ## Requirements
10 |
11 | * GNOME Shell >= 3.38
12 |
13 | ## How to contribute
14 |
15 | * Download the code
16 | * Build with Meson (see at the next section)
17 | * Log out & log in from your user session. Alternatively, just restart the computer.
18 | * Activate the extension in GNOME Tweaks
19 |
20 | ## Build with Meson
21 |
22 | The project uses a build system called [Meson](https://mesonbuild.com/). You can install
23 | in most Linux distributions as "meson".
24 |
25 | It's possible to read more information in the Meson docs to tweak the configuration if needed.
26 |
27 | For a regular use and local development these are the steps to build the
28 | project and install it:
29 |
30 | ```bash
31 | meson --prefix=$HOME/.local/ --localedir=share/gnome-shell/extensions/bigSur-StatusArea@ordissimo.com/locale .build
32 | ninja -C .build install
33 | ```
34 |
35 | It is strongly recommended to delete the destination folder
36 | ($HOME/.local/share/gnome-shell/extensions/bigSur-StatusArea@ordissimo.com) before doing this, to ensure that no old
37 | data is kept.
38 |
39 | ## Export extension ZIP file for extensions.gnome.org
40 |
41 | To create a ZIP file with the extension, just run:
42 |
43 | ```bash
44 | ./export-zip.sh
45 | ```
46 |
47 | This will create the file `bigSur-StatusArea@ordissimo.com.zip` with the extension, following the rules for publishing
48 | at extensions.gnome.org.
49 |
--------------------------------------------------------------------------------
/icons/notifications-symbolic.svg:
--------------------------------------------------------------------------------
1 |
2 |
52 |
--------------------------------------------------------------------------------
/export-zip.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Export extension as zip file for extensios.gnome.org
4 | # ----------------------------------------------------
5 | #
6 | # Usage:
7 | # ./export-zip.sh - builds extension & create zip inside repository
8 |
9 | set -e
10 |
11 | REPO_DIR="$(pwd)"
12 | BUILD_DIR="${REPO_DIR}/builddir"
13 | UUID="bigSur-StatusArea@ordissimo.com"
14 | LOCAL_PREFIX="${REPO_DIR}/${UUID}"
15 | EXTENSIONS_DIR="${LOCAL_PREFIX}/share/gnome-shell/extensions/${UUID}"
16 | SCHEMADIR="${LOCAL_PREFIX}/share/glib-2.0/schemas"
17 |
18 | # Check old builddir
19 | if [ -d "${PWD}/${BUILD_DIR}" ]; then
20 | echo "A current build directory already exists. Would you like to remove it?"
21 | select yn in "Yes" "No"; do
22 | case $yn in
23 | Yes )
24 | rm -rf "${PWD:?}/${BUILD_DIR}"
25 | echo "Build directory was removed succesfuly"
26 | break;;
27 | No )
28 | echo "The old build directory must be removed first. Exiting"
29 | exit;;
30 | esac
31 | done
32 | fi
33 |
34 | # Meson build
35 | echo "# -------------------"
36 | echo "# Buiding with meson"
37 | echo "# -------------------"
38 | meson --prefix="${LOCAL_PREFIX}" --localedir=locale "${BUILD_DIR}" "${REPO_DIR}"
39 | ninja -C "${BUILD_DIR}" install
40 |
41 | # Create distribution ZIP file
42 | echo -e "\\n# --------------------------"
43 | echo "# Create extension ZIP file"
44 | echo "# --------------------------"
45 | rm -rf "${REPO_DIR}/${UUID}.zip" "${LOCAL_PREFIX}/${UUID}.zip"
46 | cd "${LOCAL_PREFIX}" || exit
47 | mkdir schemas
48 | cp "${SCHEMADIR}"/*.xml schemas/
49 | glib-compile-schemas schemas/
50 | cp -r "${EXTENSIONS_DIR}"/* .
51 | zip -qr "${UUID}.zip" ./*.js ./*.css ./*.json ./locale ./schemas ./locale ./indicators ./icons
52 | mv -f "${UUID}.zip" "${REPO_DIR}/"
53 | cd "${REPO_DIR}" || exit
54 |
55 | # Clean
56 | rm -rf "${BUILD_DIR}" "${LOCAL_PREFIX}"
57 |
--------------------------------------------------------------------------------
/indicators/light.js:
--------------------------------------------------------------------------------
1 | /* Panel indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, UPowerGlib, Clutter } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const PopupMenu = imports.ui.popupMenu;
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
26 | const CustomButton = Extension.imports.indicators.button.CustomButton;
27 |
28 | var LightIndicator = GObject.registerClass({
29 | GTypeName: "LightIndicator",
30 | },
31 | class LightIndicator extends CustomButton {
32 |
33 | _init () {
34 | super._init("LightIndicator");
35 | this.menu.actor.add_style_class_name("aggregate-menu");
36 |
37 | this._brightness = Main.panel.statusArea.aggregateMenu._brightness;
38 | this._brightnessIcon = new St.Icon({
39 | icon_name: "display-brightness-symbolic",
40 | style_class: "system-status-icon"
41 | });
42 | this.box.add_child(this._brightnessIcon);
43 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._brightness.menu.actor);
44 | this.menu.box.add_actor(this._brightness.menu.actor);
45 |
46 | this._separator = new PopupMenu.PopupSeparatorMenuItem();
47 | this.menu.addMenuItem(this._separator);
48 | }
49 | destroy () {
50 | this.box.remove_child(this._brightnessIcon);
51 | this.menu.box.remove_actor(this._brightness.menu.actor);
52 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._brightness.menu.actor);
53 | super.destroy()
54 | }
55 | });
56 |
--------------------------------------------------------------------------------
/indicators/button.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, Shell } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const PanelMenu = imports.ui.panelMenu;
22 | const ExtensionUtils = imports.misc.extensionUtils;
23 | const Me = ExtensionUtils.getCurrentExtension();
24 | const Convenience = Me.imports.convenience;
25 |
26 | var CustomButton = GObject.registerClass({
27 | GTypeName: 'CustomButton',
28 | },
29 | class CustomButton extends PanelMenu.Button {
30 |
31 | _init (name) {
32 | super._init(0.5, name);
33 | this.settings = Convenience.getSettings();
34 | this.name = name;
35 | this._center = false;
36 | this.box = new St.BoxLayout({
37 | vertical: false,
38 | style_class: "panel-status-menu-box"
39 | });;
40 | this.add_child(this.box);
41 | }
42 |
43 | _openApp (desktop) {
44 | let app = Shell.AppSystem.get_default().lookup_app(desktop);
45 | if (app == null)
46 | return false;
47 | app.activate();
48 | return true;
49 | }
50 |
51 | set_spacing (spacing) {
52 | this._default_spacing = spacing;
53 | this.update_spacing(spacing);
54 | }
55 |
56 | update_spacing (spacing) {
57 | if (this.settings.get_boolean("activate-spacing")) {
58 | let style = '-natural-hpadding: %dpx'.format(spacing);
59 | if (spacing < 6) {
60 | style += '; -minimum-hpadding: %dpx'.format(spacing);
61 | }
62 | this.set_style(style);
63 | }
64 | else
65 | this.set_style("");
66 | }
67 |
68 | calculate_spacing () {
69 | let style = this.get_style();
70 | if (style) {
71 | let start = style.indexOf("-natural-hpadding: ");
72 | let end = style.indexOf("px;");
73 | let val = parseInt(style.substring(start + 19, end));
74 | return val;
75 | }
76 | return NaN
77 | }
78 |
79 | destroy () {
80 | super.destroy()
81 | }
82 | });
83 |
--------------------------------------------------------------------------------
/convenience.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const Gettext = imports.gettext;
20 | const Gio = imports.gi.Gio;
21 | const Config = imports.misc.config;
22 | const ExtensionUtils = imports.misc.extensionUtils;
23 |
24 | /**
25 | * initTranslations:
26 | * @domain: (optional): the gettext domain to use
27 | *
28 | * Initialize Gettext to load translations from extensionsdir/locale.
29 | * If @domain is not provided, it will be taken from metadata["gettext-domain"]
30 | */
31 | function initTranslations(domain) {
32 | let extension = ExtensionUtils.getCurrentExtension();
33 |
34 | domain = domain || extension.metadata["gettext-domain"];
35 |
36 | // check if this extension was built with "make zip-file", and thus
37 | // has the locale files in a subfolder
38 | // otherwise assume that extension has been installed in the
39 | // same prefix as gnome-shell
40 | let localeDir = extension.dir.get_child("locale");
41 | if (localeDir.query_exists(null))
42 | Gettext.bindtextdomain(domain, localeDir.get_path());
43 | else
44 | Gettext.bindtextdomain(domain, Config.LOCALEDIR);
45 | }
46 |
47 | /**
48 | * getSettings:
49 | * @schema: (optional): the GSettings schema id
50 | *
51 | * Builds and return a GSettings schema for @schema, using schema files
52 | * in extensionsdir/schemas. If @schema is not provided, it is taken from
53 | * metadata["settings-schema"].
54 | */
55 | function getSettings(schema) {
56 | let extension = ExtensionUtils.getCurrentExtension();
57 |
58 | schema = "org.gnome.shell.extensions.bigsur-statusarea";
59 | //schema = schema || extension.metadata["settings-schema"];
60 |
61 | const GioSSS = Gio.SettingsSchemaSource;
62 |
63 | // check if this extension was built with "make zip-file", and thus
64 | // has the schema files in a subfolder
65 | // otherwise assume that extension has been installed in the
66 | // same prefix as gnome-shell (and therefore schemas are available
67 | // in the standard folders)
68 | let schemaDir = extension.dir.get_child("schemas");
69 | let schemaSource;
70 | if (schemaDir.query_exists(null))
71 | schemaSource = GioSSS.new_from_directory(schemaDir.get_path(),
72 | GioSSS.get_default(),
73 | false);
74 | else
75 | schemaSource = GioSSS.get_default();
76 |
77 | let schemaObj = schemaSource.lookup(schema, true);
78 | if (!schemaObj)
79 | throw new Error("Schema " + schema + " could not be found for extension " +
80 | extension.metadata.uuid + ". Please check your installation.");
81 |
82 | return new Gio.Settings({
83 | settings_schema: schemaObj
84 | });
85 | }
86 |
--------------------------------------------------------------------------------
/indicators/volume.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, Shell, Clutter, Gio } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const PopupMenu = imports.ui.popupMenu;
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
26 | const CustomButton = Extension.imports.indicators.button.CustomButton;
27 | const Convenience = Extension.imports.convenience;
28 |
29 | var VolumeIndicator = GObject.registerClass({
30 | GTypeName: "VolumeIndicator",
31 | },
32 | class VolumeIndicator extends CustomButton {
33 |
34 | _init () {
35 | super._init("VolumeIndicator");
36 | this._settings = Convenience.getSettings();
37 | this.menu.actor.add_style_class_name("aggregate-menu");
38 | this._volume = Main.panel.statusArea.aggregateMenu._volume;
39 | this._volume.remove_actor(this._volume._primaryIndicator);
40 | this.box.add_child(this._volume._primaryIndicator);
41 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._volume.menu.actor);
42 | this.menu.box.add_actor(this._volume.menu.actor);
43 | this.connect("scroll-event", (actor, event) => {
44 | this.onScroll(event);
45 | });
46 | //this.connect("scroll-event", (actor, event) => this._volume._volumeMenu.scrollOutput(event));
47 |
48 | let settings = new PopupMenu.PopupMenuItem(_("Volume Settings"));
49 | settings.connect("activate", () => this._openApp("gnome-sound-panel.desktop"));
50 | this.menu.connect('open-state-changed', (menu, isPoppedUp) => {
51 | if (isPoppedUp) {
52 | let children = this._volume._volumeMenu._getMenuItems();
53 | for (let i = 0; i < children.length; i++) {
54 | children[i].show();
55 | }
56 | }
57 | }, this._volume);
58 | this.menu.addMenuItem(settings);
59 | // this.menu.box.connect("scroll-event", (actor, event) => this.onScroll(event));
60 | //this.menu.box.connect("scroll-event", (actor, event) => this._volume._volumeMenu.scrollOutput(event));
61 | }
62 |
63 | destroy () {
64 | //this._mediaSection.disconnect(this._mediaVisible);
65 | this.box.remove_child(this._volume._primaryIndicator);
66 | this.menu.box.remove_actor(this._volume.menu.actor);
67 | //this.menu.box.remove_actor(this._mediaSection);
68 | this._volume.add_actor(this._volume._primaryIndicator);
69 | //this._mediaSection.remove_style_class_name("music-box");
70 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._volume.menu.actor);
71 | //Main.panel.statusArea.dateMenu._messageList._addSection(this._mediaSection);
72 | super.destroy()
73 | }
74 |
75 | onScroll(event) {
76 | let result = this._volume._volumeMenu.scroll(event);
77 | if (result == Clutter.EVENT_PROPAGATE || this._volume.menu.actor.mapped)
78 | return result;
79 |
80 | let gicon = new Gio.ThemedIcon({ name: this._volume._volumeMenu.getOutputIcon() });
81 | let level = this._volume._volumeMenu.getLevel();
82 | let maxLevel = this._volume._volumeMenu.getMaxLevel();
83 | Main.osdWindowManager.show(-1, gicon, null, level, maxLevel);
84 | }
85 | });
86 |
--------------------------------------------------------------------------------
/menuItems.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 | const GObject = imports.gi.GObject;
19 |
20 | var MenuItems = GObject.registerClass({
21 | GTypeName: "MenuItems",
22 | },
23 | class MenuItems extends GObject.Object {
24 | _init (settings) {
25 | super._init();
26 | this.settings = settings;
27 | }
28 |
29 | getItems() {
30 | let itemsString = this.settings.get_string("items");
31 | return this.itemsToArray(itemsString);
32 | }
33 |
34 | itemsToArray(itemsString) {
35 | let items = itemsString.split("|");
36 | let itemsArray = new Array();
37 | for (let indexItem in items) {
38 | let itemDatas = items[indexItem].split(";");
39 | let item = {
40 | "label": itemDatas[0],
41 | "enable": (itemDatas[1] == "1"),
42 | "position": (itemDatas[2] == "1"),
43 | "shortcut": itemDatas[3]
44 | };
45 | itemsArray.push(item);
46 | }
47 | return itemsArray;
48 | }
49 |
50 | changeOrder(index, posRel) {
51 | let items = this.getItems();
52 | if ((posRel < 0 && index > 0) || (posRel > 0 && index < (items.length - 1))) {
53 | let temp = items[index];
54 | items.splice(index, 1);
55 | items.splice(parseInt(index) + posRel, 0, temp);
56 | this.setItems(items);
57 | return true;
58 | }
59 | return false;
60 | }
61 |
62 | changeEnable(index, value) {
63 | let items = this.getItems();
64 | if (index < 0 && index >= items.length) {
65 | return false;
66 | }
67 | items[index]["enable"] = value;
68 | this.setItems(items);
69 | return true;
70 | }
71 |
72 | changePosition(index, value) {
73 | let items = this.getItems();
74 | if (index < 0 && index >= items.length) {
75 | return false;
76 | }
77 | items[index]["position"] = value;
78 | this.setItems(items);
79 | return true;
80 | }
81 |
82 | setItems(items) {
83 | let itemsString = this.itemsToString(items);
84 | this.settings.set_string("items", itemsString);
85 | }
86 |
87 | itemsToString(itemsArray) {
88 | let items = new Array()
89 | for (let indexItem in itemsArray) {
90 | let itemDatasArray = itemsArray[indexItem];
91 | let itemDatasString = itemDatasArray["label"] + ";" + (itemDatasArray["enable"] ? "1" : "0") + ";" + (itemDatasArray["position"] ? "1" : "0") + ";" + itemDatasArray["shortcut"];
92 | items.push(itemDatasString);
93 | }
94 | return items.join("|");
95 | }
96 |
97 | getEnableItems() {
98 | let items = this.getItems();
99 | let indexItem;
100 | let itemsEnable = new Array();
101 | for (indexItem in items) {
102 | let item = items[indexItem];
103 | if (item["enable"]) {
104 | itemsEnable.push(item["shortcut"]);
105 | }
106 | }
107 | return itemsEnable;
108 | }
109 |
110 | getCenterItems() {
111 | let items = this.getItems();
112 | let indexItem;
113 | let itemsEnable = new Array();
114 | for (indexItem in items) {
115 | let item = items[indexItem];
116 | if (item["enable"] && item["position"]) {
117 | itemsEnable.push(item["shortcut"]);
118 | }
119 | }
120 | return itemsEnable;
121 | }
122 | });
123 |
--------------------------------------------------------------------------------
/icons/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/locale/bigSur-StatusArea.pot:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: PACKAGE VERSION\n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 | "Last-Translator: FULL NAME \n"
13 | "Language-Team: LANGUAGE \n"
14 | "Language: \n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=CHARSET\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 |
19 | #: ../prefs.js:184
20 | msgid "Settings"
21 | msgstr ""
22 |
23 | #: ../prefs.js:193
24 | msgid "User/System Indicator"
25 | msgstr ""
26 |
27 | #: ../prefs.js:197
28 | msgid "Show an icon instead of name"
29 | msgstr ""
30 |
31 | #: ../prefs.js:214
32 | msgid "Calendar Indicator"
33 | msgstr ""
34 |
35 | #: ../prefs.js:218
36 | msgid "Change date format"
37 | msgstr ""
38 |
39 | #: ../prefs.js:251
40 | msgid "Power Indicator"
41 | msgstr ""
42 |
43 | #: ../prefs.js:255
44 | msgid "Show battery percentage"
45 | msgstr ""
46 |
47 | #: ../prefs.js:279
48 | msgid "Position and size"
49 | msgstr ""
50 |
51 | #: ../prefs.js:283
52 | msgid "Indicators padding"
53 | msgstr ""
54 |
55 | #: ../prefs.js:283
56 | msgid "Position and size"
57 | msgstr ""
58 |
59 | #: ../prefs.js:283
60 | msgid "Unified Calendar/Notification Indicator"
61 | msgstr ""
62 |
63 | #: ../prefs.js:330
64 | msgid "Indicators Order"
65 | msgstr ""
66 |
67 | #: ../prefs.js:350
68 | msgid "Left"
69 | msgstr ""
70 |
71 | #: ../prefs.js:351
72 | msgid "Center"
73 | msgstr ""
74 |
75 | #: ../prefs.js:404
76 | msgid "Top to bottom -> Left to right"
77 | msgstr ""
78 |
79 | #: ../prefs.js:409
80 | msgid "Reset Indicators"
81 | msgstr ""
82 |
83 | #: ../prefs.js:415
84 | msgid "Reset"
85 | msgstr ""
86 |
87 | #: ../prefs.js:452
88 | msgid "About"
89 | msgstr ""
90 |
91 | #: ../prefs.js:484
92 | msgid "Version: "
93 | msgstr ""
94 |
95 | #: ../prefs.js:493
96 | msgid "If something breaks, don't hesitate to leave a comment at "
97 | msgstr ""
98 |
99 | #: ../prefs.js:497
100 | msgid "Webpage/Github"
101 | msgstr ""
102 |
103 | #: ../prefs.js:508
104 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
105 | msgstr ""
106 |
107 | #: ../indicators/bluetooth.js:70
108 | msgid "Bluetooth Settings"
109 | msgstr ""
110 |
111 | #: ../indicators/calendar.js:101
112 | msgid "No Events"
113 | msgstr ""
114 |
115 | #: ../indicators/calendar.js:129
116 | msgid "Date Time Settings"
117 | msgstr ""
118 |
119 | #: ../indicators/network.js:79
120 | msgid "Network Settings"
121 | msgstr ""
122 |
123 | #: ../indicators/nightlight.js:70
124 | msgid "Temperature"
125 | msgstr ""
126 |
127 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
128 | msgid "Resume"
129 | msgstr ""
130 |
131 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
132 | msgid "Turn Off"
133 | msgstr ""
134 |
135 | #: ../indicators/nightlight.js:96
136 | msgid "Display Settings"
137 | msgstr ""
138 |
139 | #: ../indicators/nightlight.js:128
140 | msgid "Turn On"
141 | msgstr ""
142 |
143 | #: ../indicators/nightlight.js:131
144 | msgid "Night Light Disabled"
145 | msgstr ""
146 |
147 | #: ../indicators/nightlight.js:131
148 | msgid "Night Light On"
149 | msgstr ""
150 |
151 | #: ../indicators/nightlight.js:132
152 | msgid "Disable Until Tomorrow"
153 | msgstr ""
154 |
155 | #: ../indicators/power.js:64
156 | msgid "Power Settings"
157 | msgstr ""
158 |
159 | #: ../indicators/system.js:76
160 | msgid "Log Out"
161 | msgstr ""
162 |
163 | #: ../indicators/system.js:83
164 | msgid "Account Settings"
165 | msgstr ""
166 |
167 | #: ../indicators/system.js:94
168 | msgid "System Settings"
169 | msgstr ""
170 |
171 | #: ../indicators/system.js:114
172 | msgid "Lock"
173 | msgstr ""
174 |
175 | #: ../indicators/system.js:136
176 | msgid "Switch User"
177 | msgstr ""
178 |
179 | #: ../indicators/system.js:159
180 | msgid "Orientation Lock"
181 | msgstr ""
182 |
183 | #: ../indicators/system.js:180
184 | msgid "Suspend"
185 | msgstr ""
186 |
187 | #: ../indicators/system.js:201
188 | msgid "Power Off"
189 | msgstr ""
190 |
191 | #: ../indicators/system.js:201
192 | msgid "Restart"
193 | msgstr ""
194 |
195 | #: ../indicators/volume.js:66
196 | msgid "Volume Settings"
197 | msgstr ""
198 |
199 |
200 | #: schemas.xml
201 | msgid "Calendar"
202 | msgstr ""
203 |
204 | msgid "Night Light"
205 | msgstr ""
206 |
207 | msgid "Light"
208 | msgstr ""
209 |
210 | msgid "Volume"
211 | msgstr ""
212 |
213 | msgid "Network"
214 | msgstr ""
215 |
216 | msgid "Power"
217 | msgstr ""
218 |
219 | msgid "Notification"
220 | msgstr ""
221 |
222 | msgid "User"
223 | msgstr ""
224 |
225 | msgid "Indicator padding"
226 | msgstr ""
227 |
228 | msgid "Enable toggle for custom indicator padding"
229 | msgstr ""
230 |
231 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
232 | msgstr ""
233 |
--------------------------------------------------------------------------------
/indicators/power.js:
--------------------------------------------------------------------------------
1 | /* Panel indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, UPowerGlib, Clutter } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const PopupMenu = imports.ui.popupMenu;
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
26 | const CustomButton = Extension.imports.indicators.button.CustomButton;
27 |
28 | var PowerIndicator = GObject.registerClass({
29 | Name: "PowerIndicator",
30 | },
31 | class PowerIndicator extends CustomButton {
32 |
33 | _init () {
34 | super._init("PowerIndicator");
35 | this.menu.actor.add_style_class_name("aggregate-menu");
36 | this._power = Main.panel.statusArea.aggregateMenu._power;
37 | this._power.remove_actor(this._power._indicator);
38 |
39 | this._percentageLabel = new St.Label({
40 | text: "",
41 | y_expand: true,
42 | y_align: Clutter.ActorAlign.CENTER,
43 | visible: false
44 | });
45 | this.box.add_child(this._power._indicator);
46 | this.box.add_child(this._percentageLabel);
47 |
48 | this._power.remove_actor(this._power._percentageLabel);
49 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._power.menu.actor);
50 |
51 | this._separator = new PopupMenu.PopupSeparatorMenuItem();
52 | this.menu.addMenuItem(this._separator);
53 |
54 | this._label = new St.Label({
55 | style_class: "label-menu"
56 | });
57 | this.menu.box.add_child(this._label);
58 | this._settings = new PopupMenu.PopupMenuItem(_("Power Settings"));
59 | this._settings.connect("activate", () => this._openApp("gnome-power-panel.desktop"));
60 | this.menu.addMenuItem(this._settings);
61 | this._properties_changed = this._power._proxy.connect("g-properties-changed", () => this._sync());
62 | this._show_battery_signal = this._power._desktopSettings.connect("changed::show-battery-percentage", () => this._sync());
63 | this._sync();
64 | }
65 |
66 | _sync () {
67 | let powertype = this._power._proxy.IsPresent;
68 | if (!powertype) {
69 | this._power._indicator.hide();
70 | this._percentageLabel.hide();
71 | this._separator.actor.hide();
72 | this._label.hide();
73 | this._settings.actor.hide();
74 |
75 | this.hide();
76 |
77 | } else {
78 | this._power._indicator.show();
79 | if (this._power._proxy.State == UPowerGlib.DeviceState.CHARGING)
80 | this._percentageLabel.visible = false;
81 | else
82 | this._percentageLabel.visible = this._power._desktopSettings.get_boolean("show-battery-percentage");
83 | this._percentageLabel.clutter_text.set_markup('' + Math.round(this._power._proxy.Percentage) + " %");
84 | this._separator.actor.show();
85 | this._label.show();
86 | this._settings.actor.show();
87 |
88 | let hideOnFull = this._hideOnFull && (this._power._proxy.State == UPowerGlib.DeviceState.FULLY_CHARGED);
89 | let hideAtPercent = this._hideOnPercent && (this._power._proxy.Percentage >= this._hideWhenPercent);
90 |
91 | this.show();
92 |
93 | if (hideOnFull) {
94 | this.actor.hide();
95 | } else if (hideAtPercent) {
96 | this._actor.hide();
97 | }
98 |
99 | }
100 | this._label.set_text(this._power._getStatus());
101 | }
102 |
103 | showPercentageLabel (status) {
104 | this._power._desktopSettings.set_boolean(status);
105 | this._sync();
106 | }
107 |
108 | setHideOnFull (status) {
109 | this._hideOnFull = status;
110 | this._sync();
111 | }
112 |
113 | setHideOnPercent (status, percent, element) {
114 | this._actor = (element == 0) ? this.actor : this._percentageLabel;
115 | this._hideOnPercent = status;
116 | this._hideWhenPercent = percent;
117 | this._sync();
118 | }
119 |
120 | destroy () {
121 | this._power._proxy.disconnect(this._properties_changed);
122 | this._power._desktopSettings.disconnect(this._show_battery_signal);
123 |
124 | this.box.remove_child(this._power._indicator);
125 |
126 | this._power.add_actor(this._power._indicator);
127 |
128 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._power.menu.actor);
129 |
130 | super.destroy()
131 | }
132 | });
133 |
--------------------------------------------------------------------------------
/locale/ru.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: \n"
4 | "Report-Msgid-Bugs-To: \n"
5 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
6 | "PO-Revision-Date: 2022-05-04 23:15+0300\n"
7 | "Last-Translator: \n"
8 | "Language-Team: \n"
9 | "Language: ru\n"
10 | "MIME-Version: 1.0\n"
11 | "Content-Type: text/plain; charset=UTF-8\n"
12 | "Content-Transfer-Encoding: 8bit\n"
13 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
14 | "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
15 | "X-Generator: Poedit 3.0.1\n"
16 |
17 | #: ../prefs.js:184
18 | msgid "Settings"
19 | msgstr "Настройки"
20 |
21 | #: ../prefs.js:193
22 | msgid "User/System Indicator"
23 | msgstr "Индикатор пользователя"
24 |
25 | #: ../prefs.js:197
26 | msgid "Show an icon instead of name"
27 | msgstr "Показывать иконку вместо имени"
28 |
29 | #: ../prefs.js:214
30 | msgid "Calendar Indicator"
31 | msgstr "Календарь"
32 |
33 | #: ../prefs.js:218
34 | msgid "Change date format"
35 | msgstr "Изменить формат даты"
36 |
37 | #: ../prefs.js:251
38 | msgid "Power Indicator"
39 | msgstr "Питание"
40 |
41 | #: ../prefs.js:255
42 | msgid "Show battery percentage"
43 | msgstr "Показывать процент заряда"
44 |
45 | #: ../prefs.js:279 ../prefs.js:283
46 | msgid "Position and size"
47 | msgstr "Позиция и размер"
48 |
49 | #: ../prefs.js:283
50 | msgid "Indicators padding"
51 | msgstr "Расстояние между индикаторами"
52 |
53 | #: ../prefs.js:283
54 | msgid "Unified Calendar/Notification Indicator"
55 | msgstr "Единый индикатор календаря и уведомлений"
56 |
57 | #: ../prefs.js:330
58 | msgid "Indicators Order"
59 | msgstr "Порядок индикаторов"
60 |
61 | #: ../prefs.js:350
62 | msgid "Left"
63 | msgstr "Справа"
64 |
65 | #: ../prefs.js:351
66 | msgid "Center"
67 | msgstr "По центру"
68 |
69 | #: ../prefs.js:404
70 | msgid "Top to bottom -> Left to right"
71 | msgstr "Для перемещения индикатора необходимо изменить его место в списке"
72 |
73 | #: ../prefs.js:409
74 | msgid "Reset Indicators"
75 | msgstr "Сбросить индикаторы"
76 |
77 | #: ../prefs.js:415
78 | msgid "Reset"
79 | msgstr "Сброс"
80 |
81 | #: ../prefs.js:452
82 | msgid "About"
83 | msgstr "О программе"
84 |
85 | #: ../prefs.js:484
86 | msgid "Version: "
87 | msgstr "Версия: "
88 |
89 | #: ../prefs.js:493
90 | msgid "If something breaks, don't hesitate to leave a comment at "
91 | msgstr "Если что-то сломается, не стесняйтесь оставлять комментарии на "
92 |
93 | #: ../prefs.js:497
94 | msgid "Webpage/Github"
95 | msgstr "Сайт/GitHub"
96 |
97 | #: ../prefs.js:508
98 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
99 | msgstr ""
100 | "Это расширение является форком Extend Panel Menu, спасибо julio641742"
101 |
102 | #: ../indicators/bluetooth.js:70
103 | msgid "Bluetooth Settings"
104 | msgstr "Параметры Bluetooth"
105 |
106 | #: ../indicators/calendar.js:101
107 | msgid "No Events"
108 | msgstr "Нет событий"
109 |
110 | #: ../indicators/calendar.js:129
111 | msgid "Date Time Settings"
112 | msgstr "Настройки даты и времени"
113 |
114 | #: ../indicators/network.js:79
115 | msgid "Network Settings"
116 | msgstr "Параметры сети"
117 |
118 | #: ../indicators/nightlight.js:70
119 | msgid "Temperature"
120 | msgstr "Температура"
121 |
122 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
123 | msgid "Resume"
124 | msgstr "Включить снова"
125 |
126 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
127 | msgid "Turn Off"
128 | msgstr "Выключить навсегда"
129 |
130 | #: ../indicators/nightlight.js:96
131 | msgid "Display Settings"
132 | msgstr "Параметры дисплея"
133 |
134 | #: ../indicators/nightlight.js:128
135 | msgid "Turn On"
136 | msgstr "Включить"
137 |
138 | #: ../indicators/nightlight.js:131
139 | msgid "Night Light Disabled"
140 | msgstr "Ночной свет не используется"
141 |
142 | #: ../indicators/nightlight.js:131
143 | msgid "Night Light On"
144 | msgstr "Ночной свет используется"
145 |
146 | #: ../indicators/nightlight.js:132
147 | msgid "Disable Until Tomorrow"
148 | msgstr "Выключить до завтра"
149 |
150 | #: ../indicators/power.js:64
151 | msgid "Power Settings"
152 | msgstr "Настройки питания"
153 |
154 | #: ../indicators/system.js:76
155 | msgid "Log Out"
156 | msgstr "Выйти"
157 |
158 | #: ../indicators/system.js:83
159 | msgid "Account Settings"
160 | msgstr "Пользователи"
161 |
162 | #: ../indicators/system.js:94
163 | msgid "System Settings"
164 | msgstr "Параметры"
165 |
166 | #: ../indicators/system.js:114
167 | msgid "Lock"
168 | msgstr "Заблокировать"
169 |
170 | #: ../indicators/system.js:136
171 | msgid "Switch User"
172 | msgstr "Сменить пользователя"
173 |
174 | #: ../indicators/system.js:159
175 | msgid "Orientation Lock"
176 | msgstr "Блокировка ориентации"
177 |
178 | #: ../indicators/system.js:180
179 | msgid "Suspend"
180 | msgstr "Сон"
181 |
182 | #: ../indicators/system.js:201
183 | msgid "Power Off"
184 | msgstr "Выключение"
185 |
186 | #: ../indicators/system.js:201
187 | msgid "Restart"
188 | msgstr "Перезапуск"
189 |
190 | #: ../indicators/volume.js:66
191 | msgid "Volume Settings"
192 | msgstr "Параметры звука"
193 |
194 | #: schemas.xml
195 | msgid "Calendar"
196 | msgstr "Календарь"
197 |
198 | msgid "Night Light"
199 | msgstr "Ночной свет"
200 |
201 | msgid "Light"
202 | msgstr "Яркость"
203 |
204 | msgid "Volume"
205 | msgstr "Громкость"
206 |
207 | msgid "Network"
208 | msgstr "Сеть"
209 |
210 | msgid "Power"
211 | msgstr "Питание"
212 |
213 | msgid "Notification"
214 | msgstr "Уведомления"
215 |
216 | msgid "User"
217 | msgstr "Пользователь"
218 |
219 | msgid "Indicator padding"
220 | msgstr "Расстояние"
221 |
222 | msgid "Enable toggle for custom indicator padding"
223 | msgstr "Включить свое расстояние между индикаторами"
224 |
225 | msgid ""
226 | "Enable toggle for individual calendar and notification indicators (gnome-"
227 | "shell restart required for effect)"
228 | msgstr ""
229 | "Включить раздельные индикаторы для календаря и уведомлений (требует "
230 | "перезапуск GNOME)"
231 |
--------------------------------------------------------------------------------
/locale/pl.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2019-12-12 20:21+0100\n"
12 | "Language-Team: Piotr Komur, pkomur@gmail.com\n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "X-Generator: Poedit 2.2.4\n"
17 | "Last-Translator: \n"
18 | "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
19 | "Language: pl\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Ustawienia"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Wskaźnik systemu/użytkownika"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Pokaż ikonę zamiast nazwy"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Wskaźnik kalendarza"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Zmień format daty"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Wskaźnik zasilania"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Pokaż procent naładowania akumulatora"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Położenie i rozmiar"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Odległości między wskaźnikami"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Wskaźnik ujednolicony kalendarz/powiadomienie."
60 |
61 | #: ../prefs.js:333
62 | msgid "Indicators Order"
63 | msgstr "Kolejność wskaźników"
64 |
65 | #: ../prefs.js:353
66 | msgid "Left"
67 | msgstr "Z lewej"
68 |
69 | #: ../prefs.js:354
70 | msgid "Center"
71 | msgstr "Po środku"
72 |
73 | #: ../prefs.js:407
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "Z góry na dół -> z lewej do prawej"
76 |
77 | #: ../prefs.js:412
78 | msgid "Reset Indicators"
79 | msgstr "Resetowanie wskaźników"
80 |
81 | #: ../prefs.js:418
82 | msgid "Reset"
83 | msgstr "Resetuj"
84 |
85 | #: ../prefs.js:455
86 | msgid "About"
87 | msgstr "O programie"
88 |
89 | #: ../prefs.js:487
90 | msgid "Version: "
91 | msgstr "Wersja:"
92 |
93 | #: ../prefs.js:496
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr "W razie problemów proszę o komentarz na:"
96 |
97 | #: ../prefs.js:500
98 | msgid "Webpage/Github"
99 | msgstr "Github"
100 |
101 | #: ../prefs.js:511
102 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
103 | msgstr ""
104 | "To rozszerzenie powstało na podstawie 'Extend Panel Menu'.\n"
105 | "Podziękowania dla julio641742."
106 |
107 | #: ../indicators/calendar.js:100
108 | msgid "No Events"
109 | msgstr "Brak zdarzeń"
110 |
111 | #: ../indicators/calendar.js:128
112 | msgid "Date Time Settings"
113 | msgstr "Ustawienia daty i czasu"
114 |
115 | #: ../indicators/network.js:95
116 | msgid "Network Settings"
117 | msgstr "Ustawienia sieci"
118 |
119 | #: ../indicators/nightlight.js:67
120 | msgid "Temperature"
121 | msgstr "Temperatura"
122 |
123 | #: ../indicators/nightlight.js:83 ../indicators/nightlight.js:126
124 | msgid "Resume"
125 | msgstr "Wznów"
126 |
127 | #: ../indicators/nightlight.js:86 ../indicators/nightlight.js:122
128 | msgid "Turn Off"
129 | msgstr "Wyłącz"
130 |
131 | #: ../indicators/nightlight.js:89
132 | msgid "Display Settings"
133 | msgstr "Ustawienia ekranu"
134 |
135 | #: ../indicators/nightlight.js:122
136 | msgid "Turn On"
137 | msgstr "Włącz"
138 |
139 | #: ../indicators/nightlight.js:125
140 | msgid "Night Light Disabled"
141 | msgstr "Nocne wyświetlanie wyłączone"
142 |
143 | #: ../indicators/nightlight.js:125
144 | msgid "Night Light On"
145 | msgstr "Nocne wyświetlanie włączone"
146 |
147 | #: ../indicators/nightlight.js:126
148 | msgid "Disable Until Tomorrow"
149 | msgstr "Wyłącz do jutra"
150 |
151 | #: ../indicators/power.js:59
152 | msgid "Power Settings"
153 | msgstr "Ustawienia zasilania"
154 |
155 | #: ../indicators/system.js:73
156 | msgid "Log Out"
157 | msgstr "Wyloguj się"
158 |
159 | #: ../indicators/system.js:80
160 | msgid "Account Settings"
161 | msgstr "Ustawienia konta"
162 |
163 | #: ../indicators/system.js:91
164 | msgid "System Settings"
165 | msgstr "Ustawienia systemu"
166 |
167 | #: ../indicators/system.js:111
168 | msgid "Lock"
169 | msgstr "Zablokuj"
170 |
171 | #: ../indicators/system.js:133
172 | msgid "Switch User"
173 | msgstr "Przełącz użytkownika"
174 |
175 | #: ../indicators/system.js:156
176 | msgid "Orientation Lock"
177 | msgstr "Zablokuj obracanie"
178 |
179 | #: ../indicators/system.js:177
180 | msgid "Suspend"
181 | msgstr "Wstrzymaj"
182 |
183 | #: ../indicators/system.js:198
184 | msgid "Power Off"
185 | msgstr "Wyłącz"
186 |
187 | #: ../indicators/system.js:201
188 | msgid "restart"
189 | msgstr "Uruchom ponownie"
190 |
191 | #: ../indicators/volume.js:66
192 | msgid "Volume Settings"
193 | msgstr "Ustawienia dźwięku"
194 |
195 | #: schemas.xml
196 | msgid "Night Light Indicator"
197 | msgstr "Wskaźnik nocnego wyświetlania"
198 |
199 | msgid "Light"
200 | msgstr "Jasność"
201 |
202 | msgid "Volume Indicator"
203 | msgstr "Wskaźnik głośności"
204 |
205 | msgid "Network Indicator"
206 | msgstr "Wskaźnik sieci"
207 |
208 | msgid "Power"
209 | msgstr "Power"
210 |
211 | msgid "User Indicator"
212 | msgstr "Wskaźnik użytkownika"
213 |
214 | msgid "Indicator padding"
215 | msgstr "Przekładka wskaźnika"
216 |
217 | msgid "Enable toggle for custom indicator padding"
218 | msgstr "Włącz przełącznik dla niestandardowego wypełnienia wskaźnika"
219 |
220 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
221 | msgstr "Włączenie przełącznika dla indywidualnego kalendarza i wskaźników powiadomień (wymagany restart gnome-shell dla efektu)"
222 |
223 |
--------------------------------------------------------------------------------
/indicators/bluetooth.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, Gio, GnomeBluetooth } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const Config = imports.misc.config;
23 | const PopupMenu = imports.ui.popupMenu;
24 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
25 | const _ = Gettext.gettext;
26 | const Me = imports.misc.extensionUtils.getCurrentExtension();
27 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
28 | const CustomButton = Extension.imports.indicators.button.CustomButton;
29 |
30 | var BluetoothIndicator = GObject.registerClass({
31 | GTypeName: "BluetoothIndicator",
32 | },
33 | class BluetoothIndicator extends CustomButton {
34 |
35 | _init() {
36 | super._init("BluetoothIndicator");
37 | //this.menu.box.set_width(270);
38 | this.menu.actor.add_style_class_name("aggregate-menu");
39 |
40 | this._bluetooth = null;
41 |
42 | if (Config.HAVE_BLUETOOTH) {
43 | this._bluetooth = Main.panel.statusArea.aggregateMenu._bluetooth;
44 | }
45 |
46 | if (!this._bluetooth) {
47 | this.hide();
48 | return;
49 | }
50 |
51 | this._bluetooth_active_icon_name = 'bluetooth-active-symbolic';
52 | this._bluetooth_disabled_icon_name = 'bluetooth-disabled-symbolic';
53 | this._bluetooth_paired_gicon = Gio.icon_new_for_string(`${Me.path}/icons/bluetooth-paired-symbolic.svg`);
54 |
55 | this._bluetooth.remove_actor(this._bluetooth._indicator);
56 | this._bluetooth._indicator.hide();
57 | this._bluetooth._item.menu._setSettingsVisibility(false);
58 |
59 | this._indicator = new St.Icon({style_class: "system-status-icon"});
60 | this._indicator.icon_name = 'bluetooth-active-symbolic';
61 |
62 | this.box.add_child(this._indicator);
63 |
64 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._bluetooth.menu.actor);
65 | this.menu.addMenuItem(this._bluetooth.menu);
66 |
67 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
68 | this._settings = new PopupMenu.PopupMenuItem(_("Bluetooth Settings"));
69 | this._settings.connect("activate", () => this._openApp("gnome-bluetooth-panel.desktop"));
70 | this.menu.addMenuItem(this._settings);
71 |
72 | this._bluetooth_properties_changed = this._bluetooth._proxy.connect("g-properties-changed", () => this._sync());
73 | this._bluetooth._sync();
74 |
75 | this._client = new GnomeBluetooth.Client();
76 | // this._model = this._client.get_model();
77 | this._deviceNotifyConnected = new Set();
78 |
79 | const deviceStore = this._client.get_devices();
80 | for (let i = 0; i < deviceStore.get_n_items(); i++)
81 | this._connectDeviceNotify(deviceStore.get_item(i));
82 |
83 | this._client.connect('device-removed', (c, path) => {
84 | this._deviceNotifyConnected.delete(path);
85 | this._queueSync.bind(this);
86 | });
87 | this._client.connect('device-added', (c, device) => {
88 | this._connectDeviceNotify(device);
89 | this._sync();
90 | });
91 |
92 | this.menu.connect("open-state-changed", (menu, isOpen) => {
93 | if (isOpen) {
94 | this._bluetooth._item.actor.show();
95 | }
96 | });
97 |
98 | this._sync();
99 |
100 | }
101 |
102 | _sync() {
103 |
104 | let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
105 | this.menu.setSensitive(sensitive);
106 |
107 | let devices = this._bluetooth._getDeviceInfos();
108 | let connectedDevices = devices.filter(dev => dev.connected);
109 | let nConnectedDevices = connectedDevices.length;
110 | let nDevices = devices.length;
111 | const adapterPowered = this._client.default_adapter_powered;
112 |
113 | if (nConnectedDevices > 0) {
114 | // Paired
115 | this._indicator.gicon = this._bluetooth_paired_gicon;
116 | this._bluetooth._item.icon.gicon = this._bluetooth_paired_gicon;
117 | } else if (adapterPowered) {
118 | // On
119 | this._indicator.icon_name = 'bluetooth-active-symbolic';
120 | this._bluetooth._item.icon.icon_name = 'bluetooth-active-symbolic';
121 | } else {
122 | // Off
123 | this._bluetooth._item.actor.show();
124 | this._indicator.icon_name = 'bluetooth-disabled-symbolic';
125 | this._bluetooth._item.icon.icon_name = 'bluetooth-disabled-symbolic';
126 | }
127 |
128 | }
129 |
130 | destroy() {
131 | if (this._bluetooth) {
132 | this._bluetooth._proxy.disconnect(this._bluetooth_properties_changed);
133 | }
134 |
135 | this.box.remove_child(this._bluetooth._indicator);
136 | this.menu.box.remove_actor(this._bluetooth.menu.actor);
137 | this._bluetooth.add_actor(this._bluetooth._indicator);
138 | this._bluetooth._item.menu._setSettingsVisibility(true);
139 |
140 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._bluetooth.menu.actor);
141 |
142 | super.destroy()
143 | }
144 | });
145 |
--------------------------------------------------------------------------------
/locale/pt_BR.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2020-01-04 11:54-0300\n"
12 | "Language-Team: \n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "X-Generator: Poedit 2.2.4\n"
17 | "Last-Translator: \n"
18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 | "Language: pt_BR\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Configurações"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Indicador de Usuário"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Mostre um ícone em vez do nome"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Indicador de calendário"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Alterar formato da data"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Indicador de energia"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Mostrar porcentagem da bateria"
48 |
49 | #: ../prefs.js:283
50 | msgid "Indicators padding"
51 | msgstr "Espaçamento dos indicadores"
52 |
53 | #: ../prefs.js:283
54 | msgid "Position and size"
55 | msgstr "Posição e tamanho"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Calendário unificado/indicador de notificação"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Ordenar Indicadores"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Esquerda"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Centro"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "De cima para baixo -> De esquerda para a direita"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Redefinir Indicadores"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Redefinr"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "Sobre"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Versão: "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr "Se algo quebrar, não hesite em deixar um comentário no "
96 |
97 | #: ../prefs.js:497
98 | msgid "Webpage/Github"
99 | msgstr "Página da Web/Github"
100 |
101 | #: ../prefs.js:508
102 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
103 | msgstr "Esta extensão é um fork do Extend Panel Menu, obrigado julio641742"
104 |
105 | #: ../indicators/bluetooth.js:70
106 | msgid "Bluetooth Settings"
107 | msgstr "Configurações de Bluetooth"
108 |
109 | #: ../indicators/calendar.js:101
110 | msgid "No Events"
111 | msgstr "Nenhum evento"
112 |
113 | #: ../indicators/calendar.js:129
114 | msgid "Date Time Settings"
115 | msgstr "Configurações de Data e Hora"
116 |
117 | #: ../indicators/network.js:79
118 | msgid "Network Settings"
119 | msgstr "Configurações de Rede"
120 |
121 | #: ../indicators/nightlight.js:70
122 | msgid "Temperature"
123 | msgstr "Temperatura"
124 |
125 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
126 | msgid "Resume"
127 | msgstr "Resumir"
128 |
129 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
130 | msgid "Turn Off"
131 | msgstr "Desligar"
132 |
133 | #: ../indicators/nightlight.js:96
134 | msgid "Display Settings"
135 | msgstr "Ajustar Tela"
136 |
137 | #: ../indicators/nightlight.js:128
138 | msgid "Turn On"
139 | msgstr "Ligar"
140 |
141 | #: ../indicators/nightlight.js:131
142 | msgid "Night Light Disabled"
143 | msgstr "Luz noturna desativada"
144 |
145 | #: ../indicators/nightlight.js:131
146 | msgid "Night Light On"
147 | msgstr "Luz noturna ligada"
148 |
149 | #: ../indicators/nightlight.js:132
150 | msgid "Disable Until Tomorrow"
151 | msgstr "Desligar até amanhã"
152 |
153 | #: ../indicators/power.js:64
154 | msgid "Power Settings"
155 | msgstr "Configurações de Energia"
156 |
157 | #: ../indicators/system.js:76
158 | msgid "Log Out"
159 | msgstr "Encerrar sessão"
160 |
161 | #: ../indicators/system.js:83
162 | msgid "Account Settings"
163 | msgstr "Configurações de Conta"
164 |
165 | #: ../indicators/system.js:94
166 | msgid "System Settings"
167 | msgstr "Configurações de Sistema"
168 |
169 | #: ../indicators/system.js:114
170 | msgid "Lock"
171 | msgstr "Bloquear"
172 |
173 | #: ../indicators/system.js:136
174 | msgid "Switch User"
175 | msgstr "Trocar Usuário"
176 |
177 | #: ../indicators/system.js:159
178 | msgid "Orientation Lock"
179 | msgstr "Bloquear rotação"
180 |
181 | #: ../indicators/system.js:180
182 | msgid "Suspend"
183 | msgstr "Suspender"
184 |
185 | #: ../indicators/system.js:201
186 | msgid "Power Off"
187 | msgstr "Desligar"
188 |
189 | #: ../indicators/system.js:201
190 | msgid "restart"
191 | msgstr "Reinicie"
192 |
193 | #: ../indicators/volume.js:66
194 | msgid "Volume Settings"
195 | msgstr "Configurações de Volume"
196 |
197 | #: schemas.xml
198 | msgid "Calendar"
199 | msgstr "Calendário"
200 |
201 | msgid "Night Light"
202 | msgstr "Luz noturna"
203 |
204 | msgid "Light"
205 | msgstr "Brilho"
206 |
207 | msgid "Volume"
208 | msgstr "Volume"
209 |
210 | msgid "Network"
211 | msgstr "Rede"
212 |
213 | msgid "Power"
214 | msgstr "Energia"
215 |
216 | msgid "Notification"
217 | msgstr "Notificação"
218 |
219 | msgid "User"
220 | msgstr "Usuário"
221 |
222 | msgid "Indicator padding"
223 | msgstr "Estofamento do Indicador"
224 |
225 | msgid "Enable toggle for custom indicator padding"
226 | msgstr "Habilitar alternância para preenchimento de indicadores personalizados"
227 |
228 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
229 | msgstr "Habilitar alternância para o calendário individual e indicadores de notificação (reinício de gnome-shell necessário para efeito)"
230 |
231 |
--------------------------------------------------------------------------------
/locale/pt_PT.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2020-01-04 11:54-0300\n"
12 | "Language-Team: \n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "X-Generator: Poedit 2.2.4\n"
17 | "Last-Translator: \n"
18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 | "Language: pt_PT\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Definições"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Indicador de Utilizador"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Mostre um ícone em vez do nome"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Indicador de calendário"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Alterar formato da data"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Indicador de energia"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Mostrar percentagem da bateria"
48 |
49 | #: ../prefs.js:283
50 | msgid "Indicators padding"
51 | msgstr "Espaçamento dos indicadores"
52 |
53 | #: ../prefs.js:283
54 | msgid "Position and size"
55 | msgstr "Posição e tamanho"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Indicador Calendário/Notificação Unido"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Organizar Indicadores"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Esquerda"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Centro"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "De cima para baixo -> Da esquerda para a direita"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Redefinir Indicadores"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Redefinir"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "Acerca de"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Versão: "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr "Se algo quebrar, não hesite em deixar um comentário na "
96 |
97 | #: ../prefs.js:497
98 | msgid "Webpage/Github"
99 | msgstr "Página da Web/Github"
100 |
101 | #: ../prefs.js:508
102 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
103 | msgstr "Esta extensão é um fork do Extend Panel Menu, obrigado a julio641742"
104 |
105 | #: ../indicators/bluetooth.js:70
106 | msgid "Bluetooth Settings"
107 | msgstr "Definições de Bluetooth"
108 |
109 | #: ../indicators/calendar.js:101
110 | msgid "No Events"
111 | msgstr "Nenhum evento"
112 |
113 | #: ../indicators/calendar.js:129
114 | msgid "Date Time Settings"
115 | msgstr "Definições de Data e Hora"
116 |
117 | #: ../indicators/network.js:79
118 | msgid "Network Settings"
119 | msgstr "Definições de Rede"
120 |
121 | #: ../indicators/nightlight.js:70
122 | msgid "Temperature"
123 | msgstr "Temperatura"
124 |
125 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
126 | msgid "Resume"
127 | msgstr "Resumir"
128 |
129 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
130 | msgid "Turn Off"
131 | msgstr "Desligar"
132 |
133 | #: ../indicators/nightlight.js:96
134 | msgid "Display Settings"
135 | msgstr "Definições de Ecrã"
136 |
137 | #: ../indicators/nightlight.js:128
138 | msgid "Turn On"
139 | msgstr "Ligar"
140 |
141 | #: ../indicators/nightlight.js:131
142 | msgid "Night Light Disabled"
143 | msgstr "Luz noturna desactivada"
144 |
145 | #: ../indicators/nightlight.js:131
146 | msgid "Night Light On"
147 | msgstr "Luz noturna ligada"
148 |
149 | #: ../indicators/nightlight.js:132
150 | msgid "Disable Until Tomorrow"
151 | msgstr "Desligar até amanhã"
152 |
153 | #: ../indicators/power.js:64
154 | msgid "Power Settings"
155 | msgstr "Definições de Energia"
156 |
157 | #: ../indicators/system.js:76
158 | msgid "Log Out"
159 | msgstr "Encerrar sessão"
160 |
161 | #: ../indicators/system.js:83
162 | msgid "Account Settings"
163 | msgstr "Definições de Conta"
164 |
165 | #: ../indicators/system.js:94
166 | msgid "System Settings"
167 | msgstr "Definições de Sistema"
168 |
169 | #: ../indicators/system.js:114
170 | msgid "Lock"
171 | msgstr "Bloquear"
172 |
173 | #: ../indicators/system.js:136
174 | msgid "Switch User"
175 | msgstr "Alterar Utilizador"
176 |
177 | #: ../indicators/system.js:159
178 | msgid "Orientation Lock"
179 | msgstr "Bloquear rotação"
180 |
181 | #: ../indicators/system.js:180
182 | msgid "Suspend"
183 | msgstr "Suspender"
184 |
185 | #: ../indicators/system.js:201
186 | msgid "Power Off"
187 | msgstr "Desligar"
188 |
189 | #: ../indicators/system.js:201
190 | msgid "restart"
191 | msgstr "Reiniciar"
192 |
193 | #: ../indicators/volume.js:66
194 | msgid "Volume Settings"
195 | msgstr "Definições de Volume"
196 |
197 | #: schemas.xml
198 | msgid "Calendar"
199 | msgstr "Calendário"
200 |
201 | msgid "Night Light"
202 | msgstr "Luz noturna"
203 |
204 | msgid "Light"
205 | msgstr "Brilho"
206 |
207 | msgid "Volume"
208 | msgstr "Volume"
209 |
210 | msgid "Network"
211 | msgstr "Rede"
212 |
213 | msgid "Power"
214 | msgstr "Energia"
215 |
216 | msgid "Notification"
217 | msgstr "Notificação"
218 |
219 | msgid "User"
220 | msgstr "Utilizador"
221 |
222 | msgid "Indicator padding"
223 | msgstr "Acolchoamento do Indicador"
224 |
225 | msgid "Enable toggle for custom indicator padding"
226 | msgstr "Habilitar alternância para preenchimento de indicadores personalizados"
227 |
228 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
229 | msgstr "Activar a alternância para o calendário individual e indicadores de notificação (reinício do gnome-shell necessário para efeito)"
230 |
231 |
232 |
--------------------------------------------------------------------------------
/indicators/nightlight.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, Gio } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const Slider = imports.ui.slider;
23 | const PopupMenu = imports.ui.popupMenu;
24 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
25 | const _ = Gettext.gettext;
26 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
27 | const CustomButton = Extension.imports.indicators.button.CustomButton;
28 |
29 | var NightLightIndicator = GObject.registerClass({
30 | GTypeName: "NightLightIndicator",
31 | },
32 | class NightLightIndicator extends CustomButton {
33 |
34 | _init () {
35 | super._init("NightLightIndicator");
36 |
37 | this._min = 4700;
38 | this._max = 1700;
39 |
40 | //this.menu.box.set_width(250);
41 | this.menu.actor.add_style_class_name("aggregate-menu");
42 |
43 | this._nightLight = Main.panel.statusArea.aggregateMenu._nightLight;
44 | this._nightLight.remove_actor(this._nightLight._indicator);
45 | this._nightLight.show();
46 | this._nightLight._sync = function () {};
47 |
48 | this.box.add_child(this._nightLight._indicator);
49 |
50 | this._label = new St.Label({
51 | style_class: "label-menu"
52 | });
53 |
54 | this._settings = new Gio.Settings({
55 | schema_id: "org.gnome.settings-daemon.plugins.color"
56 | });
57 | this._settings.connect('changed::night-light-enabled', () => this._sync());
58 |
59 | let sliderItem = new PopupMenu.PopupBaseMenuItem({
60 | activate: false
61 | });
62 |
63 | let sliderIcon = new St.Icon({
64 | icon_name: 'daytime-sunset-symbolic',
65 | style_class: 'popup-menu-icon'
66 | });
67 | sliderItem.actor.add(sliderIcon);
68 |
69 | this._slider = new Slider.Slider(0);
70 | this._slider.connect('notify::value', (s, value) => this._sliderChanged(s, value));
71 | this._slider.accessible_name = 'Temperature';
72 |
73 | this.menu.connect("open-state-changed", (menu, isOpen) => {
74 | if (isOpen) {
75 | this._updateView();
76 | }
77 | });
78 |
79 | sliderItem.actor.add(this._slider);
80 |
81 | this.menu.box.add_child(this._label);
82 | this.menu.addMenuItem(sliderItem);
83 |
84 | this._separator = new PopupMenu.PopupSeparatorMenuItem();
85 | this.menu.addMenuItem(this._separator);
86 |
87 | this._disableItem = new PopupMenu.PopupMenuItem(_("Resume"));
88 | this._disableItem.connect("activate", () => this._change());
89 | this.menu.addMenuItem(this._disableItem);
90 |
91 | this.turnItem = new PopupMenu.PopupMenuItem(_("Turn Off"));
92 | this.turnItem.connect("activate", () => this._toggleFeature());
93 | this.menu.addMenuItem(this.turnItem);
94 |
95 | let nightSettings = new PopupMenu.PopupMenuItem(_("Display Settings"));
96 | nightSettings.connect("activate", () => this._openApp("gnome-display-panel.desktop"));
97 | this.menu.addMenuItem(nightSettings);
98 |
99 | this._properties_changed = this._nightLight._proxy.connect("g-properties-changed", () => this._sync());
100 |
101 | Main.sessionMode.connect('updated', () => this._sync());
102 |
103 | this._sync();
104 | this._updateView();
105 | }
106 |
107 | _sliderChanged (slider, value) {
108 | const temperature = parseInt(this._slider.value * (this._max - this._min)) + this._min;
109 | this._settings.set_uint('night-light-temperature', temperature);
110 | }
111 |
112 | _updateView () {
113 | // Update temperature view
114 | const temperature = this._settings.get_uint('night-light-temperature');
115 | const value = (temperature - this._min) / (this._max - this._min);
116 | this._slider.value = value;
117 | }
118 |
119 | _change () {
120 | this._nightLight._proxy.DisabledUntilTomorrow = !this._nightLight._proxy.DisabledUntilTomorrow;
121 | this._sync();
122 | }
123 |
124 | _toggleFeature () {
125 | let enabledStatus = this._settings.get_boolean("night-light-enabled");
126 | this._settings.set_boolean("night-light-enabled", !enabledStatus);
127 | this._sync();
128 | }
129 |
130 | _sync () {
131 | let featureEnabled = this._settings.get_boolean("night-light-enabled");
132 | this.turnItem.label.set_text(featureEnabled ? _("Turn Off") : _("Turn On"));
133 | let disabled = this._nightLight._proxy.DisabledUntilTomorrow || !this._nightLight._proxy.NightLightActive;
134 | this._label.set_text(disabled ? _("Night Light Disabled") : _("Night Light On"));
135 | this._disableItem.label.text = disabled ? _("Resume") : _("Disable Until Tomorrow");
136 | this._disableItem.actor.visible = featureEnabled;
137 | this.visible = true;
138 | }
139 |
140 | destroy () {
141 | this._nightLight._proxy.disconnect(this._properties_changed);
142 | this.box.remove_child(this._nightLight._indicator);
143 | this._nightLight.hide();
144 | this._nightLight.add_actor(this._nightLight._indicator);
145 | super.destroy()
146 | }
147 | });
148 |
--------------------------------------------------------------------------------
/locale/sv.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # Adnan Bukvic , 2022.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2022-02-19 21:50+0100\n"
11 | "PO-Revision-Date: 2022-02-19 21:50+0100\n"
12 | "Last-Translator: Adnan Bukvic \n"
13 | "Language-Team: \n"
14 | "Language: sv\n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "X-Generator: Poedit 2.2.4\n"
19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Inställningar"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Användare/System -indikator"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Visa en ikon istället för ett namn"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Kalenderindikator"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Ändra tid/datum format"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Strömindikator"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Visa batteriprocent"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Plats och storlek"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Mellanrum för indiatorer"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Sammansatt kalender/notis indikator"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Ikonordning"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Vänster"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Mitten"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "Upp till ner -> Vänster till höger"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Återställ indikator"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Återställ"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "Om"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Version: "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr ""
96 | "Om något går sönder, vänligen lämna en kommentar på "
97 |
98 | #: ../prefs.js:497
99 | msgid "Webpage/Github"
100 | msgstr "Webbida/GitHub"
101 |
102 | #: ../prefs.js:508
103 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
104 | msgstr ""
105 | "Det här tillägget är en fork av Extend Panel Menu, tack till julio641742"
106 |
107 | #: ../indicators/bluetooth.js:70
108 | msgid "Bluetooth Settings"
109 | msgstr "Bluetoothinställingar"
110 |
111 | #: ../indicators/calendar.js:101
112 | msgid "No Events"
113 | msgstr "Inga händelser"
114 |
115 | #: ../indicators/calendar.js:129
116 | msgid "Date Time Settings"
117 | msgstr "Datum och tid intälllningar"
118 |
119 | #: ../indicators/network.js:79
120 | msgid "Network Settings"
121 | msgstr "Nätverksinställningar"
122 |
123 | #: ../indicators/nightlight.js:70
124 | msgid "Temperature"
125 | msgstr "Tempratur"
126 |
127 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
128 | msgid "Resume"
129 | msgstr "Fortsätt"
130 |
131 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
132 | msgid "Turn Off"
133 | msgstr "Stäng av"
134 |
135 | #: ../indicators/nightlight.js:96
136 | msgid "Display Settings"
137 | msgstr "Skärminställningar"
138 |
139 | #: ../indicators/nightlight.js:128
140 | msgid "Turn On"
141 | msgstr "Aktivera"
142 |
143 | #: ../indicators/nightlight.js:131
144 | msgid "Night Light Disabled"
145 | msgstr "Nattljus är av"
146 |
147 | #: ../indicators/nightlight.js:131
148 | msgid "Night Light On"
149 | msgstr "Nattljus är på"
150 |
151 | #: ../indicators/nightlight.js:132
152 | msgid "Disable Until Tomorrow"
153 | msgstr "Stäng av tills imorgon"
154 |
155 | #: ../indicators/power.js:64
156 | msgid "Power Settings"
157 | msgstr "Ström intällningar"
158 |
159 | #: ../indicators/system.js:76
160 | msgid "Log Out"
161 | msgstr "Logga ut"
162 |
163 | #: ../indicators/system.js:83
164 | msgid "Account Settings"
165 | msgstr "Användarintällningar"
166 |
167 | #: ../indicators/system.js:94
168 | msgid "System Settings"
169 | msgstr "Systemintällningar"
170 |
171 | #: ../indicators/system.js:114
172 | msgid "Lock"
173 | msgstr "Lås"
174 |
175 | #: ../indicators/system.js:136
176 | msgid "Switch User"
177 | msgstr "Byt användare"
178 |
179 | #: ../indicators/system.js:159
180 | msgid "Orientation Lock"
181 | msgstr "Riktiningslås"
182 |
183 | #: ../indicators/system.js:180
184 | msgid "Suspend"
185 | msgstr "Viloläge"
186 |
187 | #: ../indicators/system.js:201
188 | msgid "Power Off"
189 | msgstr "Stäng av"
190 |
191 | #: ../indicators/system.js:201
192 | msgid "Restart"
193 | msgstr "Starta om"
194 |
195 | #: ../indicators/volume.js:66
196 | msgid "Volume Settings"
197 | msgstr "Ljusintällningar"
198 |
199 | #: schemas.xml
200 | msgid "Calendar"
201 | msgstr "Kalender"
202 |
203 | msgid "Night Light"
204 | msgstr "Nattljus"
205 |
206 | msgid "Light"
207 | msgstr "Ljus"
208 |
209 | msgid "Volume"
210 | msgstr "Volym"
211 |
212 | msgid "Network"
213 | msgstr "Nätverk"
214 |
215 | msgid "Power"
216 | msgstr "Ström"
217 |
218 | msgid "Notification"
219 | msgstr "Notis"
220 |
221 | msgid "User"
222 | msgstr "Användare"
223 |
224 | msgid "Indicator padding"
225 | msgstr "Mellanrum för indikatorer"
226 |
227 | msgid "Enable toggle for custom indicator padding"
228 | msgstr "Akrivera för manuellt välja mellanrum mellan indikatorer"
229 |
230 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
231 | msgstr "Aktivera för att använda individuella kalender och notis indikatorer (en omstart av gnome shell krävs)"
232 |
233 | #~ msgid "Night Light Indicator"
234 | #~ msgstr "Nattljus"
235 |
236 | #~ msgid "Volume Indicator"
237 | #~ msgstr "Voylndikator"
238 |
239 | #~ msgid "Network Indicator"
240 | #~ msgstr "Nätverksindikator"
241 |
242 | #~ msgid "User Indicator"
243 | #~ msgstr "Användarindikator"
--------------------------------------------------------------------------------
/locale/es.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # Adnan Bukvic , 2022.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2022-05-04 10:51+0100\n"
11 | "PO-Revision-Date: 2022-05-04 10:51+0100\n"
12 | "Last-Translator: \n"
13 | "Language-Team: \n"
14 | "Language: es\n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "X-Generator: Poedit 2.2.4\n"
19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Configuración"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Usuario/Indicador del Sistema"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Mostrar un icono en lugar del nombre"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Indicador del Calendario"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Cambiar formato de fecha"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Indicador de energía"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Mostrar porcentaje de batería"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Posición y tamaño"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Espaciamiento de los indicadores"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Calendario unificado/Indicador de notificaciones"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Orden de los indicadores"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Izquerda"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Centro"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "De arriba a abajo -> Izquierda a derecha"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Reiniciar indicadores"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Reiniciar"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "Acerca de"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Versión: "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr "Si algo se rompe, no dude en dejar un comentario a "
96 |
97 | #: ../prefs.js:497
98 | msgid "Webpage/Github"
99 | msgstr "Página web/GitHub"
100 |
101 | #: ../prefs.js:508
102 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
103 | msgstr "Esta extensión es un fork de Extend Panel Menu, gracias a julio641742"
104 |
105 | #: ../indicators/bluetooth.js:70
106 | msgid "Bluetooth Settings"
107 | msgstr "Configuración de Bluetooth"
108 |
109 | #: ../indicators/calendar.js:101
110 | msgid "No Events"
111 | msgstr "No hay eventos"
112 |
113 | #: ../indicators/calendar.js:129
114 | msgid "Date Time Settings"
115 | msgstr "Configuración de fecha y hora"
116 |
117 | #: ../indicators/network.js:79
118 | msgid "Network Settings"
119 | msgstr "Configuración de red"
120 |
121 | #: ../indicators/nightlight.js:70
122 | msgid "Temperature"
123 | msgstr "Temperatura"
124 |
125 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
126 | msgid "Resume"
127 | msgstr "Resume"
128 |
129 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
130 | msgid "Turn Off"
131 | msgstr "Apagar"
132 |
133 | #: ../indicators/nightlight.js:96
134 | msgid "Display Settings"
135 | msgstr "Configuración de pantalla"
136 |
137 | #: ../indicators/nightlight.js:128
138 | msgid "Turn On"
139 | msgstr "Encender"
140 |
141 | #: ../indicators/nightlight.js:131
142 | msgid "Night Light Disabled"
143 | msgstr "Luz nocturna desactivada"
144 |
145 | #: ../indicators/nightlight.js:131
146 | msgid "Night Light On"
147 | msgstr "Luz nocturna activada"
148 |
149 | #: ../indicators/nightlight.js:132
150 | msgid "Disable Until Tomorrow"
151 | msgstr "Desactivar hasta mañana"
152 |
153 | #: ../indicators/power.js:64
154 | msgid "Power Settings"
155 | msgstr "Configuración de energía"
156 |
157 | #: ../indicators/system.js:76
158 | msgid "Log Out"
159 | msgstr "Cerrar la sesión"
160 |
161 | #: ../indicators/system.js:83
162 | msgid "Account Settings"
163 | msgstr "Configuración de usuario"
164 |
165 | #: ../indicators/system.js:94
166 | msgid "System Settings"
167 | msgstr "Configuración"
168 |
169 | #: ../indicators/system.js:114
170 | msgid "Lock"
171 | msgstr "Bloquear"
172 |
173 | #: ../indicators/system.js:136
174 | msgid "Switch User"
175 | msgstr "Cambiar usuario"
176 |
177 | #: ../indicators/system.js:159
178 | msgid "Orientation Lock"
179 | msgstr "Bloquear orientación"
180 |
181 | #: ../indicators/system.js:180
182 | msgid "Suspend"
183 | msgstr "Suspender"
184 |
185 | #: ../indicators/system.js:201
186 | msgid "Power Off"
187 | msgstr "Apagar"
188 |
189 | #: ../indicators/system.js:201
190 | msgid "Restart"
191 | msgstr "Reiniciar"
192 |
193 | #: ../indicators/volume.js:66
194 | msgid "Volume Settings"
195 | msgstr "Configuración de volumen"
196 |
197 | #: schemas.xml
198 | msgid "Calendar"
199 | msgstr "Calendario"
200 |
201 | msgid "Night Light"
202 | msgstr "Luz nocturna"
203 |
204 | msgid "Light"
205 | msgstr "Brillo"
206 |
207 | msgid "Volume"
208 | msgstr "Volumen"
209 |
210 | msgid "Network"
211 | msgstr "Redes"
212 |
213 | msgid "Power"
214 | msgstr "Energía"
215 |
216 | msgid "Notification"
217 | msgstr "Notificación"
218 |
219 | msgid "User"
220 | msgstr "Usuario"
221 |
222 | msgid "Indicator padding"
223 | msgstr "Espaciamiento de los indicadores"
224 |
225 | msgid "Enable toggle for custom indicator padding"
226 | msgstr "Activar espaciamiento personalizado"
227 |
228 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
229 | msgstr "Activar calendario y notificaciones separadas (se requiere reiniciar la gnome-shell)"
230 |
231 | #~ msgid "Night Light Indicator"
232 | #~ msgstr "Indicador de luz nocturna"
233 |
234 | #~ msgid "Volume Indicator"
235 | #~ msgstr "Indicador de volumen"
236 |
237 | #~ msgid "Network Indicator"
238 | #~ msgstr "Indicador de redes"
239 |
240 | #~ msgid "User Indicator"
241 | #~ msgstr "Indicador de usuario"
242 |
--------------------------------------------------------------------------------
/locale/de.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # Onno Giesmann , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2020-01-04 21:50+0100\n"
12 | "Last-Translator: Onno Giesmann \n"
13 | "Language-Team: \n"
14 | "Language: de\n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "X-Generator: Poedit 2.2.4\n"
19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Einstellungen"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Benutzer/System-Anzeige"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Symbol statt Namen anzeigen"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Kalender-Anzeige"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Datumsformat ändern"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Energie-Anzeige"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Batterieprozentsatz anzeigen"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Position und Größe"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Abstand zwischen den Anzeigern"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Unified Kalender/Benachrichtigung Indikator."
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Reihenfolge der Anzeiger"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Links"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Mittig"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "Oben nach unten -> Links nach rechts"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Anzeiger zurücksetzen"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Zurücksetzen"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "Info"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Version: "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr ""
96 | "Wenn etwas nicht klappt, hinterlassen Sie dazu gerne einen Kommentar auf "
97 |
98 | #: ../prefs.js:497
99 | msgid "Webpage/Github"
100 | msgstr "Internetseite/Github"
101 |
102 | #: ../prefs.js:508
103 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
104 | msgstr ""
105 | "Diese Erweiterung ist eine Abspaltung von Extend Panel Menu, Danke dafür an "
106 | "julio641742"
107 |
108 | #: ../indicators/bluetooth.js:70
109 | msgid "Bluetooth Settings"
110 | msgstr "Bluetooth-Einstellungen"
111 |
112 | #: ../indicators/calendar.js:101
113 | msgid "No Events"
114 | msgstr "Keine Ereignisse"
115 |
116 | #: ../indicators/calendar.js:129
117 | msgid "Date Time Settings"
118 | msgstr "Einstellungen für Datum und Zeit"
119 |
120 | #: ../indicators/network.js:79
121 | msgid "Network Settings"
122 | msgstr "Netzwerkeinstellungen"
123 |
124 | #: ../indicators/nightlight.js:70
125 | msgid "Temperature"
126 | msgstr "Temperatur"
127 |
128 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
129 | msgid "Resume"
130 | msgstr "Fortsetzen"
131 |
132 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
133 | msgid "Turn Off"
134 | msgstr "Ausschalten"
135 |
136 | #: ../indicators/nightlight.js:96
137 | msgid "Display Settings"
138 | msgstr "Bildschirmeinstellungen"
139 |
140 | #: ../indicators/nightlight.js:128
141 | msgid "Turn On"
142 | msgstr "Einschalten"
143 |
144 | #: ../indicators/nightlight.js:131
145 | msgid "Night Light Disabled"
146 | msgstr "Nachtmodus deaktiviert"
147 |
148 | #: ../indicators/nightlight.js:131
149 | msgid "Night Light On"
150 | msgstr "Nachtmodus ist an"
151 |
152 | #: ../indicators/nightlight.js:132
153 | msgid "Disable Until Tomorrow"
154 | msgstr "Ausschalten bis morgen"
155 |
156 | #: ../indicators/power.js:64
157 | msgid "Power Settings"
158 | msgstr "Energieeinstellungen"
159 |
160 | #: ../indicators/system.js:76
161 | msgid "Log Out"
162 | msgstr "Abmelden"
163 |
164 | #: ../indicators/system.js:83
165 | msgid "Account Settings"
166 | msgstr "Kontoeinstellungen"
167 |
168 | #: ../indicators/system.js:94
169 | msgid "System Settings"
170 | msgstr "Systemeinstellungen"
171 |
172 | #: ../indicators/system.js:114
173 | msgid "Lock"
174 | msgstr "Sperren"
175 |
176 | #: ../indicators/system.js:136
177 | msgid "Switch User"
178 | msgstr "Benutzer wechseln"
179 |
180 | #: ../indicators/system.js:159
181 | msgid "Orientation Lock"
182 | msgstr "Bildschirmdrehung sperren"
183 |
184 | #: ../indicators/system.js:180
185 | msgid "Suspend"
186 | msgstr "Ruhezustand"
187 |
188 | #: ../indicators/system.js:201
189 | msgid "Power Off"
190 | msgstr "Ausschalten"
191 |
192 | #: ../indicators/system.js:201
193 | msgid "Restart"
194 | msgstr "Neustart"
195 |
196 | #: ../indicators/volume.js:66
197 | msgid "Volume Settings"
198 | msgstr "Lautstärkeeinstellungen"
199 |
200 | #: schemas.xml
201 | msgid "Calendar"
202 | msgstr "Kalender"
203 |
204 | msgid "Night Light"
205 | msgstr "Nachtmodus"
206 |
207 | msgid "Light"
208 | msgstr "Helligkeit"
209 |
210 | msgid "Volume"
211 | msgstr "Lautstärke"
212 |
213 | msgid "Network"
214 | msgstr "Netzwerk"
215 |
216 | msgid "Power"
217 | msgstr "Energie"
218 |
219 | msgid "Notification"
220 | msgstr "Benachrichtigung"
221 |
222 | msgid "User"
223 | msgstr "Benutzer"
224 |
225 | msgid "Indicator padding"
226 | msgstr "Indikator Polsterung"
227 |
228 | msgid "Enable toggle for custom indicator padding"
229 | msgstr "Toggle für benutzerdefinierte Indikatorpolsterung einschalten"
230 |
231 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
232 | msgstr "Umschalter für individuelle Kalender- und Benachrichtigungsanzeigen aktivieren (Neustart der Gnome-Shell für Wirkung erforderlich)"
233 |
234 | #~ msgid "Night Light Indicator"
235 | #~ msgstr "Nachtmodus"
236 |
237 | #~ msgid "Volume Indicator"
238 | #~ msgstr "Lautstärke"
239 |
240 | #~ msgid "Network Indicator"
241 | #~ msgstr "Netzwerk"
242 |
243 | #~ msgid "User Indicator"
244 | #~ msgstr "Benutzer"
245 |
--------------------------------------------------------------------------------
/locale/it.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # Onno Giesmann , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugas-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2022-04-17 23:50+0100\n"
12 | "Last-Translator: Gianluca D'Angelo \n"
13 | "Language-Team: \n"
14 | "Language: it\n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "X-Generator: Poedit 2.2.4\n"
19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Impostazioni"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Indicatore sistema/Utilizzatore"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Mostra una icona invece del nome"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Indicatore Calendario"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Cambia il formato della data"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Indicatore energia"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Mostra percentuale baterita"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Posizione e dimensione"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Spazio tra gli indicatori"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Indicatore Calendario/Notifiche unificato"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Ordine degl indicatori"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Sinistra"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Centro"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "Da su a giù -> Da sinistra a destra"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Ripristino degli indicatori"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Reset"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "A proposito di..."
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Versione : "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr ""
96 | "Se qualcosa non funziona, non esitate a lasciare un commento a "
97 |
98 | #: ../prefs.js:497
99 | msgid "Webpage/Github"
100 | msgstr "Sito/Github"
101 |
102 | #: ../prefs.js:508
103 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
104 | msgstr ""
105 | "Questa esensione è un fork di , grazie a julio641742"
106 |
107 | #: ../indicators/bluetooth.js:70
108 | msgid "Bluetooth Settings"
109 | msgstr "Impostazioni Bluetooth"
110 |
111 | #: ../indicators/calendar.js:101
112 | msgid "No Events"
113 | msgstr "Nessun evento"
114 |
115 | #: ../indicators/calendar.js:129
116 | msgid "Date Time Settings"
117 | msgstr "Impostazioni data e ora"
118 |
119 | #: ../indicators/network.js:79
120 | msgid "Network Settings"
121 | msgstr "Impostazioni Rete"
122 |
123 | #: ../indicators/nightlight.js:70
124 | msgid "Temperature"
125 | msgstr "Temperatura"
126 |
127 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
128 | msgid "Resume"
129 | msgstr "Continua"
130 |
131 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
132 | msgid "Turn Off"
133 | msgstr "Disattiva"
134 |
135 | #: ../indicators/nightlight.js:96
136 | msgid "Display Settings"
137 | msgstr "Impostazioni Schermo"
138 |
139 | #: ../indicators/nightlight.js:128
140 | msgid "Turn On"
141 | msgstr "Attiva"
142 |
143 | #: ../indicators/nightlight.js:131
144 | msgid "Night Light Disabled"
145 | msgstr "Modalità notte disattiva"
146 |
147 | #: ../indicators/nightlight.js:131
148 | msgid "Night Light On"
149 | msgstr "Modalità notte attiva"
150 |
151 | #: ../indicators/nightlight.js:132
152 | msgid "Disable Until Tomorrow"
153 | msgstr "Disattivta fino a domaani"
154 |
155 | #: ../indicators/power.js:64
156 | msgid "Power Settings"
157 | msgstr "Impostazioni Energia"
158 |
159 | #: ../indicators/system.js:76
160 | msgid "Log Out"
161 | msgstr "Termina Sessione"
162 |
163 | #: ../indicators/system.js:83
164 | msgid "Account Settings"
165 | msgstr "Impostazioni utente"
166 |
167 | #: ../indicators/system.js:94
168 | msgid "System Settings"
169 | msgstr "Impostazioni sistema"
170 |
171 | #: ../indicators/system.js:114
172 | msgid "Lock"
173 | msgstr "Blocca"
174 |
175 | #: ../indicators/system.js:136
176 | msgid "Switch User"
177 | msgstr "Cambia utente"
178 |
179 | #: ../indicators/system.js:159
180 | msgid "Orientation Lock"
181 | msgstr "Blocca orientamento"
182 |
183 | #: ../indicators/system.js:180
184 | msgid "Suspend"
185 | msgstr "Metti in sospensione"
186 |
187 | #: ../indicators/system.js:201
188 | msgid "Power Off"
189 | msgstr "Spegni"
190 |
191 | #: ../indicators/system.js:201
192 | msgid "Restart"
193 | msgstr "Riavvia"
194 |
195 | #: ../indicators/volume.js:66
196 | msgid "Volume Settings"
197 | msgstr "Impostazione volume"
198 |
199 | #: schemas.xml
200 | msgid "Calendar"
201 | msgstr "Clendario"
202 |
203 | msgid "Night Light"
204 | msgstr "Modalità notte"
205 |
206 | msgid "Light"
207 | msgstr "Luminosità"
208 |
209 | msgid "Volume"
210 | msgstr "Volume"
211 |
212 | msgid "Network"
213 | msgstr "Rete"
214 |
215 | msgid "Power"
216 | msgstr "Batteria"
217 |
218 | msgid "Notification"
219 | msgstr "Notifiche"
220 |
221 | msgid "User"
222 | msgstr "Utente"
223 |
224 | msgid "Indicator padding"
225 | msgstr "Spazio degli indicatori"
226 |
227 | msgid "Enable toggle for custom indicator padding"
228 | msgstr "Abilita gli interruttori per la spaziatura personalizzata dell'indicatre"
229 |
230 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
231 | msgstr "Abilita gli interruttori per i singoli indicatori di calendario e di notifica (è richiesto il riavvio di gnome-shell per l'attivazione)"
232 |
233 |
234 | #~ msgid "Night Light Indicator"
235 | #~ msgstr "Indicateur mode nuit"
236 |
237 | #~ msgid "Volume Indicator"
238 | #~ msgstr "Indicateur son"
239 |
240 | #~ msgid "Network Indicator"
241 | #~ msgstr "Indicateur réseaux"
242 |
243 | #~ msgid "User Indicator"
244 | #~ msgstr "Indicateur utilisateur"
245 |
--------------------------------------------------------------------------------
/locale/fr.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the PACKAGE package.
4 | # Onno Giesmann , 2020.
5 | #
6 | msgid ""
7 | msgstr ""
8 | "Project-Id-Version: \n"
9 | "Report-Msgid-Bugs-To: \n"
10 | "POT-Creation-Date: 2017-11-15 18:04-0800\n"
11 | "PO-Revision-Date: 2020-01-04 21:50+0100\n"
12 | "Last-Translator: Onno Giesmann \n"
13 | "Language-Team: \n"
14 | "Language: fr\n"
15 | "MIME-Version: 1.0\n"
16 | "Content-Type: text/plain; charset=UTF-8\n"
17 | "Content-Transfer-Encoding: 8bit\n"
18 | "X-Generator: Poedit 2.2.4\n"
19 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20 |
21 | #: ../prefs.js:184
22 | msgid "Settings"
23 | msgstr "Paramètres"
24 |
25 | #: ../prefs.js:193
26 | msgid "User/System Indicator"
27 | msgstr "Indicateur système/Utilisateur"
28 |
29 | #: ../prefs.js:197
30 | msgid "Show an icon instead of name"
31 | msgstr "Afficher une icône en place du nom"
32 |
33 | #: ../prefs.js:214
34 | msgid "Calendar Indicator"
35 | msgstr "Indicateur calendrier"
36 |
37 | #: ../prefs.js:218
38 | msgid "Change date format"
39 | msgstr "Changer le format de date"
40 |
41 | #: ../prefs.js:251
42 | msgid "Power Indicator"
43 | msgstr "Indicateur d'énergie"
44 |
45 | #: ../prefs.js:255
46 | msgid "Show battery percentage"
47 | msgstr "Afficher le pourcentage de la batterie"
48 |
49 | #: ../prefs.js:279
50 | msgid "Position and size"
51 | msgstr "Taille et position"
52 |
53 | #: ../prefs.js:283
54 | msgid "Indicators padding"
55 | msgstr "Espace entre les indicateurs"
56 |
57 | #: ../prefs.js:283
58 | msgid "Unified Calendar/Notification Indicator"
59 | msgstr "Indicateur Calendrier/Notification unifié"
60 |
61 | #: ../prefs.js:330
62 | msgid "Indicators Order"
63 | msgstr "Ordre des indicateurs"
64 |
65 | #: ../prefs.js:350
66 | msgid "Left"
67 | msgstr "Gauche"
68 |
69 | #: ../prefs.js:351
70 | msgid "Center"
71 | msgstr "Centre"
72 |
73 | #: ../prefs.js:404
74 | msgid "Top to bottom -> Left to right"
75 | msgstr "De haut en bas -> De gauche à droite"
76 |
77 | #: ../prefs.js:409
78 | msgid "Reset Indicators"
79 | msgstr "Réinitialisation des indicateurs"
80 |
81 | #: ../prefs.js:415
82 | msgid "Reset"
83 | msgstr "Réinitialisation"
84 |
85 | #: ../prefs.js:452
86 | msgid "About"
87 | msgstr "À propos"
88 |
89 | #: ../prefs.js:484
90 | msgid "Version: "
91 | msgstr "Version : "
92 |
93 | #: ../prefs.js:493
94 | msgid "If something breaks, don't hesitate to leave a comment at "
95 | msgstr ""
96 | "Si quelque chose ne va pas, n'hésitez pas à laisser un commentaire à l'adresse suivante "
97 |
98 | #: ../prefs.js:497
99 | msgid "Webpage/Github"
100 | msgstr "Page web/Github"
101 |
102 | #: ../prefs.js:508
103 | msgid "This extension is a fork of Extend Panel Menu, thanks to julio641742"
104 | msgstr ""
105 | "Cette extension est un fork de Extend Panel Menu, merci à julio641742"
106 |
107 | #: ../indicators/bluetooth.js:70
108 | msgid "Bluetooth Settings"
109 | msgstr "Paramètres Bluetooth"
110 |
111 | #: ../indicators/calendar.js:101
112 | msgid "No Events"
113 | msgstr "Aucun évenement"
114 |
115 | #: ../indicators/calendar.js:129
116 | msgid "Date Time Settings"
117 | msgstr "Paramètres date et heure"
118 |
119 | #: ../indicators/network.js:79
120 | msgid "Network Settings"
121 | msgstr "Paramètres réseaux"
122 |
123 | #: ../indicators/nightlight.js:70
124 | msgid "Temperature"
125 | msgstr "Température"
126 |
127 | #: ../indicators/nightlight.js:88 ../indicators/nightlight.js:132
128 | msgid "Resume"
129 | msgstr "Continuer"
130 |
131 | #: ../indicators/nightlight.js:92 ../indicators/nightlight.js:128
132 | msgid "Turn Off"
133 | msgstr "Désactiver"
134 |
135 | #: ../indicators/nightlight.js:96
136 | msgid "Display Settings"
137 | msgstr "Paramètres d'affichage"
138 |
139 | #: ../indicators/nightlight.js:128
140 | msgid "Turn On"
141 | msgstr "Activer"
142 |
143 | #: ../indicators/nightlight.js:131
144 | msgid "Night Light Disabled"
145 | msgstr "Mode nuit désactivé"
146 |
147 | #: ../indicators/nightlight.js:131
148 | msgid "Night Light On"
149 | msgstr "Mode nuit activé"
150 |
151 | #: ../indicators/nightlight.js:132
152 | msgid "Disable Until Tomorrow"
153 | msgstr "Désactiver jusqu'à demain"
154 |
155 | #: ../indicators/power.js:64
156 | msgid "Power Settings"
157 | msgstr "Paramètres d'énergie"
158 |
159 | #: ../indicators/system.js:76
160 | msgid "Log Out"
161 | msgstr "Fermer la session"
162 |
163 | #: ../indicators/system.js:83
164 | msgid "Account Settings"
165 | msgstr "Paramètres de compte"
166 |
167 | #: ../indicators/system.js:94
168 | msgid "System Settings"
169 | msgstr "Paramètres système"
170 |
171 | #: ../indicators/system.js:114
172 | msgid "Lock"
173 | msgstr "Verrouiller"
174 |
175 | #: ../indicators/system.js:136
176 | msgid "Switch User"
177 | msgstr "Changer d'utilisateur"
178 |
179 | #: ../indicators/system.js:159
180 | msgid "Orientation Lock"
181 | msgstr "Verrouiller l'orientation"
182 |
183 | #: ../indicators/system.js:180
184 | msgid "Suspend"
185 | msgstr "Mise en veille"
186 |
187 | #: ../indicators/system.js:201
188 | msgid "Power Off"
189 | msgstr "Éteindre"
190 |
191 | #: ../indicators/system.js:201
192 | msgid "Restart"
193 | msgstr "Redémarrer"
194 |
195 | #: ../indicators/volume.js:66
196 | msgid "Volume Settings"
197 | msgstr "Paramètres de son"
198 |
199 | #: schemas.xml
200 | msgid "Calendar"
201 | msgstr "Calendrier"
202 |
203 | msgid "Night Light"
204 | msgstr "Mode nuit"
205 |
206 | msgid "Light"
207 | msgstr "Luminosité"
208 |
209 | msgid "Volume"
210 | msgstr "Son"
211 |
212 | msgid "Network"
213 | msgstr "Réseaux"
214 |
215 | msgid "Power"
216 | msgstr "Batterie"
217 |
218 | msgid "Notification"
219 | msgstr "Notification"
220 |
221 | msgid "User"
222 | msgstr "Utilisateur"
223 |
224 | msgid "Indicator padding"
225 | msgstr "Padding des Indicateurs"
226 |
227 | msgid "Enable toggle for custom indicator padding"
228 | msgstr "Activation le toggle pour le padding personnalisé des indicateurs"
229 |
230 | msgid "Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"
231 | msgstr "Activation du toggle pour les indicateurs de calendrier et de notification individuels (le redémarrage de gnome-shell est nécessaire pour que cela fonctionne)"
232 |
233 | #~ msgid "Night Light Indicator"
234 | #~ msgstr "Indicateur mode nuit"
235 |
236 | #~ msgid "Volume Indicator"
237 | #~ msgstr "Indicateur son"
238 |
239 | #~ msgid "Network Indicator"
240 | #~ msgstr "Indicateur réseaux"
241 |
242 | #~ msgid "User Indicator"
243 | #~ msgstr "Indicateur utilisateur"
244 |
--------------------------------------------------------------------------------
/indicators/network.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const Config = imports.misc.config;
23 | const PopupMenu = imports.ui.popupMenu;
24 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
25 | const _ = Gettext.gettext;
26 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
27 | const CustomButton = Extension.imports.indicators.button.CustomButton;
28 |
29 | var NetworkIndicator = GObject.registerClass({
30 | GTypeName: "NetworkIndicator",
31 | },
32 | class NetworkIndicator extends CustomButton {
33 |
34 | _init () {
35 | super._init("NetworkIndicator");
36 | //this.menu.box.set_width(270);
37 | this.menu.actor.add_style_class_name("aggregate-menu");
38 |
39 | this._is_rfkill = false;
40 | this._is_location = false;
41 | this._network = null;
42 | this._rfkill = Main.panel.statusArea.aggregateMenu._rfkill;
43 |
44 | if (Config.HAVE_NETWORKMANAGER) {
45 | this._network = Main.panel.statusArea.aggregateMenu._network;
46 | }
47 |
48 | this._location = Main.panel.statusArea.aggregateMenu._location;
49 | if(this._location._indicator){
50 | this._location.remove_actor(this._location._indicator);
51 | this._location._indicator.hide();
52 | }
53 |
54 | if (this._network) {
55 | this._network.remove_actor(this._network._primaryIndicator);
56 | this._network.remove_actor(this._network._vpnIndicator);
57 | this.box.add_child(this._network._primaryIndicator);
58 | this.box.add_child(this._network._vpnIndicator);
59 | this._network._vpnIndicator.hide();
60 | }
61 |
62 | this._rfkill.remove_actor(this._rfkill._indicator);
63 | this._rfkill._indicator.hide();
64 |
65 | this._arrowIcon = new St.Icon({
66 | icon_name: "airplane-mode-symbolic",
67 | style_class: "system-status-icon"
68 | });
69 |
70 | this.box.add_child(this._arrowIcon);
71 |
72 | if (this._network) {
73 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._network.menu.actor);
74 | this.menu.addMenuItem(this._network.menu);
75 | }
76 |
77 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._location.menu.actor);
78 | this.menu.addMenuItem(this._location.menu);
79 |
80 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._rfkill.menu.actor);
81 | this.menu.addMenuItem(this._rfkill.menu);
82 |
83 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
84 | let network = new PopupMenu.PopupMenuItem(_("Network Settings"));
85 | network.connect("activate", () => this._openApp("gnome-network-panel.desktop"));
86 | this.menu.addMenuItem(network);
87 |
88 | this._rfkill_properties_changed = this._rfkill._manager._proxy.connect("g-properties-changed", () => this._sync());
89 |
90 | if (this._network) {
91 | this._network_notify = this._network._primaryIndicator.connect("notify", () => this._sync());
92 | }
93 |
94 | this._rfkill._sync();
95 | this._location.notify('in-use');
96 | this._sync();
97 |
98 | Main.sessionMode.connect('updated', () => this._sync());
99 |
100 | }
101 |
102 | _sync () {
103 | this._arrowIcon.hide();
104 | if (!this._network._primaryIndicator.visible &&
105 | !this._network._vpnIndicator.visible) {
106 |
107 | if (this._is_rfkill == true) {
108 | this.box.remove_child(this._rfkill._indicator);
109 | this._is_rfkill = false;
110 | }
111 | if (this._is_location == true) {
112 | this.box.remove_child(this._location._indicator);
113 | this._is_location = false;
114 | }
115 | if (this._is_location == false && this._is_rfkill == false)
116 | this._arrowIcon.show();
117 | }
118 | else {
119 | if (!this._rfkill.airplaneMode) {
120 | if (this._is_rfkill == false) {
121 | this.box.add_child(this._rfkill._indicator);
122 | this._is_rfkill = true;
123 | }
124 | } else {
125 | if (this._is_rfkill == true) {
126 | this.box.remove_child(this._rfkill._indicator);
127 | this._is_rfkill = false;
128 | }
129 | }
130 |
131 | if (this._location._managerProxy != null) {
132 | if (this._is_location == false) {
133 | this.box.add_child(this._location._indicator);
134 | this._is_location = true;
135 | }
136 | } else {
137 | if (this._is_location == true) {
138 | this.box.remove_child(this._location._indicator);
139 | this._is_location = false;
140 | }
141 | }
142 | }
143 | log("Number Object : [" + this.box.get_n_children() + "]");
144 | /*
145 | if (this.box.get_n_children() > 2){
146 | var child = this.box.get_child_at_index(1);
147 | this.box.remove_child(child);
148 | }*/
149 | }
150 |
151 | destroy () {
152 | this._rfkill._manager._proxy.disconnect(this._rfkill_properties_changed);
153 | if (this._network) {
154 | this._network._primaryIndicator.disconnect(this._network_notify);
155 | }
156 |
157 | this.box.remove_child(this._location._indicator);
158 | this.menu.box.remove_actor(this._location.menu.actor);
159 |
160 | this._location.add_actor(this._location._indicator);
161 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._location.menu.actor);
162 |
163 | this.box.remove_child(this._rfkill._indicator);
164 | this.menu.box.remove_actor(this._rfkill.menu.actor);
165 |
166 | this._rfkill.add_actor(this._rfkill._indicator);
167 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._rfkill.menu.actor);
168 |
169 | this.box.remove_child(this._network._primaryIndicator);
170 | this.box.remove_child(this._network._vpnIndicator);
171 | this.menu.box.remove_actor(this._network.menu.actor);
172 |
173 | this._network.add_actor(this._network._primaryIndicator);
174 | this._network.add_actor(this._network._vpnIndicator);
175 |
176 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._network.menu.actor);
177 |
178 | super.destroy()
179 | }
180 | });
181 |
--------------------------------------------------------------------------------
/indicators/calendar.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { St, Gtk, GLib, Clutter, Gio, Shell } = imports.gi;
20 | const GObject = imports.gi.GObject;
21 | const Main = imports.ui.main;
22 | const PopupMenu = imports.ui.popupMenu;
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
26 | const CustomButton = Extension.imports.indicators.button.CustomButton;
27 |
28 | var CalendarIndicator = GObject.registerClass({
29 | GTypeName: "CalendarIndicator",
30 | },
31 | class CalendarIndicator extends CustomButton {
32 | _init () {
33 | super._init("CalendarIndicator");
34 |
35 | this._clock = Main.panel.statusArea.dateMenu._clock;
36 | this._calendar = Main.panel.statusArea.dateMenu._calendar;
37 | this._date = Main.panel.statusArea.dateMenu._date;
38 | this._eventsSection = new imports.ui.dateMenu.EventsSection();
39 | this._clocksSection = Main.panel.statusArea.dateMenu._clocksItem;
40 | this._weatherSection = Main.panel.statusArea.dateMenu._weatherItem;
41 | this._clockIndicator = Main.panel.statusArea.dateMenu._clockDisplay;
42 |
43 | this._clockIndicatorFormat = new St.Label({
44 | style_class: "clock-display",
45 | visible: false,
46 | y_align: Clutter.ActorAlign.CENTER
47 | });
48 |
49 | this._indicatorParent = this._clockIndicator.get_parent();
50 | this._calendarParent = this._calendar.get_parent();
51 | this._sectionParent = this._clocksSection.get_parent();
52 |
53 | this._indicatorParent.remove_actor(this._clockIndicator);
54 | this._indicatorParent.remove_child(this._date);
55 | this._calendarParent.remove_child(this._calendar);
56 | this._sectionParent.remove_child(this._clocksSection);
57 | this._sectionParent.remove_child(this._weatherSection);
58 |
59 | this.box.add_actor(this._clockIndicator);
60 | this.box.add_actor(this._clockIndicatorFormat);
61 |
62 | let boxLayout;
63 | let vbox;
64 | let hbox;
65 |
66 | hbox = new St.BoxLayout({ name: 'calendarArea' });
67 |
68 | // Fill up the second column
69 | boxLayout = new imports.ui.dateMenu.CalendarColumnLayout([this._calendar, this._date]);
70 | vbox = new St.Widget({ style_class: 'datemenu-calendar-column',
71 | layout_manager: boxLayout });
72 | boxLayout.hookup_style(vbox);
73 | hbox.add(vbox);
74 |
75 | let now = new Date();
76 | let hbox_date = new St.BoxLayout({
77 | vertical: true,style_class: 'datemenu-today-button',
78 | x_expand: true,
79 | can_focus: true,
80 | reactive: false,
81 | });
82 | vbox.add_actor(hbox_date);
83 |
84 | this.dayLabel = new St.Label({ style_class: 'day-label',
85 | x_align: Clutter.ActorAlign.START,
86 | });
87 | hbox_date.add_actor(this.dayLabel);
88 | this.dayLabel.set_text(now.toLocaleFormat('%A'));
89 | this.dateLabel = new St.Label({ style_class: 'date-label' });
90 | hbox_date.add_actor(this.dateLabel);
91 | let dateFormat = Shell.util_translate_time_string(N_("%B %-d %Y"));
92 | this.dateLabel.set_text(now.toLocaleFormat(dateFormat));
93 |
94 | this._displaysSection = new St.ScrollView({
95 | style_class: "datemenu-displays-section vfade",
96 | clip_to_allocation: true,
97 | x_expand: true,
98 | });
99 |
100 | this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
101 | vbox.add_child(this._displaysSection);
102 |
103 | let displayBox = new St.BoxLayout({
104 | vertical: true,
105 | x_expand: true,
106 | style_class: "datemenu-displays-box"
107 | });
108 | displayBox.add_child(this._eventsSection);
109 | displayBox.add_child(this._clocksSection);
110 | displayBox.add_child(this._weatherSection);
111 | this._displaysSection.add_actor(displayBox);
112 | vbox.add_child(this._date);
113 | vbox.add_child(this._calendar);
114 |
115 | this.menu.box.add(hbox);
116 |
117 | this.menu.connect("open-state-changed", (menu, isOpen) => {
118 | if (isOpen) {
119 | let now = new Date();
120 | this._calendar.setDate(now);
121 | this._eventsSection.setDate(now);
122 | this.dayLabel.set_text(now.toLocaleFormat('%A'));
123 | let dateFormat = Shell.util_translate_time_string(N_("%B %-d %Y"));
124 | this.dateLabel.set_text(now.toLocaleFormat(dateFormat));
125 | //this._date.setDate(now);
126 | }
127 | });
128 | this._date_changed = this._calendar.connect(
129 | "selected-date-changed",
130 | (calendar, date) => {
131 | this._eventsSection.setDate(date);
132 | }
133 | );
134 | }
135 |
136 | override (format) {
137 | this.resetFormat();
138 | if (format == "") {
139 | return
140 | }
141 | let that = this;
142 | this._formatChanged = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
143 | that.changeFormat();
144 | return true;
145 | });
146 | this._clockIndicator.hide();
147 | this._clockIndicatorFormat.show();
148 | this._dateFormat = format;
149 | this.changeFormat();
150 | }
151 |
152 | changeFormat () {
153 | if (this._dateFormat && this._dateFormat != "") {
154 | let date = new Date();
155 | this._clockIndicatorFormat.set_text(date.toLocaleFormat(this._dateFormat));
156 | }
157 | }
158 |
159 | resetFormat () {
160 | if (this._formatChanged) {
161 | GLib.source_remove(this._formatChanged);
162 | this._formatChanged = null;
163 | }
164 | this._clockIndicator.show();
165 | this._clockIndicatorFormat.hide();
166 | }
167 |
168 | destroy () {
169 | this.resetFormat();
170 | this._calendar.disconnect(this._date_changed);
171 |
172 | this.box.remove_child(this._clockIndicator);
173 |
174 | this._date.get_parent().remove_child(this._date);
175 | this._calendar.get_parent().remove_child(this._calendar);
176 | this._clocksSection.get_parent().remove_child(this._clocksSection);
177 | this._weatherSection.get_parent().remove_child(this._weatherSection);
178 |
179 | this._calendarParent.add_child(this._date);
180 | this._sectionParent.add_child(this._clocksSection);
181 | this._sectionParent.add_child(this._weatherSection);
182 | this._calendarParent.add_child(this._calendar);
183 |
184 | this._indicatorParent.add_actor(this._clockIndicator);
185 |
186 | super.destroy()
187 | }
188 | });
189 |
--------------------------------------------------------------------------------
/extension.js:
--------------------------------------------------------------------------------
1 | /* Panel indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const GObject = imports.gi.GObject;
20 | const Main = imports.ui.main;
21 | const Config = imports.misc.config;
22 | const ExtensionUtils = imports.misc.extensionUtils;
23 | const Me = ExtensionUtils.getCurrentExtension();
24 | const Convenience = Me.imports.convenience;
25 |
26 | const MenuItems = Me.imports.menuItems.MenuItems;
27 | const CustomButton = Me.imports.indicators.button.CustomButton;
28 | const CalendarIndicator = Me.imports.indicators.calendar.CalendarIndicator;
29 | const NetworkIndicator = Me.imports.indicators.network.NetworkIndicator;
30 | const BluetoothIndicator = Me.imports.indicators.bluetooth.BluetoothIndicator;
31 | const NightLightIndicator = Me.imports.indicators.nightlight.NightLightIndicator;
32 | const LightIndicator = Me.imports.indicators.light.LightIndicator;
33 | const NotificationIndicator = Me.imports.indicators.notification.NotificationIndicator;
34 | const PowerIndicator = Me.imports.indicators.power.PowerIndicator;
35 | const UserIndicator = Me.imports.indicators.system.UserIndicator;
36 | const VolumeIndicator = Me.imports.indicators.volume.VolumeIndicator;
37 |
38 | function init() {
39 | Convenience.initTranslations("bigSur-StatusArea");
40 | }
41 |
42 | let settings;
43 | let menuItems;
44 | let indicators = null;
45 | let settingsChanged;
46 |
47 | let light = null;
48 | let nightlight = null;
49 | let volume = null;
50 | let network = null;
51 | let bluetooth = null;
52 | let power = null;
53 | let calendar = null;
54 | let user = null;
55 | let notification = null;
56 |
57 | const CENTER_BOX = Main.panel._centerBox;
58 | const RIGHT_BOX = Main.panel._rightBox;
59 |
60 | function enable() {
61 | Main.panel.statusArea.aggregateMenu.actor.hide();
62 | Main.panel.statusArea.dateMenu.actor.hide();
63 | Main.panel._centerBox.remove_child(Main.panel.statusArea.dateMenu.container);
64 |
65 | network = new NetworkIndicator();
66 | bluetooth = new BluetoothIndicator();
67 | volume = new VolumeIndicator();
68 | power = new PowerIndicator();
69 | calendar = new CalendarIndicator();
70 | notification = new NotificationIndicator();
71 | user = new UserIndicator();
72 | nightlight = new NightLightIndicator();
73 | light = new LightIndicator();
74 |
75 | if (notification)
76 | Main.panel.addToStatusArea(notification.name, notification, 0, "right");
77 | if (user)
78 | Main.panel.addToStatusArea(user.name, user, 0, "right");
79 | if (calendar)
80 | Main.panel.addToStatusArea(calendar.name, calendar, 0, "right");
81 | if (power)
82 | Main.panel.addToStatusArea(power.name, power, 0, "right");
83 | if (network)
84 | Main.panel.addToStatusArea(network.name, network, 0, "right");
85 | if (bluetooth)
86 | Main.panel.addToStatusArea(bluetooth.name, bluetooth, 0, "right");
87 | if (bluetooth)
88 | Main.panel.addToStatusArea(volume.name, volume, 0, "right");
89 | if (nightlight)
90 | Main.panel.addToStatusArea(nightlight.name, nightlight, 0, "right");
91 | if (light)
92 | Main.panel.addToStatusArea(light.name, light, 0, "right");
93 |
94 | // Load Settings
95 | settings = Convenience.getSettings();
96 | menuItems = new MenuItems(settings);
97 | settingsChanged = new Array();
98 | let i = 0;
99 | settingsChanged[i++] = settings.connect("changed::items", applySettings);
100 | settingsChanged[i++] = settings.connect("changed::spacing", applySettings);
101 | settingsChanged[i++] = settings.connect("changed::user-icon", changeUsericon);
102 | settingsChanged[i++] = settings.connect("changed::date-format", changeDateformat);
103 | settingsChanged[i++] = settings.connect("changed::activate-spacing", applySettings);
104 | settingsChanged[i++] = settings.connect("changed::separate-date-and-notification", applySettings);
105 |
106 | applySettings();
107 | changeUsername();
108 | changeUsericon();
109 | changeDateformat();
110 | }
111 |
112 | function changeUsername() {
113 | let username = "";
114 | user.changeLabel(username);
115 | }
116 |
117 | function changeUsericon() {
118 | let enableUserIcon = settings.get_boolean("user-icon");
119 | user.changeIcon(enableUserIcon);
120 | }
121 |
122 | function changeDateformat() {
123 | let dateformat = settings.get_string("date-format");
124 | calendar.override(dateformat);
125 | }
126 |
127 | function applySettings() {
128 | let enabled = menuItems.getEnableItems();
129 | let center = menuItems.getCenterItems();
130 | indicators = new Array(enabled.length);
131 |
132 | removeAll();
133 | setup(enabled, center, indicators, "power", power);
134 | setup(enabled, center, indicators, "user", user);
135 | setup(enabled, center, indicators, "volume", volume);
136 | setup(enabled, center, indicators, "network", network);
137 | setup(enabled, center, indicators, "bluetooth", bluetooth);
138 | setup(enabled, center, indicators, "calendar", calendar);
139 | setup(enabled, center, indicators, "notification", notification);
140 | setup(enabled, center, indicators, "nightlight", nightlight);
141 | setup(enabled, center, indicators, "light", light);
142 |
143 | let rightchildren = RIGHT_BOX.get_children().length;
144 | let centerchildren = CENTER_BOX.get_children().length;
145 |
146 | let spacing = settings.get_int("spacing");
147 | if (!settings.get_boolean("activate-spacing"))
148 | spacing = -1;
149 |
150 | indicators.reverse().forEach(function (item) {
151 | item.set_spacing(spacing);
152 | if (item._center) {
153 | CENTER_BOX.insert_child_at_index(item.container, centerchildren);
154 | } else {
155 | RIGHT_BOX.insert_child_at_index(item.container, rightchildren);
156 | }
157 | });
158 |
159 | }
160 |
161 | function setup(enabledItems, centerItems, arrayIndicators, name, indicator) {
162 | if (!indicator) return;
163 | let index = enabledItems.indexOf(name);
164 | let valid = index != -1;
165 | if (valid) {
166 | arrayIndicators[index] = indicator;
167 | arrayIndicators[index]._center = centerItems.indexOf(name) != -1;
168 | }
169 | }
170 |
171 | function removeAll() {
172 | removeContainer(light);
173 | removeContainer(nightlight);
174 | removeContainer(volume);
175 | removeContainer(network);
176 | removeContainer(bluetooth);
177 | removeContainer(power);
178 | removeContainer(calendar);
179 | removeContainer(user);
180 | removeContainer(notification);
181 | }
182 |
183 | function removeContainer(item) {
184 | if (!item) return;
185 | if (item._center) {
186 | CENTER_BOX.remove_child(item.container)
187 | } else {
188 | RIGHT_BOX.remove_child(item.container);
189 | }
190 | item._center = false;
191 | }
192 |
193 | function disable() {
194 | settingsChanged.forEach(function (item) {
195 | settings.disconnect(item);
196 | });
197 | settingsChanged = null;
198 | settings = null;
199 |
200 | light.destroy();
201 | nightlight.destroy();
202 | volume.destroy();
203 | power.destroy();
204 | network.destroy();
205 | bluetooth.destroy();
206 | user.destroy();
207 | notification.destroy();
208 | calendar.destroy();
209 |
210 | Main.panel.statusArea.aggregateMenu.container.show();
211 | Main.panel.statusArea.dateMenu.container.show();
212 | Main.panel._centerBox.add_child(Main.panel.statusArea.dateMenu.container);
213 | }
214 |
--------------------------------------------------------------------------------
/indicators/system.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { AccountsService, Clutter, GLib, St, Gio } = imports.gi;
20 | const Main = imports.ui.main;
21 | const PopupMenu = imports.ui.popupMenu;
22 | const GObject = imports.gi.GObject;
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Me = imports.misc.extensionUtils.getCurrentExtension();
26 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
27 | const CustomButton = Extension.imports.indicators.button.CustomButton;
28 |
29 | var PANEL_ICON_SIZE = 16;
30 |
31 | var UserIndicator = GObject.registerClass({
32 | GTypeName: "UserIndicator",
33 | },
34 | class UserIndicator extends CustomButton {
35 |
36 | _init () {
37 | super._init("UserIndicator");
38 | //this.menu.box.set_width(270);
39 | this.menu.actor.add_style_class_name("aggregate-menu");
40 | this._system = Main.panel.statusArea.aggregateMenu._system;
41 | this._screencast = Main.panel.statusArea.aggregateMenu._screencast;
42 |
43 | let userManager = AccountsService.UserManager.get_default();
44 | this._user = userManager.get_user(GLib.get_user_name());
45 |
46 | this._nameLabel = new St.Label({
47 | text: this._user.get_real_name(),
48 | y_align: Clutter.ActorAlign.CENTER,
49 | style_class: "panel-status-menu-box"
50 | });
51 |
52 | this._powerIcon = new St.Icon({
53 | icon_name: 'avatar-default-symbolic',
54 | style_class: "system-status-icon"});
55 |
56 | if (this._screencast)
57 | this.box.add_child(this._screencast);
58 | this.box.add_child(this._powerIcon);
59 | this.box.add_child(this._nameLabel);
60 |
61 | this._createSubMenu();
62 |
63 | Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(this._system.menu.actor);
64 | //IS THIS NEEDED?
65 | // this.menu.addMenuItem(this._system.menu);
66 | }
67 | _createSubMenu () {
68 |
69 | this._switchUserSubMenu = new PopupMenu.PopupSubMenuMenuItem('', true);
70 | this._switchUserSubMenu.icon.icon_name = 'avatar-default-symbolic';
71 |
72 | this.menu.connect("open-state-changed", (menu, isOpen) => {
73 | if (isOpen) {
74 | this._switchUserSubMenu.label.text = this._user.get_real_name();
75 | this._nameLabel.text = this._user.get_real_name();
76 | }
77 | });
78 |
79 | let logout = new PopupMenu.PopupMenuItem(_("Log Out"));
80 | logout.connect("activate", () => this._system._systemActions.activateLogout());
81 | if (!this._system._logoutItem.actor.visible) {
82 | logout.actor.hide();
83 | }
84 | this._switchUserSubMenu.menu.addMenuItem(logout);
85 |
86 | let account = new PopupMenu.PopupMenuItem(_("Account Settings"));
87 | account.connect("activate", () => this._openApp("gnome-user-accounts-panel.desktop"));
88 | this._switchUserSubMenu.menu.addMenuItem(account);
89 |
90 | this.menu.addMenuItem(this._switchUserSubMenu);
91 |
92 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); // SEPARATOR
93 |
94 | let settings = new PopupMenu.PopupBaseMenuItem();
95 |
96 | let settings_label = new St.Label({
97 | text: _("System Settings"),
98 | y_align: Clutter.ActorAlign.CENTER
99 | });
100 | let settings_icon = new St.Icon({
101 | icon_name: "preferences-system-symbolic",
102 | style_class: "system-status-icon",
103 | icon_size: PANEL_ICON_SIZE
104 | });
105 |
106 | settings.actor.add_actor(settings_icon);
107 | settings.actor.add_actor(settings_label);
108 |
109 | settings.connect("activate", () => {
110 | let ret = this._openApp("gnome-control-center.desktop");
111 | if (ret == false)
112 | ret = this._openApp("org.gnome.Settings.desktop");
113 | });
114 | this.menu.addMenuItem(settings);
115 |
116 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); // SEPARATOR
117 |
118 | let lock = new PopupMenu.PopupBaseMenuItem();
119 |
120 | let lock_label = new St.Label({
121 | text: _("Lock"),
122 | y_align: Clutter.ActorAlign.CENTER
123 | });
124 | let lock_icon = new St.Icon({
125 | icon_name: "changes-prevent-symbolic",
126 | style_class: "system-status-icon",
127 | icon_size: PANEL_ICON_SIZE
128 | });
129 |
130 | lock.actor.add_actor(lock_icon);
131 | lock.actor.add_actor(lock_label);
132 |
133 | lock.connect("activate", () => this._system._systemActions.activateLockScreen());
134 | this.menu.addMenuItem(lock);
135 | //IS THIS NEEDED?
136 | // if (!this._system._lockScreenAction.visible) {
137 | // lock.actor.hide();
138 | // }
139 |
140 | //////////////
141 | let switchuser = new PopupMenu.PopupBaseMenuItem();
142 |
143 | let switchuser_label = new St.Label({
144 | text: _("Switch User"),
145 | y_align: Clutter.ActorAlign.CENTER
146 | });
147 |
148 | this._switchuser_gicon = 'system-switch-user-symbolic';
149 | let switchuser_icon = new St.Icon({ icon_name: this._switchuser_gicon });
150 | switchuser_icon.icon_size = PANEL_ICON_SIZE;
151 |
152 | switchuser.actor.add_actor(switchuser_icon);
153 | switchuser.actor.add_actor(switchuser_label);
154 |
155 | this.menu.addMenuItem(switchuser);
156 | switchuser.connect("activate", () => this._system._systemActions.activateSwitchUser());
157 | if (!this._system._loginScreenItem.actor.visible) {
158 | switchuser.actor.hide();
159 | }
160 |
161 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); // SEPARATOR
162 |
163 | //////////////
164 | let orientation = new PopupMenu.PopupBaseMenuItem();
165 |
166 | let orientation_label = new St.Label({
167 | text: _("Orientation Lock"),
168 | y_align: Clutter.ActorAlign.CENTER
169 | });
170 |
171 | this._orientation_icon_icon = 'rotation-locked-symbolic';;
172 | let orientation_icon = new St.Icon({ icon_name: this._orientation_icon_icon });
173 | orientation_icon.icon_size = PANEL_ICON_SIZE;
174 |
175 | orientation.actor.add_actor(orientation_icon);
176 | orientation.actor.add_actor(orientation_label);
177 |
178 | orientation.connect("activate", () => this._system._systemActions.activateLockOrientation());
179 | this.menu.addMenuItem(orientation);
180 | //IS THIS NEEDED?
181 | // if (!this._system._orientationLockAction.visible) {
182 | // orientation.actor.hide();
183 | // }
184 |
185 | this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); // SEPARATOR
186 |
187 | ///////////////
188 | let suspend = new PopupMenu.PopupBaseMenuItem();
189 |
190 | let suspend_label = new St.Label({
191 | text: _("Suspend"),
192 | y_align: Clutter.ActorAlign.CENTER
193 | });
194 | let suspend_icon = new St.Icon({
195 | icon_name: "media-playback-pause-symbolic",
196 | style_class: "system-status-icon",
197 | icon_size: PANEL_ICON_SIZE
198 | });
199 |
200 | suspend.actor.add_actor(suspend_icon);
201 | suspend.actor.add_actor(suspend_label);
202 |
203 | suspend.connect("activate", () => this._system._systemActions.activateSuspend());
204 | this.menu.addMenuItem(suspend);
205 | //IS THIS NEEDED?
206 | // if (!this._system._suspendAction.visible) {
207 | // suspend.actor.hide();
208 | // }
209 |
210 | let restart = new PopupMenu.PopupBaseMenuItem();
211 |
212 | let restart_label = new St.Label({
213 | text: _("Restart"),
214 | y_align: Clutter.ActorAlign.CENTER
215 | });
216 |
217 | let restart_icon = new St.Icon({
218 | icon_name: "system-reboot-symbolic",
219 | style_class: "system-status-icon",
220 | icon_size: PANEL_ICON_SIZE
221 | });
222 |
223 | restart.actor.add_actor(restart_icon);
224 | restart.actor.add_actor(restart_label);
225 |
226 | restart.connect("activate", () => this._system._systemActions.activateRestart());
227 | this.menu.addMenuItem(restart);
228 | //IS THIS NEEDED?
229 | // if (!this._system._restartAction.visible) {
230 | // restart.actor.hide();
231 | // }
232 |
233 | let power = new PopupMenu.PopupBaseMenuItem();
234 |
235 | let power_label = new St.Label({
236 | text: _("Power Off"),
237 | y_align: Clutter.ActorAlign.CENTER
238 | });
239 |
240 | let power_icon = new St.Icon({
241 | icon_name: "system-shutdown-symbolic",
242 | style_class: "system-status-icon",
243 | icon_size: PANEL_ICON_SIZE
244 | });
245 | power_icon.icon_size = PANEL_ICON_SIZE;
246 |
247 | power.actor.add_actor(power_icon);
248 | power.actor.add_actor(power_label);
249 |
250 | power.connect("activate", () => this._system._systemActions.activatePowerOff());
251 | this.menu.addMenuItem(power);
252 | //IS THIS NEEDED?
253 | // if (!this._system._powerOffAction.visible) {
254 | // power.actor.hide();
255 | // }
256 | }
257 |
258 | changeLabel (label) {
259 | if (label == "") {
260 | label = GLib.get_real_name();
261 | }
262 | this._nameLabel.set_text(label);
263 | }
264 |
265 | changeIcon (enabled) {
266 | if (enabled) {
267 | this._powerIcon.show();
268 | this._nameLabel.hide();
269 | } else {
270 | this._powerIcon.hide();
271 | this._nameLabel.show();
272 | }
273 | }
274 |
275 | destroy () {
276 | this.menu.box.remove_actor(this._system.menu.actor);
277 | Main.panel.statusArea.aggregateMenu.menu.box.add_actor(this._system.menu.actor);
278 |
279 | super.destroy()
280 | }
281 | });
282 |
--------------------------------------------------------------------------------
/indicators/notification.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const { Clutter, Gio, GLib, GnomeDesktop,
20 | GObject, GWeather, Pango, Shell, St } = imports.gi;
21 | const Main = imports.ui.main;
22 | const Me = imports.misc.extensionUtils.getCurrentExtension();
23 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
24 | const _ = Gettext.gettext;
25 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
26 | const CustomButton = Extension.imports.indicators.button.CustomButton;
27 |
28 | const NoNotifications = `${Me.path}/icons/notification-symbolic.svg`
29 | const Notifications = `${Me.path}/icons/notification-new-symbolic.svg`
30 | const NotificationsDisabled = `${Me.path}/icons/notification-disabled-symbolic.svg`
31 |
32 |
33 | var CalendarColumnLayout2 = GObject.registerClass({
34 | GTypeName: "CalendarColumnLayout2",
35 | },
36 | class CalendarColumnLayout2 extends Clutter.BoxLayout {
37 | _init(actors) {
38 | super._init({ orientation: Clutter.Orientation.VERTICAL });
39 | this._colActors = actors;
40 | }
41 |
42 | vfunc_get_preferred_width(container, forHeight) {
43 | const actors =
44 | this._colActors.filter(a => a.get_parent() === container);
45 | if (actors.length === 0)
46 | return super.vfunc_get_preferred_width(container, forHeight);
47 | return actors.reduce(([minAcc, natAcc], child) => {
48 | const [min, nat] = child.get_preferred_width(forHeight);
49 | return [Math.max(minAcc, min), Math.max(natAcc, nat)];
50 | }, [0, 0]);
51 | }
52 | });
53 |
54 | var settingsChanged = null;
55 |
56 | var NotificationIndicator = GObject.registerClass({
57 | GTypeName: "NotificationIndicator",
58 | },
59 | class NotificationIndicator extends CustomButton {
60 |
61 | _init () {
62 | super._init("NotificationIndicator");
63 |
64 | settingsChanged = this.settings.connect("changed::separate-date-and-notification", this.applySettings);
65 |
66 | this.prepareCalendar();
67 | this._messageList = Main.panel.statusArea.dateMenu._messageList;
68 | try {
69 | this._messageList._removeSection(this._messageList._eventsSection);
70 | } catch (e) {}
71 |
72 |
73 | this._messageListParent = this._messageList.get_parent();
74 | this._messageListParent.remove_actor(this._messageList);
75 |
76 | this._indicator = new MessagesIndicator(Main.panel.statusArea.dateMenu._indicator._sources, this.settings);
77 |
78 | this.box.add_child(this._indicator.actor);
79 | this.hbox = new St.BoxLayout({
80 | vertical: false,
81 | name: 'calendarArea'
82 | });
83 |
84 | this._vbox = new St.BoxLayout({
85 | height: 400
86 | });
87 |
88 | this._vbox.add(this._messageList);
89 | this.hbox.add(this._vbox);
90 |
91 | // Fill up the second column
92 | const boxLayout = new CalendarColumnLayout2([this._calendar, this._date]);
93 | this._vboxd = new St.Widget({ style_class: 'datemenu-calendar-column',
94 | layout_manager: boxLayout });
95 | boxLayout.hookup_style(this._vboxd);
96 | this.hbox.add(this._vboxd);
97 |
98 | this.addCalendar();
99 | this.menu.box.add(this.hbox);
100 |
101 | try {
102 | this._messageList._removeSection(this._messageList._mediaSection);
103 | } catch (e) {}
104 |
105 | this._closeButton = this._messageList._clearButton;
106 | this._hideIndicator = this._closeButton.connect("notify::visible", (obj) => {
107 | if (this._autoHide) {
108 | if (obj.visible) {
109 | this.actor.show();
110 | } else {
111 | this.actor.hide();
112 | }
113 | }
114 | });
115 |
116 | }
117 |
118 | setHide (value) {
119 | this._autoHide = value
120 | if (!value) {
121 | this.actor.show();
122 | } else if (this._indicator._sources == "") {
123 | this.actor.hide();
124 | }
125 | }
126 |
127 | applySettings () {
128 | if (this.settings.get_boolean("separate-date-and-notification")) {
129 | this.prepareCalendar();
130 | this.addCalendar();
131 | }
132 | else {
133 | this.removeCalendar();
134 | }
135 | }
136 |
137 | prepareCalendar () {
138 | if (!this.settings.get_boolean("separate-date-and-notification")) {
139 | this._calendar = Main.panel.statusArea.dateMenu._calendar;
140 | this._date = Main.panel.statusArea.dateMenu._date;
141 | this._eventsSection = new imports.ui.dateMenu.EventsSection();
142 | this._clocksSection = Main.panel.statusArea.dateMenu._clocksItem;
143 | this._weatherSection = Main.panel.statusArea.dateMenu._weatherItem;
144 | this._clockIndicator = Main.panel.statusArea.dateMenu._clockDisplay;
145 |
146 | this._clockIndicatorFormat = new St.Label({
147 | style_class: "clock-display",
148 | visible: false,
149 | y_align: Clutter.ActorAlign.CENTER
150 | });
151 |
152 |
153 |
154 | this._indicatorParent = this._clockIndicator.get_parent();
155 | this._calendarParent = this._calendar.get_parent();
156 | this._sectionParent = this._clocksSection.get_parent();
157 |
158 | this._indicatorParent.remove_actor(this._clockIndicator);
159 | this._indicatorParent.remove_child(this._date);
160 | this._calendarParent.remove_child(this._calendar);
161 | this._sectionParent.remove_child(this._clocksSection);
162 | this._sectionParent.remove_child(this._weatherSection);
163 |
164 | this.box.add_child(this._clockIndicator, 0);
165 | this.box.add_child(this._clockIndicatorFormat, 0);
166 | }
167 | }
168 |
169 | addCalendar () {
170 | if (!this.settings.get_boolean("separate-date-and-notification")) {
171 | this._vboxd.show();
172 | let now = new Date();
173 | let hbox_date = new St.BoxLayout({
174 | vertical: true,style_class: 'datemenu-today-button',
175 | x_expand: true,
176 | can_focus: true,
177 | reactive: false,
178 | });
179 | this._vboxd.add_actor(hbox_date);
180 |
181 | let _dayLabel = new St.Label({ style_class: 'day-label',
182 | x_align: Clutter.ActorAlign.START,
183 | });
184 | hbox_date.add_actor(_dayLabel);
185 | _dayLabel.set_text(now.toLocaleFormat('%A'));
186 | let _dateLabel = new St.Label({ style_class: 'date-label' });
187 | hbox_date.add_actor(_dateLabel);
188 | let dateFormat = Shell.util_translate_time_string(N_("%B %-d %Y"));
189 | _dateLabel.set_text(now.toLocaleFormat(dateFormat));
190 |
191 |
192 |
193 |
194 | this._displaysSection = new St.ScrollView({
195 | style_class: "datemenu-displays-section vfade",
196 | clip_to_allocation: true,
197 | x_expand: true,
198 | });
199 |
200 | this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
201 | this._vboxd.add_child(this._displaysSection);
202 |
203 | this.displayBox = new St.BoxLayout({
204 | vertical: true,
205 | x_expand: true,
206 | style_class: "datemenu-displays-box"
207 | });
208 | this.displayBox.add_child(this._eventsSection);
209 | this.displayBox.add_child(this._clocksSection);
210 | this.displayBox.add_child(this._weatherSection);
211 | this._displaysSection.add_actor(this.displayBox);
212 | this._vboxd.add_child(this._date);
213 | this._vboxd.add_child(this._calendar);
214 |
215 | this.menu.connect("open-state-changed", (menu, isOpen) => {
216 | if (isOpen) {
217 | let now = new Date();
218 | this._calendar.setDate(now);
219 | this._eventsSection.setDate(now);
220 | //this._date.setDate(now);
221 | }
222 | });
223 | this._date_changed = this._calendar.connect(
224 | "selected-date-changed",
225 | (calendar, date) => {
226 | this._eventsSection.setDate(date);
227 | }
228 | );
229 | }
230 | else
231 | this._vboxd.hide();
232 | }
233 |
234 | override (format) {
235 | if (!this.settings.get_boolean("separate-date-and-notification")) {
236 | this.resetFormat();
237 | if (format == "") {
238 | return
239 | }
240 | let that = this;
241 | this._formatChanged = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
242 | that.changeFormat();
243 | return true;
244 | });
245 | this._clockIndicator.hide();
246 | this._clockIndicatorFormat.show();
247 | this._dateFormat = format;
248 | this.changeFormat();
249 | }
250 | }
251 |
252 | changeFormat () {
253 | if (!this.settings.get_boolean("separate-date-and-notification")) {
254 | if (this._dateFormat && this._dateFormat != "") {
255 | let date = new Date();
256 | this._clockIndicatorFormat.set_text(date.toLocaleFormat(this._dateFormat));
257 | }
258 | }
259 | }
260 |
261 | resetFormat () {
262 | if (!this.settings.get_boolean("separate-date-and-notification")) {
263 | if (this._formatChanged) {
264 | GLib.source_remove(this._formatChanged);
265 | this._formatChanged = null;
266 | }
267 | this._clockIndicator.show();
268 | this._clockIndicatorFormat.hide();
269 | }
270 | }
271 |
272 | removeCalendar () {
273 | if (!this.settings.get_boolean("separate-date-and-notification")) {
274 | this.resetFormat();
275 | this._calendar.disconnect(this._date_changed);
276 |
277 | this.displayBox.remove_child(this._clocksSection);
278 | this.displayBox.remove_child(this._weatherSection);
279 | this._vboxd.remove_actor(this._date);
280 | this._vboxd.remove_actor(this._calendar);
281 | this.box.remove_child(this._clockIndicator);
282 |
283 |
284 | this._indicatorParent.add_actor(this._date);
285 | this._indicatorParent.add_actor(this._clockIndicator);
286 | this._sectionParent.add_child(this._weatherSection);
287 | this._sectionParent.add_child(this._clocksSection);
288 | this._calendarParent.add_child(this._calendar);
289 | }
290 | }
291 |
292 | destroy () {
293 | this._closeButton.disconnect(this._hideIndicator);
294 | this.settings.disconnect(settingsChanged);
295 | this.removeCalendar();
296 | this._vbox.remove_child(this._messageList);
297 | this._messageListParent.add_actor(this._messageList);
298 | super.destroy()
299 | }
300 | });
301 |
302 | var MessagesIndicator = GObject.registerClass({
303 | GTypeName: 'MessagesIndicator',
304 | },
305 | class MessagesIndicator extends GObject.Object {
306 | _init(src, settings) {
307 | this.settings = settings;
308 | this._icon = new St.Icon({
309 | style_class: 'system-status-icon'
310 | });
311 |
312 | this._Notifications_gicon = Gio.icon_new_for_string(NoNotifications);
313 | this._NewNotifications_gicon = Gio.icon_new_for_string(Notifications);
314 | this._settings = new Gio.Settings({
315 | schema_id: 'org.gnome.desktop.notifications',
316 | });
317 | this._settings.connect('changed::show-banners', this._updateCount.bind(this));
318 | this._icon.gicon = this._Notifications_gicon
319 | this.actor = this._icon;
320 | this._sources = src;
321 |
322 | this._source_added = Main.messageTray.connect('source-added', (t, source) => this._onSourceAdded(t, source));
323 | this._source_removed = Main.messageTray.connect('source-removed', (t, source) => {
324 | this._sources.splice(this._sources.indexOf(source), 1);
325 | this._updateCount();
326 | });
327 | this._queue_changed = Main.messageTray.connect('queue-changed', () => this._updateCount());
328 |
329 | let sources = Main.messageTray.getSources();
330 | sources.forEach((source) => {
331 | this._onSourceAdded(null, source);
332 | });
333 | this._updateCount()
334 | }
335 |
336 | _onSourceAdded(tray, source) {
337 | source.connect('notify::count', () => this._updateCount());
338 | this._sources.push(source);
339 | this._updateCount();
340 | }
341 |
342 | _updateCount() {
343 | let count = 0;
344 | let icon = null
345 | this._sources.forEach((source) => {
346 | count += source.count;
347 | });
348 |
349 | if (this.settings.get_boolean("separate-date-and-notification")) {
350 | if (!this._settings.get_boolean('show-banners')) {
351 | this._icon.gicon = Gio.icon_new_for_string(NotificationsDisabled);
352 | } else {
353 | this._icon.gicon = (count > 0) ? this._NewNotifications_gicon : this._Notifications_gicon;
354 | }
355 | } else {
356 | if (!this._settings.get_boolean('show-banners')) {
357 | this._icon.gicon = Gio.icon_new_for_string(NotificationsDisabled);
358 | this._icon.show();
359 | } else {
360 | if (count > 0) {
361 | this._icon.icon_name = 'media-record-symbolic';
362 | this._icon.show();
363 | } else {
364 | this.actor.hide();
365 | }
366 | }
367 | }
368 | this.actor = this._icon;
369 | }
370 |
371 | destroy() {
372 | Main.messageTray.disconnect(this._source_added);
373 | Main.messageTray.disconnect(this._source_removed);
374 | Main.messageTray.disconnect(this._queue_changed);
375 | }
376 | });
377 |
--------------------------------------------------------------------------------
/prefs.js:
--------------------------------------------------------------------------------
1 | /* Panel Indicators GNOME Shell extension
2 | *
3 | * Copyright (C) 2019 Leandro Vital
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 3 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | const Gio = imports.gi.Gio;
20 | const Gtk = imports.gi.Gtk;
21 | const GLib = imports.gi.GLib;
22 | const GObject = imports.gi.GObject;
23 | const GdkPixbuf = imports.gi.GdkPixbuf;
24 | const Gettext = imports.gettext.domain("bigSur-StatusArea");
25 | const _ = Gettext.gettext;
26 | const ExtensionUtils = imports.misc.extensionUtils;
27 | const Me = ExtensionUtils.getCurrentExtension();
28 | const Convenience = Me.imports.convenience;
29 |
30 | const Extension = imports.misc.extensionUtils.getCurrentExtension();
31 | const MenuItems = Extension.imports.menuItems;
32 |
33 | function init() {
34 | Convenience.initTranslations("bigSur-StatusArea");
35 | }
36 |
37 | const IconButton = GObject.registerClass({
38 | GTypeName: "IconButton",
39 | },
40 | class IconButton extends Gtk.Button {
41 |
42 | _init (params) {
43 | super._init({});
44 | if (params["circular"]) {
45 | let context = this.get_style_context();
46 | context.add_class("circular");
47 | }
48 | if (params["icon_name"]) {
49 | let image = new Gtk.Image({
50 | icon_name: params["icon_name"],
51 | xalign: 0.46
52 | });
53 | this.add(image);
54 | }
55 | }
56 | });
57 |
58 | var DialogWindow = GObject.registerClass({
59 | GTypeName: "DialogWindow",
60 | },
61 | class DialogWindow extends Gtk.Dialog {
62 |
63 | _init (title, parent) {
64 | super._init({
65 | title: title,
66 | transient_for: parent.get_toplevel(),
67 | use_header_bar: true,
68 | modal: true
69 | });
70 | let vbox = new Gtk.Box({
71 | orientation: Gtk.Orientation.VERTICAL,
72 | });
73 | vbox.set_homogeneous(false);
74 | vbox.set_spacing(20);
75 |
76 | this._createLayout(vbox);
77 | this.get_content_area().add(vbox);
78 | }
79 |
80 | _createLayout (vbox) {
81 | throw "Not implemented!";
82 | }
83 | });
84 |
85 | const NotebookPage = GObject.registerClass({
86 | GTypeName: "NotebookPage",
87 |
88 | },
89 | class NotebookPage extends Gtk.Box {
90 |
91 | _init (title) {
92 | super._init({
93 | orientation: Gtk.Orientation.VERTICAL,
94 | });
95 | // this.set_margin(24);
96 | this.set_homogeneous(false);
97 | this.set_spacing(20);
98 | this.title = new Gtk.Label({
99 | label: "" + title + "",
100 | use_markup: true,
101 | xalign: 0
102 | });
103 | }
104 | });
105 |
106 | var FrameBox = GObject.registerClass({
107 | GTypeName: "FrameBox",
108 | },
109 | class FrameBox extends Gtk.Frame {
110 | _init (label) {
111 | this._listBox = new Gtk.ListBox();
112 | this._listBox.set_selection_mode(Gtk.SelectionMode.NONE);
113 | super._init({
114 | child: this._listBox
115 | });
116 | // label_yalign: 0.50;
117 | this.label = label;
118 | }
119 |
120 | add (boxRow) {
121 | this._listBox.append(boxRow);
122 | }
123 | });
124 |
125 | var FrameBoxRow = GObject.registerClass({
126 | GTypeName: "FrameBoxRow",
127 | },
128 | class FrameBoxRow extends Gtk.ListBoxRow {
129 |
130 | _init () {
131 | this._box = new Gtk.Box({
132 | orientation: Gtk.Orientation.HORIZONTAL,
133 | });
134 | //this.set_margin(5);
135 | //this.set_row_spacing(20);
136 | //this.set_column_spacing(20);
137 | super._init({
138 | child: this._box
139 | });
140 | }
141 |
142 | add (widget) {
143 | this._box.append(widget);
144 | }
145 | });
146 |
147 | const PrefsWidget = GObject.registerClass({
148 | GTypeName: "PrefsWidget",
149 | //Name: "Prefs.Widget",
150 | },
151 | class PrefsWidgets extends Gtk.Box {
152 |
153 | _init () {
154 | super._init({
155 | orientation: Gtk.Orientation.VERTICAL,
156 | });
157 | this.set_spacing(5);
158 | // this.add_ccs_class("box-prefs-widget");
159 | this.settings = Convenience.getSettings();
160 | this.menuItems = new MenuItems.MenuItems(this.settings);
161 |
162 | let notebook = new Gtk.Notebook();
163 | notebook.set_margin_start(6);
164 | notebook.set_margin_end(6);
165 |
166 | let settingsPage = new SettingsPage(this.settings);
167 |
168 | notebook.append_page(settingsPage, settingsPage.title);
169 |
170 | let indicatorsPage = new IndicatorsPage(this.settings, this.menuItems);
171 | notebook.append_page(indicatorsPage, indicatorsPage.title);
172 |
173 | let aboutPage = new AboutPage(this.settings);
174 | notebook.append_page(aboutPage, aboutPage.title);
175 |
176 | this.append(notebook);
177 | }
178 | });
179 |
180 | var SettingsPage = GObject.registerClass({
181 | GTypeName: "SettingsPage",
182 | },
183 | class SettingsPage extends NotebookPage {
184 |
185 | _init (settings) {
186 | super._init(_("Settings"));
187 | this.settings = settings;
188 | this.desktopSettings = new Gio.Settings({
189 | schema_id: "org.gnome.desktop.interface"
190 | });
191 |
192 | //
193 | // User Settings
194 | //
195 | let userFrame = new FrameBox(_("User/System Indicator"));
196 | userFrame.show();
197 | let nameIconRow = new FrameBoxRow();
198 | nameIconRow.show();
199 | let nameIconLabel = new Gtk.Label({
200 | label: _("Show an icon instead of name"),
201 | xalign: 0,
202 | hexpand: true
203 | });
204 | let nameIconSwitch = new Gtk.Switch({
205 | halign: Gtk.Align.END
206 | });
207 | this.settings.bind("user-icon", nameIconSwitch, "active", Gio.SettingsBindFlags.DEFAULT);
208 |
209 | nameIconRow.add(nameIconLabel);
210 | nameIconRow.add(nameIconSwitch);
211 |
212 | userFrame.add(nameIconRow);
213 |
214 | //
215 | // Calendar Settings
216 | ///
217 | let calendarFrame = new FrameBox(_("Calendar Indicator"));
218 | calendarFrame.show();
219 | let dateFormatRow = new FrameBoxRow();
220 | dateFormatRow.show();
221 |
222 | let dateFormatLabel = new Gtk.Label({
223 | label: _("Change date format"),
224 | xalign: 0,
225 | hexpand: true
226 | });
227 | dateFormatLabel.show();
228 | let dateFormatWikiButton = new Gtk.LinkButton({
229 | label: _("wiki"),
230 | uri: "https://help.gnome.org/users/gthumb/unstable/gthumb-date-formats.html",
231 | //xalign: 0,
232 | //hexpand: true,
233 | //image: new Gtk.Image({
234 | //icon_name: "emblem-web",
235 | //xalign: 0.46
236 | //})
237 | });
238 | dateFormatWikiButton.show();
239 | let context = dateFormatWikiButton.get_style_context();
240 | context.add_class("circular");
241 |
242 | let dateFormatEntry = new Gtk.Entry({
243 | hexpand: true,
244 | halign: Gtk.Align.END
245 | });
246 | dateFormatEntry.show();
247 | this.settings.bind("date-format", dateFormatEntry, "text", Gio.SettingsBindFlags.DEFAULT);
248 |
249 | dateFormatRow.add(dateFormatLabel);
250 | dateFormatRow.add(dateFormatWikiButton);
251 | dateFormatRow.add(dateFormatEntry);
252 |
253 | calendarFrame.add(dateFormatRow);
254 |
255 | //
256 | // Power Settings
257 | ///
258 | let powerFrame = new FrameBox(_("Power Indicator"));
259 | let showPercentageLabelRow = new FrameBoxRow();
260 |
261 | showPercentageLabelRow.add(new Gtk.Label({
262 | label: _("Show battery percentage"),
263 | xalign: 0,
264 | hexpand: true
265 | }));
266 | let showPercentageLabelSwitch = new Gtk.Switch({
267 | halign: Gtk.Align.END
268 | });
269 | this.desktopSettings.bind("show-battery-percentage", showPercentageLabelSwitch, "active", Gio.SettingsBindFlags.DEFAULT);
270 | showPercentageLabelRow.add(showPercentageLabelSwitch);
271 |
272 | powerFrame.add(showPercentageLabelRow);
273 |
274 | // add the frames
275 | this.append(userFrame);
276 | this.append(calendarFrame);
277 | this.append(powerFrame);
278 | }
279 | });
280 |
281 | var IndicatorsPage = GObject.registerClass({
282 | GTypeName: "IndicatorsPage",
283 | },
284 | class IndicatorsPage extends NotebookPage {
285 |
286 | _init (settings, menuItems) {
287 | super._init(_("Position and size"));
288 | this.settings = settings;
289 | this.menuItems = menuItems;
290 |
291 | this.separatingBox = new FrameBox(_("Unified Calendar/Notification Indicator"));
292 |
293 | this.append(this.separatingBox);
294 | /////////////////////////////////////////////////////////////////////////////////////
295 | this.spacingBox = new FrameBox(_("Indicator padding"));
296 |
297 | let activateSpacingLabelRow = new FrameBoxRow();
298 |
299 | activateSpacingLabelRow.add(new Gtk.Label({
300 | label: _("Enable toggle for custom indicator padding"),
301 | xalign: 0,
302 | hexpand: true
303 | }));
304 | let activateSpacingLabelSwitch = new Gtk.Switch({
305 | halign: Gtk.Align.END
306 | });
307 | this.spacingBox.add(activateSpacingLabelRow);
308 |
309 | this.spacingRow = new FrameBoxRow();
310 |
311 | this.spacingLabel = new Gtk.Label({
312 | label: "",
313 | xalign: 0,
314 | hexpand: true
315 | });
316 | this.spacingScale = new Gtk.Scale({
317 | orientation: Gtk.Orientation.HORIZONTAL,
318 | adjustment: new Gtk.Adjustment({
319 | lower: 0,
320 | upper: 15,
321 | step_increment: 1,
322 | page_increment: 1,
323 | page_size: 0
324 | }),
325 | digits: 0,
326 | round_digits: 0,
327 | hexpand: true,
328 | value_pos: Gtk.PositionType.RIGHT
329 | });
330 | this.spacingScale.connect("value-changed", function (scale, value) {
331 | return (value ? value.toString(): "0") + " px";
332 | });
333 | this.spacingScale.add_mark(9, Gtk.PositionType.BOTTOM, "");
334 | this.spacingScale.set_value(this.settings.get_int("spacing"));
335 | this.spacingScale.connect("value-changed", this.getSpacingScale.bind(this));
336 |
337 | this.spacingRow.add(this.spacingLabel);
338 | this.spacingRow.add(this.spacingScale);
339 |
340 | this.spacingBox.add(this.spacingRow);
341 |
342 | this.settings.bind("activate-spacing" , activateSpacingLabelSwitch, "active", Gio.SettingsBindFlags.DEFAULT);
343 | activateSpacingLabelSwitch.connect("notify", this.spacingEnable.bind(this));
344 | activateSpacingLabelRow.add(activateSpacingLabelSwitch);
345 |
346 | this.append(this.spacingBox);
347 |
348 |
349 | this.indicatorsFrame = new FrameBox("");
350 | this.buildList();
351 |
352 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////
353 | let activateSeparatingLabelRow = new FrameBoxRow();
354 |
355 | activateSeparatingLabelRow.add(new Gtk.Label({
356 | label: _("Enable toggle for individual calendar and notification indicators (gnome-shell restart required for effect)"),
357 | xalign: 0,
358 | hexpand: true
359 | }));
360 | let activateSeparatingLabelSwitch = new Gtk.Switch({
361 | halign: Gtk.Align.END
362 | });
363 | this.settings.bind("separate-date-and-notification" , activateSeparatingLabelSwitch, "active", Gio.SettingsBindFlags.DEFAULT);
364 | activateSeparatingLabelSwitch.connect("notify", this.separatingEnable.bind(this));
365 | activateSeparatingLabelRow.add(activateSeparatingLabelSwitch);
366 |
367 | this.separatingBox.add(activateSeparatingLabelRow);
368 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
369 | // add the frames
370 | this.append(this.indicatorsFrame);
371 | this.spacingBox.show(); //add_actor(this.spacingRow);
372 | }
373 |
374 | getSpacingScale () {
375 | this.settings.set_int("spacing", this.spacingScale.get_value());
376 | }
377 |
378 | buildList () {
379 |
380 | this.remove(this.indicatorsFrame);
381 | this.indicatorsFrame = new FrameBox(_("Indicators Order"));
382 | this.append(this.indicatorsFrame);
383 |
384 | this.indicatorsArray = new Array();
385 | this.statusArray = new Array();
386 | this.labelsArray = new Array();
387 | let items = this.menuItems.getItems();
388 |
389 | for (let indexItem in items) {
390 | let item = items[indexItem];
391 |
392 | let indicatorRow = new FrameBoxRow();
393 |
394 | let indicatorLabel = new Gtk.Label({
395 | label: _(item["label"]),
396 | xalign: 0,
397 | hexpand: true
398 | });
399 |
400 | let positionCombo = new Gtk.ComboBoxText({
401 | halign: Gtk.Align.END
402 | });
403 | positionCombo.append_text(_("Left"));
404 | positionCombo.append_text(_("Center"));
405 | positionCombo.set_active(item["position"]);
406 | positionCombo.connect("changed", () => {
407 | this.enableCenter(positionCombo, indexItem);
408 | });
409 |
410 | let statusSwitch = new Gtk.Switch({
411 | active: (item["enable"] == "1"),
412 | halign: Gtk.Align.END
413 | });
414 | statusSwitch.connect("notify", () => {
415 | this.changeEnable(statusSwitch, null, indexItem);
416 | });
417 |
418 |
419 | let buttonBox = new Gtk.Box({
420 | halign: Gtk.Align.END
421 | });
422 |
423 | let context = buttonBox.get_style_context();
424 | context.add_class("linked");
425 |
426 | let buttonUp = new Gtk.Button();
427 | buttonUp.set_icon_name("go-up-symbolic");
428 |
429 | if (indexItem > 0) {
430 | buttonUp.connect("clicked", () => {
431 | this.changeOrder(null, indexItem, -1);
432 | });
433 | }
434 |
435 | let buttonDown = new Gtk.Button();
436 | buttonDown.set_icon_name("go-down-symbolic");
437 |
438 | if (indexItem < items.length - 1) {
439 | buttonDown.connect("clicked", () => {
440 | this.changeOrder(null, indexItem, 1);
441 | });
442 | }
443 |
444 | buttonBox.append(buttonUp);
445 | buttonBox.append(buttonDown);
446 |
447 | indicatorRow.add(indicatorLabel);
448 | indicatorRow.add(statusSwitch);
449 | indicatorRow.add(positionCombo);
450 | indicatorRow.add(buttonBox);
451 |
452 | this.indicatorsFrame.add(indicatorRow);
453 | this.indicatorsArray.push(indicatorRow);
454 | this.statusArray.push(statusSwitch);
455 | this.labelsArray.push(_(item["label"]));
456 | }
457 |
458 | let positionRow = new FrameBoxRow();
459 | positionRow.add(new Gtk.Label({
460 | label: _("Top to bottom -> Left to right"),
461 | hexpand: true
462 | }));
463 | let resetIndicatorsRow = new FrameBoxRow();
464 | resetIndicatorsRow.add(new Gtk.Label({
465 | label: _("Reset Indicators"),
466 | halign: 2,
467 | hexpand: true
468 | }));
469 | let resetButton = new Gtk.Button({
470 | visible: true,
471 | label: _("Reset"),
472 | can_focus: true
473 | });
474 | // resetButton.get_style_context().add_class(Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
475 | resetButton.connect("clicked", this.resetPosition.bind(this));
476 |
477 | resetIndicatorsRow.add(resetButton);
478 | this.indicatorsFrame.add(positionRow);
479 | this.indicatorsFrame.add(resetIndicatorsRow);
480 |
481 | this.indicatorsArray.push(positionRow);
482 | this.indicatorsArray.push(resetIndicatorsRow);
483 | }
484 |
485 | changeOrder (o, index, order) {
486 | this.menuItems.changeOrder(index, order);
487 | this.buildList();
488 | }
489 |
490 | changeEnable (object, p, index) {
491 | let items = this.menuItems.getItems();
492 | let item = items[index];
493 |
494 | if (_(item["label"]) == _("Calendar") &&
495 | !this.settings.get_boolean("separate-date-and-notification")) {
496 | object.set_active(false);
497 | }
498 | else
499 | this.menuItems.changeEnable(index, object.active);
500 | }
501 |
502 | enableCenter (object, index) {
503 | this.menuItems.changePosition(index, object.get_active());
504 | this.changeOrder(null, index, -index);
505 | }
506 |
507 | resetPosition () {
508 | this.settings.set_value("items", this.settings.get_default_value("items"));
509 | this.buildList();
510 | }
511 |
512 | spacingEnable (object, p) {
513 | if (object.active) {
514 | this.settings.set_boolean("activate-spacing", true);
515 | this.spacingRow.show();
516 | }
517 | else {
518 | this.spacingRow.hide();
519 | this.settings.set_boolean("activate-spacing", false);
520 | }
521 | }
522 |
523 | separatingEnable (object, p) {
524 | if (object.active) {
525 | this.settings.set_boolean("separate-date-and-notification" , true);
526 | }
527 | else {
528 | for(let x = 0; x < this.labelsArray.length; x++) {
529 | if (this.labelsArray[x] == _("Calendar")) {
530 | this.statusArray[x].set_active(false);
531 | }
532 | }
533 | this.settings.set_boolean("separate-date-and-notification" , false);
534 | }
535 | }
536 | });
537 |
538 | var AboutPage = GObject.registerClass({
539 | GTypeName: "AboutPage",
540 | },
541 | class AboutPage extends NotebookPage {
542 |
543 | _init (settings) {
544 | super._init(_("About"));
545 | this.settings = settings;
546 |
547 | let releaseVersion = Me.metadata["version"];
548 | let projectName = Me.metadata["name"];
549 | let projectDescription = Me.metadata["description"];
550 | let projectUrl = Me.metadata["url"];
551 | let logoPath = Me.path + "/icons/logo.svg";
552 | let [imageWidth, imageHeight] = [128, 128];
553 | let pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(logoPath, imageWidth, imageHeight);
554 | let menuImage = new Gtk.Image();
555 | menuImage.set_from_pixbuf(pixbuf);
556 | let menuImageBox = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL});
557 | menuImageBox.append(menuImage);
558 |
559 | // Create the info box
560 | let menuInfoBox = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL});
561 | let menuLabel = new Gtk.Label({
562 | label: "Panel Indicators",
563 | use_markup: true,
564 | });
565 | let versionLabel = new Gtk.Label({
566 | label: "" + _("Version: ") + releaseVersion + "",
567 | use_markup: true,
568 | });
569 | let projectDescriptionLabel = new Gtk.Label({
570 | label: "\n" + _(projectDescription),
571 | });
572 | let helpLabel = new Gtk.Label({
573 | label: "\n" + _("If something breaks, don\'t hesitate to leave a comment at "),
574 | });
575 | let projectLinkButton = new Gtk.LinkButton({
576 | label: _("Webpage/Github"),
577 | uri: projectUrl,
578 | });
579 | menuInfoBox.append(menuLabel);
580 | menuInfoBox.append(versionLabel);
581 | menuInfoBox.append(projectDescriptionLabel);
582 | menuInfoBox.append(helpLabel);
583 | menuInfoBox.append(projectLinkButton);
584 |
585 | let authorLabel = new Gtk.Label({
586 | label: _("This extension is a fork of Extend Panel Menu, thanks to julio641742"),
587 | justify: Gtk.Justification.CENTER,
588 | });
589 |
590 | // Create the GNU software box
591 | let gnuSofwareLabel = new Gtk.Label({
592 | label: 'This program comes with ABSOLUTELY NO WARRANTY.\n' +
593 | 'See the GNU General Public License version 3 for details.',
594 | use_markup: true,
595 | justify: Gtk.Justification.CENTER,
596 | });
597 | let gnuSofwareLabelBox = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL});
598 | gnuSofwareLabelBox.append(gnuSofwareLabel);
599 |
600 | this.append(menuImageBox);
601 | this.append(menuInfoBox);
602 | this.append(authorLabel);
603 | this.append(gnuSofwareLabelBox);
604 | }
605 | });
606 |
607 | function buildPrefsWidget() {
608 | let widget = new PrefsWidget();
609 | widget.show();
610 |
611 | return widget;
612 | }
613 |
614 |
615 |
--------------------------------------------------------------------------------