[Xfce4-commits] <thunarx-python:master> Replaced the NAUTILUS strings with THUNARX

Adam Plumb noreply at xfce.org
Thu May 27 18:10:56 CEST 2010


Updating branch refs/heads/master
         to 4a1ff43684766f430584fad7a29ad1eee966ccb5 (commit)
       from 23c06d484de82658cb02cd83a4dfa8414ba74fc6 (commit)

commit 4a1ff43684766f430584fad7a29ad1eee966ccb5
Author: Adam Plumb <adamplumb at gmail.com>
Date:   Fri Sep 18 08:48:42 2009 -0400

    Replaced the NAUTILUS strings with THUNARX

 src/thunarx-python-object.c |   12 ++++++------
 src/thunarx-python-object.h |    4 ++--
 src/thunarx-python.c        |   10 +++++-----
 src/thunarx-python.h        |   14 +++++++-------
 src/thunarx.defs            |   28 ++++++++++++++--------------
 src/thunarx.override        |    9 ++-------
 src/thunarxmodule.c         |    2 +-
 7 files changed, 37 insertions(+), 42 deletions(-)

diff --git a/src/thunarx-python-object.c b/src/thunarx-python-object.c
index 2268835..a871e10 100644
--- a/src/thunarx-python-object.c
+++ b/src/thunarx-python-object.c
@@ -326,7 +326,7 @@ thunarx_python_object_update_file_info (ThunarxInfoProvider *provider,
 										 ThunarxOperationHandle **handle)
 {
 	ThunarxPythonObject *object = (ThunarxPythonObject*)provider;
-    ThunarxOperationResult ret = NAUTILUS_OPERATION_COMPLETE;
+    ThunarxOperationResult ret = THUNARX_OPERATION_COMPLETE;
     PyObject *py_ret = NULL;
 	PyGILState_STATE state = pyg_gil_state_ensure();                                    \
 	
@@ -455,31 +455,31 @@ thunarx_python_object_get_type (GTypeModule *module,
 
 	if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxPropertyPageProvider_Type)) {
 		g_type_module_add_interface (module, gtype, 
-									 NAUTILUS_TYPE_PROPERTY_PAGE_PROVIDER,
+									 THUNARX_TYPE_PROPERTY_PAGE_PROVIDER,
 									 &property_page_provider_iface_info);
 	}
 
 	if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxLocationWidgetProvider_Type)) {
 		g_type_module_add_interface (module, gtype,
-									 NAUTILUS_TYPE_LOCATION_WIDGET_PROVIDER,
+									 THUNARX_TYPE_LOCATION_WIDGET_PROVIDER,
 									 &location_widget_provider_iface_info);
 	}
 	
 	if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxMenuProvider_Type)) {
 		g_type_module_add_interface (module, gtype, 
-									 NAUTILUS_TYPE_MENU_PROVIDER,
+									 THUNARX_TYPE_MENU_PROVIDER,
 									 &menu_provider_iface_info);
 	}
 
 	if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxColumnProvider_Type)) {
 		g_type_module_add_interface (module, gtype, 
-									 NAUTILUS_TYPE_COLUMN_PROVIDER,
+									 THUNARX_TYPE_COLUMN_PROVIDER,
 									 &column_provider_iface_info);
 	}
 	
 	if (PyObject_IsSubclass(type, (PyObject*)&PyThunarxInfoProvider_Type)) {
 		g_type_module_add_interface (module, gtype, 
-									 NAUTILUS_TYPE_INFO_PROVIDER,
+									 THUNARX_TYPE_INFO_PROVIDER,
 									 &info_provider_iface_info);
 	}
 	
diff --git a/src/thunarx-python-object.h b/src/thunarx-python-object.h
index e101580..1c5c7a2 100644
--- a/src/thunarx-python-object.h
+++ b/src/thunarx-python-object.h
@@ -22,8 +22,8 @@
  * 
  */
 
-#ifndef NAUTILUS_PYTHON_OBJECT_H
-#define NAUTILUS_PYTHON_OBJECT_H
+#ifndef THUNARX_PYTHON_OBJECT_H
+#define THUNARX_PYTHON_OBJECT_H
 
 #include <Python.h>
 #include <glib-object.h>
diff --git a/src/thunarx-python.c b/src/thunarx-python.c
index bc73026..65d6090 100644
--- a/src/thunarx-python.c
+++ b/src/thunarx-python.c
@@ -32,7 +32,7 @@
 #include <thunarx/thunarx-extension-types.h>
 
 static const GDebugKey thunarx_python_debug_keys[] = {
-  {"misc", NAUTILUS_PYTHON_DEBUG_MISC},
+  {"misc", THUNARX_PYTHON_DEBUG_MISC},
 };
 static const guint thunarx_python_ndebug_keys = sizeof (thunarx_python_debug_keys) / sizeof (GDebugKey);
 ThunarxPythonDebug thunarx_python_debug;
