aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorAndrew Wu <yang.wu@sun.com>2003-11-14 18:12:31 +0800
committerBolian Yin <byin@src.gnome.org>2003-11-14 18:12:31 +0800
commitedf5fa2abb90ce328ad367299693388d71e8bb05 (patch)
tree38ad4e077c9657cd59236a699d51d4e87746c1f5 /widgets/table
parent724be060d1e81a87440ecec92ae6180ea165438c (diff)
downloadgsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar.gz
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar.bz2
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar.lz
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar.xz
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.tar.zst
gsoc2013-evolution-edf5fa2abb90ce328ad367299693388d71e8bb05.zip
Fix for 50800 connect "e_cell_combo_list_button_press" to gtklist.
2003-11-14 Andrew Wu <yang.wu@sun.com> Fix for 50800 * gal/e-table/e-cell-combo.c (e_cell_combo_init): connect "e_cell_combo_list_button_press" to gtklist. (e_cell_combo_list_button_press): deal with the "click" event. (e_cell_combo_selection_changed): delete the action to selection changed. svn path=/trunk/; revision=23350
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-cell-combo.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 12a5618b81..5ff8afef6a 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -92,7 +92,9 @@ static void e_cell_combo_get_popup_pos (ECellCombo *ecc,
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 @@ e_cell_combo_init (ECellCombo *ecc)
"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 @@ e_cell_combo_selection_changed(GtkWidget *popup_list, ECellCombo *ecc)
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.