[glib/wip/gapplication] Cleanups



commit b03eba628237637ce33dd0bc3a8308ea934a6e06
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 5 00:08:11 2010 -0400

    Cleanups

 gio/gapplication.c     |   68 ++++++++++++++++++++++++------------------------
 gio/gdbusapplication.c |   10 +++---
 2 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 013396a..aef72c3 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -263,9 +263,9 @@ g_application_default_run (GApplication *application)
 
 static void
 _g_application_handle_activation (const char *appid,
-				  int         argc,
-				  char      **argv,
-				  GVariant   *platform_data)
+                                  int         argc,
+                                  char      **argv,
+                                  GVariant   *platform_data)
 {
   GVariantBuilder builder;
   GVariant *message;
@@ -278,14 +278,14 @@ _g_application_handle_activation (const char *appid,
     {
       int j;
       guint8 *argv_bytes;
-      
+
       g_variant_builder_open (&builder, G_VARIANT_TYPE ("ay"));
-      
+
       argv_bytes = (guint8*) argv[i];
       for (j = 0; argv_bytes[j]; j++)
-	g_variant_builder_add_value (&builder,
-				     g_variant_new_byte (argv_bytes[j]));
-          g_variant_builder_close (&builder);
+        g_variant_builder_add_value (&builder,
+                                     g_variant_new_byte (argv_bytes[j]));
+      g_variant_builder_close (&builder);
     }
   g_variant_builder_close (&builder);
 
@@ -366,11 +366,11 @@ g_application_new (const char  *appid)
  * g_application_register:
  * @application: A #GApplication
  * @argc: System argument count
- * @argv: (array length=argc): System argument vector 
+ * @argv: (array length=argc): System argument vector
  * @platform_data: (allow-none): Arbitrary platform-specific data, must have signature "a{sv}"
- * 
+ *
  * Ensure the current process is the unique owner of the application.
- * If successful, the GApplication:is-remote property will be changed
+ * If successful, the #GApplication:is-remote property will be changed
  * to %FALSE, and it is safe to continue creating other resources
  * such as graphics windows.
  *
@@ -379,27 +379,27 @@ g_application_new (const char  *appid)
  * %TRUE, then a platform-specific action such as bringing any
  * graphics windows associated with the application to the foreground
  * may be initiated.  After that, the current process will terminate.
- * If %FALSE, then the application remains in the GApplication:is-remote
+ * If %FALSE, then the application remains in the #GApplication:is-remote
  * state, and you can e.g. call g_application_invoke_action().
  */
 void
-g_application_register_with_data (GApplication      *application,
-				  int                argc,
-				  char             **argv,
-				  GVariant          *platform_data)
+g_application_register_with_data (GApplication  *application,
+                                  int            argc,
+                                  char         **argv,
+                                  GVariant      *platform_data)
 {
-  g_return_if_fail (application->priv->appid == NULL);
+  g_return_if_fail (application->priv->appid != NULL);
   g_return_if_fail (application->priv->is_remote);
   g_return_if_fail (platform_data == NULL
-		    || strcmp (g_variant_get_type_string (platform_data), "a{sv}") == 0);
+                    || strcmp (g_variant_get_type_string (platform_data), "a{sv}") == 0);
 
   if (!_g_application_platform_acquire_single_instance (application->priv->appid, NULL))
     {
       if (application->priv->default_quit)
         _g_application_handle_activation (application->priv->appid,
-					  argc, argv, platform_data);
+                                          argc, argv, platform_data);
       else
-	return;
+        return;
     }
 
   application->priv->is_remote = FALSE;
@@ -411,15 +411,15 @@ g_application_register_with_data (GApplication      *application,
  * g_application_new_and_register:
  * @appid: An application identifier
  * @argc: System argument count
- * @argv: (array length=argc): System argument vector 
- * 
+ * @argv: (array length=argc): System argument vector
+ *
  * This is a convenience function which combines g_application_new()
  * with g_application_register_with_data().
  */
 GApplication *
-g_application_new_and_register (const char        *appid,
-				int                argc,
-				char             **argv)
+g_application_new_and_register (const char  *appid,
+                                int          argc,
+                                char       **argv)
 {
   GApplication *app = g_application_new (appid);
   g_application_register_with_data (app, argc, argv, NULL);
@@ -538,7 +538,7 @@ g_application_invoke_action (GApplication *application,
   g_return_if_fail (action != NULL);
   if (!action->enabled)
     return;
-  
+
   g_signal_emit (application, application_signals[ACTION],
                  g_quark_from_string (name),
                  name,
@@ -692,7 +692,7 @@ g_application_run (GApplication *application)
 {
   g_return_if_fail (G_IS_APPLICATION (application));
   g_return_if_fail (!application->priv->is_remote);
-  
+
   G_APPLICATION_GET_CLASS (application)->run (application);
 }
 
@@ -730,7 +730,7 @@ g_application_quit (GApplication *application,
  * In the normal case where there is exactly one #GApplication instance
  * in this process, return that instance.  If there are multiple, the
  * first one created will be returned.  Otherwise, return %NULL.
- * 
+ *
  * Returns: (transfer none): The primary instance of #GApplication,
  *   or %NULL if none is set
  *
@@ -745,15 +745,15 @@ g_application_get_instance (void)
 /**
  * g_application_get_id:
  *
- * Retrieves the platform specific identifier for the #GApplication
- * 
+ * Retrieves the platform-specific identifier for the #GApplication.
+ *
  * Return value: The platform-specific identifier. The returned string
  *   is owned by the #GApplication instance and it should never be
  *   modified or freed
  *
  * Since: 2.26
  */
-G_CONST_RETURN char *  
+G_CONST_RETURN char *
 g_application_get_id (GApplication *application)
 {
   g_return_val_if_fail (G_IS_APPLICATION (application), NULL);
@@ -766,9 +766,9 @@ g_application_get_id (GApplication *application)
  * @application: a #GApplication
  *
  * Returns: %TRUE if this object represents a proxy for a remote application.
- */ 
+ */
 gboolean
-g_application_is_remote (GApplication      *application)
+g_application_is_remote (GApplication *application)
 {
   g_return_val_if_fail (G_IS_APPLICATION (application), FALSE);
 
@@ -932,7 +932,7 @@ g_application_class_init (GApplicationClass *klass)
                   _gio_marshal_VOID__BOXED_BOXED,
                   G_TYPE_NONE, 2,
                   G_TYPE_VARIANT,
-		  G_TYPE_VARIANT);
+                  G_TYPE_VARIANT);
 
    /**
    * GApplication:appid:
diff --git a/gio/gdbusapplication.c b/gio/gdbusapplication.c
index b18e8a5..dfef635 100644
--- a/gio/gdbusapplication.c
+++ b/gio/gdbusapplication.c
@@ -82,11 +82,11 @@ application_dbus_method_call (GDBusConnection       *connection,
       const char *action_name;
       guint32 timestamp;
       GApplicationAction *action;
-      
+
       g_variant_get (parameters, "(su)", &action_name, &timestamp);
-      
+
       action = g_hash_table_lookup (app->priv->actions, action_name);
-      
+
       if (!action)
         {
           char *errmsg  = g_strdup_printf ("Invalid action: %s", action_name);
@@ -94,9 +94,9 @@ application_dbus_method_call (GDBusConnection       *connection,
           g_free (errmsg);
           return;
         }
-      
+
       g_signal_emit (app, application_signals[ACTION], g_quark_from_string (action_name), action_name, (guint)timestamp);
-      
+
       g_dbus_method_invocation_return_value (invocation, NULL);
     }
   else if (strcmp (method_name, "Activate") == 0)



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