[Xfce4-commits] <midori:master> Hide error page button if buttons have no images
Christian Dywan
noreply at xfce.org
Sun Sep 30 00:44:01 CEST 2012
Updating branch refs/heads/master
to 191eb5f1e902ff955fdbebf50cc31e54c1447e66 (commit)
from 7c26d4ca116f856be92cda371482d5179b25f1be (commit)
commit 191eb5f1e902ff955fdbebf50cc31e54c1447e66
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Sep 30 00:41:47 2012 +0200
Hide error page button if buttons have no images
data/error.html | 2 +-
midori/midori-view.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/data/error.html b/data/error.html
index b626494..575726b 100644
--- a/data/error.html
+++ b/data/error.html
@@ -18,7 +18,7 @@
<p id="description">{description}</p>
<form method="GET" action="{uri}">
<button type="submit" onclick="location.reload(); return false;">
- <img src="stock://gtk-refresh"/>
+ <img style="{hide-button-images}" src="stock://gtk-refresh"/>
<span>{tryagain}</span>
</button>
</form>
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 16c04e5..f5c14eb 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1343,6 +1343,8 @@ midori_view_display_error (MidoriView* view,
const gchar* icon;
gchar* result;
+ gboolean show_button_images = katze_object_get_boolean (
+ gtk_widget_get_settings (view->web_view), "gtk-button-images");
if (uri == NULL)
uri = midori_tab_get_uri (MIDORI_TAB (view));
title_escaped = g_markup_escape_text (title ? title : view->title, -1);
@@ -1356,6 +1358,7 @@ midori_view_display_error (MidoriView* view,
"{description}", description,
"{tryagain}", try_again,
"{uri}", uri,
+ "{hide-button-images}", show_button_images ? "" : "display:none",
NULL);
g_free (title_escaped);
g_free (template);
More information about the Xfce4-commits
mailing list