[Xfce4-commits] <midori:master> Click Go icon in blank or speed dial to Paste and Proceed

Christian Dywan noreply at xfce.org
Fri Oct 22 23:54:02 CEST 2010


Updating branch refs/heads/master
         to ed0440cd9f9c694fefc29e9e5f8217323879d3bd (commit)
       from f6ad3b1c2140d710a8ff300ebf712bbc1a125850 (commit)

commit ed0440cd9f9c694fefc29e9e5f8217323879d3bd
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Oct 22 23:52:08 2010 +0200

    Click Go icon in blank or speed dial to Paste and Proceed

 midori/midori-browser.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 421767c..d2764bd 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")))
         {



More information about the Xfce4-commits mailing list