summaryrefslogtreecommitdiff
path: root/control-center
diff options
context:
space:
mode:
authorLauris Kaplinski <lauris@src.gnome.org>2002-03-10 15:04:22 +0000
committerLauris Kaplinski <lauris@src.gnome.org>2002-03-10 15:04:22 +0000
commit0335c74339ba706543b47eadf5800ebbd8abd99b (patch)
treeddee5463c83f4a7587ddfe8f17b8e9dd295c1774 /control-center
parented6922aae02cbdc5bf768c5c1f35bd5c1ea09833 (diff)
downloadgnome-control-center-0335c74339ba706543b47eadf5800ebbd8abd99b.tar.gz
Fixed carsh on keypresses in icon view, added item activation on enterNAUTILUS_1_1_9
Diffstat (limited to 'control-center')
-rw-r--r--control-center/capplet-dir-view-list.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/control-center/capplet-dir-view-list.c b/control-center/capplet-dir-view-list.c
index 26c7d4a3d..bbfd92672 100644
--- a/control-center/capplet-dir-view-list.c
+++ b/control-center/capplet-dir-view-list.c
@@ -331,7 +331,7 @@ static void
select_icon_list_cb (GtkWidget *widget, gint arg1, GdkEvent *event,
CappletDirView *view)
{
- if (event->type == GDK_2BUTTON_PRESS &&
+ if (event && event->type == GDK_2BUTTON_PRESS &&
((GdkEventButton *) event)->button == 1)
{
capplet_dir_entry_activate
@@ -342,6 +342,17 @@ select_icon_list_cb (GtkWidget *widget, gint arg1, GdkEvent *event,
}
}
+static gboolean
+cdvl_key_press (GtkWidget *widget, GdkEventKey *event, CappletDirView *view)
+{
+ if ((event->keyval == GDK_Return) && (view->selected)) {
+ capplet_dir_entry_activate (view->selected, view);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
void
lighten_color (GdkColor *color)
{
@@ -510,6 +521,9 @@ list_create (CappletDirView *view)
(GCallback) select_icon_list_cb,
view);
+ g_signal_connect (G_OBJECT (w), "key_press_event",
+ G_CALLBACK (cdvl_key_press), view);
+
gtk_container_add (GTK_CONTAINER (sw), w);
gtk_paned_add2 (GTK_PANED (hbox), sw);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);