[Xfce4-commits] <thunarx-python:master> Removed emblem api call and documentation

Adam Plumb noreply at xfce.org
Thu May 27 18:14:25 CEST 2010


Updating branch refs/heads/master
         to 6047ce63d3c021f74252e1c19733c754c402e880 (commit)
       from 1bed1ea12dc2b14515b7e7f19a5dc9c3e7c4cec1 (commit)

commit 6047ce63d3c021f74252e1c19733c754c402e880
Author: Adam Plumb <adamplumb at gmail.com>
Date:   Fri Jan 22 08:39:45 2010 -0500

    Removed emblem api call and documentation

 docs/documentation.py                  |    6 --
 docs/examples/thunarx-emblem-plugin.py |   20 -------
 src/thunarx.override                   |   87 --------------------------------
 3 files changed, 0 insertions(+), 113 deletions(-)

diff --git a/docs/documentation.py b/docs/documentation.py
index f22df44..758530d 100644
--- a/docs/documentation.py
+++ b/docs/documentation.py
@@ -120,12 +120,6 @@ class FileInfo:
         """
         pass
 
-    def set_emblem(self, emblem):
-        """
-        @type   emblem  string or None
-        """
-        pass
-
     def changed(self):
         pass
     
diff --git a/docs/examples/thunarx-emblem-plugin.py b/docs/examples/thunarx-emblem-plugin.py
deleted file mode 100644
index fa2c665..0000000
--- a/docs/examples/thunarx-emblem-plugin.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import thunarx
-import gtk
-
-class ThunarxEmblemPlugin(thunarx.MenuProvider):
-    def __init__(self):
-        pass
-        
-    def get_file_actions(self, window, files):
-        action = gtk.Action("ET::ShowEmblem1", "Show Emblem", "Show Emblem", None)
-        action.connect("activate", self.show_emblem, files)
-
-        action2 = gtk.Action("ET::ShowEmblem2", "Hide Emblem", "Hide Emblem", None)
-        action2.connect("activate", self.hide_emblem, files)
-        return [action,action2]
-        
-    def show_emblem(self, action, files):
-        files[0].set_emblem("default")
-
-    def hide_emblem(self, action, files):
-        files[0].set_emblem(None)
diff --git a/src/thunarx.override b/src/thunarx.override
index 576fc15..06a3452 100644
--- a/src/thunarx.override
+++ b/src/thunarx.override
@@ -24,65 +24,6 @@ headers
 
 #include <thunarx/thunarx.h>
 
-static PyObject *
-_glist_to_pyobject (GList *list)
-{
-	GList *l;
-	PyObject *item, *ret;
-
-	ret = PyList_New (0);
-
-	for (l = list; l != NULL; l = l->next)
-	{
-		item = pygobject_new ((GObject *)l->data);
-
-		if (item == NULL)
-		{
-			Py_DECREF (ret);
-			return NULL;
-		}
-
-		PyList_Append (ret, item);
-		Py_DECREF (item);
-	}
-
-	return ret;
-}
-
-GList *
-_pyobject_to_glist (PyObject        *py_items, 
-                    PyTypeObject    *type, 
-                    gboolean        *ok)
-{
-	int len, i;
-	GList *items;
-
-	*ok = TRUE;
-
-	len = PyList_Size (py_items);
-
-	for (i = 0; i < len; i++)
-	{
-		PyObject *item = PyList_GetItem (py_items, i);
-
-		if (!pygobject_check (item, type))
-		{
-			char *err = g_strdup_printf ("list item not a %s", type->tp_name);
-
-			PyErr_SetString (PyExc_TypeError, err);
-
-			g_free (err);
-			g_list_free (items);
-			*ok = FALSE;
-			return NULL;
-		}
-
-		items = g_list_append (items, pygobject_get(item));
-	}
-
-	return items;
-}
-
 GHashTable *
 _pyobject_to_ghashtable (PyObject   *py_dict, 
                          GHashTable *hashtable)
@@ -370,31 +311,3 @@ _wrap_ThunarxRenamer__proxy_do_save(ThunarxRenamer  *self,
     Py_DECREF(py_self);
     pyg_gil_state_release(__py_state);
 }
-%%
-define ThunarxFileInfo.set_emblem args
-static PyObject *
-_wrap_thunarx_file_info_set_emblem(PyGObject *self, PyObject *args)
-{
-    gchar  *emblem;
-    gchar **emblem_names = NULL;
-    static GQuark thunar_file_emblem_names_quark;
-    
-    thunar_file_emblem_names_quark = g_quark_from_static_string ("thunar-file-emblem-names");
-    
-    if (!PyArg_ParseTuple(args, "z:ThunarxFileInfo.set_emblem", &emblem))
-        return;
-
-    if (emblem != NULL)
-    {
-        emblem = g_strconcat("emblem-", emblem, NULL);
-        emblem_names = g_strsplit (emblem, ";", -1);
-    }
-    
-    g_object_set_qdata_full (G_OBJECT (self->obj), thunar_file_emblem_names_quark,
-                                  emblem_names, (GDestroyNotify) g_strfreev);
-
-    g_free(emblem);
-
-    Py_INCREF(Py_None);
-    return Py_None;
-}



More information about the Xfce4-commits mailing list