summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--caja/caja-engrampa.c20
-rw-r--r--src/actions.c2
-rw-r--r--src/dlg-add-files.c6
-rw-r--r--src/fr-window.c10
4 files changed, 13 insertions, 25 deletions
diff --git a/caja/caja-engrampa.c b/caja/caja-engrampa.c
index 3113394..5001ff9 100644
--- a/caja/caja-engrampa.c
+++ b/caja/caja-engrampa.c
@@ -39,26 +39,21 @@ extract_to_callback (CajaMenuItem *item,
gpointer user_data)
{
GList *files, *scan;
- CajaFileInfo *file;
char *default_dir;
char *quoted_default_dir;
GString *cmd;
files = g_object_get_data (G_OBJECT (item), "files");
- file = files->data;
-
- default_dir = caja_file_info_get_parent_uri (file);
-
+ default_dir = caja_file_info_get_parent_uri (files->data);
quoted_default_dir = g_shell_quote (default_dir);
cmd = g_string_new ("engrampa");
g_string_append_printf(cmd," --default-dir=%s --extract", quoted_default_dir);
for (scan = files; scan; scan = scan->next) {
- CajaFileInfo *file = scan->data;
- char *uri, *quoted_uri;
+ char *uri, *quoted_uri;
- uri = caja_file_info_get_uri (file);
+ uri = caja_file_info_get_uri (scan->data);
quoted_uri = g_shell_quote (uri);
g_string_append_printf (cmd, " %s", quoted_uri);
g_free (uri);
@@ -114,15 +109,12 @@ add_callback (CajaMenuItem *item,
gpointer user_data)
{
GList *files, *scan;
- CajaFileInfo *file;
char *uri, *dir;
char *quoted_uri, *quoted_dir;
GString *cmd;
files = g_object_get_data (G_OBJECT (item), "files");
- file = files->data;
-
- uri = caja_file_info_get_uri (file);
+ uri = caja_file_info_get_uri (files->data);
dir = g_path_get_dirname (uri);
quoted_dir = g_shell_quote (dir);
@@ -134,9 +126,7 @@ add_callback (CajaMenuItem *item,
g_free (quoted_dir);
for (scan = files; scan; scan = scan->next) {
- CajaFileInfo *file = scan->data;
-
- uri = caja_file_info_get_uri (file);
+ uri = caja_file_info_get_uri (scan->data);
quoted_uri = g_shell_quote (uri);
g_string_append_printf (cmd, " %s", quoted_uri);
g_free (uri);
diff --git a/src/actions.c b/src/actions.c
index cad7a7a..bbb88f1 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -224,9 +224,9 @@ get_archive_filename_from_selector (DlgNewData *data)
debug (DEBUG_INFO, "create/save %s\n", uri);
if (uri_exists (uri)) {
- GtkWidget *dialog;
if (! is_supported_extension (data->dialog, uri, data->supported_types)) {
+ GtkWidget *dialog;
dialog = _gtk_error_dialog_new (GTK_WINDOW (data->dialog),
GTK_DIALOG_MODAL,
NULL,
diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c
index 49b0382..fed6ed8 100644
--- a/src/dlg-add-files.c
+++ b/src/dlg-add-files.c
@@ -116,10 +116,8 @@ file_sel_response_cb (GtkWidget *widget,
/**/
selections = gtk_file_chooser_get_uris (file_sel);
- for (iter = selections; iter != NULL; iter = iter->next) {
- char *uri = iter->data;
- item_list = g_list_prepend (item_list, g_file_new_for_uri (uri));
- }
+ for (iter = selections; iter != NULL; iter = iter->next)
+ item_list = g_list_prepend (item_list, g_file_new_for_uri (iter->data));
if (item_list != NULL)
fr_window_archive_add_files (window, item_list, update);
diff --git a/src/fr-window.c b/src/fr-window.c
index 69a6de1..ee296ce 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -4932,7 +4932,7 @@ add_file_list_columns (FrWindow *window,
/* Other columns */
for (j = 0, i = COLUMN_SIZE; i < NUMBER_OF_COLUMNS; i++, j++) {
- GValue value = { 0, };
+ GValue value_oc = { 0, };
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (g_dpgettext2 (NULL, "File", titles[j]),
@@ -4946,10 +4946,10 @@ add_file_list_columns (FrWindow *window,
gtk_tree_view_column_set_sort_column_id (column, i);
- g_value_init (&value, PANGO_TYPE_ELLIPSIZE_MODE);
- g_value_set_enum (&value, PANGO_ELLIPSIZE_END);
- g_object_set_property (G_OBJECT (renderer), "ellipsize", &value);
- g_value_unset (&value);
+ g_value_init (&value_oc, PANGO_TYPE_ELLIPSIZE_MODE);
+ g_value_set_enum (&value_oc, PANGO_ELLIPSIZE_END);
+ g_object_set_property (G_OBJECT (renderer), "ellipsize", &value_oc);
+ g_value_unset (&value_oc);
gtk_tree_view_append_column (treeview, column);
}