summaryrefslogtreecommitdiffstats
path: root/gio/gio.override
diff options
context:
space:
mode:
authorPaul Pogonyshev <pogonyshev@gmx.net>2009-05-31 18:25:47 +0300
committerPaul Pogonyshev <pogonyshev@gmx.net>2009-06-12 23:56:24 +0300
commit7766daa59b0e2b85413cee368bf2ebd2afe198e1 (patch)
treeb13c148760f10ed00008c0c5b899617f85cd5b2d /gio/gio.override
parent07e9c18dc092f6546230168b6b69c1b3454e120a (diff)
downloadpygobject-7766daa59b0e2b85413cee368bf2ebd2afe198e1.tar.gz
pygobject-7766daa59b0e2b85413cee368bf2ebd2afe198e1.tar.xz
pygobject-7766daa59b0e2b85413cee368bf2ebd2afe198e1.zip
Cleanup GIO overrides to use Python function/method names
Also move several gio.Mount overrides over from 'gio.override' to existing 'gmount.override'. Part of bug #584289.
Diffstat (limited to 'gio/gio.override')
-rw-r--r--gio/gio.override204
1 files changed, 0 insertions, 204 deletions
diff --git a/gio/gio.override b/gio/gio.override
index 78d3688..aee6926 100644
--- a/gio/gio.override
+++ b/gio/gio.override
@@ -353,210 +353,6 @@ _wrap_g_content_type_guess(PyGObject *self, PyObject *args, PyObject *kwargs)
return ret;
}
%%
-override g_mount_unmount kwargs
-static PyObject *
-_wrap_g_mount_unmount(PyGObject *self,
- PyObject *args,
- PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- PyGObject *py_cancellable = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:GMount.unmount",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer)&flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_unmount(G_MOUNT(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback)async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_eject kwargs
-static PyObject *
-_wrap_g_mount_eject(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOO:gio.Mount.eject",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_eject(G_MOUNT(self->obj),
- flags,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override g_mount_remount kwargs
-static PyObject *
-_wrap_g_mount_remount(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = { "callback", "flags", "mount_operation",
- "cancellable", "user_data", NULL };
- PyGIONotify *notify;
- PyObject *py_flags = NULL;
- GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
- PyObject *py_mount_operation = Py_None;
- GMountOperation *mount_operation = NULL;
- PyGObject *py_cancellable = NULL;
- GCancellable *cancellable;
-
- notify = pygio_notify_new();
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|OOOO:gio.Mount.remount",
- kwlist,
- &notify->callback,
- &py_flags,
- &py_mount_operation,
- &py_cancellable,
- &notify->data))
- goto error;
-
- if (!pygio_notify_callback_is_valid(notify))
- goto error;
-
- if (py_mount_operation != Py_None) {
- if (!pygobject_check(py_mount_operation, &PyGMountOperation_Type)) {
- PyErr_SetString(PyExc_TypeError,
- "mount_operation must be a gio.MountOperation or None");
- goto error;
- }
-
- mount_operation = G_MOUNT_OPERATION(pygobject_get(py_mount_operation));
- }
-
- if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
- py_flags, (gpointer) &flags))
- goto error;
-
- if (!pygio_check_cancellable(py_cancellable, &cancellable))
- goto error;
-
- pygio_notify_reference_callback(notify);
-
- pyg_begin_allow_threads;
-
- g_mount_remount(G_MOUNT(self->obj),
- flags,
- mount_operation,
- cancellable,
- (GAsyncReadyCallback) async_result_callback_marshal,
- notify);
-
- pyg_end_allow_threads;
-
- Py_INCREF(Py_None);
- return Py_None;
-
- error:
- pygio_notify_free(notify);
- return NULL;
-}
-%%
-override-slot GMount.tp_repr
-static PyObject *
-_wrap_g_mount_tp_repr(PyGObject *self)
-{
- char *name = g_mount_get_name(G_MOUNT(self->obj));
- char *uuid = g_mount_get_uuid(G_MOUNT(self->obj));
- gchar *representation;
- PyObject *result;
-
- if (name) {
- if (uuid) {
- representation = g_strdup_printf("<%s at %p: %s (%s)>",
- self->ob_type->tp_name, self, name, uuid);
- }
- else {
- representation = g_strdup_printf("<%s at %p: %s>",
- self->ob_type->tp_name, self, name);
- }
- }
- else
- representation = g_strdup_printf("<%s at %p: UNKNOWN NAME>", self->ob_type->tp_name, self);
-
- g_free(name);
- g_free(uuid);
-
- result = PyString_FromString(representation);
- g_free(representation);
- return result;
-}
-%%
override g_vfs_get_supported_uri_schemes noargs
static PyObject *
_wrap_g_vfs_get_supported_uri_schemes(PyGObject *self)