Make Delete key in bookmark panel the same as menu item
This commit is contained in:
parent
6246987ba8
commit
93c483c904
1 changed files with 2 additions and 17 deletions
|
@ -777,23 +777,8 @@ midori_bookmarks_key_release_event_cb (GtkWidget* widget,
|
||||||
GdkEventKey* event,
|
GdkEventKey* event,
|
||||||
MidoriBookmarks* bookmarks)
|
MidoriBookmarks* bookmarks)
|
||||||
{
|
{
|
||||||
GtkTreeModel* model;
|
if (event->keyval == GDK_Delete)
|
||||||
GtkTreeIter iter;
|
midori_bookmarks_delete_clicked_cb (widget, bookmarks);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue