diff options
| author | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
|---|---|---|
| committer | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
| commit | 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch) | |
| tree | ab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js | |
| parent | 5d94c0a7d44a2255b81815a52a7056a94a39842d (diff) | |
| download | RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip | |
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js')
| -rw-r--r-- | raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js b/raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js deleted file mode 100644 index 899fdcf..0000000 --- a/raveos-theme/gnome/theme-data/extensions/installed/blur-my-shell@aunetx/preferences/menu.js +++ /dev/null @@ -1,68 +0,0 @@ -import Gdk from 'gi://Gdk'; -import Gtk from 'gi://Gtk'; -import Gio from 'gi://Gio'; -import GLib from 'gi://GLib'; - - -export function addMenu(window) { - const builder = new Gtk.Builder(); - - // add a dummy page and remove it immediately, to access headerbar - builder.add_from_file(GLib.filename_from_uri(GLib.uri_resolve_relative(import.meta.url, '../ui/menu.ui', GLib.UriFlags.NONE))[0]); - let menu_util = builder.get_object('menu_util'); - window.add(menu_util); - try { - addMenuToHeader(window, builder); - } catch (error) { - // could not add menu... not so bad - } - window.remove(menu_util); -} - -function addMenuToHeader(window, builder) { - // a little hack to get to the headerbar - const page = builder.get_object('menu_util'); - const pages_stack = page.get_parent(); // AdwViewStack - const content_stack = pages_stack.get_parent().get_parent(); // GtkStack - const preferences = content_stack.get_parent(); // GtkBox - const headerbar = preferences.get_first_child().get_next_sibling() - .get_first_child().get_first_child().get_first_child(); // AdwHeaderBar - headerbar.pack_start(builder.get_object('info_menu')); - - // setup menu actions - const actionGroup = new Gio.SimpleActionGroup(); - window.insert_action_group('prefs', actionGroup); - - // a list of actions with their associated link - const actions = [ - { - name: 'open-bug-report', - link: 'https://github.com/aunetx/blur-my-shell/issues' - }, - { - name: 'open-readme', - link: 'https://github.com/aunetx/blur-my-shell' - }, - { - name: 'open-license', - link: 'https://github.com/aunetx/blur-my-shell/blob/master/LICENSE' - }, - { - name: 'donate-github', - link: 'https://github.com/sponsors/aunetx' - }, - { - name: 'donate-kofi', - link: 'https://ko-fi.com/aunetx' - }, - ]; - - actions.forEach(action => { - let act = new Gio.SimpleAction({ name: action.name }); - act.connect( - 'activate', - () => Gtk.show_uri(window, action.link, Gdk.CURRENT_TIME) - ); - actionGroup.add_action(act); - }); -} |