Plamsa::PopupApplet and modal dialogs

Sebastian Kügler sebas at kde.org
Fri May 22 11:44:34 CEST 2009


On Thursday 21 May 2009 11:17:09 Marco Martin wrote:
> On Thursday 21 May 2009, Amos Kariuki wrote:
> > Have a question regarding the Plasma::PopupApplet behavior after it
> > displays a modal dialog.  In the current implementation, when a modal
> > dialog is opened from the Popup applet, the applet automatically gets
> > hidden in the background while the modal dialog is still open.  I was
> > thinking the behavior should be that the Popup applet should always
> > remain visible if a child modal dialog is displayed.  Is this a
> > reasonable default behavior or is it not advisable to display modal
> > dialogs from popup-applets?
> >
> > My scenario:
> > I have a Popup applet, docked to the panel, that displays a dialog
> > containing an "Add Folder" button.  When the user clicks the "Add
> > Folder" button, a modal KDirSelectDialog is displayed allowing the
> > user to select a folder that would be later displayed in the Popup
> > applet; however the pop-up applet gets hidden in the background.
> > After the user adds a folder, they have to reopen the Popup applet to
> > verify the folder got added.
>
> what kind of applet is?
> does make more sense that is automatically closed when it loses focus or
> not? if not you can set it as passive setPassive(true) and wouldn't be
> automatically closed anymore

I can imagine more situations where this makes sense. For example the 
networkmanager applet. When you click on a connection, a password window opens 
(and the networkmanager popup closes). That's odd because you're manipulating 
the networkmanager, and it gets hidden. In fact, I find myself opening it all 
the time again because I want to see that it's connecting (the applet shows 
the steps in connecting).

> > I'm currently working around this by manually calling
> > PopupApplet::show() after opening the KDirSelectDialog but it feels
> > kind of hackish so I thought I'd get some opinions.

Out of curiosity, this hides and shows it again, no?
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 



More information about the Plasma-devel mailing list