]> spindle.queued.net Git - midori/commitdiff
Display a shaded logo in error pages
authorChristian Dywan <christian@twotoasts.de>
Thu, 16 Oct 2008 01:51:39 +0000 (03:51 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 16 Oct 2008 01:51:39 +0000 (03:51 +0200)
AUTHORS
data/logo-shade.svg [new file with mode: 0644]
midori/midori-view.c
wscript

diff --git a/AUTHORS b/AUTHORS
index 68ec1880d563197d17d50d18bb657570b1e499e5..f0e7c33048780b927304d00ceef2b1cfb3b1a751 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -11,10 +11,11 @@ Contributors:
     Dale Whittaker <dayul@users.sf.net>
     Anders F Björklund <afb@macports.org>
 
-Icons:
+Graphics:
     extension: Nancy Runge <nancy@twotoasts.de>
     midori: Nancy Runge <nancy@twotoasts.de>
     news-feed: Nancy Runge <nancy@twotoasts.de>
+    logo-shade: Nancy Runge <nancy@twotoasts.de>
 
 Translations:
     de: Enrico Tröger <enrico.troeger@uvena.de>
diff --git a/data/logo-shade.svg b/data/logo-shade.svg
new file mode 100644 (file)
index 0000000..7a21a99
--- /dev/null
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="307.65372"
+   height="350"
+   id="svg2418"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   version="1.0"
+   inkscape:export-filename="/home/user/logo-shade.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="logo-shade.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.03"
+     inkscape:cx="74.949357"
+     inkscape:cy="143.09941"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1253"
+     inkscape:window-height="682"
+     inkscape:window-x="0"
+     inkscape:window-y="22" />
+  <defs
+     id="defs2420">
+    <linearGradient
+       id="linearGradient3412">
+      <stop
+         id="stop3414"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:0.59836066;" />
+      <stop
+         id="stop3416"
+         offset="1"
+         style="stop-color:#97f839;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3458">
+      <stop
+         id="stop3460"
+         offset="0"
+         style="stop-color:#88fe38;stop-opacity:1;" />
+      <stop
+         id="stop3462"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <inkscape:perspective
+       id="perspective2426"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       id="linearGradient3458-648">
+      <stop
+         id="stop2423"
+         offset="0"
+         style="stop-color:#bababa;stop-opacity:1;" />
+      <stop
+         id="stop2425"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3412-967">
+      <stop
+         id="stop2429"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:0.59836066;" />
+      <stop
+         id="stop2431"
+         offset="1"
+         style="stop-color:#bababa;stop-opacity:0;" />
+    </linearGradient>
+  </defs>
+  <metadata
+     id="metadata2423">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:creator>
+          <cc:Agent>
+            <dc:title>Nancy Runge &lt;nancy@twotoasts.de&gt;</dc:title>
+          </cc:Agent>
+        </dc:creator>
+        <cc:license
+           rdf:resource="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="translate(-280.66056,-644.09745)"
+     id="layer1"
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1">
+    <g
+       id="g2546"
+       style="fill:#ffffff;fill-opacity:1;stroke:#bcbcbc;stroke-opacity:1"
+       transform="matrix(2.7318355,0,0,2.7318355,-731.07518,-1421.3016)">
+      <path
+         sodipodi:nodetypes="ccsscccsc"
+         id="path3598"
+         d="M 479.0149,757.44485 C 463.33929,760.3524 390.05715,768.6009 373.75783,823.05659 C 368.99751,841.48441 371.67629,866.55457 392.88608,865.62945 C 394.38911,865.56465 394.54399,866.0597 395.07871,867.32475 C 403.8111,887.98406 426.11314,884.657 430.13518,876.12801 C 430.41248,875.53998 429.75994,876.1331 430.13518,876.12801 C 452.01909,891.1113 463.94687,870.37434 470.8404,851.89287 C 479.26032,835.85799 484.40756,769.09622 479.90163,773.41411 C 403.13312,846.97906 403.28006,782.18757 479.0149,757.44485"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#bcbcbc;stroke-width:2.79349113000000004;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <path
+         id="path3606"
+         d="M 394.6271,866.42646 C 389.11843,841.31269 395.51037,833.40754 398.10369,830.14819"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#bcbcbc;stroke-width:2.79349113000000004;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         sodipodi:nodetypes="cc" />
+      <path
+         id="path3608"
+         d="M 430.04511,875.57142 C 422.884,860.41673 424.07276,847.90995 429.16085,838.58891"
+         style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#bcbcbc;stroke-width:2.79349113000000004;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         sodipodi:nodetypes="cc" />
+    </g>
+    <g
+       id="g2551"
+       style="fill:#e8e8e8;fill-opacity:1;stroke:none"
+       transform="matrix(2.7318355,0,0,2.7318355,-731.59243,-1420.9344)">
+      <path
+         sodipodi:nodetypes="cccccccccccc"
+         id="path2553"
+         d="M 447.08573,768.31725 C 436.04919,774.1595 397.92257,781.58705 381.33359,820.27881 C 377.02863,833.88105 375.31278,851.44676 387.44516,857.54862 C 385.16801,848.06163 387.57514,834.11288 393.43272,827.57808 C 397.5473,821.96506 405.70797,826.00823 403.09775,831.29165 C 401.29067,836.46522 394.76631,843.8643 399.87669,863.28435 C 404.09154,874.85534 415.25599,879.58634 422.43347,873.92723 C 414.92666,858.12585 420.32228,825.17457 433.92305,832.69366 C 440.70334,836.82119 424.80942,848.38632 435.43821,869.81488 C 448.73626,880.75776 460.15899,863.55615 464.02222,850.63024 C 472.18961,832.82769 477.16809,790.8233 475.1786,786.29359 C 410.97397,845.50147 395.61545,794.24336 447.07098,768.23969"
+         style="fill:#e8e8e8;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.79349113;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    </g>
+  </g>
+</svg>
index 3149d064ff4735f7a7bfa6dec5ab40925a3d95a7..636a53a2bf3c0eadaadccd934bcb63a8c39f107f 100644 (file)
@@ -672,6 +672,8 @@ webkit_web_frame_load_done_cb (WebKitWebFrame* web_frame,
         data = g_strdup_printf (
             "<html><head><title>Not found - %s</title></head>"
             "<body><h1>Not found - %s</h1>"
+            "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
+            "style=\"position: absolute; right: 15px; bottom: 15px;\">"
             "<p />The page you were opening doesn't exist."
             "<p />Try to <a href=\"%s\">load the page again</a>, "
             "or move on to another page."
@@ -1393,6 +1395,8 @@ midori_view_set_uri (MidoriView*  view,
                 data = g_strdup_printf (
                     "<html><head><title>No documentation installed</title></head>"
                     "<body><h1>No documentation installed</h1>"
+                    "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
+                    "style=\"position: absolute; right: 15px; bottom: 15px;\">"
                     "<p />There is no documentation installed at %s."
                     "You may want to ask your distribution or "
                     "package maintainer for it or if this a custom build "
diff --git a/wscript b/wscript
index aec279555eea30c1af5948fd7d65378ef081f773..4f1d460a11f175e14c838ee76735f59398b1836d 100644 (file)
--- a/wscript
+++ b/wscript
@@ -163,6 +163,16 @@ def set_options (opt):
         help='Enables API documentation', dest='enable_api_docs')
 
 def build (bld):
+    def mkdir (path):
+        if not os.access (path, os.F_OK):
+            os.mkdir (path)
+
+    def _install_files (folder, destination, source):
+        try:
+            install_files (folder, destination, source)
+        except:
+            pass
+
     bld.add_subdirs ('katze midori icons')
 
     install_files ('DOCDIR', '/midori/', 'AUTHORS ChangeLog COPYING README')
@@ -201,6 +211,18 @@ def build (bld):
     if bld.env ()['INTLTOOL']:
         install_files ('DATADIR', 'applications', 'midori.desktop')
 
+    if bld.env ()['RSVG_CONVERT']:
+        mkdir (blddir + '/data')
+        convert = subprocess.Popen ([bld.env ()['RSVG_CONVERT'],
+            '-o', blddir + '/data/logo-shade.png',
+            srcdir + '/data/logo-shade.svg'],
+            stderr=subprocess.PIPE)
+        if not convert.wait ():
+            _install_files ('DATADIR', APPNAME,
+                            blddir + '/data/logo-shade.png')
+        else:
+            Params.pprint ('BLUE', "logo-shade could not be rasterized.")
+
 def shutdown ():
     if Params.g_commands['install'] or Params.g_commands['uninstall']:
         dir = Common.path_install ('DATADIR', 'icons/hicolor')