Fix search engines without %s in the context menu

This commit is contained in:
Christian Dywan 2009-04-14 19:19:50 +02:00
parent 1f4b67ac06
commit 5d360b065b

View file

@ -894,12 +894,10 @@ midori_web_view_menu_search_web_activate_cb (GtkWidget* widget,
g_object_get (view->settings, "location-entry-search", g_object_get (view->settings, "location-entry-search",
&search, NULL); &search, NULL);
if (strstr (search, "%s")) if (strstr (search, "%s"))
{
uri = g_strdup_printf (search, view->selected_text); uri = g_strdup_printf (search, view->selected_text);
g_free (search);
}
else else
uri = search; uri = g_strconcat (search, view->selected_text, NULL);
g_free (search);
g_signal_emit (view, signals[NEW_TAB], 0, uri, g_signal_emit (view, signals[NEW_TAB], 0, uri,
view->open_tabs_in_the_background); view->open_tabs_in_the_background);