ikalnytskyi / gnome-shell-extension-icon-hider

Icon Hider is a gnome-shell extension for managing status area items.
Other
31 stars 11 forks source link

Add option to hide user name separately #5

Closed l300lvl closed 11 years ago

l300lvl commented 11 years ago

Need reopened

This is not exactly the idea of this extension, but I think it would fit in hand in hand with hiding items from the panel.

I was trying to implement this with the last version but I haven't been able to create a toggle switch yet, so the following is more of a proof of concept as it can't be switched on or off, and it doesn't re-add the user name on disable.

So this creates the switch at the top of the _createMenu function, so it is properly added to the menu, but it needs a toggle function and then has to connect to that:

_createMenu: function() {

        //option to hide user name at beggining of menu
        let hideName = Main.panel.statusArea.userMenu._name.hide();
        let userName = new PopupMenu.PopupSwitchMenuItem(_("User Name"), hideName)
        this.menu.addMenuItem(userName)

    let hiddenItems = this._settings.get_strv(GSETTINGS_HIDE_KEY)

I think on disable the extension would just need to check if Main.panel.statusArea.userMenu._name is null or not, unless the extension can un-toggle everything itself somehow.

ikalnytskyi commented 11 years ago

Ok, I've added this feature, so you'll see it soon. :)

l300lvl commented 11 years ago

I added this comment to the wrong pllace on one of the bugs I opened. Anyways here is the comment, basically there is something going on where this isn't working with 3.6 like it did before:

Something else has changed where this is not working with 3.6. I made the normal changes to Main.panel._statusArea and I can get it to show up, but the icon never displays. It will let me switch it on/off but when it's on all you get is a blank panel area where the icon should be, perhaps icon names are different in 3.6. Then, when you open prefs panel the first tab is blank, it does not show the list of what to hide/show. The 2nd tab works as I said as you can choose to hide/show the icon hider button and the username. I tried recompiling the schema but that was of no use


From: Igor Kalnitsky notifications@github.com To: ikalnitsky/gnome-shell-extension-icon-hider gnome-shell-extension-icon-hider@noreply.github.com Cc: l300lvl atz3@yahoo.ca Sent: Saturday, October 13, 2012 1:10 PM Subject: Re: [gnome-shell-extension-icon-hider] Add option to hide user name separately (#5)

Ok, I've added this feature, so you'll see it soon. :) — Reply to this email directly or view it on GitHub.