2

I was wondering if anyone knows how I can hide the "All" category in Xubuntu's Whisker Menu? I can hide most categories except "All".

Any help would be much appreciated!

LinuxScientist
  • 327
  • 1
  • 4
  • 25

2 Answers2

3

I don't seem to find any command that allows that, neither via GUI nor config file. It seems to be a deeply embedded characteristics so that every new item is placed automatically in this All category.

The only alternative I can think of is that you compile your own whisker menu. That requires (1) some knowledge of C++ (language in which the program is written), (2) know how to compile a program from source. Also, you need to remove the program (Xfce Whisker Menu) before compiling. So do at your own risk.

The source code is here. As far as I can see, to get what you need modify the following files:

  • category.cpp: remove lines 43 to 63.

  • applications-page.cpp: remove lines 285 to 291.

Save and compile using these instructions or similar.

Remember to to remove the whisker menu app from your system beforehand.

  • OS error message when I try to add it to the panel: Plugin "Whisker Menu" unexpectedly left the panel, do you want to restart it? The plugin restarted more than once in the last 60 seconds. If you press Execute the panel will try to restart the plugin otherwise it will be permanently removed from the panel. – LinuxScientist Aug 14 '16 at 08:01
  • Mmm, I'm not a C++ expert at all. Maybe you should start simple. What happen if instead of deleting the creation of the category you put it an empty name? Like "". That will give you a first glance that **those lines** are the ones you have to deal with. Also, what I did was literally to search for the word "All" into every source code file. Those where the ones I found. Maybe there is something more to do. –  Aug 14 '16 at 09:20
  • Thanks for your help! I've spoken to the dev and he gave me the following fix. The "All" category is required behind the scenes, and cannot be removed. Even search requires it because it is just a filter for the "All" category. You could hide the button for it, though, by modifying the first line of the loop in Window::set_categories() to be this: for (std::vector::const_iterator i = ++categories.begin(), end = categories.end(); i != end; ++i) By increasing the categories.begin() iterator *before* using it, you will not add the "All" category button (which is always first). – LinuxScientist Aug 14 '16 at 09:55
  • That is great! I'm glad you solved it. Btw, why would you want to remove it anyway? –  Aug 14 '16 at 11:15
  • 1
    My 86 year old grandma recently switched from Windows to Linux :-) She get's easily confused and to make it easy for her I thought I'd hide the categories she has no business snooping around in and let her only see what she uses or might find interesting :-D Unfortunately the "all" category shows all the hidden category apps (even thought I hid them in the Whisker Menu). Thanks for your help though, I spent 2 weeks trying to fix lol, never crossed my mind that I might have to compile from source ;-) – LinuxScientist Aug 14 '16 at 17:01
  • Worked like charm and she's super happy! I owe you a cup of coffee or beer! – LinuxScientist Aug 14 '16 at 17:11
  • +100 for your grandma, and what a patient grandson she has! –  Aug 14 '16 at 17:20
1

user308164's answer probably worked on an older version of the code.

What worked for me was to make the iterator start at the end:

In panel-plugin/window.cpp change from

for (std::vector<SectionButton*>::const_iterator i = categories.begin(), end = categories.end(); i != end; ++i)

to

for (std::vector<SectionButton*>::const_iterator i = categories.end(), end = categories.end(); i != end; ++i)
Zanna
  • 69,223
  • 56
  • 216
  • 327
SpmP
  • 806
  • 7
  • 3