agateau.wordpress.com is outdated. I moved my blog over to agateau.com. See you there.

Getting menubars out of application windows, episode II… the missing screencast

As promised in my first post about getting menubars out of application windows, here is the missing screencast: application menus in KDE, with GTK+ support.

[blip.tv ?posts_id=3854089&dest=-1]

original version

There is still work to do, in particular getting GTK+ menus correctly ordered. I need to investigate whether the problem is in Plasma import or in the GTK+ export steps. Things are moving quite well though: icons and shortcuts are back, quite a few bugs got fixed and we have the beginning of a fallback menu (the menu which is shown when a menubar-less window is active, or when no window are active)

Ubuntu Lucid users can try this using the Unity PPA. If you want to build it yourself, you will need:


47 Comments on “Getting menubars out of application windows, episode II… the missing screencast”

  1. sheytan says:

    Yeah! This is cool, anyway it has some bugs. It doesn’t look nice with small panels, like 20px. This makes then the systray icons scaling bad. Here two screenshots:

    first with menu bar. Take a look at the systray icons:

    And here without menubar:

  2. Wow! That looks interesting. Which package do I have to install to get that in Kubuntu?

  3. The User says:

    I love this feature!
    When it is finished (probably even before ;)) I will create an auto-hiding panel containing the menu bar and some other plasmoids. 🙂

    Does it work with QMenuBar, too?

  4. The User says:

    Btw:
    Why is it in launchpad and not in KDE-SVN/Git?

    • Aurélien says:

      Because it’s part of my work for Canonical. Except for some special cases, we do all our work in Launchpad.

      • Fri13 says:

        Hopefully the code will get moved to KDE Git so it can be easily be added to be tested in other distributions than just Ubuntu. Even that Canonical pays you to make that, it is not good for community it is placed to launchpad what slows down the distribution. 😦

  5. This was long asked for. Thank you for making this happen. I had lost hopes when people dropped it when moving to KDE4.
    Since you mention that Qt too needs to be patched, I wonder if other distros are going to pull it soon. At least, hopefully, if Debian could pull it…..

  6. TheGZeus says:

    Hmm.
    Here’s hoping the patch gets brought into Qt proper.

    A true fork is… problematic.

    KDE had this feature once, so I think it’ll get back in…

    • Aurélien says:

      We are in contact with Qt developers and hope to get this back in Qt, hopefully in 4.8.

  7. andi says:

    looks great.

    Is it also possible to put the application icon and the name left to the menu bar, so that everyone know which application was active?

    great work

    • Aurélien says:

      There has been some discussions on this. For now it is not possible but it could be added. The window manager decorations are a good way to know which application is active though 🙂

  8. hmm, I installed this from the unity repo for lucid but gtk apps dont seem to comply. MyPaint for example. Perhaps I need to install something other than the plasma widget?

  9. T___U says:

    Thank you Aurélien, I was definitely missing this. 🙂

    Do you think there will be eventually a way to make it work with OO.org and Mozilla apps ? (yeah, I guess they are the most used apps by many of us 🙂

    I heard they were not true GTK apps… But maybe it can be worked around ?

    • Aurélien says:

      From what I know of Mozilla apps, it would be quite hard. Like rewriting the equivalent of the Qt and GTK patch for them. I don’t know about OOo, but I guess it’s the same. As far as I know, it’s not going to happen during Maverick cycle.

  10. ike says:

    xbar drives me nuts. i appreciate it, and i happen to love the bespin style the best anyways, but this will be much nicer for the menu, thank you

  11. Eol says:

    Currently, appmenu-gtk and your patch for Qt works with APPMENU_DISPLAY_BOTH environment variable. But appmenu-gtk shows both menus when APPMENU_DISPLAY_BOTH=1, else it shows only one. Your patch for Qt shows both menus when APPMENU_DISPLAY_BOTH isn’t empty (is defined). Can you fix it? Here is patch:

    diff –git a/src/gui/widgets/qmenu_x11.cpp b/src/gui/widgets/qmenu_x11.cpp
    index 21a77e3..9ec0f71 100644
    — a/src/gui/widgets/qmenu_x11.cpp
    +++ b/src/gui/widgets/qmenu_x11.cpp
    @@ -58,7 +58,7 @@ void QMenuBarPrivate::x11CreateMenuBar(QMenuBar *menuBar)
    {
    static bool firstCall = true;
    static bool envSaysNo = !qgetenv(“QT_X11_NO_NATIVE_MENUBAR”).isEmpty();
    – static bool envSaysBoth = !qgetenv(“APPMENU_DISPLAY_BOTH”).isEmpty();
    + static bool envSaysBoth = (qgetenv(“APPMENU_DISPLAY_BOTH”) == “1”);

    if (!menuBar->parentWidget())
    return;

    I don’t know where to post bugs, so I post it here =\

  12. avlas says:

    I love this feature 🙂

    I found though that in Kontact, the menu is not changing when moving for instance from Kmail to Akregator. I know that it is still in early stages, but this is very promising and I’m using it already in Kubuntu Lucid.

    Thanks for this great work!

    • Aurélien says:

      Good catch! just fixed it today.

      • avlas says:

        Great!

        May I ask if it will be updated also in Kubuntu Lucid? I think this is a good option for people that wants to use it and/or wants to test it

        Thanks!

  13. Ike says:

    so as far as programs that use other toolkits and partially use gtk, like firefox and openoffice. I remember hearing that Shuttleworth ws saying work woud be made into making these work (in regards to the netbook addition that i’m assumging will be using this same method). Do you know about anybody looking into this. If it was possible would it be implemented into the menu, or would they be extensions for firefox and openoffice that sent the menus to dbusmenu. (i’m not savvy on the tech stuff so excuse me if i’m mistaken about the technologies)

    • Aurélien says:

      I don’t know of anybody working on it, but it is a problem which will need to be resolved at some point. My personal hope is that Firefox and OOo devs realize this new menubar is here to stay and they should integrate with it.

  14. Ike says:

    edition*

  15. avlas says:

    The more I use the menubar, the more I love it!

    I would like to point two issues that I still have with it. Once they are solved, I think the user experience will be even greater!

    One is that I cannot get gtk applications working in the menubar (I use the version 0.1.8, the one that is working in lucid right now, so I don’t know if it has been fixed in the new versions).

    The other is that depending on the wallpaper’s colors you may want to change the font color to white. This is very useful if the wallpaper is dark.

    Again, this may have changed in the meantime…

    Thanks for your great work!

    • Aurélien says:

      – For gtk applications to integrate in the menubar you must install the appmenu-gtk package.
      – As for the font color, the menubar applet is using Plasma buttons, so it should follow the Plasma theme.

      • avlas says:

        I have appmenu-gtk (0.1.3-0lucid2) already installed in my computer, but for some reason it’s not working for me.

        Regarding the font, thanks a lot for telling, I will edit it! 🙂

        Anyway, maybe it would be good to have the possibility to change only the color font of this particular widget like in other widgets.

        One last thing, I realized that sometimes the menubar shows undescores for shorcuts of applications, but I couldn’t manage them to work.

        Follow with this great work and thanks!

        • avlas says:

          Regarding the possibility to edit the font color, I would still strongly recommend to give an option within the widget configuration. I tried several times to change it from the plasma configuration, but I could find the right way to do so, even after looking for quite a few documentation webpages talking on plasma.

  16. avlas says:

    new version of menubar is working so great, congratulations! the only issue that I see is in gimp, when you move to a secondary window the menu disappears and I would say it should be held on.

    thanks a lot for your work!

    • Aurélien says:

      Some apps create multiple top-level windows. Right now there is no way for an application to tell the menubar system: “Please show the ‘main’ menubar for all my tool windows”. This is something we need to work on.

  17. avlas says:

    also Amarok is making weird things, it is only one menu available, which says ‘group by’ (or something similar, as my kde is in another language), after exploring internet

    • Aurélien says:

      I would be very interested to reproduce this bug: I noticed that Amarok exposes multiple menubars on DBus: the correct one and multiple “group by” bars. I always get the correct one shown so I haven’t worried about this bug too much. If you can provide steps to reproduce it I’ll have a look at it.

      • avlas says:

        the way I reproduce it is quite simple actually. once in amarok, I click on internet and then any of the options there, in my case lastfm, jamendo, magnatune… once you click one of them the menubar changes to group by and even if you come back to main options you cannot get out from this group by.

        • Aurélien says:

          Should be fixed once this patch gets in: https://code.launchpad.net/~agateau/amarok/appmenu-fix

          Thanks for reporting! (amazing I get more reports from blog entries than from launchpad)

          • avlas says:

            great, thanks a lot!

            with respect to launchpad, surely it’s because I do things wrong but I found much more useful and efficient to explain issues directy to developers. my impression is that bugs in launchpad are sometimes in the limb for long time before someone pays attention to them.

            also to report a bug is sometimes more difficult than to put a comment in a blog. I know it is not the case, but when I go to launchpad for me it’s hard even to find the option ‘report a bug’.

            please, take these comments not as a complain but as a constructive criticism, I do appreciate a lot the owrk you all are doing!

          • avlas says:

            now, amarok is working great, thanks!

            may I ask you a couple of things? do you know when, if it will at all, the menubar will support firefox, chromium and openoffice?

            right now they are the only applications out of the menubar

            on the other hand, I have wxMaxima showing double menus on the menubar and on the application, did you notice it?

            thanks again!

  18. sheytan says:

    Hey, ive two ideas.

    1st: What about some kinetic animations for appear/disappear the menu bar
    2nd: When the desktop is focused, display the desktop menu like the others, in line, not as a button 🙂

    Thanks for this, this one rocks! 😀

    • Aurélien says:

      1. Animations could be nice, but it’s a bit late for this kind of work in this Kubuntu cycle. I would be a bit worried about animations getting a bit painful though.
      2. I am not sure what you mean. The menu is displayed as a menu, would you expect the menu entries (“Run Command…”, “Add Widgets…”…) to be top level items? That would look weird IMO because people are expecting top level items to be containers, not actions.

  19. Bigbrovar says:

    Hi I am using the plasma-wget-menubar on Kubuntu which I have to say as really improved my workflow and helps makes the UI of applications to be free of unnecessary clutter. However I did observed some issues I am encountering when I have the widget enabled. mainly some applications take a long time (like 4 mintute) to start, during which the whole desktop (plasma-shell) freezes and becomes unresponsive till the application launches then everything would unfreeze and the desktop becomes usable again. I do not experience this when I have the widget disabled and not all kde/Qt application is affected. I however do have the issue with Clementine, Dragon Platyer, and JUk. I filed a bug on the issue here https://bugs.launchpad.net/ubuntu/+source/plasma-widget-menubar/+bug/701527 Please let me know if there is anything I can do to resolve this problem

  20. jonathas roberto says:

    hi! looks great but… how install in opensuse 11.3 using kde 4.6.0???

    • Aurélien says:

      Right now you can’t install this on opensuse, unless you apply the Qt patch yourself. Hopefully Qt 4.8 will include this patch, making it much easier to use appmenu.

  21. […] Getting menus out of application windows 2 […]