diff options
Diffstat (limited to 'src/caja.override')
-rw-r--r-- | src/caja.override | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/src/caja.override b/src/caja.override deleted file mode 100644 index b968425..0000000 --- a/src/caja.override +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * Copyright (C) 2004 Johan Dahlin - * - * caja.override: overrides for the caja extension library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include "pygobject.h" - -#include <libcaja-extension/caja-file-info.h> -#include <libcaja-extension/caja-info-provider.h> -#include <libcaja-extension/caja-column-provider.h> -#include <libcaja-extension/caja-location-widget-provider.h> -#include <libcaja-extension/caja-menu-provider.h> -#include <libcaja-extension/caja-property-page-provider.h> -#include <libcaja-extension/caja-menu.h> - -static PyObject * -_glist_to_pyobject (GList *list) -{ - GList *l; - PyObject *item, *py_ret; - - py_ret = PyList_New (0); - - for (l = list; l != NULL; l = l->next) - { - item = pygobject_new ((GObject *)l->data); - - if (item == NULL) - { - Py_DECREF (py_ret); - return NULL; - } - - PyList_Append (py_ret, item); - Py_DECREF (item); - } - - return py_ret; -} - -%% -modulename caja -%% -import gobject.GObject as PyGObject_Type -import gtk.Widget as PyGtkWidget_Type -import gtk.Window as PyGtkWindow_Type -%% -ignore-glob - *_get_type -%% -define CajaMenu.get_items -static PyObject * -_wrap_caja_menu_get_items(PyGObject *self) -{ - GList *ret; - - if(self == NULL) - { - Py_INCREF(Py_None); - return Py_None; - } - - ret = caja_menu_get_items(CAJA_MENU(self->obj)); - if (ret) { - PyObject *py_ret = _glist_to_pyobject(ret); - return py_ret; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -define CajaInfoProvider.update_complete_invoke kwargs -static PyObject * -_wrap_caja_info_provider_update_complete_invoke(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "provider", "handle", "closure", "result", NULL }; - PyObject *py_closure, *py_handle, *py_result; - PyGObject *py_provider; - GClosure *closure; - CajaOperationHandle *handle; - CajaOperationResult result = CAJA_OPERATION_COMPLETE; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!OO|O:CajaInfoProvider.update_complete_invoke", kwlist, - &PyCajaInfoProvider_Type, &py_provider, - &py_handle, &py_closure, &py_result)) - { - Py_INCREF(Py_None); - return Py_None; - } - - closure = pyg_boxed_get(py_closure, GClosure); - handle = pyg_pointer_get(py_handle, CajaOperationHandle); - if (py_result != NULL) - result = (CajaOperationResult)py_result; - - caja_info_provider_update_complete_invoke(closure, - CAJA_INFO_PROVIDER(py_provider->obj), handle, result); - - Py_INCREF(Py_None); - return Py_None; -} -%% -define CajaMenuProvider.emit_items_updated_signal args -static PyObject * -_wrap_caja_menu_provider_emit_items_updated_signal(PyGObject *self, PyObject *args) -{ - PyGObject *py_provider; - - if (!PyArg_ParseTuple(args, "O!:CajaMenuProvider.emit_items_updated_signal", - &PyCajaMenuProvider_Type, &py_provider)) - { - Py_INCREF(Py_None); - return Py_None; - } - - caja_menu_provider_emit_items_updated_signal(CAJA_MENU_PROVIDER(py_provider->obj)); - - Py_INCREF(Py_None); - return Py_None; -} |