[PATCH] HIGfing confirm empty trash
- From: Luca Ferretti <elle uca libero it>
- To: nautilus-list gnome org
- Cc: Havoc Pennington <hp redhat com>
- Subject: [PATCH] HIGfing confirm empty trash
- Date: 18 Apr 2003 10:53:07 +0200
Probably this patch need more love (end experience), but it seems to
work. And it's a confirmation: HIG rocks![1]
There are just a couple of trouble, probably related to window manager
(or to my ignorance:-P).
If I'm right HIG said that alert's (BTW: this should be a confirmation
alert, isn't it?) window frames should have _only_ menu button, with
_only_ rollup/unroll commands. Actually we have only size/iconify
related stuff disabled.
Second trouble about window caption: using
gtk_window_set_title (GTK_WINDOW (dialog), NULL);
gtk_window_set_icon (GTK_WINDOW (dialog), NULL);
I suppose that alert should have no title and no icon, but unfortunately
it use the "File Manager" label as title and the gnome-fs-desktop.png
icon. (A dirty hack to hide the title is s/NULL/"")
[1] other alerts need works in eel :-)
--
Think bigger
My uncle
--- tmp/nautilus-file-operations.c 2003-04-18 10:33:11.000000000 +0200
+++ nautilus-file-operations.c 2003-04-17 21:35:03.000000000 +0200
@@ -2253,6 +2253,7 @@
GtkWindow *parent_window;
int response;
GtkWidget *hbox, *image, *label, *button;
+ gchar *str;
/* Just Say Yes if the preference says not to confirm. */
if (!eel_preferences_get_boolean (NAUTILUS_PREFERENCES_CONFIRM_TRASH)) {
@@ -2262,25 +2263,45 @@
parent_window = GTK_WINDOW (gtk_widget_get_toplevel (parent_view));
dialog = gtk_dialog_new ();
- gtk_window_set_title (GTK_WINDOW (dialog), _("Empty Trash"));
- gtk_window_set_wmclass (GTK_WINDOW (dialog), "empty_trash",
- "Nautilus");
+
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
+
+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 12);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), NULL);
+ gtk_window_set_icon (GTK_WINDOW (dialog), NULL);
+
+ /* gtk_window_set_wmclass (GTK_WINDOW (dialog), "empty_trash",
+ "Nautilus"); */
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent_window));
- hbox = gtk_hbox_new (FALSE, 6);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
FALSE, FALSE, 0);
- image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION,
+ image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
+ gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
gtk_widget_show (image);
+
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- label = gtk_label_new (_("Are you sure you want to permanently delete "
- "all of the items in the Trash?"));
+ str = g_strconcat ("<b>", _("Do you really want empty Trash?"),
+ "</b>\n\n", _("If you choose to empty the Trash, all items in it will be permanently deleted."), NULL);
+ label = gtk_label_new (str);
+ g_free (str);
+
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0);
+
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), label,
TRUE, TRUE, 0);
@@ -2288,7 +2309,7 @@
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- button = eel_gtk_button_new_with_stock_icon (_("_Empty"),
+ button = eel_gtk_button_new_with_stock_icon (_("_Empty Trash"),
GTK_STOCK_DELETE);
gtk_widget_show (button);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]