Renames variables to avoid conflicting with C++ keywords.
authorOmari Stephens <xsdg@xsdg.org>
Mon, 30 May 2022 06:39:12 +0000 (06:39 +0000)
committerColin Clark <colin.clark@cclark.uk>
Mon, 8 Aug 2022 14:47:59 +0000 (15:47 +0100)
14 files changed:
src/cellrenderericon.c
src/dupe.c
src/image-load.c
src/layout_image.c
src/osd.c
src/pixbuf-renderer.c
src/remote.c
src/search.c
src/ui_bookmark.c
src/ui_pathsel.c
src/utilops.c
src/view_dir.c
src/view_dir_list.c
src/view_file/view_file_list.c

index 9fd996c..5a3eb87 100644 (file)
@@ -38,7 +38,7 @@ static void gqv_cell_renderer_icon_set_property(GObject               *object,
 static void gqv_cell_renderer_icon_init_wrapper(void *, void *);
 static void gqv_cell_renderer_icon_init(GQvCellRendererIcon *celltext);
 static void gqv_cell_renderer_icon_class_init_wrapper(void *, void *);
-static void gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *class);
+static void gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *icon_class);
 static void gqv_cell_renderer_icon_finalize(GObject *object);
 static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
                                            GtkWidget          *widget,
@@ -139,12 +139,12 @@ gqv_cell_renderer_icon_class_init_wrapper(void *data, void *UNUSED(user_data))
 }
 
 static void
-gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *class)
+gqv_cell_renderer_icon_class_init(GQvCellRendererIconClass *icon_class)
 {
-       GObjectClass *object_class = G_OBJECT_CLASS(class);
-       GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class);
+       GObjectClass *object_class = G_OBJECT_CLASS(icon_class);
+       GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(icon_class);
 
-       parent_class = g_type_class_peek_parent(class);
+       parent_class = g_type_class_peek_parent(icon_class);
 
        object_class->finalize = gqv_cell_renderer_icon_finalize;
 
index 5a5e870..008fa12 100644 (file)
@@ -1173,27 +1173,27 @@ static void dupe_match_reset_list(GList *work)
                }
 }
 
-static void dupe_match_reparent(DupeWindow *dw, DupeItem *old, DupeItem *new)
+static void dupe_match_reparent(DupeWindow *dw, DupeItem *old_parent, DupeItem *new_parent)
 {
        GList *work;
 
-       if (!old || !new || !dupe_match_link_exists(old, new)) return;
+       if (!old_parent || !new_parent || !dupe_match_link_exists(old_parent, new_parent)) return;
 
-       dupe_match_link_clear(new, TRUE);
-       work = old->group;
+       dupe_match_link_clear(new_parent, TRUE);
+       work = old_parent->group;
        while (work)
                {
                DupeMatch *dm = work->data;
-               dupe_match_unlink_child(old, dm->di);
-               dupe_match_link_child(new, dm->di, dm->rank);
+               dupe_match_unlink_child(old_parent, dm->di);
+               dupe_match_link_child(new_parent, dm->di, dm->rank);
                work = work->next;
                }
 
-       new->group = old->group;
-       old->group = NULL;
+       new_parent->group = old_parent->group;
+       old_parent->group = NULL;
 
-       work = g_list_find(dw->dupes, old);
-       if (work) work->data = new;
+       work = g_list_find(dw->dupes, old_parent);
+       if (work) work->data = new_parent;
 }
 
 static void dupe_match_print_group(DupeItem *di)
index 49af0f7..403c860 100644 (file)
@@ -68,7 +68,7 @@ static guint signals[SIGNAL_COUNT] = { 0 };
 
 static void image_loader_init(GTypeInstance *instance, gpointer g_class);
 static void image_loader_class_init_wrapper(void *data, void *user_data);
-static void image_loader_class_init(ImageLoaderClass *class);
+static void image_loader_class_init(ImageLoaderClass *loader_class);
 static void image_loader_finalize(GObject *object);
 static void image_loader_stop(ImageLoader *il);
 
@@ -135,9 +135,9 @@ static void image_loader_class_init_wrapper(void *data, void *UNUSED(user_data))
        image_loader_class_init(data);
 }
 
