pygobject r788 - in trunk: . gio tests
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: pygobject r788 - in trunk: . gio tests
- Date: Tue, 17 Jun 2008 19:57:11 +0000 (UTC)
Author: johan
Date: Tue Jun 17 19:57:11 2008
New Revision: 788
URL: http://svn.gnome.org/viewvc/pygobject?rev=788&view=rev
Log:
2008-06-17 Johan Dahlin <jdahlin async com br>
* gio/gio-types.defs:
* tests/test_gio.py:
Sort out confusion between interfaces and objects, add test.
Fixes #538601
Modified:
trunk/ChangeLog
trunk/gio/gio-types.defs
trunk/tests/test_gio.py
Modified: trunk/gio/gio-types.defs
==============================================================================
--- trunk/gio/gio-types.defs (original)
+++ trunk/gio/gio-types.defs Tue Jun 17 19:57:11 2008
@@ -14,8 +14,14 @@
(gtype-id "G_TYPE_ASYNC_RESULT")
)
+(define-interface Drive
+ (in-module "gio")
+ (c-name "GDrive")
+ (gtype-id "G_TYPE_DRIVE")
+)
+
(define-interface File
- (docstring
+ (docstring
"File(arg, path=None, uri=None) -> gio.File subclass\n"
"\n"
"If arg is specified; creates a GFile with the given argument from the\n"
@@ -36,14 +42,7 @@
(gtype-id "G_TYPE_ICON")
)
-(define-object ThemedIcon
- (in-module "gio")
- (c-name "GThemedIcon")
- (gtype-id "G_TYPE_THEMED_ICON")
- (implements "GIcon")
-)
-
-(define-object LoadableIcon
+(define-interface LoadableIcon
(in-module "gio")
(c-name "GLoadableIcon")
(gtype-id "G_TYPE_LOADABLE_ICON")
@@ -84,12 +83,6 @@
(gtype-id "G_TYPE_CANCELLABLE")
)
-(define-object Drive
- (in-module "gio")
- (c-name "GDrive")
- (gtype-id "G_TYPE_DRIVE")
-)
-
(define-object FileEnumerator
(in-module "gio")
(parent "GObject")
@@ -199,7 +192,7 @@
(in-module "gio")
(parent "GObject")
(c-name "GSimpleAsyncResult")
- (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
+ (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
)
(define-object Vfs
@@ -223,6 +216,14 @@
(gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
)
+(define-object ThemedIcon
+ (in-module "gio")
+ (parent "GObject")
+ (c-name "GThemedIcon")
+ (gtype-id "G_TYPE_THEMED_ICON")
+ (implements "GIcon")
+)
+
;; Enumerations and flags ...
(define-flags AppInfoCreateFlags
Modified: trunk/tests/test_gio.py
==============================================================================
--- trunk/tests/test_gio.py (original)
+++ trunk/tests/test_gio.py Tue Jun 17 19:57:11 2008
@@ -235,7 +235,16 @@
def testGetMounts(self):
mounts = self.monitor.get_mounts()
self.failUnless(isinstance(mounts, list))
-
+ if not mounts:
+ return
+
+ self.failUnless(isinstance(mounts[0], gio.Mount))
+ # Bug 538601
+ icon = mounts[0].get_icon()
+ if not icon:
+ return
+ self.failUnless(isinstance(icon, gio.Icon))
+
class TestThemedIcon(unittest.TestCase):
def setUp(self):
@@ -280,4 +289,4 @@
def testSimple(self):
self.assertEquals(self.appinfo.get_description(),
- "Custom definition for (null)")
+ "Custom definition for does-not-exist")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]