Updating branch refs/heads/master to 427ae90f088f863bf7169b5ce642898efa43f063 (commit) from 61e51c1991c1c0c3b8293d4c8722264c3cd60a64 (commit)
commit 427ae90f088f863bf7169b5ce642898efa43f063 Author: Christian Dywan <christ...@twotoasts.de> Date: Mon Dec 7 20:35:11 2009 +0100 Try to search for it, if middle click open encounters a non-URI midori/midori-view.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index c2cbf8c..ac854a7 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1260,14 +1260,22 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, clipboard = gtk_clipboard_get_for_display ( gtk_widget_get_display (GTK_WIDGET (view)), GDK_SELECTION_PRIMARY); - uri = gtk_clipboard_wait_for_text (clipboard); - if (uri && strchr (uri, '.')) + if ((uri = gtk_clipboard_wait_for_text (clipboard))) { + KatzeArray* empty_array = katze_array_new (KATZE_TYPE_ITEM); guint i = 0; while (uri[i++] != '\0') if (uri[i] == '\n' || uri[i] == '\r') uri[i] = ' '; - new_uri = sokoke_magic_uri (g_strstrip (uri), NULL); + new_uri = sokoke_magic_uri (g_strstrip (uri), empty_array); + g_object_unref (empty_array); + if (!new_uri) + { + gchar* search; + g_object_get (view->settings, "location-entry-search", + &search, NULL); + new_uri = sokoke_search_uri (search, uri); + } if (event->state & GDK_CONTROL_MASK) { background = view->open_tabs_in_the_background; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits