commit f36ebea234c204d29d2b8e6fa2f55fd2906b08cb
Author: Ray Strode <rstrode(a)redhat.com>
Date: Tue Mar 15 11:16:53 2011 -0400
Add live installer menu item to user menu
In the mockups here:
https://live.gnome.org/GnomeShell/Design/Whiteboards/SystemStopRestart
there is a way to install updates right above the suspend item. For
an uninstalled livecd, installation is sort of analagous to updates on
an installed system.
This commit adds the installer to the user menu.
fedora-live-desktop.ks | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/fedora-live-desktop.ks b/fedora-live-desktop.ks
index 27d0723..dc42c58 100644
--- a/fedora-live-desktop.ks
+++ b/fedora-live-desktop.ks
@@ -35,6 +35,26 @@ favorite-apps=['mozilla-firefox.desktop',
'evolution.desktop', 'empathy.desktop'
FOE
glib-compile-schemas /usr/share/glib-2.0/schemas
+# add installer to user menu
+mkdir -p
~liveuser/.local/share/gnome-shell/extensions/Installer(a)shell-extensions.fedoraproject.org
+cat >>
~liveuser/.local/share/gnome-shell/extensions/Installer(a)shell-extensions.fedoraproject.org/metadata.json
<< FOE
+{"shell-version": ["2.91.91"], "uuid":
"Installer(a)shell-extensions.fedoraproject.org", "name":
"Installer", "description": "Install OS from user menu"}
+FOE
+
+cat >>
~liveuser/.local/share/gnome-shell/extensions/Installer(a)shell-extensions.fedoraproject.org/extension.js
<< FOE
+const PopupMenu = imports.ui.popupMenu;
+const Shell = imports.gi.Shell;
+const Main = imports.ui.main;
+const Util = imports.misc.util;
+
+function main() {
+ let item = new
PopupMenu.PopupMenuItem(Shell.AppSystem.get_default().get_app('liveinst.desktop').get_name());
+ item.connect('activate', function() { Util.spawnDesktop('liveinst');
});
+
+ Main.panel._statusmenu.menu.addMenuItem(item,
Main.panel._statusmenu.menu._getMenuItems().length - 1);
+}
+FOE
+
# set up timed auto-login for after 60 seconds
cat >> /etc/gdm/custom.conf << FOE
[daemon]