From: Pierre-Luc Beaudoin Date: Fri, 4 Sep 2009 00:32:08 +0000 (-0400) Subject: Port to released pyclutter 1.0 and fix coding style X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b4df59d4eb508a866c0552793fbea6bc4ec99a;p=libchamplain Port to released pyclutter 1.0 and fix coding style --- diff --git a/bindings/python/champlain-gtk/Makefile.am b/bindings/python/champlain-gtk/Makefile.am index 340b24d..17e0afc 100644 --- a/bindings/python/champlain-gtk/Makefile.am +++ b/bindings/python/champlain-gtk/Makefile.am @@ -1,4 +1,5 @@ PYDEFS=`pkg-config --variable=defsdir pygtk-2.0` +PYCLUTTERDEFS=`pkg-config --variable=defsdir pyclutter-1.0` AM_CPPFLAGS = \ -I. \ @@ -33,6 +34,7 @@ pychamplaingtk.c: pychamplaingtk.override pychamplaingtk.defs --prefix champlain \ --register $(PYDEFS)/gdk-types.defs \ --register $(PYDEFS)/gtk-types.defs \ + --register $(PYCLUTTERDEFS)/cluttergtk-types.defs \ --register $(top_srcdir)/bindings/python/champlain/pychamplain.defs \ --override pychamplaingtk.override \ pychamplaingtk.defs > $@ diff --git a/bindings/python/champlain/Makefile.am b/bindings/python/champlain/Makefile.am index 2e7a11a..16cae0d 100644 --- a/bindings/python/champlain/Makefile.am +++ b/bindings/python/champlain/Makefile.am @@ -1,4 +1,4 @@ -PYCLUTTERDEFS=`pkg-config --variable=defsdir pyclutter-0.9` +PYCLUTTERDEFS=`pkg-config --variable=defsdir pyclutter-1.0` PYGTKDEFS=`pkg-config --variable=defsdir pygtk-2.0` AM_CPPFLAGS = \ diff --git a/bindings/python/champlain/pychamplain.h b/bindings/python/champlain/pychamplain.h index 81fec45..257c952 100644 --- a/bindings/python/champlain/pychamplain.h +++ b/bindings/python/champlain/pychamplain.h @@ -2,6 +2,6 @@ #define __PYCHAMPLAIN_H__ void champlain_register_classes (PyObject *d); -void champlain_add_constants(PyObject *module, const gchar *strip_prefix); +void champlain_add_constants (PyObject *module, const gchar *strip_prefix); #endif diff --git a/bindings/python/champlain/pychamplainmodule.c b/bindings/python/champlain/pychamplainmodule.c index 5d89229..5850084 100644 --- a/bindings/python/champlain/pychamplainmodule.c +++ b/bindings/python/champlain/pychamplainmodule.c @@ -3,11 +3,11 @@ #include #include "pychamplain.h" -DL_EXPORT(void) initchamplain(void); +DL_EXPORT(void) initchamplain (void); extern PyMethodDef champlain_functions[]; DL_EXPORT(void) -initchamplain(void) +initchamplain (void) { PyObject *m, *d; diff --git a/bindings/python/demos/launcher-gtk.py b/bindings/python/demos/launcher-gtk.py index 7665f75..05a7610 100755 --- a/bindings/python/demos/launcher-gtk.py +++ b/bindings/python/demos/launcher-gtk.py @@ -17,10 +17,10 @@ class LauncherGTK: self.window.connect("destroy", gtk.main_quit) vbox = gtk.VBox(False, 12) - + self.view = champlain.View() self.view.set_property("scroll-mode", champlain.SCROLL_MODE_KINETIC) - + self.layer = create_marker_layer(self.view) self.view.add_layer(self.layer) @@ -72,19 +72,19 @@ class LauncherGTK: self.window.show_all() self.view.center_on(45.466, -73.75) - + def zoom_in(self, widget): self.view.zoom_in() def zoom_out(self, widget): self.view.zoom_out() - + def toggle_layer(self, widget): if widget.get_active(): self.layer.animate_in_all_markers() else: self.layer.animate_out_all_markers() - + def zoom_changed(self, widget): self.view.set_property("zoom-level", self.spinbutton.get_value_as_int()) diff --git a/configure.ac b/configure.ac index 2897c5b..730dbe1 100644 --- a/configure.ac +++ b/configure.ac @@ -178,7 +178,7 @@ if test x$enable_python = xyes; then glib-2.0, gobject-2.0, clutter-1.0, - pyclutter-0.9, + pyclutter-1.0, pyclutter-gtk-0.9, gconf-2.0, gtk+-2.0