aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-03-01 23:41:59 +0800
committerXan Lopez <xan@src.gnome.org>2003-03-01 23:41:59 +0800
commitd5a9404675266fdb5c68cd3ab51ff2797b7d43fc (patch)
treefbc9cf4ae599bac3b06288246f02a5f8911c0aa1 /src/bookmarks
parentfd4721ce45cce12723d3a1fde8a635367eb08559 (diff)
downloadgsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar.gz
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar.bz2
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar.lz
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar.xz
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.tar.zst
gsoc2013-epiphany-d5a9404675266fdb5c68cd3ab51ff2797b7d43fc.zip
Fix 105990.
Fix 105990.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index a3ce4fdf5..5cbb6d232 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -23,6 +23,7 @@
#include <gtk/gtkstock.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkvbox.h>
+#include <gdk/gdkkeysyms.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
@@ -340,6 +341,22 @@ ephy_bookmarks_editor_show_popup_cb (GtkWidget *view,
}
static void
+ephy_bookmarks_editor_key_pressed_cb (GtkWidget *view,
+ GdkEventKey *event,
+ EphyBookmarksEditor *editor)
+{
+ switch (event->keyval)
+ {
+ case GDK_Delete:
+ ephy_node_view_remove (editor->priv->bm_view);
+ break;
+ default:
+ break;
+ }
+
+}
+
+static void
ephy_bookmarks_editor_node_activated_cb (GtkWidget *view,
EphyNode *node,
EphyBookmarksEditor *editor)
@@ -667,6 +684,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
g_assert (editor->priv->bookmarks);
node = ephy_bookmarks_get_keywords (editor->priv->bookmarks);
+
+ /* Keywords View */
key_view = ephy_node_view_new (node, NULL);
ephy_node_view_set_browse_mode (key_view);
ephy_node_view_add_column (key_view, _("Keywords"),
@@ -691,6 +710,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
node = ephy_bookmarks_get_bookmarks (editor->priv->bookmarks);
editor->priv->bookmarks_filter = ephy_node_filter_new ();
+
+ /* Bookmarks View */
bm_view = ephy_node_view_new (node, editor->priv->bookmarks_filter);
ephy_node_view_enable_drag_source (bm_view);
ephy_node_view_add_icon_column (bm_view, EPHY_TREE_MODEL_NODE_COL_ICON);
@@ -700,6 +721,10 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
gtk_widget_show (GTK_WIDGET (bm_view));
editor->priv->bm_view = bm_view;
g_signal_connect (G_OBJECT (bm_view),
+ "key_press_event",
+ G_CALLBACK (ephy_bookmarks_editor_key_pressed_cb),
+ editor);
+ g_signal_connect (G_OBJECT (bm_view),
"node_activated",
G_CALLBACK (ephy_bookmarks_editor_node_activated_cb),
editor);