[gnome-shell] shellDBus: Add a method to reload extensions



commit 19ef6b0421b06f0c5b91a111e2509376619ed98d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 5 13:06:40 2012 -0400

    shellDBus: Add a method to reload extensions
    
    A common request from extension developers has been to reload their
    extensions without restarting the Shell.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677586

 js/ui/shellDBus.js |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 7a62577..66ac9c0 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -67,6 +67,9 @@ const GnomeShellIface = <interface name="org.gnome.Shell">
 <method name="LaunchExtensionPrefs">
     <arg type="s" direction="in" name="uuid"/>
 </method>
+<method name="ReloadExtension">
+    <arg type="s" direction="in" name="uuid"/>
+</method>
 <property name="OverviewActive" type="b" access="readwrite" />
 <property name="ApiVersion" type="i" access="read" />
 <property name="ShellVersion" type="s" access="read" />
@@ -269,6 +272,11 @@ const GnomeShell = new Lang.Class({
                    ['extension:///' + uuid], -1, null);
     },
 
+    ReloadExtension: function(uuid) {
+        ExtensionSystem.unloadExtension(uuid);
+        ExtensionSystem.loadExtension(uuid);
+    },
+
     get OverviewActive() {
         return Main.overview.visible;
     },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]