aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-04 19:05:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-04 20:34:15 +0800
commit970662db34ff0a718cd5e39c1fa268beb51e1f64 (patch)
tree73c987b95c107ae7e3014abdca4c95de12dc853d /widgets/table
parent3ee48d9bf66fbc76b7b06e77aafa015c341cd419 (diff)
downloadgsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.gz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.bz2
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.lz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.xz
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.tar.zst
gsoc2013-evolution-970662db34ff0a718cd5e39c1fa268beb51e1f64.zip
More GTK3 preparation.
This uses the new gtk_assistant_commit() I had added to GTK+ for our EImportAssistant progress page.
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-header-item.c11
-rw-r--r--widgets/table/gal-a11y-e-table.c11
-rw-r--r--widgets/table/gal-a11y-e-tree.c9
3 files changed, 22 insertions, 9 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 133a368754..a80315a596 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -37,6 +37,7 @@
#include <glib/gi18n.h>
#include "e-util/e-util.h"
#include "e-util/e-xml-utils.h"
+#include "e-util/gtk-compat.h"
#include "misc/e-canvas.h"
#include "misc/e-popup-menu.h"
@@ -614,24 +615,26 @@ do_drag_motion (ETableHeaderItem *ethi,
{
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))) {
+ GdkDragAction suggested_action;
gint col;
d(g_print("In header\n"));
col = ethi_find_col_by_x_nearest (ethi, x);
+ suggested_action = gdk_drag_context_get_suggested_action (context);
if (ethi->drag_col != -1 && (col == ethi->drag_col || col == ethi->drag_col + 1)) {
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
ethi_remove_drop_marker (ethi);
- gdk_drag_status (context, context->suggested_action, time);
+ gdk_drag_status (context, suggested_action, time);
}
else if (col != -1) {
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
ethi_add_drop_marker (ethi, col, recreate);
- gdk_drag_status (context, context->suggested_action, time);
+ gdk_drag_status (context, suggested_action, time);
} else {
ethi_remove_drop_marker (ethi);
if (ethi->drag_col != -1)
@@ -750,6 +753,7 @@ ethi_drag_motion (GtkWidget *widget,
{
GtkAllocation allocation;
GtkAdjustment *adjustment;
+ GList *targets;
gdouble hadjustment_value;
gdouble vadjustment_value;
gchar *droptype, *headertype;
@@ -757,7 +761,8 @@ ethi_drag_motion (GtkWidget *widget,
gdk_drag_status (context, 0, time);
- droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (context->targets->data));
+ targets = gdk_drag_context_list_targets (context);
+ droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (targets->data));
headertype = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE,
ethi->dnd_code);
diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c
index 6134b2d297..8aef407941 100644
--- a/widgets/table/gal-a11y-e-table.c
+++ b/widgets/table/gal-a11y-e-table.c
@@ -22,6 +22,8 @@
#include <config.h>
+#include "e-util/gtk-compat.h"
+
#include "a11y/gal-a11y-util.h"
#include "table/e-table.h"
#include "table/e-table-click-to-add.h"
@@ -89,7 +91,7 @@ init_child_item (GalA11yETable *a11y)
if (!a11y || !GTK_IS_ACCESSIBLE (a11y))
return FALSE;
- table = E_TABLE (GTK_ACCESSIBLE (a11y)->widget);
+ table = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER(table->group)) {
ETableGroupContainer *etgc = (ETableGroupContainer *)table->group;
GList *list;
@@ -127,7 +129,7 @@ et_get_n_children (AtkObject *accessible)
ETable * et;
gint n = 0;
- et = E_TABLE(GTK_ACCESSIBLE (a11y)->widget);
+ et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
if (et->group) {
if (E_IS_TABLE_GROUP_LEAF (et->group))
@@ -152,7 +154,7 @@ et_ref_child (AtkObject *accessible,
ETable * et;
gint child_no;
- et = E_TABLE(GTK_ACCESSIBLE (a11y)->widget);
+ et = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
child_no = et_get_n_children (accessible);
if (i == 0 || i < child_no - 1) {
@@ -281,7 +283,8 @@ gal_a11y_e_table_new (GObject *widget)
a11y = g_object_new (gal_a11y_e_table_get_type (), NULL);
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
+ /* FIXME No way to do this in GTK 3. */
+ /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/
/* we need to init all the children for multiple table items */
if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER (table->group)) {
diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c
index 879b517aab..c65ed543c8 100644
--- a/widgets/table/gal-a11y-e-tree.c
+++ b/widgets/table/gal-a11y-e-tree.c
@@ -22,6 +22,8 @@
#include <config.h>
+#include "e-util/gtk-compat.h"
+
#include "a11y/gal-a11y-util.h"
#include "table/e-table-item.h"
#include "table/e-tree.h"
@@ -47,10 +49,12 @@ static void
init_child_item (GalA11yETree *a11y)
{
GalA11yETreePrivate *priv = GET_PRIVATE (a11y);
- ETree *tree = E_TREE (GTK_ACCESSIBLE (a11y)->widget);
+ ETree *tree;
ETableItem * eti;
+ tree = E_TREE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y)));
g_return_if_fail (tree);
+
eti = e_tree_get_item (tree);
if (priv->child_item == NULL) {
priv->child_item = atk_gobject_accessible_for_object (G_OBJECT (eti));
@@ -174,7 +178,8 @@ gal_a11y_e_tree_new (GObject *widget)
a11y = g_object_new (gal_a11y_e_tree_get_type (), NULL);
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
+ /* FIXME No way to do this in GTK 3. */
+ /*GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);*/
return ATK_OBJECT (a11y);
}