[libwnck] Fix a few issues when building with GSEAL_ENABLED. See bug 612490.
- From: Andre Klapper <aklapper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] Fix a few issues when building with GSEAL_ENABLED. See bug 612490.
- Date: Fri, 16 Apr 2010 10:42:13 +0000 (UTC)
commit 3814479fe56974b3837ca15ac5891aba2433ecc1
Author: Andre Klapper <a9016009 gmx de>
Date: Fri Apr 16 12:40:44 2010 +0200
Fix a few issues when building with GSEAL_ENABLED. See bug 612490.
libwnck/pager-accessible.c | 20 ++++++++++++++++++++
libwnck/tasklist.c | 2 +-
libwnck/test-tasklist.c | 2 +-
libwnck/workspace-accessible.c | 4 ++++
4 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/libwnck/pager-accessible.c b/libwnck/pager-accessible.c
index 61f6753..c216081 100644
--- a/libwnck/pager-accessible.c
+++ b/libwnck/pager-accessible.c
@@ -153,7 +153,11 @@ wnck_pager_add_selection (AtkSelection *selection,
GtkWidget *widget;
int n_spaces;
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+#else
widget = GTK_ACCESSIBLE (selection)->widget;
+#endif
if (widget == NULL)
{
@@ -194,7 +198,11 @@ wnck_pager_ref_selection (AtkSelection *selection,
g_return_val_if_fail (i == 0, NULL);
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+#else
widget = GTK_ACCESSIBLE (selection)->widget;
+#endif
if (widget == NULL)
{
/*
@@ -221,7 +229,11 @@ wnck_pager_selection_count (AtkSelection *selection)
{
GtkWidget *widget;
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+#else
widget = GTK_ACCESSIBLE (selection)->widget;
+#endif
if (widget == NULL)
{
/*
@@ -248,7 +260,11 @@ wnck_pager_is_child_selected (AtkSelection *selection,
WnckWorkspace *active_wspace;
int wsno;
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+#else
widget = GTK_ACCESSIBLE (selection)->widget;
+#endif
if (widget == NULL)
{
/*
@@ -378,7 +394,11 @@ wnck_pager_accessible_ref_child (AtkObject *obj,
g_return_val_if_fail (ATK_IS_OBJECT (obj), NULL);
accessible = GTK_ACCESSIBLE (obj);
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (accessible);
+#else
widget = accessible->widget;
+#endif
if (widget == NULL)
/* State is defunct */
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 9e1c6ad..d35709d 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -3976,7 +3976,7 @@ fake_expose_widget (GtkWidget *widget,
gtk_widget_set_window (widget, pixmap);
but pixmap is not a GdkWindow...
*/
- widget->window = pixmap;
+ gtk_widget_set_window (widget, pixmap);
allocation.x += x;
allocation.y += y;
gtk_widget_set_allocation (widget, &allocation);
diff --git a/libwnck/test-tasklist.c b/libwnck/test-tasklist.c
index 850af0d..ea9577e 100644
--- a/libwnck/test-tasklist.c
+++ b/libwnck/test-tasklist.c
@@ -29,7 +29,7 @@ window_expose_event (GtkWidget *widget,
{
cairo_t *cr;
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
gdk_cairo_region (cr, event->region);
cairo_set_source_rgba (cr, 1., 1., 1., .5);
diff --git a/libwnck/workspace-accessible.c b/libwnck/workspace-accessible.c
index 26eb42e..8addbff 100644
--- a/libwnck/workspace-accessible.c
+++ b/libwnck/workspace-accessible.c
@@ -120,7 +120,11 @@ wnck_workspace_accessible_get_extents (AtkComponent *component,
workspace = WNCK_WORKSPACE (g_obj);
parent = atk_object_get_parent (ATK_OBJECT(component));
+#if GTK_CHECK_VERSION(2,21,0)
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
+#else
widget = GTK_ACCESSIBLE (parent)->widget;
+#endif
if (widget == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]