[frogr] Fix coding style



commit 9070709ae41695f764f027e229e2d29dc11fd5d8
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Sun Aug 14 18:14:45 2011 +0200

    Fix coding style

 src/frogr-controller.c     |   46 ++++++++++++++++++++++---------------------
 src/frogr-picture-loader.c |   17 ++++++++-------
 2 files changed, 33 insertions(+), 30 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 4c73643..c2f95e1 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -1111,30 +1111,32 @@ _on_picture_loaded (FrogrController *self, FrogrPicture *picture)
   mainview_model = frogr_main_view_get_model (priv->mainview);
 
   /* We need this info if account info was already fetched. */
-  if (priv->account && priv->account_extra_info_fetched) {
-    max_filesize = frogr_account_get_max_filesize (priv->account);
-    picture_filesize = frogr_picture_get_filesize (picture);
-  }
+  if (priv->account && priv->account_extra_info_fetched)
+    {
+      max_filesize = frogr_account_get_max_filesize (priv->account);
+      picture_filesize = frogr_picture_get_filesize (picture);
+    }
 
   /* Check max filesize limit, and stop the process if needed. */
-  if (picture_filesize > max_filesize) {
-    GtkWindow *window = NULL;
-    gchar *msg = NULL;
-
-    /* First %s is the title of the picture (filename of the file by
-       default). Second %s is the max allowed size for a picture to be
-       uploaded to flickr (different for free and PRO accounts). */
-    msg = g_strdup_printf (_("Can't load picture %s: size of file is bigger "
-                             "than the maximum allowed for this account (%s)"),
-                           frogr_picture_get_title (picture),
-                           frogr_util_get_datasize_string (max_filesize));
-
-    window = frogr_main_view_get_window (priv->mainview);
-    frogr_util_show_error_dialog (window, msg);
-    g_free (msg);
-
-    return FALSE;
-  }
+  if (picture_filesize > max_filesize)
+    {
+      GtkWindow *window = NULL;
+      gchar *msg = NULL;
+
+      /* First %s is the title of the picture (filename of the file by
+         default). Second %s is the max allowed size for a picture to be
+         uploaded to flickr (different for free and PRO accounts). */
+      msg = g_strdup_printf (_("Can't load picture %s: size of file is bigger "
+                               "than the maximum allowed for this account (%s)"),
+                             frogr_picture_get_title (picture),
+                             frogr_util_get_datasize_string (max_filesize));
+
+      window = frogr_main_view_get_window (priv->mainview);
+      frogr_util_show_error_dialog (window, msg);
+      g_free (msg);
+
+      return FALSE;
+    }
 
   frogr_main_view_model_add_picture (mainview_model, picture);
   g_signal_emit (self, signals[PICTURE_LOADED], 0, picture);
diff --git a/src/frogr-picture-loader.c b/src/frogr-picture-loader.c
index c717f08..685853a 100644
--- a/src/frogr-picture-loader.c
+++ b/src/frogr-picture-loader.c
@@ -357,14 +357,15 @@ _load_next_picture_cb (GObject *object,
   /* Go for the next picture, if needed */
   if (keep_going)
     _load_next_picture (self);
-  else {
-    /* Execute final callback */
-    if (priv->pictures_loaded_cb)
-      priv->pictures_loaded_cb (priv->object);
-
-    /* Process finished, self-destruct */
-    g_object_unref (self);
-  }
+  else
+    {
+      /* Execute final callback */
+      if (priv->pictures_loaded_cb)
+        priv->pictures_loaded_cb (priv->object);
+
+      /* Process finished, self-destruct */
+      g_object_unref (self);
+    }
 }
 
 static void



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