Commit b6ebffd5 authored by Carlos Soriano Sánchez's avatar Carlos Soriano Sánchez

general: Run uncrustify

parent 27b039b3
Pipeline #3358 passed with stage
in 7 minutes and 57 seconds
......@@ -95,4 +95,3 @@ eel_gtk_menu_insert_separator (GtkMenu *menu,
return GTK_MENU_ITEM (menu_item);
}
......@@ -24,7 +24,7 @@
G_DEFINE_INTERFACE (NautilusFileInfo, nautilus_file_info, G_TYPE_OBJECT)
NautilusFileInfo *(*nautilus_file_info_getter)(GFile * location, gboolean create);
NautilusFileInfo * (*nautilus_file_info_getter)(GFile * location, gboolean create);
/**
* SECTION:nautilus-file-info
......
......@@ -355,7 +355,7 @@ batch_rename_format (NautilusFile *file,
gchar *metadata;
file_name = nautilus_file_get_display_name (file);
if (!nautilus_file_is_directory(file))
if (!nautilus_file_is_directory (file))
{
extension = nautilus_file_get_extension (file);
}
......@@ -435,7 +435,7 @@ batch_rename_format (NautilusFile *file,
{
case ORIGINAL_FILE_NAME:
{
if (nautilus_file_is_directory(file))
if (nautilus_file_is_directory (file))
{
new_name = g_string_append (new_name, file_name);
}
......
......@@ -1485,7 +1485,7 @@ create_label_layout (NautilusCanvasItem *item,
{
str = g_string_append_c (str, *p);
if (*p == '_' || *p == '-' || (*p == '.' && !g_ascii_isdigit(*(p+1))))
if (*p == '_' || *p == '-' || (*p == '.' && !g_ascii_isdigit (*(p + 1))))
{
/* Ensure that we allow to break after '_' or '.' characters,
* if they are not followed by a number */
......
......@@ -132,7 +132,6 @@ nautilus_column_chooser_class_init (NautilusColumnChooserClass *chooser_class)
NAUTILUS_TYPE_FILE,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_WRITABLE));
}
static void
......
......@@ -3547,7 +3547,7 @@ is_link_trusted (NautilusFile *file,
{
GFile *location;
gboolean res;
g_autofree gchar* trusted = NULL;
g_autofree gchar *trusted = NULL;
if (!is_launcher)
{
......
......@@ -1203,9 +1203,9 @@ do_run_simple_dialog (gpointer _data)
button = gtk_dialog_add_button (GTK_DIALOG (dialog), button_title, response_id);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), response_id);
if (g_strcmp0(button_title, DELETE) == 0)
if (g_strcmp0 (button_title, DELETE) == 0)
{
gtk_style_context_add_class(gtk_widget_get_style_context(button),
gtk_style_context_add_class (gtk_widget_get_style_context (button),
"destructive-action");
}
}
......@@ -8049,13 +8049,13 @@ extract_job_on_scanned (AutoarExtractor *extractor,
/* FIXME: G_MAXUINT64 is the value used by autoar when the file size cannot
* be determined. Ideally an API should be used instead.
*/
if (total_size != G_MAXUINT64 && total_size > free_size )
if (total_size != G_MAXUINT64 && total_size > free_size)
{
nautilus_progress_info_take_status (extract_job->common.progress,
g_strdup_printf (_("Error extracting “%s”"),
basename));
run_error (&extract_job->common,
g_strdup_printf (_("Not enough free space to extract %s"),basename),
g_strdup_printf (_("Not enough free space to extract %s"), basename),
NULL,
NULL,
FALSE,
......@@ -8081,7 +8081,7 @@ report_extract_final_progress (ExtractJob *extract_job,
if (total_files == 1)
{
GFile *source_file;
g_autofree gchar * basename = NULL;
g_autofree gchar *basename = NULL;
source_file = G_FILE (extract_job->source_files->data);
basename = get_basename (source_file);
......
......@@ -1389,7 +1389,6 @@ starred_redo_func (NautilusFileUndoInfo *info,
}
else
{
nautilus_tag_manager_unstar_files (tag_manager,
G_OBJECT (info),
self->priv->files,
......@@ -1501,7 +1500,6 @@ nautilus_file_undo_info_starred_class_init (NautilusFileUndoInfoFavoritesClass *
FALSE,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
}
GList *
......
......@@ -557,7 +557,9 @@ nautilus_is_starred_directory (GFile *dir)
uri = g_file_get_uri (dir);
if (eel_uri_is_starred (uri))
{
return TRUE;
}
return FALSE;
}
......@@ -1436,4 +1438,3 @@ nautilus_uri_to_native_uri (const gchar *uri)
return NULL;
}
......@@ -4529,9 +4529,13 @@ char *
nautilus_file_get_display_name (NautilusFile *file)
{
if (nautilus_file_is_other_locations (file))
{
return g_strdup (_("Other Locations"));
}
if (nautilus_file_is_starred_location (file))
{
return g_strdup (_("Starred"));
}
return g_strdup (nautilus_file_peek_display_name (file));
}
......@@ -6115,7 +6119,7 @@ nautilus_file_set_search_fts_snippet (NautilusFile *file,
file->details->fts_snippet = g_strdup (fts_snippet);
}
const gchar*
const gchar *
nautilus_file_get_search_fts_snippet (NautilusFile *file)
{
return file->details->fts_snippet;
......@@ -7770,7 +7774,8 @@ nautilus_file_get_file_type (NautilusFile *file)
{
g_return_val_if_fail (NAUTILUS_IS_FILE (file), G_FILE_TYPE_UNKNOWN);
return nautilus_file_info_get_file_type (NAUTILUS_FILE_INFO (file));;
return nautilus_file_info_get_file_type (NAUTILUS_FILE_INFO (file));
;
  • Oh, uncrustify doesn't handle double semicolons correctly. New line for empty statement. (By the way, did anyone receive an email for this comment?)

  • 0f411dc4 should make uncrustify remove those.

Please register or sign in to reply
}
/**
......@@ -9210,8 +9215,9 @@ thumbnail_limit_changed_callback (gpointer user_data)
cached_thumbnail_limit = g_settings_get_uint64 (nautilus_preferences,
NAUTILUS_PREFERENCES_FILE_THUMBNAIL_LIMIT);
//Converts the obtained limit in MB to bytes
cached_thumbnail_limit *= MEGA_TO_BASE_RATE;;
/*Converts the obtained limit in MB to bytes */
cached_thumbnail_limit *= MEGA_TO_BASE_RATE;
;
/* Tell the world that icons might have changed. We could invent a narrower-scope
* signal to mean only "thumbnails might have changed" if this ends up being slow
......
......@@ -3632,7 +3632,6 @@ debuting_files_add_files_callback (NautilusFilesView *view,
{
nautilus_file_ref (NAUTILUS_FILE (l->data));
data->added_files = g_list_prepend (data->added_files, NAUTILUS_FILE (l->data));
}
g_object_unref (location);
}
......@@ -8449,11 +8448,9 @@ finish_loading (NautilusFilesView *view)
/* Start loading. */
/* Connect handlers to learn about loading progress. */
priv->done_loading_handler_id = g_signal_connect
(priv->model, "done-loading",
priv->done_loading_handler_id = g_signal_connect (priv->model, "done-loading",
G_CALLBACK (done_loading_callback), view);
priv->load_error_handler_id = g_signal_connect
(priv->model, "load-error",
priv->load_error_handler_id = g_signal_connect (priv->model, "load-error",
G_CALLBACK (load_error_callback), view);
/* Monitor the things needed to get the right icon. Also
......
......@@ -1632,7 +1632,6 @@ starred_cell_data_func (GtkTreeViewColumn *column,
g_object_set (renderer,
"icon-name", "non-starred-symbolic",
NULL);
}
nautilus_file_unref (file);
......@@ -1663,7 +1662,7 @@ filename_cell_data_func (GtkTreeViewColumn *column,
-1);
escaped_name = g_markup_escape_text (text, -1);
display_text = g_string_new(escaped_name);
display_text = g_string_new (escaped_name);
directory = nautilus_files_view_get_model (NAUTILUS_FILES_VIEW (view));
......@@ -2326,8 +2325,8 @@ get_default_visible_columns (NautilusListView *list_view)
NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS);
}
static GList*
default_column_array_as_list (gchar** array)
static GList *
default_column_array_as_list (gchar **array)
{
GList *res = NULL;
gint i = 0;
......@@ -2348,7 +2347,7 @@ get_visible_columns (NautilusListView *list_view)
g_autoptr (GList) visible_columns = NULL;
GPtrArray *res;
GList *l;
g_autofree gchar* uri = NULL;
g_autofree gchar *uri = NULL;
gboolean in_xdg_dirs;
gboolean is_starred;
......@@ -3802,7 +3801,7 @@ nautilus_list_view_reveal_for_selection_context_menu (NautilusFilesView *view)
list = gtk_tree_selection_get_selected_rows (tree_selection, NULL);
list = g_list_last (list);
path = g_steal_pointer(&list->data);
path = g_steal_pointer (&list->data);
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
}
......
......@@ -717,7 +717,7 @@ get_activation_action (NautilusFile *file)
char *activation_uri;
gboolean handles_extract = FALSE;
g_autoptr (GAppInfo) app_info = NULL;
const gchar* app_id;
const gchar *app_id;
app_info = nautilus_mime_get_default_application_for_file (file);
if (app_info != NULL)
......
......@@ -142,7 +142,7 @@ set_copy_move_dialog_text (FileConflictDialogData *data)
{
primary_text = g_strdup_printf (_("You are trying to replace the destination folder “%s” with a symbolic link."),
destination_name);
message = g_strdup_printf(_("This is not allowed in order to avoid the deletion of the destination folder’s contents."));
message = g_strdup_printf (_("This is not allowed in order to avoid the deletion of the destination folder’s contents."));
message_extra = _("Please rename the symbolic link or press the skip button.");
}
else if (source_is_directory)
......
......@@ -362,8 +362,8 @@ static gboolean format_spin_button(GtkSpinButton *spin_button,
gchar *text;
adjustment = gtk_spin_button_get_adjustment (spin_button);
value = (int)gtk_adjustment_get_value (adjustment);
text = g_strdup_printf ("%d MB",value);
value = (int) gtk_adjustment_get_value (adjustment);
text = g_strdup_printf ("%d MB", value);
gtk_entry_set_text (GTK_ENTRY (spin_button), text);
return TRUE;
......@@ -377,7 +377,6 @@ static void nautilus_preferences_window_setup_thumbnail_limit_formatting (GtkBui
g_signal_connect (spin, "output", G_CALLBACK (format_spin_button),
spin);
}
static void bind_builder_bool(GtkBuilder *builder,
......
......@@ -488,7 +488,6 @@ window_export_handle (GtkWindow *window,
GtkWindowHandleExported callback,
gpointer user_data)
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
{
......
......@@ -93,7 +93,6 @@ nautilus_progress_info_manager_constructor (GType type,
static void
nautilus_progress_info_manager_init (NautilusProgressInfoManager *self)
{
}
static void
......
......@@ -344,7 +344,6 @@ nautilus_search_engine_model_class_init (NautilusSearchEngineModelClass *class)
* Whether the search engine is running a search.
*/
g_object_class_override_property (gobject_class, PROP_RUNNING, "running");
}
static void
......
......@@ -341,7 +341,8 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
g_string_append (sparql, " fts:snippet(?urn)");
}
g_string_append (sparql, "\nWHERE {"
g_string_append (sparql,
"\nWHERE {"
" ?urn a nfo:FileDataObject;"
" nfo:fileLastModified ?mtime;"
" nfo:fileLastAccessed ?atime;"
......@@ -537,7 +538,6 @@ nautilus_search_engine_tracker_class_init (NautilusSearchEngineTrackerClass *cla
* Whether the search engine is running a search.
*/
g_object_class_override_property (gobject_class, PROP_RUNNING, "running");
}
static void
......
......@@ -367,14 +367,14 @@ search_fts_mode_changed (GtkToggleButton *button,
popover->fts_enabled == FALSE)
{
popover->fts_enabled = TRUE;
g_settings_set_boolean(nautilus_preferences, NAUTILUS_PREFERENCES_FTS_ENABLED, TRUE);
g_settings_set_boolean (nautilus_preferences, NAUTILUS_PREFERENCES_FTS_ENABLED, TRUE);
g_object_notify (G_OBJECT (popover), "fts-enabled");
}
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (popover->filename_search_button)) &&
popover->fts_enabled == TRUE)
{
popover->fts_enabled = FALSE;
g_settings_set_boolean(nautilus_preferences, NAUTILUS_PREFERENCES_FTS_ENABLED, FALSE);
g_settings_set_boolean (nautilus_preferences, NAUTILUS_PREFERENCES_FTS_ENABLED, FALSE);
g_object_notify (G_OBJECT (popover), "fts-enabled");
}
}
......
......@@ -22,7 +22,8 @@
#include "nautilus-directory-private.h"
#include <glib/gi18n.h>
struct _NautilusFavoriteDirectory {
struct _NautilusFavoriteDirectory
{
NautilusDirectory parent_slot;
NautilusTagManager *tag_manager;
......@@ -105,7 +106,7 @@ nautilus_starred_directory_update_files (NautilusFavoriteDirectory *self)
{
if (!g_hash_table_contains (uri_table, l->data))
{
file = nautilus_file_get_by_uri ((gchar*) l->data);
file = nautilus_file_get_by_uri ((gchar *) l->data);
for (monitor_list = self->monitor_list; monitor_list; monitor_list = monitor_list->next)
{
......@@ -270,7 +271,7 @@ real_file_monitor_add (NautilusDirectory *directory,
if (callback != NULL)
{
(*callback) (directory, starred->files, callback_data);
(*callback)(directory, starred->files, callback_data);
}
for (list = starred->files; list != NULL; list = list->next)
......@@ -314,7 +315,9 @@ real_monitor_remove (NautilusDirectory *directory,
monitor = list->data;
if (monitor->client != client)
{
continue;
}
starred->monitor_list = g_list_delete_link (starred->monitor_list, list);
......@@ -339,7 +342,7 @@ real_handles_location (GFile *location)
return FALSE;
}
static FavoriteCallback*
static FavoriteCallback *
starred_callback_find_pending (NautilusFavoriteDirectory *starred,
NautilusDirectoryCallback callback,
gpointer callback_data)
......@@ -361,7 +364,7 @@ starred_callback_find_pending (NautilusFavoriteDirectory *starred,
return NULL;
}
static FavoriteCallback*
static FavoriteCallback *
starred_callback_find (NautilusFavoriteDirectory *starred,
NautilusDirectoryCallback callback,
gpointer callback_data)
......@@ -422,7 +425,7 @@ real_cancel_callback (NautilusDirectory *directory,
}
}
static GList*
static GList *
real_get_file_list (NautilusDirectory *directory)
{
NautilusFavoriteDirectory *starred;
......@@ -448,7 +451,7 @@ nautilus_starred_directory_set_files (NautilusFavoriteDirectory *self)
for (l = starred_files; l != NULL; l = l->next)
{
file = nautilus_file_get_by_uri ((gchar*) l->data);
file = nautilus_file_get_by_uri ((gchar *) l->data);
g_signal_connect (file, "changed", G_CALLBACK (file_changed), self);
......@@ -518,7 +521,7 @@ nautilus_starred_directory_dispose (GObject *object)
{
for (l = starred->monitor_list; l != NULL; l = l->next)
{
starred_monitor_destroy ((FavoriteMonitor*) l->data, starred);
starred_monitor_destroy ((FavoriteMonitor *) l->data, starred);
}
g_list_free (starred->monitor_list);
......@@ -552,7 +555,7 @@ nautilus_starred_directory_class_init (NautilusFavoriteDirectoryClass *klass)
directory_class->get_file_list = real_get_file_list;
}
NautilusFavoriteDirectory*
NautilusFavoriteDirectory *
nautilus_starred_directory_new ()
{
NautilusFavoriteDirectory *self;
......@@ -577,5 +580,4 @@ nautilus_starred_directory_init (NautilusFavoriteDirectory *self)
self->tag_manager = tag_manager;
nautilus_starred_directory_set_files (self);
}
......@@ -71,7 +71,7 @@ enum
static guint signals[LAST_SIGNAL];
static const gchar*
static const gchar *
nautilus_tag_manager_file_with_id_changed_url (GHashTable *hash_table,
gint64 id,
const gchar *url)
......@@ -102,7 +102,7 @@ destroy_insert_task_data (gpointer data)
g_free (data);
}
static GString*
static GString *
add_selection_filter (GList *selection,
GString *query)
{
......@@ -343,7 +343,7 @@ get_query_status (TrackerSparqlCursor *cursor,
return success;
}
GList*
GList *
nautilus_tag_manager_get_starred_files (NautilusTagManager *self)
{
return g_hash_table_get_keys (self->starred_files);
......@@ -440,12 +440,11 @@ nautilus_tag_manager_gpointer_task_finish (GObject *source_object,
return g_task_propagate_pointer (G_TASK (res), error);
}
static GString*
static GString *
nautilus_tag_manager_delete_tag (NautilusTagManager *self,
GList *selection,
GString *query)
{
g_string_append (query,
"DELETE { ?urn nao:hasTag nao:predefined-tag-favorite }"
"WHERE { ?urn a nfo:FileDataObject ; nie:url ?url .");
......@@ -457,7 +456,7 @@ nautilus_tag_manager_delete_tag (NautilusTagManager *self,
return query;
}
static GString*
static GString *
nautilus_tag_manager_insert_tag (NautilusTagManager *self,
GList *selection,
GString *query)
......@@ -532,7 +531,6 @@ on_get_file_ids_for_urls_cursor_callback (GObject *object,
g_task_get_cancellable (task),
on_get_file_ids_for_urls_cursor_callback,
task);
}
......@@ -683,7 +681,7 @@ nautilus_tag_manager_unstar_files (NautilusTagManager *self,
}
void
on_tracker_notifier_events(TrackerNotifier *notifier,
on_tracker_notifier_events (TrackerNotifier *notifier,
GPtrArray *events,
gpointer user_data)
{
......@@ -803,7 +801,6 @@ on_tracker_notifier_events(TrackerNotifier *notifier,
g_string_free (query, TRUE);
}
}
static void
......@@ -844,7 +841,7 @@ nautilus_tag_manager_class_init (NautilusTagManagerClass *klass)
G_TYPE_POINTER);
}
NautilusTagManager* nautilus_tag_manager_get ()
NautilusTagManager *nautilus_tag_manager_get ()
{
if (tag_manager != NULL)
{
......@@ -852,7 +849,7 @@ NautilusTagManager* nautilus_tag_manager_get ()
}
tag_manager = g_object_new (NAUTILUS_TYPE_TAG_MANAGER, NULL);
g_object_add_weak_pointer (G_OBJECT (tag_manager), (gpointer)&tag_manager);
g_object_add_weak_pointer (G_OBJECT (tag_manager), (gpointer) & tag_manager);
return tag_manager;
}
......@@ -871,7 +868,6 @@ void nautilus_tag_manager_set_cancellable (NautilusTagManager *tag_manager,
"events",
G_CALLBACK (on_tracker_notifier_events),
tag_manager);
}
static void
......
......@@ -264,6 +264,7 @@ vfs_file_get_date (NautilusFile *file,
}
case NAUTILUS_DATE_TYPE_TRASHED:
{
/* Before we have info on a file, the date is unknown. */
if (trash_time == 0)
{
......@@ -274,6 +275,7 @@ vfs_file_get_date (NautilusFile *file,
*date = trash_time;
}
return TRUE;
}
case NAUTILUS_DATE_TYPE_RECENCY:
/* Before we have info on a file, the date is unknown. */
......
......@@ -172,7 +172,7 @@ nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
priv->location_change_type = NAUTILUS_LOCATION_CHANGE_RELOAD;
}
RestoreTabData*
RestoreTabData *
nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *self)
{
NautilusWindowSlotPrivate *priv;
......@@ -223,7 +223,7 @@ real_handles_location (NautilusWindowSlot *self,
gboolean handles_location;
g_autofree char *uri = NULL;
uri = g_file_get_uri(location);
uri = g_file_get_uri (location);
file = nautilus_file_get (location);
handles_location = !nautilus_file_is_other_locations (file);
......
......@@ -175,7 +175,8 @@ static const struct
{ GDK_KEY_Forward, "forward" },
};
static const GtkPadActionEntry pad_actions[] = {
static const GtkPadActionEntry pad_actions[] =
{
{ GTK_PAD_ACTION_BUTTON, 0, -1, N_("Parent folder"), "up" },
{ GTK_PAD_ACTION_BUTTON, 1, -1, N_("Home"), "go-home" },
{ GTK_PAD_ACTION_BUTTON, 2, -1, N_("New tab"), "new-tab" },
......@@ -1841,7 +1842,7 @@ nautilus_window_on_undo_changed (NautilusFileUndoManager *manager,
if (nautilus_file_undo_info_get_op_type (undo_info) == NAUTILUS_FILE_UNDO_OP_MOVE_TO_TRASH)
{
g_autoptr(GList) files = NULL;
g_autoptr (GList) files = NULL;
files = nautilus_file_undo_info_trash_get_files (NAUTILUS_FILE_UNDO_INFO_TRASH (undo_info));
......@@ -2090,7 +2091,7 @@ notebook_popup_menu_show (NautilusWindow *window,
gtk_widget_show_all (popup);
gtk_menu_popup_at_pointer (GTK_MENU (popup),
(GdkEvent*) event);
(GdkEvent *) event);
}
/* emitted when the user clicks the "close" button of tabs */
......@@ -2886,7 +2887,7 @@ nautilus_window_init (NautilusWindow *window)
gtk_window_group_add_window (window_group, GTK_WINDOW (window));
g_object_unref (window_group);
priv->tab_data_queue = g_queue_new();
priv->tab_data_queue = g_queue_new ();
priv->pad_controller = gtk_pad_controller_new (GTK_WINDOW (window),
G_ACTION_GROUP (window),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment