diff --git a/unite.pot b/unite.pot index 5be6bac..b24cc48 100644 --- a/unite.pot +++ b/unite.pot @@ -3,194 +3,173 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR galen1423 , 2020. # -msgid "" -msgstr "" "Project-Id-Version: Unite Shell\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-09-16 03:07+0300\n" +"POT-Creation-Date: 2024-07-30 10:03+0300\n" "PO-Revision-Date: 2020-04-30 18:36+0200\n" +"Last-Translator: \n" "Language-Team: \n" +"Language: en_EN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.0\n" -"Last-Translator: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"Language: en_EN\n" +"X-Generator: Poedit 3.4.2\n" "X-Poedit-Basepath: unite@hardpixel.eu\n" "X-Poedit-SearchPath-0: settings.ui\n" -"X-Poedit-SearchPath-1: overrides/settings.ui\n" -#: overrides/settings.ui:38 settings.ui:32 -msgid "Extend top bar left box" +#: settings.ui:11 +msgid "General" msgstr "" -#: overrides/settings.ui:78 settings.ui:52 +#: settings.ui:32 msgid "Auto focus new windows" msgstr "" -#: overrides/settings.ui:118 settings.ui:72 +#: settings.ui:52 msgid "Show system tray in top bar" msgstr "" -#: overrides/settings.ui:158 settings.ui:92 +#: settings.ui:72 +msgid "Show appmenu in top bar" +msgstr "" + +#: settings.ui:92 msgid "Show desktop name in top bar" msgstr "" -#: overrides/settings.ui:198 settings.ui:112 +#: settings.ui:112 msgid "Enable titlebar actions on top bar click" msgstr "" -#: overrides/settings.ui:238 settings.ui:132 +#: settings.ui:132 msgid "Restrict functionalities to the primary screen" msgstr "" -#: overrides/settings.ui:278 settings.ui:152 +#: settings.ui:152 msgid "Hide activities button" msgstr "" -#: overrides/settings.ui:294 overrides/settings.ui:339 -#: overrides/settings.ui:386 overrides/settings.ui:433 settings.ui:162 -#: settings.ui:187 settings.ui:214 settings.ui:241 +#: settings.ui:162 settings.ui:187 settings.ui:214 settings.ui:241 msgid "Never" msgstr "" -#: overrides/settings.ui:295 overrides/settings.ui:949 -#: overrides/settings.ui:996 settings.ui:163 settings.ui:521 settings.ui:548 +#: settings.ui:163 settings.ui:477 settings.ui:504 msgid "Auto" msgstr "" -#: overrides/settings.ui:296 overrides/settings.ui:343 -#: overrides/settings.ui:390 overrides/settings.ui:437 settings.ui:164 -#: settings.ui:191 settings.ui:218 settings.ui:245 +#: settings.ui:164 settings.ui:191 settings.ui:218 settings.ui:245 msgid "Always" msgstr "" -#: overrides/settings.ui:323 settings.ui:177 +#: settings.ui:177 msgid "Hide window titlebars" msgstr "" -#: overrides/settings.ui:340 overrides/settings.ui:387 -#: overrides/settings.ui:434 settings.ui:188 settings.ui:215 settings.ui:242 +#: settings.ui:188 settings.ui:215 settings.ui:242 msgid "Tiled" msgstr "" -#: overrides/settings.ui:341 overrides/settings.ui:388 -#: overrides/settings.ui:435 settings.ui:189 settings.ui:216 settings.ui:243 +#: settings.ui:189 settings.ui:216 settings.ui:243 msgid "Maximized" msgstr "" -#: overrides/settings.ui:342 overrides/settings.ui:389 -#: overrides/settings.ui:436 settings.ui:190 settings.ui:217 settings.ui:244 +#: settings.ui:190 settings.ui:217 settings.ui:244 msgid "Both" msgstr "" -#: overrides/settings.ui:370 settings.ui:204 +#: settings.ui:204 msgid "Show window title in app menu" msgstr "" -#: overrides/settings.ui:417 settings.ui:231 +#: settings.ui:231 msgid "Show window buttons in top bar" msgstr "" -#: overrides/settings.ui:464 settings.ui:258 +#: settings.ui:258 msgid "Notification messages position" msgstr "" -#: overrides/settings.ui:480 settings.ui:268 +#: settings.ui:268 msgid "Center" msgstr "" -#: overrides/settings.ui:481 overrides/settings.ui:950 settings.ui:269 -#: settings.ui:522 +#: settings.ui:269 settings.ui:478 msgid "Left" msgstr "" -#: overrides/settings.ui:482 overrides/settings.ui:951 settings.ui:270 -#: settings.ui:523 +#: settings.ui:270 settings.ui:479 msgid "Right" msgstr "" -#: overrides/settings.ui:506 settings.ui:282 -msgid "General" -msgstr "" - -#: overrides/settings.ui:531 settings.ui:307 -msgid "Apply system fonts to shell theme" -msgstr "" - -#: overrides/settings.ui:571 settings.ui:327 -msgid "Convert tray icons to greyscale" +#: settings.ui:283 +msgid "Appearance" msgstr "" -#: overrides/settings.ui:610 settings.ui:346 -msgid "Hide top bar dropdown arrows" +#: settings.ui:304 +msgid "Extend top bar left box" msgstr "" -#: overrides/settings.ui:650 settings.ui:367 -msgid "Hide aggregate menu dropdown arrow" +#: settings.ui:324 +msgid "Use text in activities button" msgstr "" -#: overrides/settings.ui:689 settings.ui:387 -msgid "Hide app menu dropdown arrow" +#: settings.ui:344 +msgid "Convert tray icons to greyscale" msgstr "" -#: overrides/settings.ui:729 settings.ui:407 +#: settings.ui:363 msgid "Hide app menu application icon" msgstr "" -#: overrides/settings.ui:769 settings.ui:427 +#: settings.ui:383 msgid "Reduce top bar items spacing" msgstr "" -#: overrides/settings.ui:809 settings.ui:447 +#: settings.ui:403 msgid "Top bar desktop name text" msgstr "" -#: overrides/settings.ui:823 settings.ui:455 +#: settings.ui:411 msgid "GNOME Desktop" msgstr "" -#: overrides/settings.ui:848 settings.ui:466 +#: settings.ui:422 msgid "Max width for the app menu" msgstr "" -#: overrides/settings.ui:888 settings.ui:486 +#: settings.ui:442 msgid "Ellipsis mode for app menu" msgstr "" -#: overrides/settings.ui:904 settings.ui:496 +#: settings.ui:452 msgid "Start" msgstr "" -#: overrides/settings.ui:905 settings.ui:497 +#: settings.ui:453 msgid "Middle" msgstr "" -#: overrides/settings.ui:906 settings.ui:498 +#: settings.ui:454 msgid "End" msgstr "" -#: overrides/settings.ui:933 settings.ui:511 +#: settings.ui:467 msgid "Top bar window buttons position" msgstr "" -#: overrides/settings.ui:952 settings.ui:524 +#: settings.ui:480 msgid "First" msgstr "" -#: overrides/settings.ui:953 settings.ui:525 +#: settings.ui:481 msgid "Last" msgstr "" -#: overrides/settings.ui:980 settings.ui:538 +#: settings.ui:494 msgid "Top bar window buttons theme" msgstr "" -#: overrides/settings.ui:997 settings.ui:549 +#: settings.ui:505 msgid "Default" msgstr "" - -#: overrides/settings.ui:1021 settings.ui:561 -msgid "Appearance" -msgstr "" diff --git a/unite@hardpixel.eu/prefs.js b/unite@hardpixel.eu/prefs.js index 83657f2..caffeb0 100644 --- a/unite@hardpixel.eu/prefs.js +++ b/unite@hardpixel.eu/prefs.js @@ -6,120 +6,92 @@ import { ExtensionPreferences } from 'resource:///org/gnome/Shell/Extensions/js/ import * as Theme from './theme.js' import * as Convenience from './convenience.js' -const PrefsWidget = GObject.registerClass( - class UnitePrefsWidget extends Gtk.Box { - _init(params) { - super._init(params) - - this._settings = Convenience.getSettings() - this._buildable = new Gtk.Builder() - this._themes = new Theme.WindowControlsThemes() - - this._loadTemplate() - this._loadThemes() - - this._bindStrings() - this._bindSelects() - this._bindBooleans() - this._bindEnumerations() - this._bindIntegers() - } - - _loadTemplate() { - const template = GLib.build_filenamev([Convenience.getPath(), 'settings.ui']) - this._buildable.add_from_file(template) - - this._container = this._getWidget('prefs_widget') - this.append(this._container) - } - - _loadThemes() { - const widget = this._getWidget('window-buttons-theme') - const themes = this._themes.available.sort((a, b) => { - return a.uuid < b.uuid ? -1 : a.uuid > b.uuid ? 1 : 0 - }) - - themes.forEach(theme => { - if (theme.uuid !== 'default') { - widget.append(theme.uuid, theme.name) - } - }) - } - - _getWidget(name) { - let widgetName = name.replace(/-/g, '_') - return this._buildable.get_object(widgetName) - } - - _bindInput(setting, prop) { - let widget = this._getWidget(setting) - this._settings.bind(setting, widget, prop, this._settings.DEFAULT_BINDING) - } - - _bindEnum(setting) { - let widget = this._getWidget(setting) - widget.set_active(this._settings.get_enum(setting)) - - widget.connect('changed', combobox => { - this._settings.set_enum(setting, combobox.get_active()) - }) - } - - _bindStrings() { - let settings = this._settings.getTypeSettings('string') - settings.forEach(setting => this._bindInput(setting, 'text')) - } - - _bindSelects() { - let settings = this._settings.getTypeSettings('select') - settings.forEach(setting => this._bindInput(setting, 'active-id')) - } - - _bindBooleans() { - let settings = this._settings.getTypeSettings('boolean') - settings.forEach(setting => this._bindInput(setting, 'active')) - } - - _bindEnumerations() { - let settings = this._settings.getTypeSettings('enum') - settings.forEach(setting => this._bindEnum(setting)) - } - - _bindIntegers() { - let settings = this._settings.getTypeSettings('int') - settings.forEach(setting => this._bindInput(setting, 'value')) - } +class UnitePreferencesWidget { + constructor() { + this._settings = Convenience.getSettings() + this._buildable = new Gtk.Builder() + this._themes = new Theme.WindowControlsThemes() + + this._loadTemplate() + this._loadThemes() + + this._bindStrings() + this._bindSelects() + this._bindBooleans() + this._bindEnumerations() + this._bindIntegers() } -) -export default class UnitePreferences extends ExtensionPreferences { - fillPreferencesWindow(window) { - const pages = [ - { name: 'general', icon: 'emblem-system-symbolic' }, - { name: 'appearance', icon: 'emblem-photos-symbolic' } - ] + _loadTemplate() { + const template = GLib.build_filenamev([Convenience.getPath(), 'settings.ui']) + this._buildable.add_from_file(template) + } - const widget = new PrefsWidget() + _loadThemes() { + const widget = this._getWidget('window-buttons-theme') + const themes = this._themes.available.sort((a, b) => { + return a.uuid < b.uuid ? -1 : a.uuid > b.uuid ? 1 : 0 + }) - pages.forEach(({ name, icon }) => { - const page = Adw.PreferencesPage.new() - const group = Adw.PreferencesGroup.new() + themes.forEach(theme => { + if (theme.uuid !== 'default') { + widget.append(theme.uuid, theme.name) + } + }) + } - const label = widget._getWidget(`${name}_label`) - const prefs = widget._getWidget(`${name}_prefs`) + _getWidget(name) { + let widgetName = name.replace(/-/g, '_') + return this._buildable.get_object(widgetName) + } - page.set_name(name) - page.set_title(label.get_text()) - page.set_icon_name(icon) + _bindInput(setting, prop) { + let widget = this._getWidget(setting) + this._settings.bind(setting, widget, prop, this._settings.DEFAULT_BINDING) + } - prefs.unparent() - group.add(prefs) + _bindEnum(setting) { + let widget = this._getWidget(setting) + widget.set_active(this._settings.get_enum(setting)) - page.add(group) - window.add(page) + widget.connect('changed', combobox => { + this._settings.set_enum(setting, combobox.get_active()) }) + } + + _bindStrings() { + let settings = this._settings.getTypeSettings('string') + settings.forEach(setting => this._bindInput(setting, 'text')) + } + + _bindSelects() { + let settings = this._settings.getTypeSettings('select') + settings.forEach(setting => this._bindInput(setting, 'active-id')) + } + + _bindBooleans() { + let settings = this._settings.getTypeSettings('boolean') + settings.forEach(setting => this._bindInput(setting, 'active')) + } + + _bindEnumerations() { + let settings = this._settings.getTypeSettings('enum') + settings.forEach(setting => this._bindEnum(setting)) + } + + _bindIntegers() { + let settings = this._settings.getTypeSettings('int') + settings.forEach(setting => this._bindInput(setting, 'value')) + } +} + +export default class UnitePreferences extends ExtensionPreferences { + fillPreferencesWindow(window) { + const widget = new UnitePreferencesWidget() + + window.add(widget._getWidget('general_page')) + window.add(widget._getWidget('windows_page')) - window.set_default_size(620, 665) - widget.unrealize() + window.set_default_size(620, 660) } } diff --git a/unite@hardpixel.eu/settings.ui b/unite@hardpixel.eu/settings.ui index b6c43b5..11789b9 100644 --- a/unite@hardpixel.eu/settings.ui +++ b/unite@hardpixel.eu/settings.ui @@ -6,519 +6,385 @@ 1 10 - - 1 - 0 - 1 + + general-page + General + emblem-system-symbolic - - - - start - 20 - 20 - 20 - 20 - vertical - 15 - 1 + + Layout Tweaks + + + Extend panel left box + Extend top panel left box + extend_left_box - - 50 - - - 0 - center - Auto focus new windows - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Reduce panel spacing + Reduce top panel icons and buttons spacing + reduce_panel_spacing - - 50 - - - 0 - center - Show system tray in top bar - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Notifications position + System notification messages position + notifications_position - - 50 - - - 0 - center - Show appmenu in top bar - - - - - 1 - end - center - 1 - - + + center + 130 + 2 + + Center + Left + Right + + + + + + + + System Tray + + + Enable tray + Show system tray in top panel + show_legacy_tray - - 50 - - - 0 - center - Show desktop name in top bar - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Greyscale icons + Convert tray icons to greyscale + greyscale_tray_icons - - 50 - - - 0 - center - Enable titlebar actions on top bar click - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + + + Application Menu + + + Enable appmenu + Show appmenu button in top panel + show_appmenu_button - - 50 - - - 0 - center - Restrict functionalities to the primary screen - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Maximum width + Maximum width for the appmenu button label + app_menu_max_width - - 50 - - - 0 - center - Hide activities button - - - - - 1 - 170 - end - 1 - - Never - Auto - Always - - - + + center + 130 + 0 + maxwidth_appmenu_adjustment + + + + + Text ellipsis + Text ellipsis mode for appmenu button label + app_menu_ellipsize_mode - - 50 - - - 0 - center - Hide window titlebars - - - - - 1 - 170 - end - 2 - - Never - Tiled - Maximized - Both - Always - - - + + center + 130 + 2 + + Start + Middle + End + + + + + + Disable icon + Hide application icon in appmenu button + hide_app_menu_icon - - 50 - - - 0 - center - Show window title in app menu - - - - - 1 - 170 - end - 2 - - Never - Tiled - Maximized - Both - Always - - - + + center + 1 + + + + + + + Workspace Switcher + + + Use text button + Revive old activities text button + use_activities_text - - 50 - - - 0 - center - Show window buttons in top bar - - - - - 1 - 170 - end - 2 - - Never - Tiled - Maximized - Both - Always - - - + + center + 1 + + + + + Hide switcher + Hide workspace switcher button + hide_activities_button - - 50 - - - 0 - center - Notification messages position - - - - - 1 - 170 - end - 2 - - Center - Left - Right - - - + + center + 130 + 1 + + Never + Auto + Always + - - - - 1 - 0 - General - - + - - - - start - 20 - 20 - 20 - 20 - vertical - 15 - 1 + + Desktop Name + + + Enable desktop name + Show desktop name label in top panel + show_desktop_name - - 50 - - - 0 - center - Extend top bar left box - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Desktop name label + Text to use as desktop name label + desktop_name_text - - 50 - - - 0 - center - Use text in activities button - - - - - 1 - end - center - 1 - - + + center + 12 + 130 + GNOME Desktop + + + + + + + appearance-page + Windows + emblem-photos-symbolic + + + Behavior + + + Primary screen only + Restrict functionalities to the primary screen + restrict_to_primary_screen - - 50 - - - 0 - center - Convert tray icons to greyscale - - - - - 1 - end - center - - + + center + 1 + + + + + Auto focus + Auto focus new windows + autofocus_windows - - 50 - - - 0 - center - Hide app menu application icon - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + Panel click actions + Enable titlebar actions on top panel click + enable_titlebar_actions - - 50 - - - 0 - center - Reduce top bar items spacing - - - - - 1 - end - center - 1 - - + + center + 1 + + + + + + + Titlebars + + + Hide titlebars + Hide window titlebars + hide_window_titlebars - - 50 - - - 0 - center - Top bar desktop name text - - - - - 1 - 170 - end - GNOME Desktop - - + + center + 130 + 2 + + Never + Tiled + Maximized + Both + Always + + + + + + Show appmenu title + Show window title in top panel appmenu + show_window_title - - - - 0 - center - Max width for the app menu - - - - - 1 - 170 - end - 0 - maxwidth_appmenu_adjustment - - + + center + 130 + 2 + + Never + Tiled + Maximized + Both + Always + + + + + + + + Buttons + + + Show buttons + Show window buttons in top panel + show_window_buttons - - - - 0 - center - Ellipsis mode for app menu - - - - - 1 - 170 - end - 2 - - Start - Middle - End - - - + + center + 130 + 2 + + Never + Tiled + Maximized + Both + Always + + + + + + Panel position + Window buttons position in top panel + window_buttons_placement - - 50 - - - 0 - center - Top bar window buttons position - - - - - 1 - 170 - end - 0 - - Auto - Left - Right - First - Last - - - + + center + 130 + 0 + + Auto + Left + Right + First + Last + + + + + + Icon theme + Top panel window buttons theme + window_buttons_theme - - 50 - - - 0 - center - Top bar window buttons theme - - - - - 1 - 170 - end - default-dark - - Auto - Default - - - + + center + 130 + default-dark + + Auto + Default + - - - - 1 - 0 - Appearance - - +