aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-06-05 23:47:23 +0800
committerChris Lahey <clahey@src.gnome.org>2002-06-05 23:47:23 +0800
commit882e28269d85c84086b4fee1938f3cb11c82ce6f (patch)
treef877266b12335d7afe5768953adb182e983789d9 /widgets/table
parentee96e3762905713b1785d24f6de278608060d6c3 (diff)
downloadgsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar.gz
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar.bz2
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar.lz
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar.xz
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.tar.zst
gsoc2013-evolution-882e28269d85c84086b4fee1938f3cb11c82ce6f.zip
Added debugging printfs.
2002-06-05 Christopher James Lahey <clahey@ximian.com> * e-table-field-chooser-item.c: Added debugging printfs. * e-table-header-item.c: Added debugging printfs. (ethi_drag_motion): Don't subtract widget->allocation.* here. It seems that this value is affected by whether the table is using a click to add field. Not sure why. * e-table-item.c (eti_realize): Check for NULL selection here. svn path=/trunk/; revision=17118
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-field-chooser-item.c3
-rw-r--r--widgets/table/e-table-header-item.c8
-rw-r--r--widgets/table/e-table-item.c3
3 files changed, 13 insertions, 1 deletions
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index cf974d2327..d09dfd6e11 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -42,6 +42,8 @@
#include "e-table-field-chooser-item.h"
+#define d(x)
+
#if 0
enum {
BUTTON_PRESSED,
@@ -546,6 +548,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci, GdkEvent *event, double x, doub
etfci->drag_col = ecol->col_idx;
etfci_drag_types[0].target = g_strdup_printf("%s-%s", etfci_drag_types[0].target, etfci->dnd_code);
+ d(g_print ("etfci - %s\n", etfci_drag_types[0].target));
list = gtk_target_list_new (etfci_drag_types, ELEMENTS (etfci_drag_types));
context = gtk_drag_begin (widget, list, GDK_ACTION_MOVE, 1, event);
g_free(etfci_drag_types[0].target);
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 66b570ce10..142e63b809 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -592,9 +592,12 @@ do_drag_motion(ETableHeaderItem *ethi,
guint time,
gboolean recreate)
{
+ d(g_print("In do_drag_motion\n"));
+ d(g_print("x = %d, y = %d, ethi->width = %d, ethi->height = %d\n", x, y, ethi->width, ethi->height));
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))){
int col;
+ d(g_print("In header\n"));
col = ethi_find_col_by_x_nearest (ethi, x);
@@ -718,8 +721,12 @@ ethi_drag_motion (GtkWidget *widget, GdkDragContext *context,
g_free (headertype);
+ d(g_print ("y = %d, widget->allocation.y = %d, GTK_LAYOUT (widget)->vadjustment->value = %f\n", y, widget->allocation.y, GTK_LAYOUT (widget)->vadjustment->value));
+
+#if 0
x -= widget->allocation.x;
y -= widget->allocation.y;
+#endif
if (x < 20)
direction |= ET_SCROLL_LEFT;
@@ -850,6 +857,7 @@ ethi_drag_drop (GtkWidget *canvas,
if (col != -1) {
char *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
+ d(g_print ("ethi - %s\n", target));
gtk_drag_get_data (canvas, context, gdk_atom_intern(target, FALSE), time);
g_free (target);
}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 86f55aeab2..a6697544fa 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1665,8 +1665,9 @@ eti_realize (GnomeCanvasItem *item)
free_height_cache(eti);
- if (item->canvas->focused_item == NULL) {
+ if (item->canvas->focused_item == NULL && eti->selection) {
int row;
+
row = e_selection_model_cursor_row (E_SELECTION_MODEL (eti->selection));
row = model_to_view_row(eti, row);
if (row != -1) {