aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-editor.c
diff options
context:
space:
mode:
authorDavid Bordoley <bordoley@msu.edu>2003-03-29 00:06:33 +0800
committerDave Bordoley <Bordoley@src.gnome.org>2003-03-29 00:06:33 +0800
commitd15bb064a753c1087301d830f6ebf036290f26d7 (patch)
treee4695096c31aa1ec7581af362a2997876ac45f6c /src/bookmarks/ephy-bookmarks-editor.c
parent7f45e7613d25995f69daf640bebc05399b557f91 (diff)
downloadgsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar.gz
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar.bz2
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar.lz
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar.xz
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.tar.zst
gsoc2013-epiphany-d15bb064a753c1087301d830f6ebf036290f26d7.zip
Use the same key_press callback for both the topics and bm's view.
2003-03-27 David Bordoley <bordoley@msu.edu> * src/bookmarks/ephy-bookmarks-editor.c: (key_pressed_cb), (ephy_bookmarks_editor_construct): Use the same key_press callback for both the topics and bm's view. s/bookmarks/title in the bm tree. Remove an unused enum. * src/bookmarks/ephy-topics-selector.c: (topic_key_pressed), (ephy_topics_build_ui): Use space, return and enter to toggle topics in the selector.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 39587c4e6..9bfbd3c14 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -96,12 +96,6 @@ enum
PROP_BOOKMARKS
};
-enum
-{
- RESPONSE_REMOVE,
- RESPONSE_GO
-};
-
static GtkTargetEntry topic_drag_types [] =
{
{ EPHY_DND_TOPIC_TYPE, 0, 0 }
@@ -481,21 +475,6 @@ 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)
@@ -527,14 +506,15 @@ bookmarks_filter (EphyBookmarksEditor *editor,
}
static void
-keyword_node_key_pressed_cb (GtkWidget *view,
- GdkEventKey *event,
- EphyBookmarksEditor *editor)
+key_pressed_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ EphyNodeView *view)
{
switch (event->keyval)
{
case GDK_Delete:
- ephy_node_view_remove (editor->priv->key_view);
+ case GDK_KP_Delete:
+ ephy_node_view_remove (view);
break;
default:
@@ -719,8 +699,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
editor->priv->key_view = key_view;
g_signal_connect (G_OBJECT (key_view),
"key_press_event",
- G_CALLBACK (keyword_node_key_pressed_cb),
- editor);
+ G_CALLBACK (key_pressed_cb),
+ editor->priv->key_view);
g_signal_connect (G_OBJECT (key_view),
"node_selected",
G_CALLBACK (keyword_node_selected_cb),
@@ -747,15 +727,15 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
ephy_node_view_set_hinted (bm_view, TRUE);
ephy_node_view_enable_drag_source (bm_view, NULL, 0, EPHY_NODE_BMK_PROP_LOCATION);
ephy_node_view_add_icon_column (bm_view, EPHY_TREE_MODEL_NODE_COL_ICON);
- ephy_node_view_add_column (bm_view, _("Bookmarks"),
+ ephy_node_view_add_column (bm_view, _("Title"),
EPHY_TREE_MODEL_NODE_COL_BOOKMARK, TRUE, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (bm_view), TRUE, TRUE, 0);
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_CALLBACK (key_pressed_cb),
+ editor->priv->bm_view);
g_signal_connect (G_OBJECT (bm_view),
"node_activated",
G_CALLBACK (ephy_bookmarks_editor_node_activated_cb),