@@ -279,11 +279,11 @@ thunarx_python_init_python (void)
 	debug("sys.path.insert(0, ...)");
 	sys_path = PySys_GetObject("path");
 	PyList_Insert(sys_path, 0,
-				  (tmp = PyString_FromString(NAUTILUS_LIBDIR "/thunarx-python")));
+				  (tmp = PyString_FromString(THUNARX_LIBDIR "/thunarx-python")));
 	Py_DECREF(tmp);
 	
 	/* import thunarx */
-	g_setenv("INSIDE_NAUTILUS_PYTHON", "", FALSE);
+	g_setenv("INSIDE_THUNARX_PYTHON", "", FALSE);
 	debug("import thunarx");
 	thunarx = PyImport_ImportModule("thunarx");
 	if (!thunarx) {
@@ -325,7 +325,7 @@ thunarx_module_initialize(GTypeModule *module)
 	gchar *user_extensions_dir;
 	const gchar *env_string;
 
-	env_string = g_getenv("NAUTILUS_PYTHON_DEBUG");
+	env_string = g_getenv("THUNARX_PYTHON_DEBUG");
 	if (env_string != NULL) {
 		thunarx_python_debug = g_parse_debug_string(env_string,
 													 thunarx_python_debug_keys,
@@ -337,7 +337,7 @@ thunarx_module_initialize(GTypeModule *module)
 
 	all_types = g_array_new(FALSE, FALSE, sizeof(GType));
 
-	thunarx_python_load_dir(module, NAUTILUS_EXTENSION_DIR "/python");
+	thunarx_python_load_dir(module, THUNARX_EXTENSION_DIR "/python");
 	user_extensions_dir = g_strdup_printf("%s/.thunarx/python-extensions/",
 										  g_get_home_dir());
 	thunarx_python_load_dir(module, user_extensions_dir);
diff --git a/src/thunarx-python.h b/src/thunarx-python.h
index d6d8dec..a8aeb23 100644
--- a/src/thunarx-python.h
+++ b/src/thunarx-python.h
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef NAUTILUS_PYTHON_H
-#define NAUTILUS_PYTHON_H
+#ifndef THUNARX_PYTHON_H
+#define THUNARX_PYTHON_H
 
 #include <glib-object.h>
 #include <glib/gprintf.h>
@@ -33,16 +33,16 @@ typedef int Py_ssize_t;
 #endif
 
 typedef enum {
-    NAUTILUS_PYTHON_DEBUG_MISC = 1 << 0,
+    THUNARX_PYTHON_DEBUG_MISC = 1 << 0,
 } ThunarxPythonDebug;
 
 extern ThunarxPythonDebug thunarx_python_debug;
 
-#define debug(x) { if (thunarx_python_debug & NAUTILUS_PYTHON_DEBUG_MISC) \
+#define debug(x) { if (thunarx_python_debug & THUNARX_PYTHON_DEBUG_MISC) \
                        g_printf( "thunarx-python:" x "\n"); }
-#define debug_enter()  { if (thunarx_python_debug & NAUTILUS_PYTHON_DEBUG_MISC) \
+#define debug_enter()  { if (thunarx_python_debug & THUNARX_PYTHON_DEBUG_MISC) \
                              g_printf("%s: entered\n", __FUNCTION__); }
-#define debug_enter_args(x, y) { if (thunarx_python_debug & NAUTILUS_PYTHON_DEBUG_MISC) \
+#define debug_enter_args(x, y) { if (thunarx_python_debug & THUNARX_PYTHON_DEBUG_MISC) \
                                      g_printf("%s: entered " x "\n", __FUNCTION__, y); }
 
 
@@ -76,4 +76,4 @@ PyTypeObject *_PyThunarxPropertyPage_Type;
 PyTypeObject *_PyThunarxPropertyPageProvider_Type;
 #define PyThunarxPropertyPageProvider_Type (*_PyThunarxPropertyPageProvider_Type)
 
-#endif /* NAUTILUS_PYTHON_H */
+#endif /* THUNARX_PYTHON_H */
diff --git a/src/thunarx.defs b/src/thunarx.defs
index 0e87d96..1a694d7 100644
--- a/src/thunarx.defs
+++ b/src/thunarx.defs
@@ -4,64 +4,64 @@
   (in-module "Thunarx")
   (parent "GObject")
   (c-name "ThunarxColumn")
