[epiphany] web view: fix icon names
- From: Saleem Abdulrasool <asaleem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] web view: fix icon names
- Date: Thu, 1 Dec 2011 05:16:57 +0000 (UTC)
commit 901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd
Author: Saleem Abdulrasool <compnerd compnerd org>
Date: Tue Nov 29 19:19:59 2011 -0800
web view: fix icon names
The GTK+ 3.0 themes have a different name for the dialog icons
(dialog-{information,error}) rather than the stock GTK+ icon names
(gtk-dialog-{info,error}). Use the proper names.
Additionally, ensure that icon_info is not NULL when performing the lookup,
which will fail. This part of the change is to avoid a possible crash/segfault
caused by the lookup without a valid icon_info.
Bug: 665170
Signed-Off-By: Saleem Abdulrasool <compnerd compnerd org>
embed/ephy-web-view.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index e55dfdc..7a9a49b 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2040,7 +2040,7 @@ ephy_web_view_load_error_page (EphyWebView *view,
button_label = g_strdup (_("Try again"));
html_file = ephy_file ("error.html");
- stock_icon = GTK_STOCK_DIALOG_ERROR;
+ stock_icon = "dialog-error";
break;
case EPHY_WEB_VIEW_ERROR_PAGE_CRASH:
page_title = g_strdup_printf (_("Oops! Error loading %s"), hostname);
@@ -2058,7 +2058,7 @@ ephy_web_view_load_error_page (EphyWebView *view,
button_label = g_strdup (_("Load again anyway"));
html_file = ephy_file ("recovery.html");
- stock_icon = GTK_STOCK_DIALOG_INFO;
+ stock_icon = "dialog-information";
break;
default:
return;
@@ -2071,7 +2071,7 @@ ephy_web_view_load_error_page (EphyWebView *view,
48,
GTK_ICON_LOOKUP_GENERIC_FALLBACK);
- image_data = get_file_content_as_base64 (gtk_icon_info_get_filename (icon_info));
+ image_data = icon_info ? get_file_content_as_base64 (gtk_icon_info_get_filename (icon_info)) : NULL;
g_file_get_contents (html_file, &template, NULL, NULL);
@@ -2083,7 +2083,7 @@ ephy_web_view_load_error_page (EphyWebView *view,
((gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) ? "rtl" : "ltr"),
page_title,
uri,
- image_data,
+ image_data ? image_data : "",
msg_title, msg, button_label);
g_free (template);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]