]> spindle.queued.net Git - midori/commitdiff
Reuse the trashed item and remove it from the trash properly
authorChristian Dywan <christian@twotoasts.de>
Sat, 2 Aug 2008 03:29:38 +0000 (05:29 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 2 Aug 2008 03:29:38 +0000 (05:29 +0200)
midori/midori-browser.c

index c25ddfce9d033ef195e9367b248132ebc45a7e05..4725cb067dd9ec30bea6f6c2c3827d82aa45f278 100644 (file)
@@ -1679,10 +1679,10 @@ midori_browser_menu_trash_item_activate_cb (GtkWidget*     menuitem,
     /* Create a new web view with an uri which has been closed before */
     KatzeXbelItem* item = g_object_get_data (G_OBJECT (menuitem),
                                              "KatzeXbelItem");
-    const gchar* uri = katze_xbel_bookmark_get_href (item);
-    gint n = midori_browser_add_uri (browser, uri);
+    gint n = midori_browser_add_xbel_item (browser, item);
     midori_browser_set_current_page (browser, n);
-    katze_xbel_item_unref (item);
+    midori_web_list_remove_item (browser->trash, item);
+    _midori_browser_update_actions (browser);
 }
 
 static void