Allow search engine addresses prefixed with %s
Related to: https://bugs.launchpad.net/midori/+bug/909423
This commit is contained in:
parent
64d21c2120
commit
451cd1fbea
2 changed files with 3 additions and 0 deletions
|
@ -1520,6 +1520,8 @@ katze_uri_entry_changed_cb (GtkWidget* entry,
|
||||||
{
|
{
|
||||||
const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
|
const gchar* uri = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||||
gboolean valid = midori_uri_is_location (uri);
|
gboolean valid = midori_uri_is_location (uri);
|
||||||
|
if (!valid && g_object_get_data (G_OBJECT (entry), "allow_%s"))
|
||||||
|
valid = uri && g_str_has_prefix (uri, "%s");
|
||||||
if (*uri && !valid)
|
if (*uri && !valid)
|
||||||
{
|
{
|
||||||
GdkColor bg_color = { 0 };
|
GdkColor bg_color = { 0 };
|
||||||
|
|
|
@ -972,6 +972,7 @@ midori_search_action_get_editor (MidoriSearchAction* search_action,
|
||||||
#else
|
#else
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
#endif
|
||||||
|
g_object_set_data (G_OBJECT (entry_uri), "allow_%s", (void*)1);
|
||||||
gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);
|
gtk_entry_set_activates_default (GTK_ENTRY (entry_uri), TRUE);
|
||||||
if (!new_engine)
|
if (!new_engine)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry_uri)
|
gtk_entry_set_text (GTK_ENTRY (entry_uri)
|
||||||
|
|
Loading…
Reference in a new issue