[nautilus] general: adjust uncrustify style



commit 0abaab1c446e247a359f6759697a104db34ed5b7
Author: Carlos Soriano <csoriano gnome org>
Date:   Tue Sep 6 10:07:51 2016 +0200

    general: adjust uncrustify style
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770564

 data/uncrustify.cfg                      |    5 +++-
 eel/eel-canvas.c                         |    2 +-
 eel/eel-string.c                         |    6 +++++
 nautilus-desktop/nautilus-desktop-link.c |    3 ++
 src/nautilus-canvas-container.c          |   21 +++++++++++++++++
 src/nautilus-canvas-dnd.c                |    2 +-
 src/nautilus-file-operations.c           |    8 +++---
 src/nautilus-operations-ui-manager.c     |    5 ++-
 src/nautilus-properties-window.c         |    6 ++--
 src/nautilus-thumbnails.c                |   36 +++++++++++++++---------------
 src/nautilus-window-slot.c               |    2 +-
 11 files changed, 65 insertions(+), 31 deletions(-)
---
diff --git a/data/uncrustify.cfg b/data/uncrustify.cfg
index 61277c5..0aed3cf 100644
--- a/data/uncrustify.cfg
+++ b/data/uncrustify.cfg
@@ -98,7 +98,7 @@ mod_full_brace_for                       = force
 mod_full_brace_function                  = force
 mod_full_brace_if                        = force
 mod_full_brace_while                     = force
-mod_case_brace                           = add
+mod_case_brace                           = force
 
 # Align
 align_func_params                        = true
@@ -119,6 +119,9 @@ cmt_star_cont                            = true       # Whether to put a star on
 cmt_sp_after_star_cont                   = 1          # The number of spaces to insert after the star on 
subsequent comment lines
 cmt_c_nl_start                           = false      # false/true
 cmt_c_nl_end                             = true       # false/true
+# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
+# the comment are the same length. Default=True
+cmt_multi_check_last                     = false
 
 # Encoding
 utf8_bom                                 = remove
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index 044beeb..c8a0470 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -3493,7 +3493,7 @@ eel_canvas_set_scroll_region (EelCanvas *canvas,
                     gtk_adjustment_get_value (hadjustment) + canvas->zoom_xofs,
                     gtk_adjustment_get_value (vadjustment) + canvas->zoom_yofs,
                     /*canvas->zoom_xofs,
-                    *   canvas->zoom_yofs,*/
+                     *   canvas->zoom_yofs,*/
                     &wxofs, &wyofs);
 
     canvas->scroll_x1 = x1;
diff --git a/eel/eel-string.c b/eel/eel-string.c
index 9fe79ab..85c0841 100644
--- a/eel/eel-string.c
+++ b/eel/eel-string.c
@@ -489,6 +489,7 @@ get_arg_type_from_format (EelPrintfHandler *custom_handlers,
             }
             return ARG_TYPE_INT;
         }
+        break;
 
         case 'e':
         case 'E':
@@ -505,16 +506,21 @@ get_arg_type_from_format (EelPrintfHandler *custom_handlers,
             }
             return ARG_TYPE_DOUBLE;
         }
+        break;
 
         case 'c':
         {
             return ARG_TYPE_INT;
         }
+        break;
 
         case 's':
         case 'p':
         case 'n':
+        {
             return ARG_TYPE_POINTER;
+        }
+        break;
     }
     return ARG_TYPE_INVALID;
 }
diff --git a/nautilus-desktop/nautilus-desktop-link.c b/nautilus-desktop/nautilus-desktop-link.c
index 603c248..e10d6c4 100644
--- a/nautilus-desktop/nautilus-desktop-link.c
+++ b/nautilus-desktop/nautilus-desktop-link.c
@@ -232,7 +232,10 @@ nautilus_desktop_link_new (NautilusDesktopLinkType type)
 
         default:
         case NAUTILUS_DESKTOP_LINK_MOUNT:
