Bug 1119

Summary: adding automatically used of oxygen-gtk when oxygen is chosen
Product: Mageia Reporter: Luc Menut <lmenut>
Component: RPM PackagesAssignee: John Balcaen <balcaen.john>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://git.reviewboard.kde.org/r/101151
Whiteboard:
Source RPM: kdebase4-workspace-4.6.2 CVE:
Status comment:

Description Luc Menut 2011-05-03 15:55:40 CEST
Description of problem:
Oxygen-gtk is now mature and allows a very good integration of gtk applications in kde when oxygen is used as widget style.
I proposed upstream on kde review board a patch to use automatically oxygen-gtk for gtk apps if the kde widget style is oxygen (and if oxygent-gtk is installed on the system).
https://git.reviewboard.kde.org/r/101151
This patch was reviewed by Hugo Pereira Da Costa, and accepted recently (it isn't in trunk for now because I don't have write access on kde git).

It would be nice if we can have this patch included in Mageia.
If you are agree with this proposal, I can push the diff in svn.
Comment 1 Ahmad Samir 2011-05-03 18:33:41 CEST
What if a user selects Oxygen for KDE apps, but wants GTK+ apps to use the default GTK theme, ia_ora-gnome, or another GTK+ theme?
Comment 2 Ahmad Samir 2011-05-03 19:06:35 CEST
To elaborate, I agree that it should be an opt-out, i.e. user selects Oxygen style in systemsettings -> everything is Oxygen. But there should be an easy way to opt-out, here're a situation:
- oxygen-gtk is installed on the system, user A wants to use it but user B wants to use another GTK+ theme (the default ia_ora-gnome or any other theme).

(I can't read code that well, so can't answer those questions myself :)).
Comment 3 Luc Menut 2011-05-03 19:20:15 CEST
(In reply to comment #1)
> What if a user selects Oxygen for KDE apps, but wants GTK+ apps to use the
> default GTK theme, ia_ora-gnome, or another GTK+ theme?

oxygen-gtk is used by default only if the user has not defined another gtk style, eg by gtk-qt-kcm for us (if ~/.gtkrc-2.0-kde exists, oxygen-gtk is not used automatically).
You can see exactly when oxygen-gtk is not used automatically in the diff
https://git.reviewboard.kde.org/r/101151/diff/#3.13
line 273 to 287.
Comment 4 Luc Menut 2011-05-03 19:31:38 CEST
(In reply to comment #2)
> To elaborate, I agree that it should be an opt-out, i.e. user selects Oxygen
> style in systemsettings -> everything is Oxygen. But there should be an easy
> way to opt-out, here're a situation:
> - oxygen-gtk is installed on the system, user A wants to use it but user B
> wants to use another GTK+ theme (the default ia_ora-gnome or any other theme).
> 
> (I can't read code that well, so can't answer those questions myself :)).

user B just needs to use gtk-qt-kcm (or kcm-gtk on some distros) and sets the theme he wants for gtk apps, and oxygen-gtk will not be set in ~/.kde4/share/config/gtkrc-2.0
Comment 5 Ahmad Samir 2011-05-03 19:40:48 CEST
Then, I think oxygen-gtk should require, instead of only suggesting, gtk-qt-kcm.

(Though I have two gripes with that:
- oxgyen-gtk doesn't really need gtk-qt-kcm to work
- gtk-qt-kcm has an entry/button that should "fix firefox scroll bars, which edits ~/.mozilla/firefox/<profile>/chrome/userChrome.css, this isn't needed with oxygen-gtk).
Comment 6 Luc Menut 2011-05-03 20:09:48 CEST
(In reply to comment #5)
> Then, I think oxygen-gtk should require, instead of only suggesting,
> gtk-qt-kcm.
> 

why? 
we do exactly the same with iaora and xsettings-kde; if widgetStyle=iaorakde, xsettings-kde automatically sets iaora for gtk apps. And kde4-style-iaora-common doesn't suggest gtk-qt-kcm !!

btw, IIRC, Fedora, Kubuntu and OpenSuse use (or will use for next release) oxygen+oxygen-gtk by default.
Comment 7 Ahmad Samir 2011-05-03 20:27:35 CEST
I just want to be sure there's an easy opt-out way... but you're right (users who use themes other than the ia_ora-gnome know how to get around).

If ~/.kde4/share/config/gtkrc-2.0 is used, that means "apply colors to non-kde4 applications" in the colors kcm will have effect? (AFAICS, when it's enabled it copies /var/lib/mageia/kde4-profiles/common/share/config/gtkrc-2.0 to ~/.kde4/share/config/).
Comment 8 Luc Menut 2011-05-03 21:15:49 CEST
(In reply to comment #7)
> 
> If ~/.kde4/share/config/gtkrc-2.0 is used, that means "apply colors to non-kde4
> applications" in the colors kcm will have effect?

no, "apply colors to non-kde4 applications" (=KRdbExportColors) and KRdbExportGtkTheme write data for gtk apps in the same files ~/.kde4/share/config/gtkrc and ~/.kde4/share/config/gtkrc-2.0, but are distincts.
The theme oxygen-gtk automatically uses same colors as kde for gtk apps by itself, regardless of "apply colors to non-kde4 applications".

> (AFAICS, when it's enabled it
> copies /var/lib/mageia/kde4-profiles/common/share/config/gtkrc-2.0 to
> ~/.kde4/share/config/).

no, ~/.kde4/share/config/gtkrc-2.0 isn't copied from /var/lib/mageia/kde4-profiles/..., but is written from scratch by createGtkrc(...) in krdb.cpp, when kde start or when colors are changed in systemsettings.
Comment 9 Ahmad Samir 2011-05-03 21:27:20 CEST
You're right, sorry for the noise..
Comment 10 John Balcaen 2011-05-05 04:23:07 CEST
Patch is added for the next kdebase4-workspace.
Thks for the patch

Status: NEW => RESOLVED
Resolution: (none) => FIXED