1

I use mostly GTK+ applications (eg. Geeqie, Audacious, etc.) on Lubuntu. However, I decided to give KDE 4 a try by installing kubuntu-desktop and then removing the apps I didn't want.

Big mistake. Now, even when I'm running LXDE with the Qt applications running QGtkStyle, apps like K3b use Windows/KDE button order in dialog boxes rather than the GNOME/OSX-style button order used by standard GTK+ dialogs.

How do I force Qt applications back into using the GNOME-style button order for dialog boxes?

(Ideally, in a manner strong enough that it'll stay in effect even if I log into KDE, since 90% of my applications are GTK+ ones regardless of which desktop I run)

1 Answer 1

0

It turns out that:

  1. Qt button ordering is left up to the widget themes.
  2. The "GTK+ Style" widget theme follows whatever is defined in GTK+ config files.
  3. GTK+ button order is controlled by the gtk-alternative-button-order config key.
  4. Some KDE setups install a gtkrc file which sets gtk-alternative-button-order = 1.

Therefore, to get GNOME/OSX-style "OK on the right" ordering, the solution is:

  1. Make sure KDE is set to use either "GTK+ Style" or a style which intentionally mimics GTK+'s default configuration options.
  2. If the GTK2_RC_FILES environment variable is set, make sure ~/.gtkrc-2.0 (or something else you can edit) comes last. (Later files override earlier ones)
    • In KDE, you can set environment variables by putting shell scripts with .sh extensions in ~/.kde/env/ and making them executable.
    • In LXDE, you can set environment variables using export in ~/.xsessionrc
  3. Add gtk-alternative-button-order = 0 to your ~/.gtkrc-2.0

Not all applications obey button ordering instructions, but the ones that don't are usually GTK+ applications which hard-code "OK on the right"... so you probably won't notice.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .