GNOME Bugzilla – Bug 647386
[PATCH] The user-theme extension doesn't revert to the original theme immediately
Last modified: 2011-05-02 21:42:24 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 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.
(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
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
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.
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.
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 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.
(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.