Localize "Search" in quick dial and use the user's default search
This commit is contained in:
parent
b0c069730f
commit
68bb3d2378
3 changed files with 12 additions and 5 deletions
|
@ -6,10 +6,10 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="wrap">
|
<div id="wrap">
|
||||||
<form id="search_bar" name="search_bar" action="http://www.google.com/search" method="get">
|
<form id="search_bar" name="search_bar" action="{search_uri}" method="get">
|
||||||
<input type="text" name="q" value="Google" onfocus="javascript:this.value='';"
|
<input type="text" name="q" value="{search_title}" onfocus="javascript:this.value='';"
|
||||||
onblur="javascript:if(this.value=='') this.value='Google';" />
|
onblur="javascript:if(this.value=='') this.value='{search_title}';" />
|
||||||
<button>Search</button>
|
<button>{search}</button>
|
||||||
</form>
|
</form>
|
||||||
<div class="shortcut top" id="s1">
|
<div class="shortcut top" id="s1">
|
||||||
<a href="#" onclick="javascript:return getAction('s1');">
|
<a href="#" onclick="javascript:return getAction('s1');">
|
||||||
|
|
|
@ -211,6 +211,6 @@
|
||||||
console.log ("tandoori-save");
|
console.log ("tandoori-save");
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -1912,6 +1912,7 @@ midori_view_set_uri (MidoriView* view,
|
||||||
gchar* tandoori_body;
|
gchar* tandoori_body;
|
||||||
gchar* tandoori_html;
|
gchar* tandoori_html;
|
||||||
gchar* t_body_fname;
|
gchar* t_body_fname;
|
||||||
|
gchar* location_entry_search;
|
||||||
|
|
||||||
katze_assign (view->uri, g_strdup (""));
|
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);
|
g_file_get_contents (t_body_fname, &tandoori_body, NULL, NULL);
|
||||||
|
|
||||||
tandoori_html = g_strconcat (tandoori_head, tandoori_body, 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,
|
data = sokoke_replace_variables (tandoori_html,
|
||||||
"{res}", res_root,
|
"{res}", res_root,
|
||||||
"{title}", _("Blank page"),
|
"{title}", _("Blank page"),
|
||||||
|
"{search_uri}", &location_entry_search,
|
||||||
|
"{search_title}", _("Suchen"),
|
||||||
|
"{search}", _("Suchen"),
|
||||||
"{click_to_add}", _("Click to add a shortcut"),
|
"{click_to_add}", _("Click to add a shortcut"),
|
||||||
"{enter_shortcut_address}", _("Enter shortcut address"),
|
"{enter_shortcut_address}", _("Enter shortcut address"),
|
||||||
"{enter_shortcut_name}", _("Enter shortcut name"),
|
"{enter_shortcut_name}", _("Enter shortcut name"),
|
||||||
"{are_you_sure}", _("Are you sure you want to delete this shortcut?"), NULL);
|
"{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)
|
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
||||||
webkit_web_frame_load_alternate_string (
|
webkit_web_frame_load_alternate_string (
|
||||||
|
|
Loading…
Reference in a new issue