diff options
author | rbuj <[email protected]> | 2020-12-26 11:19:59 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-01-07 18:10:25 +0100 |
commit | 7c58d22450c00649e0ff96cf10b26bcdccbc67e6 (patch) | |
tree | 334cbfe8ee48403388d816c5741ef0946acc43aa /mate-panel/libpanel-util | |
parent | 9977c91b407f65ad3f3777b984155a35dc880096 (diff) | |
download | mate-panel-7c58d22450c00649e0ff96cf10b26bcdccbc67e6.tar.bz2 mate-panel-7c58d22450c00649e0ff96cf10b26bcdccbc67e6.tar.xz |
Local variable shadows outer variable warning reported by cppcheck
Diffstat (limited to 'mate-panel/libpanel-util')
-rw-r--r-- | mate-panel/libpanel-util/panel-icon-chooser.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/mate-panel/libpanel-util/panel-icon-chooser.c b/mate-panel/libpanel-util/panel-icon-chooser.c index 44d64908..e9f0c2ec 100644 --- a/mate-panel/libpanel-util/panel-icon-chooser.c +++ b/mate-panel/libpanel-util/panel-icon-chooser.c @@ -357,7 +357,6 @@ _panel_icon_chooser_clicked (GtkButton *button) GtkWidget *filechooser; GtkWidget *toplevel; GtkWindow *parent; - char *path; gboolean filechooser_path_set; if (chooser->priv->filechooser) { @@ -382,15 +381,11 @@ _panel_icon_chooser_clicked (GtkButton *button) panel_gtk_file_chooser_add_image_preview (GTK_FILE_CHOOSER (filechooser)); - path = g_build_filename (DATADIR, "icons", NULL); gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (filechooser), - path, NULL); - g_free (path); + DATADIR "/icons", NULL); - path = g_build_filename (DATADIR, "pixmaps", NULL); gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (filechooser), - path, NULL); - g_free (path); + DATADIR "/pixmaps", NULL); filechooser_path_set = FALSE; @@ -428,14 +423,11 @@ _panel_icon_chooser_clicked (GtkButton *button) } if (!filechooser_path_set) { - char *path; /* FIXME? Use current icon theme? But there might not be a lot * of icons there... */ - path = g_build_filename (DATADIR, "icons", NULL); gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filechooser), - path); - g_free (path); + DATADIR "/icons"); } gtk_window_set_destroy_with_parent (GTK_WINDOW (filechooser), TRUE); |