[Xfce4-commits] <midori:master> Add homepage handling in _action_navigation_activate ()

Christian Dywan noreply at xfce.org
Sat Jun 26 22:00:02 CEST 2010


Updating branch refs/heads/master
         to 0bc4933c17c8a7438d4b0667dbe7bc6738a74ed3 (commit)
       from 6d7e1838ea217fcea9590359554a6499de1af5dd (commit)

commit 0bc4933c17c8a7438d4b0667dbe7bc6738a74ed3
Author: Alexander Butenko <a.butenka at gmail.com>
Date:   Fri Jun 25 11:18:22 2010 -0400

    Add homepage handling in _action_navigation_activate ()

 midori/midori-browser.c |   21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 2a1b185..5302d7e 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3517,23 +3517,12 @@ _action_navigation_activate (GtkAction*     action,
         midori_view_set_uri (view, uri);
         g_free (uri);
     }
-}
-
-static void
-_action_homepage_activate (GtkAction*     action,
-                           MidoriBrowser* browser)
-{
-    gchar* homepage;
-
-    if (g_object_get_data (G_OBJECT (action), "midori-middle-click"))
+    else if (g_str_equal (name, "Homepage"))
     {
-        g_object_set_data (G_OBJECT (action), "midori-middle-click", (void*)0);
-        return;
+        g_object_get (browser->settings, "homepage", &uri, NULL);
+        midori_view_set_uri (view, uri);
+        g_free (uri);
     }
-
-    g_object_get (browser->settings, "homepage", &homepage, NULL);
-    midori_browser_set_current_uri (browser, homepage);
-    g_free (homepage);
 }
 
 static void
@@ -5197,7 +5186,7 @@ static const GtkActionEntry entries[] =
         N_("Go to the next sub-page"), G_CALLBACK (_action_navigation_activate) },
     { "Homepage", STOCK_HOMEPAGE,
         NULL, "<Alt>Home",
-        N_("Go to your homepage"), G_CALLBACK (_action_homepage_activate) },
+        N_("Go to your homepage"), G_CALLBACK (_action_navigation_activate) },
     { "TrashEmpty", GTK_STOCK_CLEAR,
         N_("Empty Trash"), "",
         N_("Delete the contents of the trash"), G_CALLBACK (_action_trash_empty_activate) },



More information about the Xfce4-commits mailing list