aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-07 06:07:28 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-07 06:07:28 +0800
commitba57a90d939acce8ddc2b480f22de64be5c7a7f8 (patch)
tree9f260b685c9b89c42b37d4cafc681cd867cb4c3b /widgets/table/e-table.c
parent58e53223b1999d4b2207db0464f02e1cad9d4618 (diff)
downloadgsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar.gz
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar.bz2
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar.lz
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar.xz
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.tar.zst
gsoc2013-evolution-ba57a90d939acce8ddc2b480f22de64be5c7a7f8.zip
Implemented these functions.
2001-08-06 Christopher James Lahey <clahey@ximian.com> * e-table.c, e-table.h (e_table_drag_highlight, e_table_drag_unhighlight): Implemented these functions. * e-tree.c (e_tree_drag_highlight, e_tree_drag_unhighlight): Implemented these functions. svn path=/trunk/; revision=11713
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 83296059c8..166f864348 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -1666,6 +1666,39 @@ e_table_drag_highlight (ETable *table,
{
g_return_if_fail(table != NULL);
g_return_if_fail(E_IS_TABLE(table));
+
+ if (row != -1) {
+ int x, y, width, height;
+ if (col == -1) {
+ e_table_get_cell_geometry (table, row, 0, &x, &y, &width, &height);
+ x = 0;
+ width = GTK_WIDGET (table->table_canvas)->allocation.width;
+ } else {
+ e_table_get_cell_geometry (table, row, col, &x, &y, &width, &height);
+ x += GTK_LAYOUT(table->table_canvas)->hadjustment->value;
+ }
+ y += GTK_LAYOUT(table->table_canvas)->vadjustment->value;
+
+ if (table->drop_highlight == NULL) {
+ table->drop_highlight =
+ gnome_canvas_item_new (gnome_canvas_root (table->table_canvas),
+ gnome_canvas_rect_get_type (),
+ "fill_color", NULL,
+ /* "outline_color", "black",
+ "width_pixels", 1,*/
+ "outline_color_gdk", &(GTK_WIDGET (table)->style->fg[GTK_STATE_NORMAL]),
+ NULL);
+ }
+ gnome_canvas_item_set (table->drop_highlight,
+ "x1", (double) x,
+ "x2", (double) x + width - 1,
+ "y1", (double) y,
+ "y2", (double) y + height - 1,
+ NULL);
+ } else {
+ gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
+ table->drop_highlight = NULL;
+ }
}
void
@@ -1673,6 +1706,11 @@ e_table_drag_unhighlight (ETable *table)
{
g_return_if_fail(table != NULL);
g_return_if_fail(E_IS_TABLE(table));
+
+ if (table->drop_highlight) {
+ gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
+ table->drop_highlight = NULL;
+ }
}
void e_table_drag_dest_set (ETable *table,