+        {
             g_assert_not_reached ();
+        }
+        break;
     }
 
     create_icon_file (link);
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index 610225e..26b21e7 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -366,19 +366,25 @@ nautilus_canvas_container_get_grid_size_for_zoom_level (NautilusCanvasZoomLevel
         {
             return SMALL_ICON_GRID_WIDTH;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_STANDARD:
         {
             return STANDARD_ICON_GRID_WIDTH;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_LARGE:
         {
             return LARGE_ICON_GRID_WIDTH;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_LARGER:
+        {
             return LARGER_ICON_GRID_WIDTH;
+        }
+        break;
     }
     g_return_val_if_reached (STANDARD_ICON_GRID_WIDTH);
 }
@@ -392,19 +398,25 @@ nautilus_canvas_container_get_icon_size_for_zoom_level (NautilusCanvasZoomLevel
         {
             return NAUTILUS_CANVAS_ICON_SIZE_SMALL;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_STANDARD:
         {
             return NAUTILUS_CANVAS_ICON_SIZE_STANDARD;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_LARGE:
         {
             return NAUTILUS_CANVAS_ICON_SIZE_LARGE;
         }
+        break;
 
         case NAUTILUS_CANVAS_ZOOM_LEVEL_LARGER:
+        {
             return NAUTILUS_CANVAS_ICON_SIZE_LARGER;
+        }
+        break;
     }
     g_return_val_if_reached (NAUTILUS_CANVAS_ICON_SIZE_STANDARD);
 }
@@ -3613,7 +3625,10 @@ closest_in_90_degrees (NautilusCanvasContainer *container,
         break;
 
         default:
+        {
             g_assert_not_reached ();
+        }
+        break;
     }
 
     dist = dx * dx + dy * dy;
@@ -6072,8 +6087,11 @@ item_event_callback (EelCanvasItem *item,
         }
 
         default:
+        {
             container->details->double_clicked = FALSE;
             return FALSE;
+        }
+        break;
     }
 }
 
@@ -8058,8 +8076,11 @@ nautilus_canvas_container_accessible_do_action (AtkAction *accessible,
         break;
 
         default:
+        {
             g_warning ("Invalid action passed to NautilusCanvasContainerAccessible::do_action");
             return FALSE;
+        }
+        break;
     }
     return TRUE;
 }
diff --git a/src/nautilus-canvas-dnd.c b/src/nautilus-canvas-dnd.c
index ae8a2e2..27d6aac 100644
--- a/src/nautilus-canvas-dnd.c
+++ b/src/nautilus-canvas-dnd.c
@@ -1939,8 +1939,8 @@ drag_data_received_callback (GtkWidget        *widget,
                         nautilus_file_changes_consume_changes (TRUE);
                         success = TRUE;
                     }
-                    break;
                 } /* NAUTILUS_ICON_DND_XDNDDIRECTSAVE */
+                break;
         }
         gtk_drag_finish (context, success, FALSE, time);
 
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 1a3bdc7..bbf7420 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -5483,10 +5483,10 @@ retry:
         if (is_merge)
         {
             /* On merge we now write in the target directory, which may not
-            *   be in the same directory as the source, even if the parent is
-            *   (if the merged directory is a mountpoint). This could cause
-            *   problems as we then don't transcode filenames.
-            *   We just set same_fs to FALSE which is safe but a bit slower. */
+             *   be in the same directory as the source, even if the parent is
+             *   (if the merged directory is a mountpoint). This could cause
+             *   problems as we then don't transcode filenames.
+             *   We just set same_fs to FALSE which is safe but a bit slower. */
             same_fs = FALSE;
         }
 
diff --git a/src/nautilus-operations-ui-manager.c b/src/nautilus-operations-ui-manager.c
index 4a1d727..ab6da21 100644
--- a/src/nautilus-operations-ui-manager.c
+++ b/src/nautilus-operations-ui-manager.c
@@ -490,7 +490,8 @@ copy_move_conflict_ask_user_action (GtkWindow *parent_window,
     return data->response;
 }
 
