[nautilus] mime-actions: use GtkMessageDialog



commit 7a3dcdd4bf667aac271be74988770e18575a7df2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Aug 21 18:25:42 2010 +0200

    mime-actions: use GtkMessageDialog
    
    Instead of EelAlertDialog, which is going away.

 libnautilus-private/nautilus-mime-actions.c |   46 ++++++++++++++++-----------
 1 files changed, 27 insertions(+), 19 deletions(-)
---
diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c
index b2d4c2e..858dd49 100644
--- a/libnautilus-private/nautilus-mime-actions.c
+++ b/libnautilus-private/nautilus-mime-actions.c
@@ -27,7 +27,6 @@
 
 #include <eel/eel-glib-extensions.h>
 #include <eel/eel-stock-dialogs.h>
-#include <eel/eel-alert-dialog.h>
 #include <eel/eel-string.h>
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
@@ -1266,22 +1265,28 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
 	char *mime_type = nautilus_file_get_mime_type (parameters->file);
 	char *error_message = get_application_no_mime_type_handler_message (parameters->file, parameters->uri);
 	if (g_content_type_is_unknown (mime_type)) {
-		dialog = eel_alert_dialog_new (parameters->parent_window,
-		                      GTK_DIALOG_DESTROY_WITH_PARENT,
-                		      GTK_MESSAGE_ERROR,
-		                      0,
-                		      error_message,
-                		      _("The file is of an unknown type"));
+		dialog = gtk_message_dialog_new (parameters->parent_window,
+						 GTK_DIALOG_DESTROY_WITH_PARENT,
+						 GTK_MESSAGE_ERROR,
+						 0,
+						 NULL);
+		g_object_set (dialog,
+			      "text", error_message,
+			      "secondary-text", _("The file is of an unknown type"),
+			      NULL);
 	} else {
 		char *text;
 		text = g_strdup_printf (_("There is no application installed for %s files"), g_content_type_get_description (mime_type));
 
-		dialog = eel_alert_dialog_new (parameters->parent_window,
-		                      GTK_DIALOG_DESTROY_WITH_PARENT,
-                		      GTK_MESSAGE_ERROR,
-		                      0,
-                		      error_message,
-                		      text);
+		dialog = gtk_message_dialog_new (parameters->parent_window,
+						 GTK_DIALOG_DESTROY_WITH_PARENT,
+						 GTK_MESSAGE_ERROR,
+						 0,
+						 NULL);
+		g_object_set (dialog,
+			      "text", error_message,
+			      "secondary-text", text,
+			      NULL);
 
 		g_free (text);
 	}
@@ -1609,12 +1614,15 @@ activate_desktop_file (ActivateParameters *parameters,
 					   ),
 					 display_name);
 		
-		dialog = eel_alert_dialog_new (parameters->parent_window,
-					       0,
-					       GTK_MESSAGE_WARNING,
-					       GTK_BUTTONS_NONE,
-					       primary,
-					       secondary);
+		dialog = gtk_message_dialog_new (parameters->parent_window,
+						 0,
+						 GTK_MESSAGE_WARNING,
+						 GTK_BUTTONS_NONE,
+						 NULL);
+		g_object_set (dialog,
+			      "text", primary,
+			      "secondary-text", secondary,
+			      NULL);
 		gtk_dialog_add_button (GTK_DIALOG (dialog),
 				       _("_Launch Anyway"), RESPONSE_RUN);
 		if (nautilus_file_can_set_permissions (file)) {



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