From 9e2412ce340e7e39a1fe6532151afd4fdbe8bb37 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Sun, 20 Jul 2008 17:02:33 +0000 Subject: Committing on behalf of Milan Crha 2008-07-15 Milan Crha ** Part of fix for bug #329821 * e-table-item.c: (find_cell): Do not consider last row's height till the bottom. * e-table-item.h: (e_table_item_compute_mouse_over): * e-table-item.c: (e_table_item_compute_mouse_over): * e-table-group-container.c: (etgc_compute_mouse_over), (etgc_class_init): * e-table-group-leaf.c: (etgl_compute_mouse_over), (etgl_class_init): * e-table.h: (e_table_get_mouse_over_cell): * e-table.c: (e_table_get_mouse_over_cell): * e-table-group.h: (struct ETableGroupClass), (e_table_group_compute_mouse_over): * e-table-group.c: (e_table_group_compute_mouse_over), (etg_class_init): Be able to calculate mouse-over position correctly, relatively to the ETableItem. svn path=/trunk/; revision=35778 --- widgets/table/e-table.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 6ee1a93cbd..c260199ecb 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -2413,6 +2413,24 @@ e_table_get_cell_geometry (ETable *table, } } +/** + * e_table_get_mouse_over_cell: + * Similar to e_table_get_cell_at, only here we recalculate x,y relatively to each item. + **/ +void +e_table_get_mouse_over_cell (ETable *table, int x, int y, int *row, int *col) +{ + g_return_if_fail (table != NULL); + g_return_if_fail (E_IS_TABLE (table)); + + x += GTK_LAYOUT (table->table_canvas)->hadjustment->value; + y += GTK_LAYOUT (table->table_canvas)->vadjustment->value; + + y -= E_TABLE_HEADER_ITEM (table->header_item)->height; + + e_table_group_compute_mouse_over (table->group, x, y, row, col); +} + /** * e_table_get_selection_model: * @table: The #ETable to query -- cgit v1.2.3 From 1f8187e8da5ebfc67730e3f9a82487a0a44239fb Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Tue, 30 Sep 2008 15:19:23 +0000 Subject: Change License from GPL to LGPL. svn path=/trunk/; revision=36502 --- widgets/table/e-table.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index c260199ecb..bd2926c682 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -1,25 +1,26 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * e-table.c - A graphical view of a Table. - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - * Authors: - * Chris Lahey - * Miguel de Icaza * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License, version 2, as published by the Free Software Foundation. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Chris Lahey + * Miguel de Icaza + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. */ #include -- cgit v1.2.3 From 5f0a7fea0d679915459fb28a98c82d61cb79b673 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 16 Feb 2009 11:00:23 +0000 Subject: ** Fix for bug #550114 2009-02-16 Milan Crha ** Fix for bug #550114 * widgets/table/e-table-group.h: * widgets/table/e-table-group.c: * widgets/table/e-table-group-container.c: * widgets/table/e-table-group-leaf.c: Replaced 'compute_mouse_over' with 'get_mouse_over', now works with cached values 'motion_row', 'motion_col'. * widgets/table/e-table.c: (e_table_get_mouse_over_cell): Mouse position not required anymore, remove it too then. * calendar/gui/e-calendar-table.h: (ec_query_tooltip): * calendar/gui/e-calendar-table.c: (ec_query_tooltip): Offer it to others too. * calendar/gui/e-calendar-table.c: (query_tooltip_cb): Use above funtion. Show proper tooltip in table with grouping columns. * calendar/gui/e-memo-table.c: (query_tooltip_cb), (e_memo_table_init): Show tooltips in memo view too. svn path=/trunk/; revision=37275 --- widgets/table/e-table.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index bd2926c682..b2e6b0ecaf 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -2416,20 +2416,18 @@ e_table_get_cell_geometry (ETable *table, /** * e_table_get_mouse_over_cell: - * Similar to e_table_get_cell_at, only here we recalculate x,y relatively to each item. + * Similar to e_table_get_cell_at, only here we check based on the mouse motion information in the group. **/ void -e_table_get_mouse_over_cell (ETable *table, int x, int y, int *row, int *col) +e_table_get_mouse_over_cell (ETable *table, int *row, int *col) { g_return_if_fail (table != NULL); g_return_if_fail (E_IS_TABLE (table)); - x += GTK_LAYOUT (table->table_canvas)->hadjustment->value; - y += GTK_LAYOUT (table->table_canvas)->vadjustment->value; - - y -= E_TABLE_HEADER_ITEM (table->header_item)->height; + if (!table->group) + return; - e_table_group_compute_mouse_over (table->group, x, y, row, col); + e_table_group_get_mouse_over (table->group, row, col); } /** -- cgit v1.2.3 From e42f27652709397453431b75c32601a4f4effd48 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 23 Apr 2009 10:02:07 -0400 Subject: =?UTF-8?q?Bug=20577929=20=E2=80=93=20Consolidate=20marshallers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consolidate all marshalling specifications to e-util/e-marshal.list. This reduces code duplication and makes it slightly easier to locate unused marshallers. --- widgets/table/e-table.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index b2e6b0ecaf..69a300d950 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -3141,7 +3141,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, double_click), NULL, NULL, - e_util_marshal_NONE__INT_INT_BOXED, + e_marshal_NONE__INT_INT_BOXED, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); @@ -3151,7 +3151,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, right_click), NULL, NULL, - e_util_marshal_INT__INT_INT_BOXED, + e_marshal_INT__INT_INT_BOXED, G_TYPE_INT, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); @@ -3161,7 +3161,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, click), NULL, NULL, - e_util_marshal_INT__INT_INT_BOXED, + e_marshal_INT__INT_INT_BOXED, G_TYPE_INT, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); @@ -3171,7 +3171,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, key_press), NULL, NULL, - e_util_marshal_INT__INT_INT_BOXED, + e_marshal_INT__INT_INT_BOXED, G_TYPE_INT, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); @@ -3181,7 +3181,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, start_drag), NULL, NULL, - e_util_marshal_INT__INT_INT_BOXED, + e_marshal_INT__INT_INT_BOXED, G_TYPE_INT, 3, G_TYPE_INT, G_TYPE_INT, GDK_TYPE_EVENT); @@ -3200,7 +3200,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, white_space_event), NULL, NULL, - e_util_marshal_INT__BOXED, + e_marshal_INT__BOXED, G_TYPE_INT, 1, GDK_TYPE_EVENT); et_signals[TABLE_DRAG_BEGIN] = @@ -3209,7 +3209,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_begin), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT, + e_marshal_NONE__INT_INT_OBJECT, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, @@ -3220,7 +3220,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_end), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT, + e_marshal_NONE__INT_INT_OBJECT, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, @@ -3231,7 +3231,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_data_get), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT_BOXED_UINT_UINT, + e_marshal_NONE__INT_INT_OBJECT_BOXED_UINT_UINT, G_TYPE_NONE, 6, G_TYPE_INT, G_TYPE_INT, @@ -3245,7 +3245,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_data_delete), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT, + e_marshal_NONE__INT_INT_OBJECT, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, @@ -3257,7 +3257,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_leave), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT_UINT, + e_marshal_NONE__INT_INT_OBJECT_UINT, G_TYPE_NONE, 4, G_TYPE_INT, G_TYPE_INT, @@ -3269,7 +3269,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_motion), NULL, NULL, - e_util_marshal_BOOLEAN__INT_INT_OBJECT_INT_INT_UINT, + e_marshal_BOOLEAN__INT_INT_OBJECT_INT_INT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_INT, G_TYPE_INT, @@ -3283,7 +3283,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_drop), NULL, NULL, - e_util_marshal_BOOLEAN__INT_INT_OBJECT_INT_INT_UINT, + e_marshal_BOOLEAN__INT_INT_OBJECT_INT_INT_UINT, G_TYPE_BOOLEAN, 6, G_TYPE_INT, G_TYPE_INT, @@ -3297,7 +3297,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, table_drag_data_received), NULL, NULL, - e_util_marshal_NONE__INT_INT_OBJECT_INT_INT_BOXED_UINT_UINT, + e_marshal_NONE__INT_INT_OBJECT_INT_INT_BOXED_UINT_UINT, G_TYPE_NONE, 8, G_TYPE_INT, G_TYPE_INT, @@ -3316,7 +3316,7 @@ e_table_class_init (ETableClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ETableClass, set_scroll_adjustments), NULL, NULL, - e_util_marshal_NONE__OBJECT_OBJECT, + e_marshal_NONE__OBJECT_OBJECT, G_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD, -- cgit v1.2.3