fthx / babar

Task bar. GNOME Shell extension
GNU General Public License v3.0
41 stars 14 forks source link

Babar causes the "remove dropdown arrows" extension to stop working #4

Closed Feichtmeier closed 3 years ago

Feichtmeier commented 3 years ago

https://extensions.gnome.org/extension/800/remove-dropdown-arrows/

This extension does not work anymore and is displayed as "error" on gnome-extension page after babar is activated

I noticed that all arrows are still removed except the places indicator Maybe this is caused by three extensions working together? babar, places-indicator + remove arrows?

Babar is pretty cool btw :)

fthx commented 3 years ago

Ok I reproduced; happens when playing with activate/deactivate extensions Babar & RDDA.

Ok, I looked at this part:

// toggle Places Status Indicator extension label to folder 
    _show_places_icon(show_icon) {
        this.places_indicator = Main.panel.statusArea['places-menu'];
        if (this.places_indicator) {
            this.places_indicator.remove_child(this.places_indicator.get_first_child());
            this.places_box = new St.BoxLayout({style_class: 'panel-status-menu-box'});
            if (show_icon) {
                this.places_icon = new St.Icon({icon_name: 'folder-symbolic', style_class: 'system-status-icon'});
                this.places_box.add_child(this.places_icon);
            } else {
                this.places_label = new St.Label({text: _('Places'), y_expand: true,y_align: Clutter.ActorAlign.CENTER});
                this.places_box.add_child(this.places_label);
            }
            this.places_box.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
            this.places_indicator.add_actor(this.places_box);
        }
    }

in looking glass I succeeded to just remove the Places label (trying to not deleting/recreating the down arrow): Main.panel.statusArea['places-menu'].get_first_child().remove_child(Main.panel.statusArea['places-menu'].get_first_child().get_first_child()) (pffff... did not compress this one, it's more handy in LG with r(i)) but for whatever reason (I feel it's because Babar watches extensions state changed signal to be able to replace Places by an icon even when Places is activated after Babar) it does not work inside the extension.

So I'm stuck here.

Feichtmeier commented 3 years ago

Maybe check the amount of childs? When the arrow is gone I guess there is only one child

fthx commented 3 years ago

https://github.com/fthx/babar/commit/d2d3d1a5e854cbf837f7c73d9d99107a645d0eea

Solved, as far as I tested. Please test & confirm & close? Thanks. :-) The new way for Places label substitution is cleaner, so it's better, whatever its compatibility with RDDA extension.

It will be the v. 11 in GS extensions website.

Feichtmeier commented 3 years ago

cool thanks! how can I install it without the extension homepage? download zipped repo and unzip to gnome-shell extension dir?

fthx commented 3 years ago

Yes, you can dl the latest unreviewed version 14 here: https://extensions.gnome.org/review/download/22220.shell-extension.zip unzip it and rename it to "babar@fthx", in GS extension folder, then restart session.

As you know, it's the only way when you use browser snaps like me because the connector is not recognized by FF or Chromium... ;-)

Feichtmeier commented 3 years ago

Confirmed that this fixed it :) Bildschirmfoto von 2021-02-11 10-11-27

fthx commented 3 years ago

Happy to see that Wacom Indicator extension is used by some people! Working at home makes some of them useful... ;-)

fthx commented 3 years ago

You can test the new version with prefs UI here: https://extensions.gnome.org/review/download/22243.shell-extension.zip

Please ask for new prefs, if you need some, in the dedicated bug thread here: https://github.com/fthx/babar/issues/5