After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647386 - [PATCH] The user-theme extension doesn't revert to the original theme immediately
[PATCH] The user-theme extension doesn't revert to the original theme immedia...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.0.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-10 21:08 UTC by Timur Kristóf
Modified: 2011-05-02 21:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that makes the user-theme extension revert to the original theme when its gsettings key is reset (687 bytes, patch)
2011-04-10 21:08 UTC, Timur Kristóf
needs-work Details | Review
Revert "User Themes: don't load a null stylesheet" (1.22 KB, patch)
2011-04-27 09:28 UTC, John Stowers
none Details | Review
Revert "User Themes: don't load a null stylesheet" (1.22 KB, patch)
2011-04-27 10:15 UTC, John Stowers
rejected Details | Review

Description Timur Kristóf 2011-04-10 21:08:55 UTC
Created attachment 185665 [details] [review]
Patch that makes the user-theme extension revert to the original theme when its gsettings key is reset

This bug is about http://git.gnome.org/browse/gnome-shell-extensions/plain/extensions/user-theme/

The extension works well, but it doesn't revert to the original theme of Gnome shell when its gsettings key is reset.

I've attached a patch that does exactly this.
Tested and works well on the latest Fedora 15.

(Also, after applying this patch, clicking on the revert button in gnome-tweak-tool will actually indeed revert to the original theme.)
Comment 1 Giovanni Campagna 2011-04-12 17:42:33 UTC
Comment on attachment 185665 [details] [review]
Patch that makes the user-theme extension revert to the original theme when its gsettings key is reset

You need to rewrite it as a git commit, and add a sensible message.
Also, you cannot use "/usr/share/gnome-shell", as it could be installed anywhere. Use Main.setThemeStylesheet(null) to revert to default.
Comment 2 John Stowers 2011-04-15 07:29:21 UTC
(In reply to comment #1)
> (From update of attachment 185665 [details] [review])
> You need to rewrite it as a git commit, and add a sensible message.
> Also, you cannot use "/usr/share/gnome-shell", as it could be installed
> anywhere. Use Main.setThemeStylesheet(null) to revert to default.

IIRC this used to work before this commit 

http://git.gnome.org/browse/gnome-shell-extensions/commit/?id=a4d7a4eba46a7b3647024eb36dd9ce1ce09a5cb7

i.e. there is no problem setting the css to null
Comment 3 John Stowers 2011-04-27 09:22:23 UTC
gnome-tweak-tool etc. can't reset the theme without this. I reverted the original commit.

gnome-shell explicitly handles null as the default theme
Comment 4 John Stowers 2011-04-27 09:28:14 UTC
Created attachment 186720 [details] [review]
Revert "User Themes: don't load a null stylesheet"

This reverts commit a4d7a4eba46a7b3647024eb36dd9ce1ce09a5cb7.

Inorder to reset to the default theme, gnome-shell expects
the stylesheet be set to null. So allow this case.

This fixes bug 647386 and is necessary for gnome-tweak-tool
and other theme utilities to work correctly.
Comment 5 John Stowers 2011-04-27 10:15:10 UTC
Created attachment 186724 [details] [review]
Revert "User Themes: don't load a null stylesheet"

This reverts commit a4d7a4eba46a7b3647024eb36dd9ce1ce09a5cb7.

Inorder to reset to the default theme, gnome-shell expects
the stylesheet be set to null. So allow this case.

This fixes bug 647386 and is necessary for gnome-tweak-tool
and other theme utilities to work correctly.
Comment 6 John Stowers 2011-04-27 11:48:48 UTC
It would be great if I could get the OK to commit this and branch/do a 3.0.2 release - theme changing (without the need to restart the shell) is broken without it.
Comment 7 Giovanni Campagna 2011-05-02 16:24:36 UTC
Comment on attachment 186724 [details] [review]
Revert "User Themes: don't load a null stylesheet"

Reading out code fully, the fix is incorrect, as it causes invalid themes to load.
I've pushed a different fix to master. If needed, after due testing I can push it to gnome-3-0 and eventually release a 3.0.2.
Comment 8 John Stowers 2011-05-02 21:42:24 UTC
(In reply to comment #7)
> (From update of attachment 186724 [details] [review])
> Reading out code fully, the fix is incorrect, as it causes invalid themes to
> load.
> I've pushed a different fix to master. If needed, after due testing I can push
> it to gnome-3-0 and eventually release a 3.0.2.

That would be good. The various theme interested parties assure me they will be testing it further soon.