From ed0440cd9f9c694fefc29e9e5f8217323879d3bd Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 22 Oct 2010 23:52:08 +0200 Subject: [PATCH] Click Go icon in blank or speed dial to Paste and Proceed --- midori/midori-browser.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 421767cf..d2764bd0 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3594,7 +3594,19 @@ _action_location_secondary_icon_released (GtkAction* action, { const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view)); const gchar* feed; - if (gtk_window_get_focus (GTK_WINDOW (browser)) == widget) + /* Clicking icon on blank is equal to Paste and Proceed */ + if (midori_view_is_blank (MIDORI_VIEW (view))) + { + GtkClipboard* clipboard = gtk_clipboard_get_for_display ( + gtk_widget_get_display (view), GDK_SELECTION_CLIPBOARD)); + gchar* text = gtk_clipboard_wait_for_text (clipboard); + if (text != NULL) + { + _action_location_submit_uri (action, text, FALSE, browser); + g_free (text); + } + } + else if (gtk_window_get_focus (GTK_WINDOW (browser)) == widget) _action_location_submit_uri (action, uri, FALSE, browser); else if ((feed = g_object_get_data (G_OBJECT (view), "news-feeds"))) { -- 2.39.5