aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2011-11-30 11:19:59 +0800
committerSaleem Abdulrasool <compnerd@compnerd.org>2011-12-01 13:16:06 +0800
commit901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd (patch)
treea172fcafc464e18d1a54dbd7535c77a0de376581 /embed
parent819cc7dea0676deb2dc6b422683780ab2a1ed8c0 (diff)
downloadgsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar.gz
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar.bz2
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar.lz
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar.xz
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.tar.zst
gsoc2013-epiphany-901c1cc5fa13111f5593ed6f3ab14ea3654b3fdd.zip
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>
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index e55dfdc7d..7a9a49b62 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);