-typedef struct {
+typedef struct
+{
     GtkWindow *parent_window;
     NautilusFile *file;
 } HandleUnsupportedFileData;
@@ -499,7 +500,7 @@ static gboolean
 open_file_in_application (gpointer user_data)
 {
     HandleUnsupportedFileData *data;
-    g_autoptr (GAppInfo) application  = NULL;
+    g_autoptr (GAppInfo) application = NULL;
 
     data = user_data;
 
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 62b4596..769c4f5 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -869,8 +869,8 @@ select_all_at_idle (gpointer user_data)
 }
 
 static void
-name_field_activate (GtkWidget  *name_field,
-                     gpointer    user_data)
+name_field_activate (GtkWidget *name_field,
+                     gpointer   user_data)
 {
     NautilusPropertiesWindow *window;
 
@@ -2757,7 +2757,7 @@ location_show_original (NautilusPropertiesWindow *window)
     NautilusFile *file;
 
     /* there is no way a recent item will be mixed with
-    *   other items so just pick the first file to check */
+     *   other items so just pick the first file to check */
     file = NAUTILUS_FILE (g_list_nth_data (window->details->original_files, 0));
     return (file != NULL && !nautilus_file_is_in_recent (file));
 }
diff --git a/src/nautilus-thumbnails.c b/src/nautilus-thumbnails.c
index 040faeb..167ef53 100644
--- a/src/nautilus-thumbnails.c
+++ b/src/nautilus-thumbnails.c
@@ -193,8 +193,8 @@ nautilus_thumbnail_remove_from_queue (const char *file_uri)
     g_mutex_lock (&thumbnails_mutex);
 
     /*********************************
-    * MUTEX LOCKED
-    *********************************/
+     * MUTEX LOCKED
+     *********************************/
 
     if (thumbnails_to_make_hash)
     {
@@ -209,8 +209,8 @@ nautilus_thumbnail_remove_from_queue (const char *file_uri)
     }
 
     /*********************************
-    * MUTEX UNLOCKED
-    *********************************/
+     * MUTEX UNLOCKED
+     *********************************/
 
 #ifdef DEBUG_THUMBNAILS
     g_message ("(Remove from queue) Unlocking mutex\n");
@@ -229,8 +229,8 @@ nautilus_thumbnail_prioritize (const char *file_uri)
     g_mutex_lock (&thumbnails_mutex);
 
     /*********************************
-    * MUTEX LOCKED
-    *********************************/
+     * MUTEX LOCKED
+     *********************************/
 
     if (thumbnails_to_make_hash)
     {
@@ -244,8 +244,8 @@ nautilus_thumbnail_prioritize (const char *file_uri)
     }
 
     /*********************************
-    * MUTEX UNLOCKED
-    *********************************/
+     * MUTEX UNLOCKED
+     *********************************/
 
 #ifdef DEBUG_THUMBNAILS
     g_message ("(Prioritize) Unlocking mutex\n");
@@ -255,8 +255,8 @@ nautilus_thumbnail_prioritize (const char *file_uri)
 
 
 /***************************************************************************
-* Thumbnail Thread Functions.
-***************************************************************************/
+ * Thumbnail Thread Functions.
+ ***************************************************************************/
 
 
 /* This is a one-shot idle callback called from the main loop to call
@@ -413,8 +413,8 @@ nautilus_create_thumbnail (NautilusFile *file)
     g_mutex_lock (&thumbnails_mutex);
 
     /*********************************
-    * MUTEX LOCKED
-    *********************************/
+     * MUTEX LOCKED
+     *********************************/
 
     if (thumbnails_to_make_hash == NULL)
     {
@@ -459,8 +459,8 @@ nautilus_create_thumbnail (NautilusFile *file)
     }
 
     /*********************************
-    * MUTEX UNLOCKED
-    *********************************/
+     * MUTEX UNLOCKED
+     *********************************/
 
 #ifdef DEBUG_THUMBNAILS
     g_message ("(Main Thread) Unlocking mutex\n");
@@ -491,8 +491,8 @@ thumbnail_thread_func (GTask        *task,
         g_mutex_lock (&thumbnails_mutex);
 
         /*********************************
-        * MUTEX LOCKED
-        *********************************/
+         * MUTEX LOCKED
+         *********************************/
 
         /* Pop the last thumbnail we just made off the head of the
          *  list and free it. I did this here so we only have to lock
@@ -533,8 +533,8 @@ thumbnail_thread_func (GTask        *task,
         currently_thumbnailing = info;
         current_orig_mtime = info->original_file_mtime;
         /*********************************
-        * MUTEX UNLOCKED
-        *********************************/
+         * MUTEX UNLOCKED
+         *********************************/
 
 #ifdef DEBUG_THUMBNAILS
         g_message ("(Thumbnail Thread) Unlocking mutex\n");
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 55d7214..ba278e7 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -104,7 +104,7 @@ typedef struct
     /* Load state */
     GCancellable *find_mount_cancellable;
     /* It could be either the view is loading the files or the search didn't
-    * finish. Used for showing a spinner to provide feedback to the user. */
+     * finish. Used for showing a spinner to provide feedback to the user. */
     gboolean allow_stop;
     gboolean needs_reload;
     gchar *pending_search_text;


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