diff options
author | rbuj <[email protected]> | 2021-02-06 12:39:43 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-03-10 22:54:40 +0100 |
commit | 3d298032b8f357231faca55265299b323b38f05a (patch) | |
tree | b8a0a111ef2392d17b5372b9ce3de1a607e6bb52 /src/caja-file-management-properties.c | |
parent | 888b9f76ed309a0739d39dc5113cebb35f16aa33 (diff) | |
download | caja-3d298032b8f357231faca55265299b323b38f05a.tar.bz2 caja-3d298032b8f357231faca55265299b323b38f05a.tar.xz |
cppcheck warning: Local variable 'combo_box' shadows outer argument
Diffstat (limited to 'src/caja-file-management-properties.c')
-rw-r--r-- | src/caja-file-management-properties.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index 25f45ade..3c702cc3 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -357,25 +357,18 @@ icon_captions_changed_callback (GtkComboBox *combo_box, int i; builder = GTK_BUILDER (user_data); - captions = g_ptr_array_new (); for (i = 0; icon_captions_components[i] != NULL; i++) { - GtkWidget *combo_box; - int active; + GObject *object; GPtrArray *column_names; - char *name; - - combo_box = GTK_WIDGET (gtk_builder_get_object - (builder, icon_captions_components[i])); - active = gtk_combo_box_get_active (GTK_COMBO_BOX (combo_box)); - - column_names = g_object_get_data (G_OBJECT (combo_box), - "column_names"); + int active; - name = g_ptr_array_index (column_names, active); - g_ptr_array_add (captions, name); + object = gtk_builder_get_object (builder, icon_captions_components[i]); + column_names = g_object_get_data (object, "column_names"); + active = gtk_combo_box_get_active (GTK_COMBO_BOX(object)); + g_ptr_array_add (captions, g_ptr_array_index (column_names, active)); } g_ptr_array_add (captions, NULL); |