[evince/wip/gpoo/improve-message-area] shell: Use the info bar close button instead of a custom one



commit 4d6f0302eb04245a8391f7ed3b0c80d9ccfe3d23
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Fri Nov 9 12:34:06 2018 -0300

    shell: Use the info bar close button instead of a custom one

 shell/ev-message-area.c          |  2 ++
 shell/ev-progress-message-area.c |  2 ++
 shell/ev-window.c                | 13 -------------
 3 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c
index 1a4078dd..3f9b30d8 100644
--- a/shell/ev-message-area.c
+++ b/shell/ev-message-area.c
@@ -283,6 +283,8 @@ ev_message_area_new (GtkMessageType type,
                va_end (args);
        }
 
+       gtk_info_bar_set_show_close_button (GTK_INFO_BAR (widget), TRUE);
+
        return widget;
 }
 
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index 84ca05a9..16cfa48a 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -176,6 +176,8 @@ ev_progress_message_area_new (const gchar *icon_name,
        ev_message_area_set_image_from_icon_name (EV_MESSAGE_AREA (widget),
                                                  icon_name);
 
+       gtk_info_bar_set_show_close_button (GTK_INFO_BAR (widget), TRUE);
+
        return widget;
 }
 
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 1ecd3269..038cb10a 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -773,8 +773,6 @@ ev_window_error_message (EvWindow    *window,
        
        area = ev_message_area_new (GTK_MESSAGE_ERROR,
                                    msg,
-                                   _("_Close"),
-                                   GTK_RESPONSE_CLOSE,
                                    NULL);
        g_free (msg);
        
@@ -805,8 +803,6 @@ ev_window_warning_message (EvWindow    *window,
 
        area = ev_message_area_new (GTK_MESSAGE_WARNING,
                                    msg,
-                                   _("_Close"),
-                                   GTK_RESPONSE_CLOSE,
                                    NULL);
        g_free (msg);
        
@@ -1936,8 +1932,6 @@ show_loading_progress (EvWindow *ev_window)
 
        area = ev_progress_message_area_new ("document-open-symbolic",
                                             text,
-                                            _("_Close"),
-                                            GTK_RESPONSE_CLOSE,
                                             _("C_ancel"),
                                             GTK_RESPONSE_CANCEL,
                                             NULL);
@@ -2389,8 +2383,6 @@ show_reloading_progress (EvWindow *ev_window)
                                ev_window->priv->uri);
        area = ev_progress_message_area_new ("view-refresh-symbolic",
                                             text,
-                                            _("_Close"),
-                                            GTK_RESPONSE_CLOSE,
                                             _("C_ancel"),
                                             GTK_RESPONSE_CANCEL,
                                             NULL);
@@ -2738,8 +2730,6 @@ show_saving_progress (GFile *dst)
        g_free (uri);
        area = ev_progress_message_area_new ("document-save-symbolic",
                                             text,
-                                            _("_Close"),
-                                            GTK_RESPONSE_CLOSE,
                                             _("C_ancel"),
                                             GTK_RESPONSE_CANCEL,
                                             NULL);
@@ -3442,8 +3432,6 @@ ev_window_print_operation_status_changed (EvPrintOperation *op,
 
                area = ev_progress_message_area_new ("document-print-symbolic",
                                                     text,
-                                                    _("_Close"),
-                                                    GTK_RESPONSE_CLOSE,
                                                     _("C_ancel"),
                                                     GTK_RESPONSE_CANCEL,
                                                     NULL);
@@ -5678,7 +5666,6 @@ ev_window_cmd_view_toggle_caret_navigation (GSimpleAction *action,
 
        message_area = ev_message_area_new (GTK_MESSAGE_QUESTION,
                                            _("Enable caret navigation?"),
-                                           _("_No"),  GTK_RESPONSE_NO,
                                            _("_Enable"), GTK_RESPONSE_YES,
                                            NULL);
        ev_message_area_set_secondary_text (EV_MESSAGE_AREA (message_area),


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