[Xfce4-commits] <midori:master> Handle RTL in special pages (errors)

Christian Dywan noreply at xfce.org
Sun Jul 15 00:14:02 CEST 2012


Updating branch refs/heads/master
         to 49957c95d1677671a27eb2172ba9071116009f6a (commit)
       from 81543161dfbd6f8fd13e6422c46df399cc342eb8 (commit)

commit 49957c95d1677671a27eb2172ba9071116009f6a
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jul 14 00:26:23 2012 +0200

    Handle RTL in special pages (errors)

 data/about.css       |   17 +++++++++++++++--
 data/error.html      |    2 +-
 midori/midori-view.c |    2 ++
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/data/about.css b/data/about.css
index 42df9b5..66cb334 100644
--- a/data/about.css
+++ b/data/about.css
@@ -24,6 +24,11 @@ body {
    padding-top: 1%;
 }
 
+html[dir="rtl"] #icon {
+   float: right;
+   padding-right: 1%;
+}
+
 #main {
    float: right;
    width: 75%;
@@ -38,8 +43,16 @@ h1 {
 }
 
 #logo {
-  position: absolute; right: 15px; bottom: 15px;
-  z-index: -1;
+   position: absolute; bottom: 15px;
+   z-index: -1;
+}
+
+html[dir="ltr"] #logo {
+   right: 15px;
+}
+
+html[dir="rtl"] #logo {
+   left: 15px;
 }
 
 button span,
diff --git a/data/error.html b/data/error.html
index 6bc9698..b626494 100644
--- a/data/error.html
+++ b/data/error.html
@@ -2,7 +2,7 @@
  Error page template for Midori.
  This file is licensed under the terms of the expat license, see the file EXPAT.
 -->
-<html>
+<html dir="{dir}">
 <head>
 <title>{title}</title>
 <link rel="shortcut icon" href="{icon}" />
diff --git a/midori/midori-view.c b/midori/midori-view.c
index a475763..9d8eb06 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1439,6 +1439,8 @@ midori_view_display_error (MidoriView*     view,
         title_escaped = g_markup_escape_text (title, -1);
         icon = katze_item_get_icon (view->item);
         result = sokoke_replace_variables (template,
+            "{dir}", gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL ?
+                "rtl" : "ltr",
             "{title}", title_escaped,
             "{icon}", icon ? icon : "",
             "{message}", message,


More information about the Xfce4-commits mailing list