]> spindle.queued.net Git - midori/commitdiff
Localize "Search" in quick dial and use the user's default search
authorChristian Dywan <christian@twotoasts.de>
Fri, 8 May 2009 00:56:26 +0000 (02:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 8 May 2009 00:56:26 +0000 (02:56 +0200)
data/tandoori-body.html
data/tandoori-head.html
midori/midori-view.c

index 3528b27cd796af59c2d310a15f8bdea879b69d4d..a99f3da59ace49369a6a1d0ce4712944b4bdce52 100644 (file)
@@ -6,10 +6,10 @@
 
 <body>
     <div id="wrap">
-        <form id="search_bar" name="search_bar" action="http://www.google.com/search" method="get">
-            <input type="text" name="q" value="Google" onfocus="javascript:this.value='';"
-                onblur="javascript:if(this.value=='') this.value='Google';" />
-            <button>Search</button>
+        <form id="search_bar" name="search_bar" action="{search_uri}" method="get">
+            <input type="text" name="q" value="{search_title}" onfocus="javascript:this.value='';"
+                onblur="javascript:if(this.value=='') this.value='{search_title}';" />
+            <button>{search}</button>
         </form>
     <div class="shortcut top" id="s1">
         <a href="#" onclick="javascript:return getAction('s1');">
index 71873292dcb78f9279296030bcb318bd4201f089..e1051b797baf3d349fac315eb592ed5bfa9c5ee7 100644 (file)
         console.log ("tandoori-save");
     }
 
-               </script>
+    </script>
 </head>
 
index 00723fc8dd37d8a8c24fcef29c29b48b0654cacb..1d33b49c55cfe155e41e78a787af5d93eb24dcb0 100644 (file)
@@ -1912,6 +1912,7 @@ midori_view_set_uri (MidoriView*  view,
             gchar* tandoori_body;
             gchar* tandoori_html;
             gchar* t_body_fname;
+            gchar* location_entry_search;
 
             katze_assign (view->uri, g_strdup (""));
 
@@ -1934,13 +1935,19 @@ midori_view_set_uri (MidoriView*  view,
                 g_file_get_contents (t_body_fname, &tandoori_body, NULL, NULL);
 
             tandoori_html = g_strconcat (tandoori_head, tandoori_body, NULL);
+            g_object_get (view->settings, "location-entry-search",
+                          &location_entry_search, NULL);
             data = sokoke_replace_variables (tandoori_html,
                 "{res}", res_root,
                 "{title}", _("Blank page"),
+                "{search_uri}", &location_entry_search,
+                "{search_title}", _("Suchen"),
+                "{search}", _("Suchen"),
                 "{click_to_add}", _("Click to add a shortcut"),
                 "{enter_shortcut_address}", _("Enter shortcut address"),
                 "{enter_shortcut_name}", _("Enter shortcut name"),
                 "{are_you_sure}", _("Are you sure you want to delete this shortcut?"), NULL);
+            g_free (location_entry_search);
 
             #if WEBKIT_CHECK_VERSION (1, 1, 6)
             webkit_web_frame_load_alternate_string (