gnome-shell/gnome-shell-favourite-apps-firefox.patch
Owen W. Taylor 4f966f9606 Handle mozilla-firefox.desktop to firefox.desktop transition for user config
- Change gnome-shell-favourite-apps-firefox.patch to also patch the JS code
  to handle the transition from mozilla-firefox.desktop to firefox.desktop.
  (#808894, reported by Jonathan Kamens)
2012-04-05 18:47:47 -04:00

27 lines
1.4 KiB
Diff

--- gnome-shell-3.1.91/data/org.gnome.shell.gschema.xml.in.firefox 2011-09-07 19:50:20.167547963 +0300
+++ gnome-shell-3.1.91/data/org.gnome.shell.gschema.xml.in 2011-09-07 19:51:32.067106738 +0300
@@ -31,7 +31,7 @@
</_description>
</key>
<key name="favorite-apps" type="as">
- <default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
+ <default>[ 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop' ]</default>
<_summary>List of desktop file IDs for favorite applications</_summary>
<_description>
The applications corresponding to these identifiers
--- a/js/ui/appFavorites.js
+++ b/js/ui/appFavorites.js
@@ -24,6 +24,12 @@ const AppFavorites = new Lang.Class({
_reload: function() {
let ids = global.settings.get_strv(this.FAVORITE_APPS_KEY);
+ // Fedora: Replace old mozilla-firefox.desktop with firefox.desktop,
+ for (let i = 0; i < ids.length; i++) {
+ if (ids[i] == 'mozilla-firefox.desktop')
+ ids[i] = 'firefox.desktop'
+ }
+
let appSys = Shell.AppSystem.get_default();
let apps = ids.map(function (id) {
return appSys.lookup_app(id);