Use midori_browser_open_bookmark for the bookmarkbar

This commit is contained in:
Christian Dywan 2010-08-14 20:58:38 +02:00
parent a7452bd0b5
commit 9c84a2c407

View file

@ -183,6 +183,10 @@ midori_bookmarks_insert_item_db (sqlite3* db,
KatzeItem* item, KatzeItem* item,
gchar* folder); gchar* folder);
void
midori_browser_open_bookmark (MidoriBrowser* browser,
KatzeItem* item);
static void static void
midori_bookmarkbar_populate (MidoriBrowser* browser); midori_bookmarkbar_populate (MidoriBrowser* browser);
@ -2663,7 +2667,7 @@ midori_bookmarkbar_activate_item (GtkAction* action,
KatzeItem* item, KatzeItem* item,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
midori_browser_set_current_uri (browser, katze_item_get_uri (item)); midori_browser_open_bookmark (browser, item);
} }
static gboolean static gboolean
@ -3778,14 +3782,8 @@ static void
midori_browser_bookmark_open_activate_cb (GtkWidget* menuitem, midori_browser_bookmark_open_activate_cb (GtkWidget* menuitem,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
KatzeItem* item; KatzeItem* item = (KatzeItem*)g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
const gchar* uri; midori_browser_open_bookmark (browser, item);
item = (KatzeItem*)g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
uri = katze_item_get_uri (item);
if (uri && *uri)
midori_browser_set_current_uri (browser, uri);
} }
static void static void