Mercurial > geeqie.yaz
comparison src/utilops.c @ 223:73efc1ba150f
Setting no limit size to trash directory is now possible using zero as value.
A tooltip was added to the spinner to inform the user of this possibility.
When 0 is set, no remaining/free space check occurs.
Default size of the trash was set to a 128M and maximum size is now 2048MB, which
is more conform to today's standards.
The delete dialog now displays more information:
- if external command will be used
- if safe delete is on, max size and path to the trash
- if safe delete is off
author | zas_ |
---|---|
date | Thu, 03 Apr 2008 08:51:32 +0000 |
parents | f6e307c7bad6 |
children | 9faf34f047b1 |
comparison
equal
deleted
inserted
replaced
222:77f1bcc6c161 | 223:73efc1ba150f |
---|---|
1318 if (v >= n) n = v + 1; | 1318 if (v >= n) n = v + 1; |
1319 | 1319 |
1320 total += fd->size; | 1320 total += fd->size; |
1321 } | 1321 } |
1322 | 1322 |
1323 while (list && | 1323 while (safe_delete_size > 0 && list && |
1324 (free_space < 0 || total + free_space > (gint64)safe_delete_size * 1048576) ) | 1324 (free_space < 0 || total + free_space > (gint64)safe_delete_size * 1048576) ) |
1325 { | 1325 { |
1326 FileData *fd; | 1326 FileData *fd; |
1327 | 1327 |
1328 if (!sorted) | 1328 if (!sorted) |
1447 static void box_append_safe_delete_status(GenericDialog *gd) | 1447 static void box_append_safe_delete_status(GenericDialog *gd) |
1448 { | 1448 { |
1449 GtkWidget *label; | 1449 GtkWidget *label; |
1450 gchar *buf; | 1450 gchar *buf; |
1451 | 1451 |
1452 buf = g_strdup_printf(_("Safe delete: %s"), (safe_delete_enable) ? _("on") : _("off")); | 1452 if (editor_command[CMD_DELETE]) |
1453 { | |
1454 buf = g_strdup(_("Deletion by external command")); | |
1455 } | |
1456 else | |
1457 { | |
1458 if (safe_delete_enable) | |
1459 { | |
1460 gchar *buf2; | |
1461 if (safe_delete_size > 0) | |
1462 buf2 = g_strdup_printf(_(" (max. %d MB)"), safe_delete_size); | |
1463 else | |
1464 buf2 = g_strdup(""); | |
1465 | |
1466 buf = g_strdup_printf(_("Safe delete: %s%s\nTrash: %s"), _("on"), buf2, safe_delete_path); | |
1467 g_free(buf2); | |
1468 } | |
1469 else | |
1470 { | |
1471 buf = g_strdup_printf(_("Safe delete: %s"), _("off")); | |
1472 } | |
1473 } | |
1474 | |
1453 label = pref_label_new(gd->vbox, buf); | 1475 label = pref_label_new(gd->vbox, buf); |
1454 g_free(buf); | 1476 g_free(buf); |
1455 | 1477 |
1456 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | 1478 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
1457 gtk_widget_set_sensitive(label, FALSE); | 1479 gtk_widget_set_sensitive(label, FALSE); |