]> spindle.queued.net Git - midori/commitdiff
Click Go icon in blank or speed dial to Paste and Proceed
authorChristian Dywan <christian@twotoasts.de>
Fri, 22 Oct 2010 21:52:08 +0000 (23:52 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 22 Oct 2010 21:52:08 +0000 (23:52 +0200)
midori/midori-browser.c

index 421767cf67b082dbe29fdd3b75a1d92b5d1afae1..d2764bd02dd00b5dfb51e8a2e8839141e33db891 100644 (file)
@@ -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")))
         {