-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hhoao/feat_45_1.0.x_prefs
[feat] add ellipsize_mode_switch prefs
- Loading branch information
Showing
9 changed files
with
130 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,10 @@ import Logger from './src/utils/Logger.js'; | |
import Config from './src/config/Config.js'; | ||
import {TabPanel} from './src/TabPanel.js'; | ||
|
||
export const get_extension_object = () => Extension.lookupByUUID('[email protected]'); | ||
export const get_settings = () => get_extension_object().getSettings( | ||
"org.gnome.shell.extensions.app_tabs" | ||
); | ||
export default class AppTabsExtension extends Extension { | ||
enable() { | ||
this._logger = new Logger("AppTabsExtension") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
"description": "Panel will include a different window tab for the same application that is currently launched.1. You can see the application window intuitively\n2. Click tab to jump to the corresponding window immediately\n3. Click the Close button to close the window", | ||
"url": "https://github.com/hhoao/app_tabs", | ||
"uuid": "[email protected]", | ||
"shell-version": [ | ||
"45" | ||
] | ||
"settings-schema": "org.gnome.shell.extensions.app_tabs", | ||
"shell-version": ["45"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Gio from 'gi://Gio'; | ||
import Adw from 'gi://Adw'; | ||
import Gtk from 'gi://Gtk'; | ||
import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; | ||
|
||
export default class DockerContainersPreferences extends ExtensionPreferences { | ||
get_ellipsize_mode_switch = () => { | ||
const settings = this.getSettings() | ||
const ellipsize_mode_switch = new Gtk.Switch({ | ||
active: false, | ||
valign: Gtk.Align.CENTER, | ||
}); | ||
settings.bind("ellipsize-mode", ellipsize_mode_switch, "active", Gio.SettingsBindFlags.DEFAULT); | ||
return ellipsize_mode_switch; | ||
}; | ||
|
||
fillPreferencesWindow(window) { | ||
const page = new Adw.PreferencesPage({ | ||
title: 'General', | ||
icon_name: 'dialog-information-symbolic', | ||
}); | ||
const group = new Adw.PreferencesGroup({ | ||
title: 'Appearance', | ||
description: 'Configure the appearance of the extension', | ||
}); | ||
page.add(group); | ||
|
||
const row = new Adw.ActionRow({ | ||
title: "Enable ellipsis mode of label", | ||
}); | ||
group.add(row); | ||
|
||
const ellipsize_mode_switch = this.get_ellipsize_mode_switch(); | ||
|
||
row.add_suffix(ellipsize_mode_switch); | ||
row.activatable_widget = ellipsize_mode_switch; | ||
|
||
window.add(page); | ||
} | ||
} | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<schemalist> | ||
<schema id="org.gnome.shell.extensions.app_tabs" path="/org/gnome/shell/extensions/app_tabs/"> | ||
<key name="ellipsize-mode" type="b"> | ||
<default>false</default> | ||
</key> | ||
</schema> | ||
</schemalist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters