firefox updates

This commit is contained in:
Tio
2021-03-14 03:42:28 +01:00
parent 25ecd01890
commit 97f2070a7d
248 changed files with 1324 additions and 474 deletions

View File

@ -96,7 +96,7 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
maxId = dummyDevice.get_id();
}
_d("Max Id:" + maxId);
let defaultDevice = this.getDefaultDevice();
while (++id < maxId) {
let uidevice = this._deviceAdded(this._control, id);
@ -139,10 +139,12 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
_deviceAdded(control, id, dontcheck) {
let obj = this._devices[id];
let uidevice = null;
_d("Added - "+ id);
if (!obj) {
uidevice = this.lookupDeviceById(id);
if (!uidevice || !uidevice.port_name || uidevice.description.match(/Dummy\s+(Output|Input)/gi)) {
if (!uidevice || uidevice.description.match(/Dummy\s+(Output|Input)/gi)) {
return null;
}
@ -197,7 +199,7 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
return uidevice;
}
_d("Added: " + id + ":" + uidevice.description + ":" + uidevice.port_name + ":" + obj.uidevice.origin);
_d("Added: " + id + ":" + uidevice.description + ":" + uidevice.port_name + ":" + uidevice.origin);
if (!this._availableDevicesIds[id]) {
this._availableDevicesIds[id] = 0;
}
@ -323,6 +325,7 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
}
_deviceActivated(control, id) {
_d("Activated:- " + id);
let obj = this._devices[id];
if (obj && obj !== this._activeDevice) {
_d("Activated: " + id + ":" + obj.uidevice.description + ":" + obj.uidevice.port_name + ":" + obj.uidevice.origin);
@ -366,7 +369,9 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
this._setDeviceActiveProfile(device);
}
}*/
this._setDeviceActiveProfile(this._activeDevice);
if(this._activeDevice){
this._setDeviceActiveProfile(this._activeDevice);
}
return true;
}
@ -503,6 +508,7 @@ var SoundDeviceChooserBase = class SoundDeviceChooserBase {
let device = this._devices[id];
let uidevice = device.uidevice;
if (uidevice.port_name == null || uidevice.description == null) {
_d("Device port_name null or description null");
continue;
}
switch (this._canShowDevice(uidevice, uidevice.port_available)) {

View File

@ -79,6 +79,12 @@ function getCard(card_index) {
return cards[card_index];
}
function getCardByName(card_name) {
if (!cards || Object.keys(cards).length == 0) {
refreshCards();
}
return Object.keys(cards).map((index) => cards[index]).find(({name}) => name === card_name)
}
function getProfiles(control, uidevice) {
let stream = control.lookup_stream_id(uidevice.get_stream_id());
@ -136,20 +142,16 @@ function refreshCards() {
if (newProfLogic) {
_log("New logic");
let pyLocation = Me.dir.get_child('utils/pa_helper.py').get_path();
let pythonExec = 'python';
let pyVer = 3;
while (!isCmdFound(pythonExec) && pyVer >= 2) {
_log(pythonExec + " is not found. Try next");
pythonExec = 'python' + pyVer--;
}
if (pyVer <= 1) {
_log('ERROR: Python not found. fallback to default mode' + e);
let pythonExec = ['python', 'python3', 'python2'].find(cmd => isCmdFound(cmd));
if (!pythonExec) {
_log('ERROR: Python not found. fallback to default mode');
_settings.set_boolean(Prefs.NEW_PROFILE_ID, false);
Gio.Settings.sync();
newProfLogic = false;
}
else {
try {
_log('Python found.' + pythonExec);
let [result, out, err, exit_code] = GLib.spawn_command_line_sync(pythonExec + ' ' + pyLocation);
// _log("result" + result +" out"+out + " exit_code" +
// exit_code + "err" +err);
@ -172,6 +174,7 @@ function refreshCards() {
}
//error = true;
if (!newProfLogic || error) {
_log("Old logic");
try {
let [result, out, err, exit_code] = GLib.spawn_command_line_sync('pactl list cards');
if (result && !exit_code) {
@ -239,7 +242,7 @@ function parseOutput(out) {
}
break;
case "PORTS":
if ((matches = /\t*(.*?):\s(.*?)\s\(.*?priority:/.exec(line))) {
if ((matches = /\t*(.*?):\s(.*)\s\(.*?priority:/.exec(line))) {
port = { 'name': matches[1], 'human_name': matches[2], 'card_name': cards[cardIndex].name, 'card_description' : cards[cardIndex].card_description };
cards[cardIndex].ports.push(port);
ports.push(port);

View File

@ -43,6 +43,9 @@ extends Base.SoundDeviceChooserBase {
getDefaultIcon() {
return "audio-card";
}
getStreams() {
return this._control.get_sinks();
}
};
var SoundInputDeviceChooser = class SoundInputDeviceChooser
@ -62,6 +65,9 @@ extends Base.SoundDeviceChooserBase {
getDefaultIcon() {
return "audio-input-microphone";
}
getStreams() {
return this._control.get_sources();
}
};
var InputSliderInstance = class InputSliderInstance {

View File

@ -11,5 +11,5 @@
],
"url": "https://github.com/kgshank/gse-sound-output-device-chooser",
"uuid": "sound-output-device-chooser@kgshank.net",
"version": 33
"version": 34
}

View File

@ -67,13 +67,15 @@ function getPortsFromSettings(_settings) {
function setPortsSettings(ports,_settings) {
let settingsObj = { 'version': PORT_SETTINGS_VERSION };
settingsObj.ports = ports;
_d(JSON.stringify(settingsObj));
//_d(JSON.stringify(settingsObj));
_settings.set_string(PORT_SETTINGS, JSON.stringify(settingsObj));
return settingsObj;
}
function getPortDisplayName(port) {
return port.card_description + " - " + port.human_name;
const card = Lib.getCardByName(port.card_name);
const description = card && card.card_description
return `${port.human_name} - ${description}`;
}
function migratePortSettings(currVersion, currSettings, _settings) {

View File

@ -25,13 +25,16 @@ var SettingsManager = GObject.registerClass(
'show-window-buttons': 'enum',
'window-buttons-theme': 'enum',
'hide-window-titlebars': 'enum',
'enable-titlebar-actions': 'boolean',
'window-buttons-placement': 'select',
'hide-dropdown-arrows': 'boolean',
'hide-aggregate-menu-arrow': 'boolean',
'hide-app-menu-arrow': 'boolean',
'hide-app-menu-icon': 'boolean',
'reduce-panel-spacing': 'boolean',
'restrict-to-primary-screen': 'boolean'
'restrict-to-primary-screen': 'boolean',
'app-menu-max-width': 'int',
'app-menu-ellipsize-mode': 'enum'
}
}
@ -50,8 +53,11 @@ var SettingsManager = GObject.registerClass(
getSetting(key) {
if (!this.exists(key)) return
let boolean = this.getSettingType(key) == 'boolean'
return boolean ? this.get_boolean(key) : this.get_string(key)
switch (this.getSettingType(key)) {
case 'int': return this.get_int(key)
case 'boolean': return this.get_boolean(key)
default: return this.get_string(key)
}
}
}
)

View File

@ -12,5 +12,5 @@
],
"url": "https://github.com/hardpixel/unite-shell",
"uuid": "unite@hardpixel.eu",
"version": 44
"version": 45
}

View File

@ -1,7 +1,11 @@
const Gi = imports._gi
const System = imports.system
const GObject = imports.gi.GObject
const GLib = imports.gi.GLib
const St = imports.gi.St
const Pango = imports.gi.Pango
const Clutter = imports.gi.Clutter
const Meta = imports.gi.Meta
const Shell = imports.gi.Shell
const AppSystem = imports.gi.Shell.AppSystem.get_default()
const WinTracker = imports.gi.Shell.WindowTracker.get_default()
@ -487,6 +491,200 @@ var TrayIcons = class TrayIcons extends PanelExtension {
}
}
var TitlebarActions = class TitlebarActions extends PanelExtension {
constructor({ settings }) {
const active = val => val == true
super(settings, 'enable-titlebar-actions', active)
}
_init() {
this.signals = new Handlers.Signals()
this.settings = new Handlers.Settings()
this.signals.connect(
Main.panel, 'button-press-event', this._onButtonPressEvent.bind(this)
)
}
_onButtonPressEvent(actor, event) {
const focusWindow = global.unite.focusWindow
if (!focusWindow || !focusWindow.hideTitlebars) {
return Clutter.EVENT_PROPAGATE
}
const [mouseX, mouseY] = event.get_coords()
const ccount = event.get_click_count()
const button = event.get_button()
const clickOnChildren = Main.panel.get_children().some(({ x, y, width, height }) => {
return mouseX >= x && mouseX <= x + width && mouseY >= y && mouseY <= y + height
})
if (clickOnChildren) {
return Clutter.EVENT_PROPAGATE
}
let action = null
if (button == 1 && ccount == 2) {
action = this.settings.get('action-double-click-titlebar')
}
if (button == 2) {
action = this.settings.get('action-middle-click-titlebar')
}
if (button == 3) {
action = this.settings.get('action-right-click-titlebar')
}
if (action == 'menu') {
this._openWindowMenu(focusWindow.win, mouseX)
return Clutter.EVENT_STOP
}
if (action && action != 'none') {
return this._handleClickAction(action, focusWindow)
}
return Clutter.EVENT_PROPAGATE
}
_handleClickAction(action, win) {
const mapping = {
'toggle-maximize': 'maximize',
'toggle-maximize-horizontally': 'maximizeX',
'toggle-maximize-vertically': 'maximizeY',
'toggle-shade': 'shade',
'minimize': 'minimize',
'lower': 'lower'
}
const method = mapping[action]
if (method) {
win[method].call(win)
return Clutter.EVENT_STOP
}
return Clutter.EVENT_PROPAGATE
}
_openWindowMenu(win, x) {
const size = Main.panel.height + 4
const rect = { x, y: 0, width: size, height: size }
const type = Meta.WindowMenuType.WM
Main.wm._windowMenuManager.showWindowMenuForWindow(win, type, rect)
}
_destroy() {
this.signals.disconnectAll()
this.settings.disconnectAll()
}
}
var AppMenuCustomizer = class AppMenuCustomizer extends PanelExtension {
constructor({ settings }) {
const active = val => val > 0
super(settings, 'app-menu-max-width', active)
}
_init() {
this.signals = new Handlers.Signals()
this.settings = new Handlers.Settings()
this.tooltip = new St.Label({ visible: false, style_class: 'dash-label' })
this.signals.connect(
AppMenu, 'notify::hover', this._onAppMenuHover.bind(this)
)
this.signals.connect(
AppMenu, 'button-press-event', this._onAppMenuClicked.bind(this)
)
this.settings.connect(
'app-menu-max-width', this._onMaxWidthChange.bind(this)
)
this.settings.connect(
'app-menu-ellipsize-mode', this._onEllipsizeModeChange.bind(this)
)
Main.uiGroup.add_child(this.tooltip)
this._onMaxWidthChange()
}
get maxWidth() {
return this.settings.get('app-menu-max-width')
}
get ellipsizeMode() {
return this.settings.get('app-menu-ellipsize-mode')
}
setLabelMaxWidth(width) {
const label = AppMenu._label
label && label.set_style('max-width' + (width ? `: ${width}px` : ''))
}
setTextEllipsizeMode(mode) {
const modeK = mode.toUpperCase()
const label = AppMenu._label
label && label.get_clutter_text().set_ellipsize(Pango.EllipsizeMode[modeK])
}
_onAppMenuHover(appMenu) {
if (!appMenu._label) return
this.isHovered = appMenu.get_hover()
if (!this.isHovered) {
return this.tooltip.hide()
}
GLib.timeout_add(GLib.PRIORITY_DEFAULT, 400, () => {
if (this.isHovered && !this.tooltip.visible) {
const [mouseX, mouseY] = global.get_pointer()
this.tooltip.set_position(mouseX + 20, mouseY)
this.tooltip.set_text(appMenu._label.get_text())
this.tooltip.show()
}
return GLib.SOURCE_REMOVE
})
}
_onAppMenuClicked() {
this.isHovered = false
this.tooltip.hide()
}
_onMaxWidthChange() {
this.setLabelMaxWidth(this.maxWidth)
this.setTextEllipsizeMode(this.ellipsizeMode)
}
_onEllipsizeModeChange() {
this.setTextEllipsizeMode(this.ellipsizeMode)
}
_destroy() {
this.tooltip.destroy()
this.setLabelMaxWidth(null)
this.setTextEllipsizeMode('end')
this.signals.disconnectAll()
this.settings.disconnectAll()
}
}
var PanelManager = GObject.registerClass(
class UnitePanelManager extends GObject.Object {
_init() {
@ -496,6 +694,8 @@ var PanelManager = GObject.registerClass(
this.activities = new ActivitiesButton(this)
this.desktop = new DesktopName(this)
this.tray = new TrayIcons(this)
this.titlebar = new TitlebarActions(this)
this.appmenu = new AppMenuCustomizer(this)
}
activate() {
@ -504,6 +704,8 @@ var PanelManager = GObject.registerClass(
this.activities.activate()
this.desktop.activate()
this.tray.activate()
this.titlebar.activate()
this.appmenu.activate()
}
destroy() {
@ -512,6 +714,8 @@ var PanelManager = GObject.registerClass(
this.activities.destroy()
this.desktop.destroy()
this.tray.destroy()
this.titlebar.destroy()
this.appmenu.destroy()
this.settings.disconnectAll()
}

View File

@ -20,6 +20,9 @@ var PrefsWidget = GObject.registerClass(
if (VERSION >= 36) {
const fonts = this._getWidget('use_system_fonts_section')
fonts.set_no_show_all(true)
fonts.set_visible(false)
fonts.set_sensitive(false)
}
@ -27,6 +30,7 @@ var PrefsWidget = GObject.registerClass(
this._bindSelects()
this._bindBooleans()
this._bindEnumerations()
this._bindIntegers()
}
_getWidget(name) {
@ -67,6 +71,11 @@ var PrefsWidget = GObject.registerClass(
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') })
}
}
)

View File

@ -59,6 +59,12 @@
<value value="2" nick="always" />
</enum>
<enum id="org.gnome.shell.extensions.unite.ellipsizeMode">
<value value="0" nick="start" />
<value value="1" nick="middle" />
<value value="2" nick="end" />
</enum>
<schema id="org.gnome.shell.extensions.unite" path="/org/gnome/shell/extensions/unite/">
<key name="use-system-fonts" type="b">
<default>true</default>
@ -95,6 +101,11 @@
<summary>Set the top bar desktop name text.</summary>
</key>
<key name="enable-titlebar-actions" type="b">
<default>true</default>
<summary>Enable window titlebar actions on top bar click.</summary>
</key>
<key name="restrict-to-primary-screen" type="b">
<default>true</default>
<summary>Restrict functionalities to the primary screen.</summary>
@ -120,6 +131,16 @@
<summary>Hide app menu application icon.</summary>
</key>
<key name="app-menu-max-width" type="i">
<default>0</default>
<summary>Limit the width of the app menu. 0 means no limit.</summary>
</key>
<key name="app-menu-ellipsize-mode" enum="org.gnome.shell.extensions.unite.ellipsizeMode">
<default>"end"</default>
<summary>The place where characters will be omitted when the max width of the app menu is reached.</summary>
</key>
<key name="reduce-panel-spacing" type="b">
<default>true</default>
<summary>Reduce top bar items spacing.</summary>

View File

@ -1,34 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<!-- Generated with glade 3.38.2 -->
<interface domain="unite">
<requires lib="gtk+" version="3.10"/>
<object class="GtkAdjustment" id="maxwidth_appmenu_adjustment">
<property name="upper">1000</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkNotebook" id="prefs_widget">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="show_border">False</property>
<property name="show-border">False</property>
<property name="scrollable">True</property>
<child>
<object class="GtkBox" id="general_prefs">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="margin_left">20</property>
<property name="margin_right">20</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="margin-left">20</property>
<property name="margin-right">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="orientation">vertical</property>
<property name="spacing">15</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox" id="extend_left_box_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Extend top bar left box</property>
</object>
@ -41,14 +46,14 @@
<child>
<object class="GtkSwitch" id="extend_left_box">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -56,18 +61,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="autofocus_windows_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Auto focus new windows</property>
</object>
@ -80,14 +85,14 @@
<child>
<object class="GtkSwitch" id="autofocus_windows">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -95,18 +100,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="show_legacy_tray_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Show system tray in top bar</property>
</object>
@ -119,14 +124,14 @@
<child>
<object class="GtkSwitch" id="show_legacy_tray">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -134,18 +139,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox" id="show_desktop_name_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Show desktop name in top bar</property>
</object>
@ -158,14 +163,14 @@
<child>
<object class="GtkSwitch" id="show_desktop_name">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -173,18 +178,57 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="enable_titlebar_actions_section">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Enable titlebar actions on top bar click</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="enable_titlebar_actions">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkBox" id="restrict_to_primary_screen_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Restrict functionalities to the primary screen</property>
</object>
@ -197,14 +241,14 @@
<child>
<object class="GtkSwitch" id="restrict_to_primary_screen">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -212,18 +256,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hide_activities_button_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide activities button</property>
</object>
@ -235,10 +279,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="hide_activities_button">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">1</property>
<property name="can-focus">False</property>
<property name="active-id">1</property>
<items>
<item id="0" translatable="yes">Never</item>
<item id="1" translatable="yes">Auto</item>
@ -248,7 +292,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -256,18 +300,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hide_window_titlebars_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide window titlebars</property>
</object>
@ -279,10 +323,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="hide_window_titlebars">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">2</property>
<property name="can-focus">False</property>
<property name="active-id">2</property>
<items>
<item id="0" translatable="yes">Never</item>
<item id="1" translatable="yes">Tiled</item>
@ -294,7 +338,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -302,18 +346,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="position">7</property>
</packing>
</child>
<child>
<object class="GtkBox" id="show_window_title_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Show window title in app menu</property>
</object>
@ -325,10 +369,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="show_window_title">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">2</property>
<property name="can-focus">False</property>
<property name="active-id">2</property>
<items>
<item id="0" translatable="yes">Never</item>
<item id="1" translatable="yes">Tiled</item>
@ -340,7 +384,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -348,18 +392,18 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkBox" id="show_window_buttons_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Show window buttons in top bar</property>
</object>
@ -371,10 +415,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="show_window_buttons">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">2</property>
<property name="can-focus">False</property>
<property name="active-id">2</property>
<items>
<item id="0" translatable="yes">Never</item>
<item id="1" translatable="yes">Tiled</item>
@ -386,7 +430,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -400,12 +444,12 @@
<child>
<object class="GtkBox" id="notifications_position_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Notification messages position</property>
</object>
@ -417,10 +461,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="notifications_position">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">2</property>
<property name="can-focus">False</property>
<property name="active-id">2</property>
<items>
<item id="0" translatable="yes">Center</item>
<item id="1" translatable="yes">Left</item>
@ -430,7 +474,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -443,40 +487,40 @@
</child>
</object>
<packing>
<property name="tab_expand">True</property>
<property name="tab-expand">True</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="general_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">General</property>
</object>
<packing>
<property name="tab_fill">False</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox" id="appearance_prefs">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="margin_left">20</property>
<property name="margin_right">20</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="margin-left">20</property>
<property name="margin-right">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="orientation">vertical</property>
<property name="spacing">15</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox" id="use_system_fonts_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Apply system fonts to shell theme</property>
</object>
@ -489,14 +533,14 @@
<child>
<object class="GtkSwitch" id="use_system_fonts">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -510,12 +554,12 @@
<child>
<object class="GtkBox" id="greyscale_tray_icons_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Convert tray icons to greyscale</property>
</object>
@ -528,13 +572,13 @@
<child>
<object class="GtkSwitch" id="greyscale_tray_icons">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -548,12 +592,12 @@
<child>
<object class="GtkBox" id="hide_dropdown_arrows_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide top bar dropdown arrows</property>
</object>
@ -566,14 +610,14 @@
<child>
<object class="GtkSwitch" id="hide_dropdown_arrows">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -587,12 +631,12 @@
<child>
<object class="GtkBox" id="hide_aggregate_menu_arrow_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide aggregate menu dropdown arrow</property>
</object>
@ -605,13 +649,13 @@
<child>
<object class="GtkSwitch" id="hide_aggregate_menu_arrow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -625,12 +669,12 @@
<child>
<object class="GtkBox" id="hide_app_menu_arrow_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide app menu dropdown arrow</property>
</object>
@ -643,14 +687,14 @@
<child>
<object class="GtkSwitch" id="hide_app_menu_arrow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -664,12 +708,12 @@
<child>
<object class="GtkBox" id="hide_app_menu_icon_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Hide app menu application icon</property>
</object>
@ -682,14 +726,14 @@
<child>
<object class="GtkSwitch" id="hide_app_menu_icon">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -703,12 +747,12 @@
<child>
<object class="GtkBox" id="reduce_panel_spacing_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Reduce top bar items spacing</property>
</object>
@ -721,14 +765,14 @@
<child>
<object class="GtkSwitch" id="reduce_panel_spacing">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -742,12 +786,12 @@
<child>
<object class="GtkBox" id="desktop_name_text_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Top bar desktop name text</property>
</object>
@ -759,15 +803,15 @@
</child>
<child>
<object class="GtkEntry" id="desktop_name_text">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">GNOME Desktop</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -779,17 +823,15 @@
</packing>
</child>
<child>
<object class="GtkBox" id="window_buttons_placement_section">
<object class="GtkBox" id="app_menu_max_width_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="spacing">50</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Top bar window buttons position</property>
<property name="label" translatable="yes">Max width for the app menu</property>
</object>
<packing>
<property name="expand">False</property>
@ -798,23 +840,17 @@
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="window_buttons_placement">
<property name="width_request">170</property>
<object class="GtkSpinButton" id="app_menu_max_width">
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">auto</property>
<items>
<item id="auto" translatable="yes">Auto</item>
<item id="left" translatable="yes">Left</item>
<item id="right" translatable="yes">Right</item>
<item id="first" translatable="yes">First</item>
<item id="last" translatable="yes">Last</item>
</items>
<property name="can-focus">True</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">maxwidth_appmenu_adjustment</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -826,15 +862,105 @@
</packing>
</child>
<child>
<object class="GtkBox" id="window_buttons_theme_section">
<object class="GtkBox" id="app_menu_ellipsize_mode_section">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Ellipsis mode for app menu</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="app_menu_ellipsize_mode">
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active-id">2</property>
<items>
<item id="0" translatable="yes">Start</item>
<item id="1" translatable="yes">Middle</item>
<item id="2" translatable="yes">End</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkBox" id="window_buttons_placement_section">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Top bar window buttons position</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="window_buttons_placement">
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active-id">auto</property>
<items>
<item id="auto" translatable="yes">Auto</item>
<item id="left" translatable="yes">Left</item>
<item id="right" translatable="yes">Right</item>
<item id="first" translatable="yes">First</item>
<item id="last" translatable="yes">Last</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
</packing>
</child>
<child>
<object class="GtkBox" id="window_buttons_theme_section">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="no-show-all">True</property>
<property name="spacing">50</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Top bar window buttons theme</property>
</object>
@ -846,10 +972,10 @@
</child>
<child>
<object class="GtkComboBoxText" id="window_buttons_theme">
<property name="width_request">170</property>
<property name="width-request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="active_id">0</property>
<property name="can-focus">False</property>
<property name="active-id">0</property>
<items>
<item id="0" translatable="yes">Default Dark</item>
<item id="1" translatable="yes">Default Light</item>
@ -877,7 +1003,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -885,24 +1011,24 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="position">11</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
<property name="tab_expand">True</property>
<property name="tab-expand">True</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="appearance_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Appearance</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>

View File

@ -252,6 +252,34 @@ var MetaWindow = GObject.registerClass(
}
}
maximizeX() {
if (this.win.maximized_horizontally) {
this.win.unmaximize(Meta.MaximizeFlags.HORIZONTAL)
} else {
this.win.maximize(Meta.MaximizeFlags.HORIZONTAL)
}
}
maximizeY() {
if (this.win.maximized_vertically) {
this.win.unmaximize(Meta.MaximizeFlags.VERTICAL)
} else {
this.win.maximize(Meta.MaximizeFlags.VERTICAL)
}
}
shade() {
if (this.win.is_shaded) {
this.win.shade(true)
} else {
this.win.unshade(true)
}
}
lower() {
this.win.lower()
}
close() {
const time = global.get_current_time()
time && this.win.delete(time)
@ -279,7 +307,9 @@ var MetaWindow = GObject.registerClass(
if (label && this.hasFocus && this.title) {
const current = label.get_text()
current != this.title && label.set_text(this.title)
const newText = this.title.replace(/\r?\n|\r/g, ' ')
current != newText && label.set_text(newText)
}
}

View File

@ -1 +1 @@
/home/tio/TROM-Share/TROM-Jaro Icons/DONE
/home/tio/TROM Share/TROM-Jaro Icons/DONE