Friday, February 02, 2007

nested dialogs suck

i hate dialogs-on-dialogs, or as i like to call it "matryoshka windows". i did some work before coming to boston to make the password dialog able to show errors right in the dialog so when you mistype the password you get in-dialog feedback. no more matryoashka! kdesu is now a bit nicer =)

i also addressed a few api issues in the new kpassworddialog (e.g. remember to always make constructors that have defaults for all their parameters explicit; a showErrorMessage() method; a method to allow subclasses to check a password before the dialog accept()s); addCommentLine() actually adds lines rather than just show the first one, etc) .. i also fixed a few issues in kdelibs/kdesu which should resolve issues like it not saying "put your password in" when using sudo.

i also stumbled upon a little known configuration option in the process: you can define whether you use sudo or su by putting something like this in a config file (kdeglobals recommended):

[super-user-command]
super-user-command=[sudo|su]


i worked with el and jan on the usability of the new dialog and i hope to come out of this process with some guidelines and thoughts for other dialogs in kde4 as well.

but yeah.. no more password matryoshka!!!!!

4 comments:

Anonymous said...

ahhh.... that's good stuff.

And to think, I'd almost broken my addiction to this blog, after a week of silence.

texnofobix said...

Does this super-user thing work on all versions of KDE?

Aaron J. Seigo said...

@texnofobix: at least since 3.5, not sure how far back this config option goes though. sorry =/

Anonymous said...

I agree with you about the nested dialogs, and I was wondering why many applications still do it.

Maybe because there's no easy way to do the nonintrusive frames for several actions: find in text, notify about warnings,...

I really like the way firefox does these things, and I was wondering if making a base widget for KDE to simplify this task (a hiding widget with an animation for apparition, a special color, timeout,...) would be something interesting for KDE4. (Or maybe it's already in the works??).

I don't know that much about Qt/KDE maybe it's already very simple to do as it is, I just don't understand why developers keep creating dialogs for this.