[gnome-shell] shell-global: Remove unused ShellGlobal parameters



commit 4b008b1adaf5ff7a2f09e3e91c02855a45969cef
Author: Dan Winship <danw gnome org>
Date:   Wed Apr 27 07:04:58 2011 -0400

    shell-global: Remove unused ShellGlobal parameters
    
    Remove the ShellGlobal parameter from any method that isn't actually
    ShellGlobal-related (and rename them to not have "global" in the
    name).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648755

 js/ui/search.js    |    2 +-
 src/shell-global.c |   21 +++++++++------------
 src/shell-global.h |   17 ++++++++---------
 3 files changed, 18 insertions(+), 22 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index 1244def..eb84b09 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -276,7 +276,7 @@ OpenSearchSystem.prototype = {
     _addProvider: function(fileName) {
         let path = global.datadir + '/search_providers/' + fileName;
         let source = Shell.get_file_contents_utf8_sync(path);
-        let [success, name, url, langs, icon_uri] = global.parse_search_provider(source);
+        let [success, name, url, langs, icon_uri] = Shell.parse_search_provider(source);
         let provider ={ name: name,
                         url: url,
                         id: this._providers.length,
diff --git a/src/shell-global.c b/src/shell-global.c
index 3061d5f..cdf9fcb 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1086,21 +1086,19 @@ shell_global_reexec_self (ShellGlobal *global)
 }
 
 /**
- * shell_global_breakpoint:
- * @global: A #ShellGlobal
+ * shell_breakpoint:
  *
  * Using G_BREAKPOINT(), interrupt the current process.  This is useful
  * in conjunction with a debugger such as gdb.
  */
 void
-shell_global_breakpoint (ShellGlobal *global)
+shell_breakpoint (void)
 {
   G_BREAKPOINT ();
 }
 
 /**
- * shell_global_parse_search_provider:
- * @global: A #ShellGlobal
+ * shell_parse_search_provider:
  * @data: description of provider
  * @name: (out): location to store a display name
  * @url: (out): location to store template of url
@@ -1111,13 +1109,12 @@ shell_global_breakpoint (ShellGlobal *global)
  * Returns: %TRUE on success
  */
 gboolean
-shell_global_parse_search_provider (ShellGlobal   *global,
-                                    const char    *data,
-                                    char         **name,
-                                    char         **url,
-                                    GList        **langs,
-                                    char         **icon_data_uri,
-                                    GError       **error)
+shell_parse_search_provider (const char    *data,
+                             char         **name,
+                             char         **url,
+                             GList        **langs,
+                             char         **icon_data_uri,
+                             GError       **error)
 {
   xmlDocPtr doc = xmlParseMemory (data, strlen(data));
   xmlNode *root;
diff --git a/src/shell-global.h b/src/shell-global.h
index 311a12c..67e657f 100644
--- a/src/shell-global.h
+++ b/src/shell-global.h
@@ -73,15 +73,14 @@ void     shell_global_end_modal   (ShellGlobal *global,
 
 void shell_global_reexec_self (ShellGlobal *global);
 
-void shell_global_breakpoint (ShellGlobal *global);
-
-gboolean shell_global_parse_search_provider (ShellGlobal   *global,
-                                             const char    *data,
-                                             char         **name,
-                                             char         **url,
-                                             GList        **langs,
-                                             char         **icon_data_uri,
-                                             GError       **error);
+void shell_breakpoint (void);
+
+gboolean shell_parse_search_provider (const char    *data,
+                                      char         **name,
+                                      char         **url,
+                                      GList        **langs,
+                                      char         **icon_data_uri,
+                                      GError       **error);
 
 void shell_global_gc (ShellGlobal *global);
 



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