pygobject r736 - in trunk: . gio



Author: johan
Date: Sat Jan 19 19:12:11 2008
New Revision: 736
URL: http://svn.gnome.org/viewvc/pygobject?rev=736&view=rev

Log:
2008-01-19  Johan Dahlin  <johan gnome org>

	* gio/gio.override (_wrap_g_app_info_get_all_for_type),
	(_wrap_g_app_info_get_all),
	(_wrap_g_drive_get_volumes): Implement.



Modified:
   trunk/ChangeLog
   trunk/gio/gio.override

Modified: trunk/gio/gio.override
==============================================================================
--- trunk/gio/gio.override	(original)
+++ trunk/gio/gio.override	Sat Jan 19 19:12:11 2008
@@ -32,10 +32,11 @@
 				    pygobject_new(source_object), 
 				    pygobject_new((GObject *)result));
 
-    if (ret == NULL) {
+    if (ret == NULL)
+      {
 	PyErr_Print();
 	PyErr_Clear();
-    }
+      }
 
     Py_XDECREF(ret);
 
@@ -118,6 +119,73 @@
   return ret;
 }
 %%
+override g_drive_get_volumes noargs
+static PyObject *
+_wrap_g_drive_get_volumes (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+  
+  list = g_drive_get_volumes (G_DRIVE (self->obj));
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GVolume *volume = l->data;
+    PyObject *item = pygobject_new((GObject *)volume);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
+%%
+override g_app_info_get_all noargs
+static PyObject *
+_wrap_g_app_info_get_all (PyGObject *self)
+{
+  GList *list, *l;
+  PyObject *ret;
+  
+  list = g_app_info_get_all ();
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GObject *obj = l->data;
+    PyObject *item = pygobject_new(obj);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
+%%
+override g_app_info_get_all_for_type args
+static PyObject *
+_wrap_g_app_info_get_all_for_type (PyGObject *self, PyObject *args)
+{
+  GList *list, *l;
+  PyObject *ret;
+  gchar *type;
+  
+  if (!PyArg_ParseTuple (args, "s:app_info_get_all_for_type", &type))
+    return NULL;
+  
+  list = g_app_info_get_all_for_type (type);
+
+  ret = PyList_New(0);
+  for (l = list; l; l = l->next) {
+    GObject *obj = l->data;
+    PyObject *item = pygobject_new(obj);
+    PyList_Append(ret, item);
+    Py_DECREF(item);
+  }
+  g_list_free(list);
+  
+  return ret;
+}
+%%
 override g_input_stream_read kwargs
 static PyObject *
 _wrap_g_input_stream_read(PyGObject *self, PyObject *args, PyObject *kwargs)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]