annotate src/trash.c @ 684:9f00d0d874fa

Save order of Properties dialog tabs to rc file. Users of GTK+ <2.10 can set tabs order directly in the rc file, others can move tabs using drag'n drop. The option is named properties.tabs_order, its default value is "123" which is General, Keywords, Exif tabs (left to right).
author zas_
date Sun, 18 May 2008 21:14:01 +0000
parents 8268cbe682f1
children d897ff542ad9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 143
diff changeset
2 * Geeqie
67
f63ecca6c087 Fri Oct 13 05:22:43 2006 John Ellis <johne@verizon.net>
gqview
parents: 66
diff changeset
3 * (C) 2006 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 448
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 * Author: John Ellis
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
7 *
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
11 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
12
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
13
281
9995c5fb202a gqview.h -> main.h
zas_
parents: 254
diff changeset
14 #include "main.h"
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
15 #include "trash.h"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
16 #include "utilops.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
17
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
18
586
905688aa2317 split filelist.c to filefilter.c and filedata.c
nadvornik
parents: 513
diff changeset
19 #include "filedata.h"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
20 #include "ui_fileops.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
21 #include "ui_misc.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
22
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
23
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
24 /*
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
25 *--------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
26 * Safe Delete
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
27 *--------------------------------------------------------------------------
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
28 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
29
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
30 static gint file_util_safe_number(gint64 free_space)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
31 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
32 gint n = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
33 gint64 total = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
34 GList *list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
35 GList *work;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
36 gint sorted = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
37 gint warned = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
38
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
39 if (!filelist_read(options->file_ops.safe_delete_path, &list, NULL)) return 0;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
40
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
41 work = list;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
42 while (work)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
43 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
44 FileData *fd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
45 gint v;
442
4b2d7f9af171 Big whitespaces cleanup:
zas_
parents: 341
diff changeset
46
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
47 fd = work->data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
48 work = work->next;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
49
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
50 v = (gint)strtol(fd->name, NULL, 10);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
51 if (v >= n) n = v + 1;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
52
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
53 total += fd->size;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
54 }
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
55
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
56 while (options->file_ops.safe_delete_folder_maxsize > 0 && list &&
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
57 (free_space < 0 || total + free_space > (gint64)options->file_ops.safe_delete_folder_maxsize * 1048576) )
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
58 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
59 FileData *fd;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
60
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
61 if (!sorted)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
62 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
63 list = filelist_sort(list, SORT_NAME, TRUE);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
64 sorted = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
65 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
66
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
67 fd = list->data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
68 list = g_list_remove(list, fd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
69
506
fc9c8a3e1a8b Handle the newline in DEBUG_N() macro instead of adding one
zas_
parents: 497
diff changeset
70 DEBUG_1("expunging from trash for space: %s", fd->name);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
71 if (!unlink_file(fd->path) && !warned)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
72 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
73 file_util_warning_dialog(_("Delete failed"),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
74 _("Unable to remove old file from trash folder"),
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
75 GTK_STOCK_DIALOG_WARNING, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
76 warned = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
77 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
78 total -= fd->size;
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 136
diff changeset
79 file_data_unref(fd);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
80 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
81
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
82 filelist_free(list);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
83
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
84 return n;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
85 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
86
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
87 void file_util_trash_clear(void)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
88 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
89 file_util_safe_number(-1);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
90 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
91
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
92 static gchar *file_util_safe_dest(const gchar *path)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
93 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
94 gint n;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
95
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
96 n = file_util_safe_number(filesize(path));
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
97 return g_strdup_printf("%s/%06d_%s", options->file_ops.safe_delete_path, n, filename_from_path(path));
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
98 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
99
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
100 static void file_util_safe_del_toggle_cb(GtkWidget *button, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
101 {
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
102 options->file_ops.safe_delete_enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
103 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
104
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
105 static void file_util_safe_del_close_cb(GtkWidget *dialog, gpointer data)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
106 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
107 GenericDialog **gd = data;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
108
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
109 *gd = NULL;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
110 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
111
600
9c28465c95d1 Tidy up.
zas_
parents: 597
diff changeset
112 gint file_util_safe_unlink(const gchar *path)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
113 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
114 static GenericDialog *gd = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
115 gchar *result = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
116 gint success = TRUE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
117
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
118 if (!isfile(path)) return FALSE;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
119
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
120 if (!isdir(options->file_ops.safe_delete_path))
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
121 {
506
fc9c8a3e1a8b Handle the newline in DEBUG_N() macro instead of adding one
zas_
parents: 497
diff changeset
122 DEBUG_1("creating trash: %s", options->file_ops.safe_delete_path);
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
123 if (!options->file_ops.safe_delete_path || !mkdir_utf8(options->file_ops.safe_delete_path, 0755))
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
124 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
125 result = _("Could not create folder");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
126 success = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
127 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
128 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
129
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
130 if (success)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
131 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
132 gchar *dest;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
133
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
134 dest = file_util_safe_dest(path);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
135 if (dest)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
136 {
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
137 DEBUG_1("safe deleting %s to %s", path, dest);
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
138 success = move_file(path, dest);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
139 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
140 else
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
141 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
142 success = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
143 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
144
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
145 if (!success && !access_file(path, W_OK))
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
146 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
147 result = _("Permission denied");
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
148 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
149 g_free(dest);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
150 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
151
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
152 if (result && !gd)
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
153 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
154 GtkWidget *button;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
155 gchar *buf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
156
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
157 buf = g_strdup_printf(_("Unable to access or create the trash folder.\n\"%s\""), options->file_ops.safe_delete_path);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
158 gd = file_util_warning_dialog(result, buf, GTK_STOCK_DIALOG_WARNING, NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
159 g_free(buf);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
160
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
161 button = gtk_check_button_new_with_label(_("Turn off safe delete"));
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
162 g_signal_connect(G_OBJECT(button), "toggled",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
163 G_CALLBACK(file_util_safe_del_toggle_cb), NULL);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
164 gtk_box_pack_start(GTK_BOX(gd->vbox), button, FALSE, FALSE, 0);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
165 gtk_widget_show(button);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
166
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
167 g_signal_connect(G_OBJECT(gd->dialog), "destroy",
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
168 G_CALLBACK(file_util_safe_del_close_cb), &gd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
169 }
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
170
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
171 return success;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
172 }
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
173
600
9c28465c95d1 Tidy up.
zas_
parents: 597
diff changeset
174 gchar *file_util_safe_delete_status(void)
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
175 {
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
176 gchar *buf;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
177
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 288
diff changeset
178 if (options->editor_command[CMD_DELETE])
223
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
179 {
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
180 buf = g_strdup(_("Deletion by external command"));
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
181 }
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
182 else
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
183 {
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
184 if (options->file_ops.safe_delete_enable)
223
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
185 {
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
186 gchar *buf2;
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
187 if (options->file_ops.safe_delete_folder_maxsize > 0)
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
188 buf2 = g_strdup_printf(_(" (max. %d MB)"), options->file_ops.safe_delete_folder_maxsize);
223
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
189 else
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
190 buf2 = g_strdup("");
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
191
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 318
diff changeset
192 buf = g_strdup_printf(_("Safe delete: %s%s\nTrash: %s"), _("on"), buf2, options->file_ops.safe_delete_path);
223
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
193 g_free(buf2);
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
194 }
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
195 else
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
196 {
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
197 buf = g_strdup_printf(_("Safe delete: %s"), _("off"));
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
198 }
73efc1ba150f Setting no limit size to trash directory is now possible using zero as value.
zas_
parents: 196
diff changeset
199 }
597
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
200
5da092a6a92a moved safe delete functions to separate file
nadvornik
parents: 596
diff changeset
201 return buf;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 3
diff changeset
202 }