[PATCH] Use "Close" instead of "Cancel" when mime types are mismatched



Hi,

I have a .txt file (which is really a .txt file) recognized as a bitmap.
This is probably a bug in shared-mime-info...
When double-clicking on the file, nautilus is clever and finds that the
mime type found with the extension is not the same as the one find with
the mime magic. It then shows a warning dialog. This dialog has a
"Cancel" button but it really should be a "Close" one.

Attached patch should fix this.

Thanks,

Vincent

-- 
Les gens heureux ne sont pas press�
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.6368
diff -u -p -r1.6368 ChangeLog
--- ChangeLog	21 Jan 2005 19:54:10 -0000	1.6368
+++ ChangeLog	23 Jan 2005 15:45:12 -0000
@@ -1,3 +1,8 @@
+2005-01-23  Vincent Untz  <vincent vuntz net>
+
+	* src/file-manager/fm-directory-view.c: (warn_mismatched_mime_types):
+	use a Close button instead of a Cancel button.
+
 2005-01-21  Francisco Javier F. Serrador  <serrador cvs gnome org>
 
 	* src/nautilus-window-menus.c: Correct License (It said Evince).
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.654
diff -u -p -r1.654 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	14 Jan 2005 10:40:12 -0000	1.654
+++ src/file-manager/fm-directory-view.c	23 Jan 2005 15:45:14 -0000
@@ -4177,7 +4177,7 @@ warn_mismatched_mime_types (FMDirectoryV
 	dialog = eel_alert_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
 				       0,
 				       GTK_MESSAGE_ERROR,
-				       GTK_BUTTONS_NONE,
+				       GTK_BUTTONS_CLOSE,
 				       primary,
 				       secondary,
 				       primary);
@@ -4185,11 +4185,6 @@ warn_mismatched_mime_types (FMDirectoryV
 	g_free (primary);
 	g_free (secondary);
 	g_free (name);
-
-	gtk_dialog_add_button (GTK_DIALOG (dialog),
-			       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-	gtk_dialog_set_default_response (GTK_DIALOG (dialog), 
-					 GTK_RESPONSE_CANCEL);
 
 	g_signal_connect (dialog, 
 			  "response",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]