Search This Blog

Thursday, August 9, 2012

Submenus support in QML shutdown dialog

In the past weeks Konstantinos Smanis has been working in adding Grub2 and Burg submenu support in kdm and in the shutdown dialog. He had implement the support for the C++ version of the dialog used until KDE SC 4.8.x. However, since KDE SC 4.9 now uses QML based shutdown dialog I had to add some changes in it to support submenus as well. Here is result:





This will work out of the box in KDE SC 4.9.1 along with fixes for menus not reacting to clicks problem.

11 comments:

Thomas Pfeiffer said...

Good to see it working!
I don't know if it looks the same in the C++ Version, but the menu-indicator looks a bit out of place here, plus I wouldn't know where exactly to klick to open the submenu. Does one have to klick the triangle itself or what is the click area?

tux said...

Good work ! And do you know if it's possible (even manually) to change the countdown in the shutdown dialog ?

Anonymous said...

Hi, I think it's great that you got the features there. But how about using QML to show something nicer than sub-menus? They are hard to use, especially with touch input or not so good mouses.

Lamarque said...

@Thomas Pfeiffer, you can click anywhere in the whole line that contains the triangle, which is located at the same place as the C++ version.

@tux, the countdown is hardcoded and works like the C++ version. I do not plan do change that.

@Anonymous, that dialog is not supposed to be used with touch screen. Actually the whole Plasma Desktop is not supposed to be used with touchscreen, we have Plasma Active for that. This is not a feature people is going to use very often, if your mouse is not so good you would have much more problems accessing menus in other applications.

Anonymous said...

Imho it would be better if the shutdown dialog would be shown in fullscreen. Nobody will interact at the same time with an other window if the system should go down. Then there will be enough space for options and such (mostly suboptimal) submenus can be avoided.

Lamarque said...

I prefer to keep it like it is now. If the user can see the desktop he/she can also see if there are important running programs or opened documents that needs saving.

Anonymous said...

One thing that has always bugged me: Why is the shutdown dialog even there?
When I press "shutdown" or "restart" in the K-Menu, of course I want to shutdown or restart. And not be asked another time if I really want to do this

Lamarque said...

There are more than one way of shutting a device down: you can just logout, just reboot, just shutdown, suspend to ram, suspend to disk and reboot into a different operating system. The dialog is there to offer those possibilities to the user. That's pretty obvious.

Anonymous said...

All those options already have different buttons for them in the K-Menu (I'm using KDE 4.9).

When I hit "Restart" there, the only 2 buttons the shutdown dialog has to offer are "Restart" and "Cancel".

When I press "Shutdown" in the K-Menu, the dialog that pops up offers me to "Shutdown", "Restart" and "Cancel".

So its just a seemingly random subset of the choices I already had in the K-Menu.
Its a bit tricky to translate those button names, so I am unsure if I could get my thoughts across clearly, so I made a picture here: http://imageshack.us/photo/my-images/717/unbenanntjhk.jpg/

Lamarque said...

Several users, including me, usually do not use the K menu to trigger the shutdown dialog. We use the Ctl+Alt+Del shortcut, which shows all possible buttons. It looks like the K menu has a bug where it does not correctly inform the dialog which buttons should appear. I will try to fix that.

Lamarque said...

Hmmm actually it is not a bug, it is supposed to work that way by what I can see in the original source code.