-static void image_loader_class_init(ImageLoaderClass *class)
+static void image_loader_class_init(ImageLoaderClass *loader_class)
 {
-       GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+       GObjectClass *gobject_class = G_OBJECT_CLASS (loader_class);
 
 //     gobject_class->set_property = image_loader_set_property;
 //     gobject_class->get_property = image_loader_get_property;
index 163df6c..255a2f0 100644 (file)
@@ -1785,9 +1785,12 @@ void layout_image_first(LayoutWindow *lw)
 
        if (cd && info)
                {
-               CollectInfo *new;
-               new = collection_get_first(cd);
-               if (new != info) layout_image_set_collection_real(lw, cd, new, TRUE);
+               CollectInfo *first_collection;
+               first_collection = collection_get_first(cd);
+               if (first_collection != info)
+                       {
+                       layout_image_set_collection_real(lw, cd, first_collection, TRUE);
+                        }
                return;
                }
 
@@ -1811,9 +1814,12 @@ void layout_image_last(LayoutWindow *lw)
 
        if (cd && info)
                {
-               CollectInfo *new;
-               new = collection_get_last(cd);
-               if (new != info) layout_image_set_collection_real(lw, cd, new, FALSE);
+               CollectInfo *last_collection;
+               last_collection = collection_get_last(cd);
+               if (last_collection != info)
+                       {
+                       layout_image_set_collection_real(lw, cd, last_collection, FALSE);
+                        }
                return;
                }
 
@@ -2432,14 +2438,14 @@ static void layout_image_maint_removed(LayoutWindow *lw, FileData *fd)
                cd = image_get_collection(lw->image, &info);
                if (cd && info)
                        {
-                       CollectInfo *new;
+                       CollectInfo *next_collection;
 
-                       new = collection_next_by_info(cd, info);
-                       if (!new) new = collection_prev_by_info(cd, info);
+                       next_collection = collection_next_by_info(cd, info);
+                       if (!next_collection) next_collection = collection_prev_by_info(cd, info);
 
-                       if (new)
+                       if (next_collection)
                                {
-                               layout_image_set_collection(lw, cd, new);
+                               layout_image_set_collection(lw, cd, next_collection);
                                return;
                                }
                        layout_image_set_fd(lw, NULL);
index 492face..fb986b9 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -248,12 +248,12 @@ gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
        guint pos, prev;
        gboolean want_separator = FALSE;
        gchar *name, *data;
-       GString *new;
+       GString *osd_info;
        gchar *ret;
 
        if (!str || !*str) return g_strdup("");
 
-       new = g_string_new(str);
+       osd_info = g_string_new(str);
 
        prev = -1;
 
@@ -266,7 +266,7 @@ gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
                gchar *extrapos = NULL;
                gchar *p;
 
-               start = strchr(new->str + (prev + 1), delim);
+               start = strchr(osd_info->str + (prev + 1), delim);
                if (!start)
                        break;
                end = strchr(start+1, delim);
@@ -301,7 +301,7 @@ gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
                        extra = g_strndup(extrapos, end - extrapos);
 
                name = g_strndup(start+1, (trunc ? trunc : end)-start-1);
-               pos = start - new->str;
+               pos = start - osd_info->str;
                data = NULL;
 
                if (strcmp(name, "keywords") == 0)
@@ -407,30 +407,30 @@ gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
                        g_free(extra);
                        }
 
-               g_string_erase(new, pos, end-start+1);
+               g_string_erase(osd_info, pos, end-start+1);
                if (data && *data)
                        {
                        if (want_separator)
                                {
                                /* insert separator */
-                               g_string_insert(new, pos, sep);
+                               g_string_insert(osd_info, pos, sep);
                                pos += strlen(sep);
                                want_separator = FALSE;
                                }
 
-                       g_string_insert(new, pos, data);
+                       g_string_insert(osd_info, pos, data);
                        pos += strlen(data);
                }
 
-               if (pos-prev >= 1 && new->str[pos] == imp)
+               if (pos-prev >= 1 && osd_info->str[pos] == imp)
                        {
                        /* pipe character is replaced by a separator, delete it
                         * and raise a flag if needed */
-                       g_string_erase(new, pos--, 1);
+                       g_string_erase(osd_info, pos--, 1);
                        want_separator |= (data && *data);
                        }
 
-               if (new->str[pos] == '\n') want_separator = FALSE;
+               if (osd_info->str[pos] == '\n') want_separator = FALSE;
 
                prev = pos - 1;
 
@@ -439,19 +439,19 @@ gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
                }
 
        /* search and destroy empty lines */
-       end = new->str;
+       end = osd_info->str;
        while ((start = strchr(end, '\n')))
                {
                end = start;
                while (*++(end) == '\n')
                        ;
-               g_string_erase(new, start-new->str, end-start-1);
+               g_string_erase(osd_info, start-osd_info->str, end-start-1);
                }
 
