[nautilus] mime-actions: fix unhandled type dialog content



commit 4fe527bc8b0aaa072581a087247656c2385ad86a
Author: Christopher Hargarten <cphargarten icloud com>
Date:   Thu Aug 23 20:29:42 2018 -0500

    mime-actions: fix unhandled type dialog content
    
    The 'Could not display' dialog, is, admittedly pretty ugly.
    The line break in the secondary text is tough to read through,
    and, YES/NO button actions aren't apparent to the user.
    
    This commit removes the linebreak in the secondary text
    and gives the buttons relevant names for the user.
    
    https://gitlab.gnome.org/GNOME/nautilus/issues/583

 src/nautilus-mime-actions.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 56feb82e9..6d5027330 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1295,14 +1295,19 @@ pk_proxy_appeared_cb (GObject      *source,
     /* use a custom dialog to prompt the user to install new software */
     dialog = gtk_message_dialog_new (parameters_install->parent_window, 0,
                                      GTK_MESSAGE_ERROR,
-                                     GTK_BUTTONS_YES_NO,
+                                     GTK_BUTTONS_NONE,
                                      "%s", error_message);
     gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                                              _("There is no application installed for ā€œ%sā€ files.\n"
+                                              _("There is no application installed for ā€œ%sā€ files. "
                                                 "Do you want to search for an application to open this 
file?"),
                                               g_content_type_get_description (mime_type));
     gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
+    gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL);
+    gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Search in Software"), GTK_RESPONSE_YES);
+
+    gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
+
     parameters_install->dialog = dialog;
     parameters_install->proxy = proxy;
 


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