rhythmbox r5726 - in trunk: . bindings/python



Author: jmatthew
Date: Sun Jun  8 06:43:47 2008
New Revision: 5726
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5726&view=rev

Log:
2008-06-08  Jonathan Matthew  <jonathan d14n org>

	patch mostly by:  Mats Taraldsvik  <mats-post broadpark no>

	* bindings/python/rhythmdb.defs:
	* bindings/python/rhythmdb.override:
	Add bindings for the entry type save_to_disk property.
	Fixes #534062.


Modified:
   trunk/ChangeLog
   trunk/bindings/python/rhythmdb.defs
   trunk/bindings/python/rhythmdb.override

Modified: trunk/bindings/python/rhythmdb.defs
==============================================================================
--- trunk/bindings/python/rhythmdb.defs	(original)
+++ trunk/bindings/python/rhythmdb.defs	Sun Jun  8 06:43:47 2008
@@ -28,6 +28,7 @@
     '("gpointer" "post_entry_create" (access readwrite))
     '("gpointer" "pre_entry_destroy" (access readwrite))
     '("gpointer" "get_playback_uri" (access readwrite))
+    '("gboolean" "save_to_disk" (access readwrite))
     '("char*" "can_sync_metadata" (access readwrite))
     '("char*" "sync_metadata" (access readwrite))
     '("RhythmDBEntryCategory" "category" (access readwrite))

Modified: trunk/bindings/python/rhythmdb.override
==============================================================================
--- trunk/bindings/python/rhythmdb.override	(original)
+++ trunk/bindings/python/rhythmdb.override	Sun Jun  8 06:43:47 2008
@@ -613,6 +613,51 @@
 
 	return 0;
 }
+
+%%
+override-attr  RhythmDBEntryType_.save_to_disk
+
+static PyObject *
+_wrap_rhythmdb_entry_type__get_save_to_disk(PyGBoxed *self, void *closure)
+{
+    RhythmDBEntryType et;
+
+    if (pyg_boxed_check(self, RHYTHMDB_TYPE_ENTRY_TYPE))
+	    et = pyg_boxed_get(self, RhythmDBEntryType_);
+    else {
+	    char *s = g_strdup_printf ("self should be a RhythmDBEntryType, is a %s", g_type_name (pyg_type_from_object ((PyObject*)self)));
+	    PyErr_SetString(PyExc_TypeError, s);
+	    g_free (s);
+	    return NULL;
+    }
+
+    return py_return_boolean (et->save_to_disk);
+}
+
+static int
+_wrap_rhythmdb_entry_type__set_save_to_disk(PyGBoxed *self, PyObject *value)
+{
+	RhythmDBEntryType et;
+	gboolean save_to_disk;
+	int ret;
+
+	if (pyg_boxed_check(self, RHYTHMDB_TYPE_ENTRY_TYPE)) {
+		et = pyg_boxed_get(self, RhythmDBEntryType_);
+	} else {
+		char *s = g_strdup_printf ("self should be a RhythmDBEntryType, is a %s", g_type_name (pyg_type_from_object ((PyObject*)self)));
+		PyErr_SetString(PyExc_TypeError, s);
+		g_free (s);
+		return -1;
+	}
+
+	if (value == Py_True) {
+	    et->save_to_disk = TRUE;
+	} else {
+	    et->save_to_disk = FALSE;
+	}
+	return 0;
+}
+
 %%
 override-attr  RhythmDBEntryType_.can_sync_metadata
 



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