aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-11-06 03:52:33 +0800
committerChris Lahey <clahey@src.gnome.org>2001-11-06 03:52:33 +0800
commit514e14b2c6fe46d3a786517cfd546a9ac2080af9 (patch)
tree2492381b7de6967d2e8d7d178e7b6d8a751bb5ec
parent76d416305f74670cebaaaa639f39554b77cbe3e0 (diff)
downloadgsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar.gz
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar.bz2
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar.lz
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar.xz
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.tar.zst
gsoc2013-evolution-514e14b2c6fe46d3a786517cfd546a9ac2080af9.zip
New functions here.
2001-11-03 Christopher James Lahey <clahey@ximian.com> * e-cell-popup.c, e-cell-popup.h (e_cell_popup_set_shown, e_cell_popup_queue_cell_redraw): New functions here. * e-cell-combo.c: Use e_cell_popup_set_shown to set the popup_shown variable so that ECellPopup can properly request a redraw. svn path=/trunk/; revision=14592
-rw-r--r--widgets/table/e-cell-combo.c8
-rw-r--r--widgets/table/e-cell-popup.c19
-rw-r--r--widgets/table/e-cell-popup.h14
3 files changed, 32 insertions, 9 deletions
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index d4e6b605d2..1844c5c81f 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -350,7 +350,7 @@ e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col)
gdk_window_resize (ecc->popup_window->window, width, height);
gtk_widget_show (ecc->popup_window);
- E_CELL_POPUP (ecc)->popup_shown = TRUE;
+ e_cell_popup_set_shown (E_CELL_POPUP (ecc), TRUE);
d(g_print("%s: popup_shown = TRUE\n", __FUNCTION__));
}
@@ -520,7 +520,7 @@ e_cell_combo_button_press (GtkWidget *popup_window,
gdk_pointer_ungrab (event->button.time);
gtk_widget_hide (ecc->popup_window);
- E_CELL_POPUP (ecc)->popup_shown = FALSE;
+ e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE);
d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
/* We don't want to update the cell here. Since the list is in browse
@@ -561,7 +561,7 @@ e_cell_combo_button_release (GtkWidget *popup_window,
gdk_pointer_ungrab (event->time);
gtk_widget_hide (ecc->popup_window);
- E_CELL_POPUP (ecc)->popup_shown = FALSE;
+ 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);
@@ -590,7 +590,7 @@ e_cell_combo_key_press (GtkWidget *popup_window,
gdk_pointer_ungrab (event->time);
gtk_widget_hide (ecc->popup_window);
- E_CELL_POPUP (ecc)->popup_shown = FALSE;
+ e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE);
d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
if (event->keyval != GDK_Escape)
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 3791d4c7aa..bf0104758f 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -507,3 +507,22 @@ e_cell_popup_do_popup (ECellPopupView *ecp_view,
return popup_func ? popup_func (ecp, event, row, view_col) : FALSE;
}
+
+/* This redraws the popup cell. Only use this if you know popup_view_col and
+ popup_row are valid. */
+void
+e_cell_popup_queue_cell_redraw (ECellPopup *ecp)
+{
+ ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
+
+ e_table_item_redraw_range (eti, ecp->popup_view_col, ecp->popup_row,
+ ecp->popup_view_col, ecp->popup_row);
+}
+
+void
+e_cell_popup_set_shown (ECellPopup *ecp,
+ gboolean shown)
+{
+ ecp->popup_shown = shown;
+ e_cell_popup_queue_cell_redraw (ecp);
+}
diff --git a/widgets/table/e-cell-popup.h b/widgets/table/e-cell-popup.h
index 8f89ddf9ef..eba0d941df 100644
--- a/widgets/table/e-cell-popup.h
+++ b/widgets/table/e-cell-popup.h
@@ -82,12 +82,16 @@ struct _ECellPopupView {
};
-GtkType e_cell_popup_get_type (void);
-ECell *e_cell_popup_new (void);
+GtkType e_cell_popup_get_type (void);
+ECell *e_cell_popup_new (void);
/* Get and set the child ECell. */
-ECell *e_cell_popup_get_child (ECellPopup *ecp);
-void e_cell_popup_set_child (ECellPopup *ecp,
- ECell *child);
+ECell *e_cell_popup_get_child (ECellPopup *ecp);
+void e_cell_popup_set_child (ECellPopup *ecp,
+ ECell *child);
+
+void e_cell_popup_set_shown (ECellPopup *ecp,
+ gboolean shown);
+void e_cell_popup_queue_cell_redraw (ECellPopup *ecp);
#endif /* _E_CELL_POPUP_H_ */