[Xfce4-commits] <thunarx-python:master> Removed column and column provider interfaces
Adam Plumb
noreply at xfce.org
Thu May 27 18:10:58 CEST 2010
Updating branch refs/heads/master
to dcc1181f1821ef4c2dd1afc8d72cf550a90cce9c (commit)
from 4a1ff43684766f430584fad7a29ad1eee966ccb5 (commit)
commit dcc1181f1821ef4c2dd1afc8d72cf550a90cce9c
Author: Adam Plumb <adamplumb at gmail.com>
Date: Fri Sep 18 09:00:50 2009 -0400
Removed column and column provider interfaces
src/thunarx-python-object.c | 46 ----------------------------------
src/thunarx-python.c | 5 +---
src/thunarx-python.h | 6 ----
src/thunarx.defs | 57 ++++--------------------------------------
4 files changed, 7 insertions(+), 107 deletions(-)
diff --git a/src/thunarx-python-object.c b/src/thunarx-python-object.c
index a871e10..6cfc273 100644
--- a/src/thunarx-python-object.c
+++ b/src/thunarx-python-object.c
@@ -32,7 +32,6 @@
/* Thunarx extension headers */
#include <thunarx/thunarx-file-info.h>
#include <thunarx/thunarx-info-provider.h>
-#include <thunarx/thunarx-column-provider.h>
#include <thunarx/thunarx-location-widget-provider.h>
#include <thunarx/thunarx-menu-item.h>
#include <thunarx/thunarx-menu-provider.h>
@@ -276,39 +275,6 @@ thunarx_python_object_menu_provider_iface_init (ThunarxMenuProviderIface *iface)
iface->get_file_items = thunarx_python_object_get_file_items;
}
-#define METHOD_NAME "get_columns"
-static GList *
-thunarx_python_object_get_columns (ThunarxColumnProvider *provider)
-{
- ThunarxPythonObject *object = (ThunarxPythonObject*)provider;
- GList *ret = NULL;
- PyObject *py_ret;
- PyGILState_STATE state = pyg_gil_state_ensure(); \
-
- debug_enter();
-
- CHECK_METHOD_NAME(object->instance);
-
- py_ret = PyObject_CallMethod(object->instance, METHOD_PREFIX METHOD_NAME,
- NULL);
-
- HANDLE_RETVAL(py_ret);
-
- HANDLE_LIST(py_ret, ThunarxColumn, "thunarx.Column");
-
- beach:
- pyg_gil_state_release(state);
- return ret;
-}
-#undef METHOD_NAME
-
-static void
-thunarx_python_object_column_provider_iface_init (ThunarxColumnProviderIface *iface)
-{
- iface->get_columns = thunarx_python_object_get_columns;
-}
-
-
#define METHOD_NAME "cancel_update"
static void
thunarx_python_object_cancel_update (ThunarxInfoProvider *provider,
@@ -422,12 +388,6 @@ thunarx_python_object_get_type (GTypeModule *module,
NULL
};
- static const GInterfaceInfo column_provider_iface_info = {
- (GInterfaceInitFunc) thunarx_python_object_column_provider_iface_init,
- NULL,
- NULL
- };
-
static const GInterfaceInfo info_provider_iface_info = {
(GInterfaceInitFunc) thunarx_python_object_info_provider_iface_init,
NULL,
@@ -471,12 +431,6 @@ thunarx_python_object_get_type (GTypeModule *module,
&menu_provider_iface_info);
}
- if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxColumnProvider_Type)) {
- g_type_module_add_interface (module, gtype,
- THUNARX_TYPE_COLUMN_PROVIDER,
- &column_provider_iface_info);
- }
-
if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxInfoProvider_Type)) {
g_type_module_add_interface (module, gtype,
THUNARX_TYPE_INFO_PROVIDER,
diff --git a/src/thunarx-python.c b/src/thunarx-python.c
index 65d6090..7614b38 100644
--- a/src/thunarx-python.c
+++ b/src/thunarx-python.c
@@ -137,8 +137,7 @@ thunarx_python_load_file(GTypeModule *type_module, const gchar *filename)
if (!PyType_Check(value))
continue;
- if (PyObject_IsSubclass(value, (PyObject*)&PyThunarxColumnProvider_Type) ||
- PyObject_IsSubclass(value, (PyObject*)&PyThunarxInfoProvider_Type) ||
+ if (PyObject_IsSubclass(value, (PyObject*)&PyThunarxInfoProvider_Type) ||
PyObject_IsSubclass(value, (PyObject*)&PyThunarxLocationWidgetProvider_Type) ||
PyObject_IsSubclass(value, (PyObject*)&PyThunarxMenuProvider_Type) ||
PyObject_IsSubclass(value, (PyObject*)&PyThunarxPropertyPageProvider_Type)) {
@@ -304,8 +303,6 @@ thunarx_python_init_python (void)
return FALSE; \
}
- IMPORT(Column, "Column");
- IMPORT(ColumnProvider, "ColumnProvider");
IMPORT(InfoProvider, "InfoProvider");
IMPORT(LocationWidgetProvider, "LocationWidgetProvider");
IMPORT(Menu, "Menu");
diff --git a/src/thunarx-python.h b/src/thunarx-python.h
index a8aeb23..f3d813c 100644
--- a/src/thunarx-python.h
+++ b/src/thunarx-python.h
@@ -49,12 +49,6 @@ extern ThunarxPythonDebug thunarx_python_debug;
PyTypeObject *_PyGtkWidget_Type;
#define PyGtkWidget_Type (*_PyGtkWidget_Type)
-PyTypeObject *_PyThunarxColumn_Type;
-#define PyThunarxColumn_Type (*_PyThunarxColumn_Type)
-
-PyTypeObject *_PyThunarxColumnProvider_Type;
-#define PyThunarxColumnProvider_Type (*_PyThunarxColumnProvider_Type)
-
PyTypeObject *_PyThunarxInfoProvider_Type;
#define PyThunarxInfoProvider_Type (*_PyThunarxInfoProvider_Type)
diff --git a/src/thunarx.defs b/src/thunarx.defs
index 1a694d7..d0853a4 100644
--- a/src/thunarx.defs
+++ b/src/thunarx.defs
@@ -1,17 +1,5 @@
;; -*- scheme -*-
; object definitions ...
-(define-object Column
- (in-module "Thunarx")
- (parent "GObject")
- (c-name "ThunarxColumn")
- (gtype-id "THUNARX_TYPE_COLUMN")
-)
-
-(define-interface ColumnProvider
- (in-module "Thunarx")
- (c-name "ThunarxColumnProvider")
- (gtype-id "THUNARX_TYPE_COLUMN_PROVIDER")
-)
(define-interface FileInfo
(in-module "Thunarx")
@@ -78,35 +66,14 @@
)
-;; From /usr/include/thunarx/libthunarx-extension/thunarx-column.h
-
-(define-function thunarx_column_get_type
- (c-name "thunarx_column_get_type")
- (return-type "GType")
-)
-
-(define-function thunarx_column_new
- (c-name "thunarx_column_new")
- (is-constructor-of "ThunarxColumn")
- (return-type "ThunarxColumn*")
- (parameters
- '("const-char*" "name")
- '("const-char*" "attribute")
- '("const-char*" "label")
- '("const-char*" "description")
- )
-)
-
-
-
-;; From /usr/include/thunarx/libthunarx-extension/thunarx-extension-types.h
+;; From /usr/include/thunarx-1/libthunarx-extension/thunarx-extension-types.h
(define-function thunarx_operation_result_get_type
(c-name "thunarx_operation_result_get_type")
(return-type "GType")
)
-;; From /usr/include/thunarx/libthunarx-extension/thunarx-file-info.h
+;; From /usr/include/thunarx-1/libthunarx-extension/thunarx-file-info.h
(define-function thunarx_file_info_list_copy
(c-name "thunarx_file_info_list_copy")
@@ -165,12 +132,6 @@
(return-type "char*")
)
-(define-method get_parent_location
- (of-object "ThunarxFileInfo")
- (c-name "thunarx_file_info_get_parent_location")
- (return-type "GFile")
-)
-
(define-method get_parent_uri
(of-object "ThunarxFileInfo")
(c-name "thunarx_file_info_get_parent_uri")
@@ -189,9 +150,9 @@
(return-type "char*")
)
-(define-method is_mime_type
+(define-method has_mime_type
(of-object "ThunarxFileInfo")
- (c-name "thunarx_file_info_is_mime_type")
+ (c-name "thunarx_file_info_has_mime_type")
(return-type "gboolean")
(parameters
'("const-char*" "mime_type")
@@ -238,7 +199,7 @@
(return-type "none")
)
-;; From /usr/include/thunarx/libthunarx-extension/thunarx-menu-item.h
+;; From /usr/include/thunarx-1/libthunarx-extension/thunarx-menu-item.h
(define-function thunarx_menu_item_get_type
(c-name "thunarx_menu_item_get_type")
@@ -260,12 +221,6 @@
)
)
-(define-method get_items
- (of-object "ThunarxMenu")
- (c-name "thunarx_menu_get_items")
- (return-type "GList*")
-)
-
(define-function thunarx_menu_item_list_free
(c-name "thunarx_menu_item_list_free")
(return-type "none")
@@ -301,7 +256,7 @@
(return-type "none")
)
-;; From /usr/include/thunarx/libthunarx-extension/thunarx-property-page.h
+;; From /usr/include/thunarx-1/libthunarx-extension/thunarx-property-page.h
(define-function thunarx_property_page_get_type
(c-name "thunarx_property_page_get_type")
More information about the Xfce4-commits
mailing list