From 86b3ff6a9cd575dbed3a6b2562fad2d22b8f48f9 Mon Sep 17 00:00:00 2001 From: Laurent Napias Date: Sat, 29 Jun 2019 12:04:50 +0200 Subject: Remove trailing whitespaces --- src/caja-python-object.c | 68 ++++++++++++++++++++++++------------------------ src/caja-python-object.h | 6 ++--- src/caja-python.c | 26 +++++++++--------- src/caja-python.h | 2 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/caja-python-object.c b/src/caja-python-object.c index fbc5f79..7820d10 100644 --- a/src/caja-python-object.c +++ b/src/caja-python-object.c @@ -17,7 +17,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: Dave Camp - * + * */ #include @@ -138,7 +138,7 @@ free_pygobject_data_list(GList *list) { if (list == NULL) return; - + g_list_foreach(list, (GFunc)free_pygobject_data, NULL); } @@ -149,7 +149,7 @@ caja_python_boxed_new (PyTypeObject *type, gpointer boxed, gboolean free_on_deal self->gtype = pyg_type_from_object ( (PyObject *) type); self->boxed = boxed; self->free_on_dealloc = free_on_dealloc; - + return (PyObject *) self; } @@ -162,20 +162,20 @@ caja_python_object_get_property_pages (CajaPropertyPageProvider *provider, PyObject *py_files, *py_ret = NULL; GList *ret = NULL; PyGILState_STATE state = pyg_gil_state_ensure(); - + debug_enter(); CHECK_OBJECT(object); CHECK_METHOD_NAME(object->instance); CONVERT_LIST(py_files, files); - + py_ret = PyObject_CallMethod(object->instance, METHOD_PREFIX METHOD_NAME, "(N)", py_files); HANDLE_RETVAL(py_ret); HANDLE_LIST(py_ret, CajaPropertyPage, "Caja.PropertyPage"); - + beach: Py_XDECREF(py_ret); pyg_gil_state_release(state); @@ -247,26 +247,26 @@ caja_python_object_get_file_items (CajaMenuProvider *provider, GList *ret = NULL; PyObject *py_ret = NULL, *py_files; PyGILState_STATE state = pyg_gil_state_ensure(); - + debug_enter(); - CHECK_OBJECT(object); + CHECK_OBJECT(object); if (PyObject_HasAttrString(object->instance, "get_file_items_full")) { CONVERT_LIST(py_files, files); py_ret = PyObject_CallMethod(object->instance, METHOD_PREFIX "get_file_items_full", "(NNN)", - pygobject_new((GObject *)provider), - pygobject_new((GObject *)window), + pygobject_new((GObject *)provider), + pygobject_new((GObject *)window), py_files); } else if (PyObject_HasAttrString(object->instance, "get_file_items")) { CONVERT_LIST(py_files, files); py_ret = PyObject_CallMethod(object->instance, METHOD_PREFIX METHOD_NAME, - "(NN)", - pygobject_new((GObject *)window), + "(NN)", + pygobject_new((GObject *)window), py_files); } else @@ -296,7 +296,7 @@ caja_python_object_get_background_items (CajaMenuProvider *provider, GList *ret = NULL; PyObject *py_ret = NULL; PyGILState_STATE state = pyg_gil_state_ensure(); - + debug_enter(); CHECK_OBJECT(object); @@ -324,7 +324,7 @@ caja_python_object_get_background_items (CajaMenuProvider *provider, HANDLE_RETVAL(py_ret); HANDLE_LIST(py_ret, CajaMenuItem, "Caja.MenuItem"); - + beach: free_pygobject_data(file, NULL); Py_XDECREF(py_ret); @@ -350,7 +350,7 @@ caja_python_object_get_columns (CajaColumnProvider *provider) PyGILState_STATE state = pyg_gil_state_ensure(); \ debug_enter(); - + CHECK_OBJECT(object); CHECK_METHOD_NAME(object->instance); @@ -360,7 +360,7 @@ caja_python_object_get_columns (CajaColumnProvider *provider) HANDLE_RETVAL(py_ret); HANDLE_LIST(py_ret, CajaColumn, "Caja.Column"); - + beach: if (py_ret != NULL) Py_XDECREF(py_ret); @@ -450,7 +450,7 @@ caja_python_object_update_file_info (CajaInfoProvider *provider, { goto beach; } - + HANDLE_RETVAL(py_ret); if (!INT_CHECK(py_ret)) @@ -464,7 +464,7 @@ caja_python_object_update_file_info (CajaInfoProvider *provider, if (!*handle && ret == CAJA_OPERATION_IN_PROGRESS) ret = CAJA_OPERATION_FAILED; - + beach: free_pygobject_data(file, NULL); Py_XDECREF(py_ret); @@ -480,7 +480,7 @@ caja_python_object_info_provider_iface_init (CajaInfoProviderIface *iface) iface->update_file_info = caja_python_object_update_file_info; } -static void +static void caja_python_object_instance_init (CajaPythonObject *object) { CajaPythonObjectClass *class; @@ -509,20 +509,20 @@ caja_python_object_class_init (CajaPythonObjectClass *class, debug_enter(); parent_class = g_type_class_peek_parent (class); - + class->type = (PyObject*)class_data; - + G_OBJECT_CLASS (class)->finalize = caja_python_object_finalize; } -GType -caja_python_object_get_type (GTypeModule *module, +GType +caja_python_object_get_type (GTypeModule *module, PyObject *type) { GTypeInfo *info; const char *type_name; GType gtype; - + static const GInterfaceInfo property_page_provider_iface_info = { (GInterfaceInitFunc) caja_python_object_property_page_provider_iface_init, NULL, @@ -555,7 +555,7 @@ caja_python_object_get_type (GTypeModule *module, debug_enter_args("type=%s", STRING_ASSTRING(PyObject_GetAttrString(type, "__name__"))); info = g_new0 (GTypeInfo, 1); - + info->class_size = sizeof (CajaPythonObjectClass); info->class_init = (GClassInitFunc)caja_python_object_class_init; info->instance_size = sizeof (CajaPythonObject); @@ -566,15 +566,15 @@ caja_python_object_get_type (GTypeModule *module, type_name = g_strdup_printf("%s+CajaPython", STRING_ASSTRING(PyObject_GetAttrString(type, "__name__"))); - - gtype = g_type_module_register_type (module, + + gtype = g_type_module_register_type (module, G_TYPE_OBJECT, type_name, info, 0); if (PyObject_IsSubclass(type, (PyObject*)&PyCajaPropertyPageProvider_Type)) { - g_type_module_add_interface (module, gtype, + g_type_module_add_interface (module, gtype, CAJA_TYPE_PROPERTY_PAGE_PROVIDER, &property_page_provider_iface_info); } @@ -585,27 +585,27 @@ caja_python_object_get_type (GTypeModule *module, CAJA_TYPE_LOCATION_WIDGET_PROVIDER, &location_widget_provider_iface_info); } - + if (PyObject_IsSubclass(type, (PyObject*)&PyCajaMenuProvider_Type)) { - g_type_module_add_interface (module, gtype, + g_type_module_add_interface (module, gtype, CAJA_TYPE_MENU_PROVIDER, &menu_provider_iface_info); } if (PyObject_IsSubclass(type, (PyObject*)&PyCajaColumnProvider_Type)) { - g_type_module_add_interface (module, gtype, + g_type_module_add_interface (module, gtype, CAJA_TYPE_COLUMN_PROVIDER, &column_provider_iface_info); } - + if (PyObject_IsSubclass(type, (PyObject*)&PyCajaInfoProvider_Type)) { - g_type_module_add_interface (module, gtype, + g_type_module_add_interface (module, gtype, CAJA_TYPE_INFO_PROVIDER, &info_provider_iface_info); } - + return gtype; } diff --git a/src/caja-python-object.h b/src/caja-python-object.h index 3cb4cea..8747d05 100644 --- a/src/caja-python-object.h +++ b/src/caja-python-object.h @@ -1,7 +1,7 @@ /* - * caja-python-object.h - Generation of wrapper objects for caja + * caja-python-object.h - Generation of wrapper objects for caja * extension objects in python. - * + * * Copyright (C) 2003 Novell, Inc. * * This library is free software; you can redistribute it and/or @@ -19,7 +19,7 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: Dave Camp - * + * */ #ifndef CAJA_PYTHON_OBJECT_H diff --git a/src/caja-python.c b/src/caja-python.c index f609b1e..af154d9 100644 --- a/src/caja-python.c +++ b/src/caja-python.c @@ -85,7 +85,7 @@ static PyGetSetDef caja_operationhandle_handle = { }; -static inline gboolean +static inline gboolean np_init_pygobject(void) { PyObject *gobject = pygobject_init (PYGOBJECT_MAJOR_VERSION, PYGOBJECT_MINOR_VERSION, PYGOBJECT_MICRO_VERSION); @@ -99,7 +99,7 @@ np_init_pygobject(void) } static void -caja_python_load_file(GTypeModule *type_module, +caja_python_load_file(GTypeModule *type_module, const gchar *filename) { PyObject *main_module, *main_locals, *locals, *key, *value; @@ -148,7 +148,7 @@ caja_python_load_file(GTypeModule *type_module, } static void -caja_python_load_dir (GTypeModule *module, +caja_python_load_dir (GTypeModule *module, const char *dirname) { GDir *dir; @@ -156,11 +156,11 @@ caja_python_load_dir (GTypeModule *module, gboolean initialized = FALSE; debug_enter_args("dirname=%s", dirname); - + dir = g_dir_open(dirname, 0, NULL); if (!dir) return; - + while ((name = g_dir_read_name(dir))) { if (g_str_has_suffix(name, ".py")) @@ -175,7 +175,7 @@ caja_python_load_dir (GTypeModule *module, if (!initialized) { PyObject *sys_path, *py_path; - + /* n-p python part is initialized on demand (or not * at all if no extensions are found) */ if (!caja_python_init_python()) @@ -184,7 +184,7 @@ caja_python_load_dir (GTypeModule *module, g_dir_close(dir); break; } - + /* sys.path.insert(0, dirname) */ sys_path = PySys_GetObject("path"); py_path = STRING_FROMSTRING(dirname); @@ -193,7 +193,7 @@ caja_python_load_dir (GTypeModule *module, } caja_python_load_file(module, modulename); } - } + } } static gboolean @@ -222,7 +222,7 @@ caja_python_init_python (void) PyErr_Print(); return FALSE; } - + debug("PySys_SetArgv"); PySys_SetArgv(1, argv); if (PyErr_Occurred()) @@ -307,7 +307,7 @@ caja_python_init_python (void) return FALSE; } Py_DECREF(descr); - + return TRUE; } @@ -334,11 +334,11 @@ caja_module_initialize(GTypeModule *module) caja_python_load_dir(module, DATADIR "/caja-python/extensions"); // Look in XDG_DATA_DIR, ~/.local/share/caja-python/extensions - user_extensions_dir = g_build_filename(g_get_user_data_dir(), + user_extensions_dir = g_build_filename(g_get_user_data_dir(), "caja-python", "extensions", NULL); caja_python_load_dir(module, user_extensions_dir); } - + void caja_module_shutdown(void) { @@ -356,7 +356,7 @@ caja_module_list_types(const GType **types, int *num_types) { debug_enter(); - + *types = (GType*)all_types->data; *num_types = all_types->len; } diff --git a/src/caja-python.h b/src/caja-python.h index 28b95e2..f87a169 100644 --- a/src/caja-python.h +++ b/src/caja-python.h @@ -1,6 +1,6 @@ /* * caja-python.c - Caja Python extension - * + * * Copyright (C) 2004 Johan Dahlin * * This library is free software; you can redistribute it and/or -- cgit v1.2.1