[gtk-mac-integration] [Introspection] Remove bindings/python/gtk3_osxapplication, made obsolete by gobject-introspection.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] [Introspection] Remove bindings/python/gtk3_osxapplication, made obsolete by gobject-introspection.
- Date: Thu, 29 Dec 2011 23:35:52 +0000 (UTC)
commit 067d4ecde044a6d05fd4285501159003da43ebe1
Author: John Ralls <jralls ceridwen us>
Date: Fri Nov 25 15:11:58 2011 -0800
[Introspection] Remove bindings/python/gtk3_osxapplication, made obsolete by gobject-introspection.
bindings/python/gtk3_osxapplication/Makefile.am | 39 ----
bindings/python/gtk3_osxapplication/__init__.py | 28 ---
.../gtk_osxapplication.override | 183 --------------------
.../python/gtk3_osxapplication/test-integration.py | 86 ---------
.../gtkosx_application-module.c} | 3 +-
.../gtk_osxapplication/gtkosx_application.override | 93 ++++++++++
6 files changed, 94 insertions(+), 338 deletions(-)
---
diff --git a/bindings/python/gtk3_osxapplication/gtk_osxapplication-module.c b/bindings/python/gtk_osxapplication/gtkosx_application-module.c
similarity index 90%
rename from bindings/python/gtk3_osxapplication/gtk_osxapplication-module.c
rename to bindings/python/gtk_osxapplication/gtkosx_application-module.c
index 61ac186..a170d71 100644
--- a/bindings/python/gtk3_osxapplication/gtk_osxapplication-module.c
+++ b/bindings/python/gtk_osxapplication/gtkosx_application-module.c
@@ -1,5 +1,4 @@
-#define NO_IMPORT_PYGOBJECT
-#include <pygtk-2.0/pygobject.h>
+#include <pygobject.h>
void gtk_osxapplication_register_classes (PyObject *d);
void pygtk_osxapplication_add_constants(PyObject *module, const gchar *strip_prefix);
diff --git a/bindings/python/gtk_osxapplication/gtkosx_application.override b/bindings/python/gtk_osxapplication/gtkosx_application.override
new file mode 100644
index 0000000..4e88427
--- /dev/null
+++ b/bindings/python/gtk_osxapplication/gtkosx_application.override
@@ -0,0 +1,93 @@
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+%%
+headers
+#include <Python.h>
+#include <pygtk/pygtk.h>
+#include <gtkosxapplication.h>
+
+%%
+modulename gtk_osxapplication
+%%
+import gobject.GObject as PyGObject_Type
+import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
+import gtk.MenuShell as PyGtkMenuShell_Type
+import gtk.MenuItem as PyGtkMenuItem_Type
+import gtk.Window as PyGtkWindow_Type
+import gtk.Widget as PyGtkWidget_Type
+%%
+ignore-glob
+ *_get_type
+%%
+override gtk_osxapplication_add_app_menu_group noargs
+static PyObject*
+_wrap_gtk_osxapplication_add_app_menu_group (PyGObject *self)
+{
+ GtkOSXApplicationMenuGroup *group;
+ PyObject *ret;
+
+ group = gtk_osxapplication_add_app_menu_group (GTK_OSX_APPLICATION(self->obj));
+
+ ret = PyCObject_FromVoidPtr ((void *) group, NULL);
+
+ return ret;
+}
+%%
+override gtk_osxapplication_add_app_menu_item kwargs
+static PyObject*
+_wrap_gtk_osxapplication_add_app_menu_item (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "group", "item", NULL };
+ PyObject *pygroup;
+ PyObject *pyitem;
+ GtkOSXApplicationMenuGroup *group;
+ GtkMenuItem *item;
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO!:add_app_menu_item",
+ kwlist,
+ &pygroup,
+ &PyGtkMenuItem_Type,
+ &pyitem))
+ return NULL;
+
+ Py_INCREF (Py_None);
+ group = PyCObject_AsVoidPtr (pygroup);
+ item = GTK_MENU_ITEM (pygobject_get (pyitem));
+ g_return_val_if_fail(group != NULL, Py_None);
+ gtk_osxapplication_add_app_menu_item (GTK_OSX_APPLICATION(self->obj), group, item);
+ return Py_None;
+}
+%%
+override gtk_osxapplication_insert_app_menu_item kwargs
+static PyObject*
+_wrap_gtk_osxapplication_insert_app_menu_item (PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "item", "index", NULL };
+ PyObject *pyitem;
+ GtkWidget *item;
+ gint index;
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i:insert_app_menu_item",
+ kwlist,
+ &PyGtkWidget_Type,
+ &pyitem, &index))
+ return NULL;
+
+ Py_INCREF (Py_None);
+ item = GTK_WIDGET (pygobject_get (pyitem));
+ gtk_osxapplication_insert_app_menu_item (GTK_OSX_APPLICATION(self->obj), item, index);
+ return Py_None;
+}
+%%
+override quartz_application_get_bundle_info kwargs
+static PyObject*
+_wrap_quartz_application_get_bundle_info (PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "key", NULL };
+ char *key;
+ gpointer item;
+ PyObject *ret;
+
+ item = quartz_application_get_bundle_info (key);
+
+ ret = PyCObject_FromVoidPtr (item, NULL);
+
+ return ret;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]