-  (gtype-id "NAUTILUS_TYPE_COLUMN")
+  (gtype-id "THUNARX_TYPE_COLUMN")
 )
 
 (define-interface ColumnProvider
   (in-module "Thunarx")
   (c-name "ThunarxColumnProvider")
-  (gtype-id "NAUTILUS_TYPE_COLUMN_PROVIDER")
+  (gtype-id "THUNARX_TYPE_COLUMN_PROVIDER")
 )
 
 (define-interface FileInfo
   (in-module "Thunarx")
   (c-name "ThunarxFileInfo")
-  (gtype-id "NAUTILUS_TYPE_FILE_INFO")
+  (gtype-id "THUNARX_TYPE_FILE_INFO")
 )
 
 (define-interface InfoProvider
   (in-module "Thunarx")
   (c-name "ThunarxInfoProvider")
-  (gtype-id "NAUTILUS_TYPE_INFO_PROVIDER")
+  (gtype-id "THUNARX_TYPE_INFO_PROVIDER")
 )
 
 (define-interface LocationWidgetProvider
   (in-module "Thunarx")
   (c-name "ThunarxLocationWidgetProvider")
-  (gtype-id "NAUTILUS_TYPE_LOCATION_WIDGET_PROVIDER")
+  (gtype-id "THUNARX_TYPE_LOCATION_WIDGET_PROVIDER")
 )
 
 (define-object Menu
   (in-module "Thunarx")
   (parent "GObject")
   (c-name "ThunarxMenu")
-  (gtype-id "NAUTILUS_TYPE_MENU")
+  (gtype-id "THUNARX_TYPE_MENU")
 )
 
 (define-object MenuItem
   (in-module "Thunarx")
   (parent "GObject")
   (c-name "ThunarxMenuItem")
-  (gtype-id "NAUTILUS_TYPE_MENU_ITEM")
+  (gtype-id "THUNARX_TYPE_MENU_ITEM")
 )
 
 (define-interface MenuProvider
   (in-module "Thunarx")
   (c-name "ThunarxMenuProvider")
-  (gtype-id "NAUTILUS_TYPE_MENU_PROVIDER")
+  (gtype-id "THUNARX_TYPE_MENU_PROVIDER")
 )
 
 (define-object PropertyPage
   (in-module "Thunarx")
   (parent "GObject")
   (c-name "ThunarxPropertyPage")
-  (gtype-id "NAUTILUS_TYPE_PROPERTY_PAGE")
+  (gtype-id "THUNARX_TYPE_PROPERTY_PAGE")
 )
 
 (define-interface PropertyPageProvider
   (in-module "Thunarx")
   (c-name "ThunarxPropertyPageProvider")
-  (gtype-id "NAUTILUS_TYPE_PROPERTY_PAGE_PROVIDER")
+  (gtype-id "THUNARX_TYPE_PROPERTY_PAGE_PROVIDER")
 )
 
 ;; Enumerations and flags ...
@@ -69,11 +69,11 @@
 (define-enum OperationResult
   (in-module "Thunarx")
   (c-name "ThunarxOperationResult")
-  (gtype-id "NAUTILUS_TYPE_OPERATION_RESULT")
+  (gtype-id "THUNARX_TYPE_OPERATION_RESULT")
   (values
-    '("complete" "NAUTILUS_OPERATION_COMPLETE")
-    '("failed" "NAUTILUS_OPERATION_FAILED")
-    '("in-progress" "NAUTILUS_OPERATION_IN_PROGRESS")
+    '("complete" "THUNARX_OPERATION_COMPLETE")
+    '("failed" "THUNARX_OPERATION_FAILED")
+    '("in-progress" "THUNARX_OPERATION_IN_PROGRESS")
   )
 )
 
diff --git a/src/thunarx.override b/src/thunarx.override
index ea72b09..c95f712 100644
--- a/src/thunarx.override
+++ b/src/thunarx.override
@@ -25,12 +25,7 @@ headers
 
 #include "pygnomevfs.h"
 
-#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-provider.h>
-#include <thunarx/thunarx-property-page-provider.h>
+#include <thunarx/thunarx.h>
 
 %%
 modulename thunarx
@@ -48,7 +43,7 @@ _wrap_thunarx_file_info_get_vfs_file_info(PyGObject *self)
 {
     GnomeVFSFileInfo *ret;
     
-    ret = thunarx_file_info_get_vfs_file_info(NAUTILUS_FILE_INFO(self->obj));
+    ret = thunarx_file_info_get_vfs_file_info(THUNARX_FILE_INFO(self->obj));
     if (ret) {
         return pygnome_vfs_file_info_new(ret);
     }
diff --git a/src/thunarxmodule.c b/src/thunarxmodule.c
index 03d48c6..9d356ac 100644
--- a/src/thunarxmodule.c
+++ b/src/thunarxmodule.c
@@ -52,5 +52,5 @@ initthunarx(void)
     d = PyModule_GetDict (m);
 	
     pythunarx_register_classes (d);
-    pythunarx_add_constants(m, "NAUTILUS_");    
+    pythunarx_add_constants(m, "THUNARX_");    
 }



More information about the Xfce4-commits mailing list