[goocanvas] Update source code for GTK+ 3.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas] Update source code for GTK+ 3.
- Date: Fri, 11 Jun 2010 20:44:38 +0000 (UTC)
commit 65d3b5b2364e840a154cdfad3a4e6f3dcd1a931e
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jun 11 22:44:25 2010 +0200
Update source code for GTK+ 3.
* demo/Makefile.am: Fix a typo.
* demo/demo-grabs.c (create_fixed):
* demo/mv-demo-grabs.c (create_fixed):
* src/goocanvas.c (goo_canvas_grab_focus), (goo_canvas_focus):
* src/goocanvasatk.c (goo_canvas_item_accessible_grab_focus),
(goo_canvas_item_accessible_ref_state_set):
Replace use of gtk_fixed_set_has_window() with gtk_widget_set_has_window().
Replace use of GTK_WIDGET_CAN_FOCUS() with gtk_widget_get_can_focus().
Replace use of GTK_WIDGET_TOPLEVEL() with gtk_widget_is_toplevel().
This seems to all work fine.
ChangeLog | 16 ++++++++++++++++
demo/Makefile.am | 2 +-
demo/demo-grabs.c | 2 +-
demo/mv-demo-grabs.c | 2 +-
src/goocanvas.c | 4 ++--
src/goocanvasatk.c | 4 ++--
6 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1c5ea31..ba49467 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2010-06-11 Murray Cumming <murrayc murrayc com>
+ Update source code for GTK+ 3.
+
+ * demo/Makefile.am: Fix a typo.
+ * demo/demo-grabs.c (create_fixed):
+ * demo/mv-demo-grabs.c (create_fixed):
+ * src/goocanvas.c (goo_canvas_grab_focus), (goo_canvas_focus):
+ * src/goocanvasatk.c (goo_canvas_item_accessible_grab_focus),
+ (goo_canvas_item_accessible_ref_state_set):
+ Replace use of gtk_fixed_set_has_window() with gtk_widget_set_has_window().
+ Replace use of GTK_WIDGET_CAN_FOCUS() with gtk_widget_get_can_focus().
+ Replace use of GTK_WIDGET_TOPLEVEL() with gtk_widget_is_toplevel().
+
+ This seems to all work fine.
+
+2010-06-11 Murray Cumming <murrayc murrayc com>
+
Use GTK+ 3 instead of GTK+ 2.
* goocanvas.pc.in: Rename to goocanvas-2.0.pc.in:
diff --git a/demo/Makefile.am b/demo/Makefile.am
index 07e0ddb..4fe8d49 100644
--- a/demo/Makefile.am
+++ b/demo/Makefile.am
@@ -53,7 +53,7 @@ mv_simple_demo_LDADD = $(DEMO_LIBS)
scalability_demo_SOURCES = \
scalability-demo.c
-scalability_demo_LDADD = $(top_builddir)/src/libgoocanva-2.0s.la @PACKAGE_LIBS@ $(INTLLIBS)
+scalability_demo_LDADD = $(DEMO_LIBS)
mv_scalability_demo_SOURCES = \
mv-scalability-demo.c
diff --git a/demo/demo-grabs.c b/demo/demo-grabs.c
index 77ca24a..e1d1c3f 100644
--- a/demo/demo-grabs.c
+++ b/demo/demo-grabs.c
@@ -212,7 +212,7 @@ create_fixed (GtkTable *table, gint row, gchar *text, gchar *id)
gtk_widget_show (label);
fixed = gtk_fixed_new ();
- gtk_fixed_set_has_window (GTK_FIXED (fixed), TRUE);
+ gtk_widget_set_has_window (GTK_FIXED (fixed), TRUE);
gtk_widget_set_events (fixed,
GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
diff --git a/demo/mv-demo-grabs.c b/demo/mv-demo-grabs.c
index fd3db06..c5fa53b 100644
--- a/demo/mv-demo-grabs.c
+++ b/demo/mv-demo-grabs.c
@@ -217,7 +217,7 @@ create_fixed (GtkTable *table, gint row, gchar *text, gchar *id)
gtk_widget_show (label);
fixed = gtk_fixed_new ();
- gtk_fixed_set_has_window (GTK_FIXED (fixed), TRUE);
+ gtk_widget_set_has_window (fixed, TRUE);
gtk_widget_set_events (fixed,
GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
diff --git a/src/goocanvas.c b/src/goocanvas.c
index 32f18ab..30ae902 100644
--- a/src/goocanvas.c
+++ b/src/goocanvas.c
@@ -3393,7 +3393,7 @@ goo_canvas_grab_focus (GooCanvas *canvas,
g_return_if_fail (GOO_IS_CANVAS (canvas));
g_return_if_fail (GOO_IS_CANVAS_ITEM (item));
- g_return_if_fail (GTK_WIDGET_CAN_FOCUS (canvas));
+ g_return_if_fail (gtk_widget_get_can_focus (GTK_WIDGET (canvas)));
if (canvas->focused_item) {
event.type = GDK_FOCUS_CHANGE;
@@ -4224,7 +4224,7 @@ goo_canvas_focus (GtkWidget *widget,
canvas = GOO_CANVAS (widget);
/* If keyboard navigation has been turned off for the canvas, return FALSE.*/
- if (!GTK_WIDGET_CAN_FOCUS (canvas))
+ if (!gtk_widget_get_can_focus (widget))
return FALSE;
/* If a child widget has the focus, try moving the focus within that. */
diff --git a/src/goocanvasatk.c b/src/goocanvasatk.c
index 451a829..4410e52 100644
--- a/src/goocanvasatk.c
+++ b/src/goocanvasatk.c
@@ -222,7 +222,7 @@ goo_canvas_item_accessible_grab_focus (AtkComponent *component)
goo_canvas_grab_focus (canvas, item);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (canvas));
- if (GTK_WIDGET_TOPLEVEL (toplevel))
+ if (gtk_widget_is_toplevel (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
return TRUE;
@@ -414,7 +414,7 @@ goo_canvas_item_accessible_ref_state_set (AtkObject *accessible)
g_object_get (item, "can-focus", &can_focus, NULL);
- if (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (canvas)) && can_focus)
+ if (gtk_widget_get_can_focus (GTK_WIDGET (canvas)) && can_focus)
{
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]