Commit 619970b1 authored by António Fernandes's avatar António Fernandes 🐚 Committed by António Fernandes
Browse files

general: Uniformize case code style

There are a few non-braced single-statement in the final cases, which
have  gone unnoticed until detected by a recent uncrustify update.

Let's add the missing braces around single-statements even if it's the
last case.
parent 9661a9de
......@@ -2952,7 +2952,9 @@ eel_canvas_button (GtkWidget *widget,
break;
default:
{
mask = 0;
}
}
switch (event->type)
......@@ -2988,7 +2990,9 @@ eel_canvas_button (GtkWidget *widget,
break;
default:
{
g_assert_not_reached ();
}
}
return retval;
......
......@@ -378,8 +378,10 @@ nautilus_canvas_item_set_property (GObject *object,
break;
default:
{
g_warning ("nautilus_canvas_item_set_property on unknown argument");
return;
}
}
eel_canvas_item_request_update (EEL_CANVAS_ITEM (object));
......@@ -776,8 +778,10 @@ nautilus_canvas_item_get_max_text_width (NautilusCanvasItem *item)
break;
default:
{
g_warning ("Zoom level not valid. This may incur in missaligned grid");
max_text_width = MAX_TEXT_WIDTH_STANDARD;
}
}
return max_text_width * canvas_item->canvas->pixels_per_unit - 2 * TEXT_BACK_PADDING_X;
......@@ -1526,8 +1530,10 @@ nautilus_canvas_item_event (EelCanvasItem *item,
}
default:
{
/* Don't eat up other events; canvas container might use them. */
return FALSE;
}
}
}
......@@ -2056,8 +2062,10 @@ nautilus_canvas_item_accessible_do_action (AtkAction *accessible,
break;
default:
{
g_warning ("Invalid action passed to NautilusCanvasItemAccessible::do_action");
return FALSE;
}
}
return TRUE;
......
......@@ -696,7 +696,9 @@ nautilus_drag_drag_data_get_from_cache (GList *cache,
break;
default:
{
return FALSE;
}
}
result = g_string_new (NULL);
......
......@@ -3278,10 +3278,12 @@ report_preparing_count_progress (CommonJob *job,
break;
case OP_KIND_COMPRESS:
{
s = g_strdup_printf (ngettext ("Preparing to compress %'d file",
"Preparing to compress %'d files",
source_info->num_files),
source_info->num_files);
}
}
nautilus_progress_info_take_details (job->progress, s);
......@@ -3339,7 +3341,9 @@ get_scan_primary (OpKind kind)
}
case OP_KIND_COMPRESS:
{
return g_strdup (_("Error while compressing files."));
}
}
}
......
......@@ -655,7 +655,9 @@ special_directory_get_icon (GUserDirectory directory,
ICON_CASE (VIDEOS);
default:
{
return (symbolic) ? g_themed_icon_new (NAUTILUS_ICON_FOLDER) : g_themed_icon_new (NAUTILUS_ICON_FULLCOLOR_FOLDER);
}
}
#undef ICON_CASE
......
......@@ -3795,7 +3795,9 @@ nautilus_file_compare_for_sort (NautilusFile *file_1,
break;
default:
{
g_return_val_if_reached (0);
}
}
if (reversed)
......@@ -9416,8 +9418,10 @@ nautilus_drag_can_accept_info (NautilusFile *drop_target_item,
}
default:
{
g_assert_not_reached ();
return FALSE;
}
}
}
......
......@@ -1760,7 +1760,9 @@ pattern_select_response_cb (GtkWidget *dialog,
break;
default:
{
g_assert_not_reached ();
}
}
}
......@@ -2308,7 +2310,9 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
break;
default:
{
g_assert_not_reached ();
}
}
nautilus_file_operations_compress (source_files, output,
......
......@@ -183,6 +183,7 @@ nautilus_list_model_get_column_type (GtkTreeModel *tree_model,
}
default:
{
if (index < NAUTILUS_LIST_MODEL_NUM_COLUMNS + priv->columns->len)
{
return G_TYPE_STRING;
......@@ -191,6 +192,7 @@ nautilus_list_model_get_column_type (GtkTreeModel *tree_model,
{
return G_TYPE_INVALID;
}
}
}
}
......@@ -325,7 +327,9 @@ nautilus_list_model_get_icon_size_for_zoom_level (NautilusListZoomLevel zoom_lev
}
case NAUTILUS_LIST_ZOOM_LEVEL_LARGER:
{
return NAUTILUS_LIST_ICON_SIZE_LARGER;
}
}
g_return_val_if_reached (NAUTILUS_LIST_ICON_SIZE_STANDARD);
}
......@@ -444,6 +448,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
break;
default:
{
if (column >= NAUTILUS_LIST_MODEL_NUM_COLUMNS && column < NAUTILUS_LIST_MODEL_NUM_COLUMNS + priv->columns->len)
{
NautilusColumn *nautilus_column;
......@@ -476,6 +481,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
{
g_assert_not_reached ();
}
}
}
}
......@@ -1540,7 +1546,9 @@ nautilus_list_model_get_zoom_level_from_column_id (int column)
}
case NAUTILUS_LIST_MODEL_LARGER_ICON_COLUMN:
{
return NAUTILUS_LIST_ZOOM_LEVEL_LARGER;
}
}
g_return_val_if_reached (NAUTILUS_LIST_ZOOM_LEVEL_STANDARD);
......@@ -1567,7 +1575,9 @@ nautilus_list_model_get_column_id_from_zoom_level (NautilusListZoomLevel zoom_le
}
case NAUTILUS_LIST_ZOOM_LEVEL_LARGER:
{
return NAUTILUS_LIST_MODEL_LARGER_ICON_COLUMN;
}
}
g_return_val_if_reached (NAUTILUS_LIST_MODEL_STANDARD_ICON_COLUMN);
......
......@@ -2020,7 +2020,9 @@ nautilus_list_view_get_icon_padding_for_zoom_level (NautilusListZoomLevel zoom_l
}
default:
{
g_assert_not_reached ();
}
}
}
......
......@@ -348,7 +348,9 @@ drag_data_get_callback (GtkWidget *widget,
break;
default:
{
g_assert_not_reached ();
}
}
g_free (uri);
g_object_unref (location);
......@@ -513,6 +515,7 @@ entry_would_have_inserted_characters (const GdkEvent *event)
}
default:
{
if (keyval >= 0x20 && keyval <= 0xFF)
{
if ((state & GDK_CONTROL_MASK) != 0)
......@@ -524,6 +527,7 @@ entry_would_have_inserted_characters (const GdkEvent *event)
return FALSE;
}
}
}
}
/* GTK+ 4 TODO: gdk_event_get_string () and check if length > 0. */
......@@ -671,7 +675,9 @@ nautilus_location_entry_icon_release (GtkEntry *gentry,
break;
default:
{
g_assert_not_reached ();
}
}
}
......@@ -910,7 +916,9 @@ nautilus_location_entry_set_secondary_action (NautilusLocationEntry *entry
break;
default:
{
g_assert_not_reached ();
}
}
priv->secondary_action = secondary_action;
}
......
......@@ -1257,7 +1257,9 @@ get_gicon (ButtonData *button_data)
}
default:
{
return NULL;
}
}
return NULL;
......
......@@ -189,7 +189,9 @@ nautilus_places_view_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......@@ -216,7 +218,9 @@ nautilus_places_view_set_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -184,7 +184,9 @@ nautilus_query_editor_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......@@ -213,7 +215,9 @@ nautilus_query_editor_set_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -144,7 +144,9 @@ nautilus_query_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......@@ -207,7 +209,9 @@ nautilus_query_set_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -309,7 +309,9 @@ nautilus_search_engine_model_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -399,7 +399,9 @@ nautilus_search_engine_recent_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -545,7 +545,9 @@ nautilus_search_engine_tracker_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -482,7 +482,9 @@ nautilus_search_engine_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -738,7 +738,9 @@ nautilus_search_popover_get_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......@@ -767,7 +769,9 @@ nautilus_search_popover_set_property (GObject *object,
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
}
......
......@@ -65,7 +65,9 @@ set_special_location (NautilusSpecialLocationBar *bar,
break;
default:
{
g_assert_not_reached ();
}
}
gtk_label_set_text (GTK_LABEL (bar->label), message);
......
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