]> spindle.queued.net Git - midori/commitdiff
Make Delete key in bookmark panel the same as menu item
authorChristian Dywan <christian@twotoasts.de>
Sun, 21 Nov 2010 15:25:27 +0000 (16:25 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 22 Nov 2010 02:49:52 +0000 (03:49 +0100)
panels/midori-bookmarks.c

index b843e4f86d907101978339a1d5588df81b05f8e2..4933f465034c8675122445bf37ba2e8d33bfb1ed 100644 (file)
@@ -777,23 +777,8 @@ midori_bookmarks_key_release_event_cb (GtkWidget*       widget,
                                        GdkEventKey*     event,
                                        MidoriBookmarks* bookmarks)
 {
-    GtkTreeModel* model;
-    GtkTreeIter iter;
-
-    if (event->keyval != GDK_Delete)
-        return FALSE;
-
-    if (katze_tree_view_get_selected_iter (GTK_TREE_VIEW (widget), &model, &iter))
-    {
-        KatzeItem* item;
-        KatzeArray* parent;
-
-        gtk_tree_model_get (model, &iter, 0, &item, -1);
-        parent = katze_item_get_parent (item);
-        katze_array_remove_item (parent, item);
-
-        g_object_unref (item);
-    }
+    if (event->keyval == GDK_Delete)
+        midori_bookmarks_delete_clicked_cb (widget, bookmarks);
 
     return FALSE;
 }