[evolution-patches] gal patch for bug 50800 (e-cell-combo keyboard navigation)
- From: wu yang <Yang Wu sun com>
- To: Mike Kestner <mkestner ximian com>
- Cc: evolution-patches ximian com, sceri-evolution-acc sun com
- Subject: [evolution-patches] gal patch for bug 50800 (e-cell-combo keyboard navigation)
- Date: Tue, 11 Nov 2003 11:35:30 +0800
Hi Mike
This is a small patch for e-cell-combo keyboard navigation.
In e-cell-combo, use "Up" and "Down" to select item
Thanks
Index: gal/e-table/e-cell-combo.c
===================================================================
RCS file: /cvs/gnome/gal/gal/e-table/e-cell-combo.c,v
retrieving revision 1.15
diff -u -b -B -r1.15 e-cell-combo.c
--- gal/e-table/e-cell-combo.c 1 May 2003 18:21:34 -0000 1.15
+++ gal/e-table/e-cell-combo.c 11 Nov 2003 03:30:52 -0000
@@ -92,7 +92,9 @@
gint *height,
gint *width);
-static void e_cell_combo_selection_changed(GtkWidget *popup_list, ECellCombo *ecc);
+static void e_cell_combo_selection_changed (GtkWidget *popup_list, ECellCombo *ecc);
+
+static gint e_cell_combo_list_button_press (GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc);
static gint e_cell_combo_button_press (GtkWidget *popup_window,
GdkEvent *event,
@@ -169,6 +171,10 @@
"selection_changed",
G_CALLBACK (e_cell_combo_selection_changed),
ecc);
+ g_signal_connect (ecc->popup_list,
+ "button_press_event",
+ G_CALLBACK (e_cell_combo_list_button_press),
+ ecc);
g_signal_connect (ecc->popup_window,
"button_press_event",
G_CALLBACK (e_cell_combo_button_press),
@@ -503,14 +509,26 @@
if (!GTK_LIST(popup_list)->selection || !GTK_WIDGET_REALIZED(ecc->popup_window))
return;
+ e_cell_combo_restart_edit (ecc);
+}
+
+static gint
+e_cell_combo_list_button_press(GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc)
+{
+ g_return_val_if_fail (GTK_IS_LIST(popup_list), FALSE);
+
+ e_cell_combo_update_cell (ecc);
gtk_grab_remove (ecc->popup_window);
- gdk_pointer_ungrab (gtk_get_current_event_time());
+ gdk_pointer_ungrab (event->button.time);
gtk_widget_hide (ecc->popup_window);
e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE);
+ d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
- e_cell_combo_update_cell (ecc);
e_cell_combo_restart_edit (ecc);
+
+ return TRUE;
+
}
/* This handles button press events in the popup window.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]