-       g_strchomp(new->str);
+       g_strchomp(osd_info->str);
 
-       ret = new->str;
-       g_string_free(new, FALSE);
+       ret = osd_info->str;
+       g_string_free(osd_info, FALSE);
 
        return ret;
 }
index f2eb176..97efde8 100644 (file)
@@ -122,7 +122,7 @@ static GtkEventBoxClass *parent_class = NULL;
 
 
 
-static void pixbuf_renderer_class_init(PixbufRendererClass *class);
+static void pixbuf_renderer_class_init(PixbufRendererClass *renderer_class);
 static void pixbuf_renderer_init(PixbufRenderer *pr);
 static void pixbuf_renderer_finalize(GObject *object);
 static void pixbuf_renderer_set_property(GObject *object, guint prop_id,
@@ -185,11 +185,11 @@ GType pixbuf_renderer_get_type(void)
        return pixbuf_renderer_type;
 }
 
-static void pixbuf_renderer_class_init(PixbufRendererClass *class)
+static void pixbuf_renderer_class_init(PixbufRendererClass *renderer_class)
 {
-       GObjectClass *gobject_class = G_OBJECT_CLASS(class);
+       GObjectClass *gobject_class = G_OBJECT_CLASS(renderer_class);
 
-       parent_class = g_type_class_peek_parent(class);
+       parent_class = g_type_class_peek_parent(renderer_class);
 
        gobject_class->set_property = pixbuf_renderer_set_property;
        gobject_class->get_property = pixbuf_renderer_get_property;
@@ -1667,7 +1667,7 @@ static gboolean pr_zoom_clamp(PixbufRenderer *pr, gdouble zoom,
        gint w, h;
        gdouble scale;
        gboolean force = !!(flags & PR_ZOOM_FORCE);
-       gboolean new = !!(flags & PR_ZOOM_NEW);
+       gboolean new_z = !!(flags & PR_ZOOM_NEW);
 
        zoom = CLAMP(zoom, pr->zoom_min, pr->zoom_max);
 
@@ -1686,7 +1686,7 @@ static gboolean pr_zoom_clamp(PixbufRenderer *pr, gdouble zoom,
                gint max_h;
                gboolean sizeable;
 
-               sizeable = (new && pr_parent_window_sizable(pr));
+               sizeable = (new_z && pr_parent_window_sizable(pr));
 
                if (sizeable)
                        {
@@ -1777,7 +1777,7 @@ static void pr_zoom_sync(PixbufRenderer *pr, gdouble zoom,
        gint old_cx, old_cy;
        gboolean center_point = !!(flags & PR_ZOOM_CENTER);
        gboolean force = !!(flags & PR_ZOOM_FORCE);
-       gboolean new = !!(flags & PR_ZOOM_NEW);
+       gboolean new_z = !!(flags & PR_ZOOM_NEW);
        gboolean lazy = !!(flags & PR_ZOOM_LAZY);
        PrZoomFlags clamp_flags = flags;
        gdouble old_center_x = pr->norm_center_x;
@@ -1804,7 +1804,7 @@ static void pr_zoom_sync(PixbufRenderer *pr, gdouble zoom,
        (void) pr_size_clamp(pr);
        (void) pr_parent_window_resize(pr, pr->width, pr->height);
 
-       if (force && new)
+       if (force && new_z)
                {
                switch (pr->scroll_reset)
                        {
index 1046ea7..4556d35 100644 (file)
@@ -833,7 +833,7 @@ static void gr_render_intent(const gchar *UNUSED(text), GIOChannel *channel, gpo
 static void get_filelist(const gchar *text, GIOChannel *channel, gboolean recurse)
 {
        GList *list = NULL;
-       FileFormatClass class;
+       FileFormatClass format_class;
        FileData *dir_fd;
        FileData *fd;
        GString *out_string = g_string_new(NULL);
@@ -880,9 +880,9 @@ static void get_filelist(const gchar *text, GIOChannel *channel, gboolean recurs
                {
                fd = work->data;
                g_string_append_printf(out_string, "%s", fd->path);
-               class = filter_file_get_class(fd->path);
+               format_class = filter_file_get_class(fd->path);
 
-               switch (class)
+               switch (format_class)
                        {
                        case FORMAT_CLASS_IMAGE:
                                out_string = g_string_append(out_string, "    Class: Image");
@@ -1249,7 +1249,7 @@ static void gr_list_clear(const gchar *UNUSED(text), GIOChannel *UNUSED(channel)
 static void gr_list_add(const gchar *text, GIOChannel *UNUSED(channel), gpointer data)
 {
        RemoteData *remote_data = data;
-       gboolean new = TRUE;
+       gboolean is_new = TRUE;
        gchar *path = NULL;
        FileData *fd;
        FileData *first;
@@ -1312,13 +1312,13 @@ static void gr_list_add(const gchar *text, GIOChannel *UNUSED(channel), gpointer
                }
        else if (!remote_data->single_dir)
                {
-               new = (!collection_get_first(remote_data->command_collection));
+               is_new = (!collection_get_first(remote_data->command_collection));
                }
 
        if (!remote_data->single_dir)
                {
                layout_image_set_collection(lw_id, remote_data->command_collection, collection_get_first(remote_data->command_collection));
-               if (collection_add(remote_data->command_collection, file_data_new_group(text), FALSE) && new)
+               if (collection_add(remote_data->command_collection, file_data_new_group(text), FALSE) && is_new)
                        {
                        layout_image_set_collection(lw_id, remote_data->command_collection, collection_get_first(remote_data->command_collection));
                        }
index 311e1fb..43bcf8f 100644 (file)
@@ -2254,7 +2254,7 @@ static gboolean search_file_next(SearchData *sd)
                {
                tested = TRUE;
                match = FALSE;
-               FileFormatClass class;
+               FileFormatClass format_class;
                FileFormatClass search_class;
 
                if (g_strcmp0(gtk_combo_box_text_get_active_text(
@@ -2294,14 +2294,14 @@ static gboolean search_file_next(SearchData *sd)
 
                if (search_class != FORMAT_CLASS_BROKEN)
                        {
-                       class = fd->format_class;
+                       format_class = fd->format_class;
                        if (sd->match_class == SEARCH_MATCH_EQUAL)
                                {
-                               match = (class == search_class);
+                               match = (format_class == search_class);
                                }
                        else if (sd->match_class == SEARCH_MATCH_NONE)
                                {
-                               match = (class != search_class);
+                               match = (format_class != search_class);
                                }
                        }
                else
index fe3f18a..f2f7472 100644 (file)
@@ -237,28 +237,28 @@ static void bookmark_edit_ok_cb(GenericDialog *UNUSED(gd), gpointer data)
        const gchar *name;
        gchar *path;
        const gchar *icon;
-       gchar *new;
+       gchar *new_string;
 
        name = gtk_entry_get_text(GTK_ENTRY(p->name_entry));
        path = remove_trailing_slash(gtk_entry_get_text(GTK_ENTRY(p->path_entry)));
        icon = gtk_entry_get_text(GTK_ENTRY(p->icon_entry));
 
-       new = bookmark_string(name, path, icon);
+       new_string = bookmark_string(name, path, icon);
 
        if (p->bb->key)
                {
-               history_list_item_change(p->bb->parent, p->bb->key, new);
+               history_list_item_change(p->bb->parent, p->bb->key, new_string);
                }
        else
                {
-               history_list_add_to_key(p->bb->parent, new, 0);
+               history_list_add_to_key(p->bb->parent, new_string, 0);
                }
 
        if (path && strlen(path) > 0) tab_completion_append_to_history(p->path_entry, path);
        if (icon && strlen(icon) > 0) tab_completion_append_to_history(p->icon_entry, icon);
 
        g_free(path);
-       g_free(new);
+       g_free(new_string);
 
        bookmark_populate_all(p->bb->parent);
 }
index cbd05f8..ab05944 100644 (file)
@@ -408,7 +408,7 @@ static void dest_view_store_selection(Dest_Data *dd, GtkTreeView *view)
        dd->right_click_path = gtk_tree_model_get_path(model, &iter);
 }
 
-static gint dest_view_rename_cb(TreeEditData *ted, const gchar *old, const gchar *new, gpointer data)
+static gint dest_view_rename_cb(TreeEditData *ted, const gchar *old_name, const gchar *new_name, gpointer data)
 {
        Dest_Data *dd = data;
        GtkTreeModel *model;
@@ -424,18 +424,18 @@ static gint dest_view_rename_cb(TreeEditData *ted, const gchar *old, const gchar
        if (!old_path) return FALSE;
 
        buf = remove_level_from_path(old_path);
-       new_path = g_build_filename(buf, new, NULL);
+       new_path = g_build_filename(buf, new_name, NULL);
        g_free(buf);
 
        if (isname(new_path))
                {
-               buf = g_strdup_printf(_("A file with name %s already exists."), new);
+               buf = g_strdup_printf(_("A file with name %s already exists."), new_name);
                warning_dialog(_("Rename failed"), buf, GTK_STOCK_DIALOG_INFO, dd->entry);
                g_free(buf);
                }
        else if (!rename_file(old_path, new_path))
                {
-               buf = g_strdup_printf(_("Failed to rename %s to %s."), old, new);
+               buf = g_strdup_printf(_("Failed to rename %s to %s."), old_name, new_name);
                warning_dialog(_("Rename failed"), buf, GTK_STOCK_DIALOG_ERROR, dd->entry);
                g_free(buf);
                }
@@ -443,7 +443,7 @@ static gint dest_view_rename_cb(TreeEditData *ted, const gchar *old, const gchar
                {
                const gchar *text;
 
-               gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, new, 1, new_path, -1);
+               gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, new_name, 1, new_path, -1);
 
                text = gtk_entry_get_text(GTK_ENTRY(dd->entry));
                if (text && old_path && strcmp(text, old_path) == 0)
index ffe6524..8ab703a 100644 (file)
@@ -3119,9 +3119,9 @@ void file_util_copy_path_to_clipboard(FileData *fd, gboolean quoted)
 void file_util_copy_path_list_to_clipboard(GList *list, gboolean quoted)
 {
        GList *work;
-       GString *new;
+       GString *path_list_str;
 
-       new = g_string_new("");
+       path_list_str = g_string_new("");
        work = list;
        while (work) {
                FileData *fd = work->data;
@@ -3131,30 +3131,30 @@ void file_util_copy_path_list_to_clipboard(GList *list, gboolean quoted)
 
                if (quoted)
                        {
-                       g_string_append(new, g_shell_quote(fd->path));
+                       g_string_append(path_list_str, g_shell_quote(fd->path));
                        }
                else
                        {
-                       g_string_append(new, fd->path);
+                       g_string_append(path_list_str, fd->path);
                        }
-               if (work) g_string_append_c(new, ' ');
+               if (work) g_string_append_c(path_list_str, ' ');
                }
 
        if (options->clipboard_selection == CLIPBOARD_PRIMARY)
                {
-               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), new->str, new->len);
+               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), path_list_str->str, path_list_str->len);
                }
        else if  (options->clipboard_selection == CLIPBOARD_CLIPBOARD)
                {
-               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), new->str, new->len);
+               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), path_list_str->str, path_list_str->len);
                }
        else
                {
-               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), new->str, new->len);
-               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), new->str, new->len);
+               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), path_list_str->str, path_list_str->len);
+               gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), path_list_str->str, path_list_str->len);
                }
 
-       g_string_free(new, TRUE);
+       g_string_free(path_list_str, TRUE);
        filelist_free(list);
 }
 
index 0da221b..28c3ad8 100644 (file)
@@ -267,7 +267,7 @@ static void vd_rename_finished_cb(gboolean success, const gchar *new_path, gpoin
                }
 }
 
-static gboolean vd_rename_cb(TreeEditData *td, const gchar *UNUSED(old), const gchar *new, gpointer data)
+static gboolean vd_rename_cb(TreeEditData *td, const gchar *UNUSED(old_name), const gchar *new_name, gpointer data)
 {
        ViewDir *vd = data;
        FileData *fd;
@@ -278,7 +278,7 @@ static gboolean vd_rename_cb(TreeEditData *td, const gchar *UNUSED(old), const g
        if (!fd) return FALSE;
 
        base = remove_level_from_path(fd->path);
-       new_path = g_build_filename(base, new, NULL);
+       new_path = g_build_filename(base, new_name, NULL);
        g_free(base);
 
        file_util_rename_dir(fd, new_path, vd->view, vd_rename_finished_cb, vd);
index 5224890..78f85a5 100644 (file)
@@ -259,18 +259,18 @@ static gboolean vdlist_populate(ViewDir *vd, gboolean clear)
 
                        if (match < 0)
                                {
-                               GtkTreeIter new;
+                               GtkTreeIter new_iter;
 
                                if (valid)
                                        {
-                                       gtk_list_store_insert_before(store, &new, &iter);
+                                       gtk_list_store_insert_before(store, &new_iter, &iter);
                                        }
                                else
                                        {
-                                       gtk_list_store_append(store, &new);
+                                       gtk_list_store_append(store, &new_iter);
                                        }
 
-                               gtk_list_store_set(store, &new,
+                               gtk_list_store_set(store, &new_iter,
                                                   DIR_COLUMN_POINTER, fd,
                                                   DIR_COLUMN_ICON, pixbuf,
                                                   DIR_COLUMN_NAME, fd->name,
index 7bf7a68..e2b1687 100644 (file)
@@ -81,7 +81,7 @@ enum {
 
 
 static gboolean vflist_row_is_selected(ViewFile *vf, FileData *fd);
-static gboolean vflist_row_rename_cb(TreeEditData *td, const gchar *old, const gchar *new, gpointer data);
+static gboolean vflist_row_rename_cb(TreeEditData *td, const gchar *old_name, const gchar *new_name, gpointer data);
 static void vflist_populate_view(ViewFile *vf, gboolean force);
 static gboolean vflist_is_multiline(ViewFile *vf);
 static void vflist_set_expanded(ViewFile *vf, GtkTreeIter *iter, gboolean expanded);
@@ -501,24 +501,24 @@ void vflist_popup_destroy_cb(GtkWidget *UNUSED(widget), gpointer data)
  *-----------------------------------------------------------------------------
  */
 
-static gboolean vflist_row_rename_cb(TreeEditData *UNUSED(td), const gchar *old, const gchar *new, gpointer data)
+static gboolean vflist_row_rename_cb(TreeEditData *UNUSED(td), const gchar *old_name, const gchar *new_name, gpointer data)
 {
        ViewFile *vf = data;
        gchar *new_path;
 
-       if (!new || !new[0]) return FALSE;
+       if (!new_name || !new_name[0]) return FALSE;
 
-       new_path = g_build_filename(vf->dir_fd->path, new, NULL);
+       new_path = g_build_filename(vf->dir_fd->path, new_name, NULL);
 
-       if (strchr(new, G_DIR_SEPARATOR) != NULL)
+       if (strchr(new_name, G_DIR_SEPARATOR) != NULL)
                {
-               gchar *text = g_strdup_printf(_("Invalid file name:\n%s"), new);
+               gchar *text = g_strdup_printf(_("Invalid file name:\n%s"), new_name);
                file_util_warning_dialog(_("Error renaming file"), text, GTK_STOCK_DIALOG_ERROR, vf->listview);
                g_free(text);
                }
        else
                {
-               gchar *old_path = g_build_filename(vf->dir_fd->path, old, NULL);
+               gchar *old_path = g_build_filename(vf->dir_fd->path, old_name, NULL);
                FileData *fd = file_data_new_group(old_path); /* get the fd from cache */
                file_util_rename_simple(fd, new_path, vf->listview);
                file_data_unref(fd);
@@ -1027,12 +1027,12 @@ static void vflist_setup_iter_recursive(ViewFile *vf, GtkTreeStore *store, GtkTr
 
                        if (match < 0)
                                {
-                               GtkTreeIter new;
+                               GtkTreeIter new_iter;
 
                                if (valid)
                                        {
                                        num_ordered++;
-                                       gtk_tree_store_insert_before(store, &new, parent_iter, &iter);
+                                       gtk_tree_store_insert_before(store, &new_iter, parent_iter, &iter);
                                        }
                                else
                                        {
@@ -1041,18 +1041,18 @@ static void vflist_setup_iter_recursive(ViewFile *vf, GtkTreeStore *store, GtkTr
                                            and it seems to be much faster to add new entries to the beginning and reorder later
                                        */
                                        num_prepended++;
-                                       gtk_tree_store_prepend(store, &new, parent_iter);
+                                       gtk_tree_store_prepend(store, &new_iter, parent_iter);
                                        }
 
-                               vflist_setup_iter(vf, store, &new, file_data_ref(fd));
-                               vflist_setup_iter_recursive(vf, store, &new, fd->sidecar_files, selected, force);
+                               vflist_setup_iter(vf, store, &new_iter, file_data_ref(fd));
+                               vflist_setup_iter_recursive(vf, store, &new_iter, fd->sidecar_files, selected, force);
 
                                if (g_list_find(selected, fd))
                                        {
                                        /* renamed files - the same fd appears at different position - select it again*/
                                        GtkTreeSelection *selection;
                                        selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(vf->listview));
-                                       gtk_tree_selection_select_iter(selection, &new);
+                                       gtk_tree_selection_select_iter(selection, &new_iter);
                                        }
 
                                done = TRUE;