[nautilus-python] Updated to include new GIO types and new fileinfo methods (get_file_type, get_location, get_parent_l



commit ef3f74d4b08685b1e66e1141e801f2898c09945b
Author: Adam Plumb <adamplumb gmail com>
Date:   Thu Jan 14 11:35:35 2010 -0500

    Updated to include new GIO types and new fileinfo methods (get_file_type, get_location, get_parent_location)

 configure.in              |    5 +++++
 examples/documentation.py |   13 ++++++++++++-
 src/Makefile.am           |    2 ++
 src/nautilus.defs         |    4 ++--
 4 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6ffd574..75ea369 100644
--- a/configure.in
+++ b/configure.in
@@ -49,6 +49,11 @@ PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
 AC_SUBST(PYGTK_CODEGEN)
 AC_MSG_RESULT($PYGTK_CODEGEN)
 
+AC_MSG_CHECKING(for pygobject defs)
+PYGOBJECT_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygobject-2.0`
+AC_SUBST(PYGOBJECT_DEFSDIR)
+AC_MSG_RESULT($PYGOBJECT_DEFSDIR)
+
 NAUTILUS_LIBDIR=`$PKG_CONFIG --variable=libdir libnautilus-extension`
 AC_SUBST(NAUTILUS_LIBDIR)
 AC_DEFINE_UNQUOTED(NAUTILUS_LIBDIR, "$NAUTILUS_LIBDIR", [Nautilus libdir])
diff --git a/examples/documentation.py b/examples/documentation.py
index 8c74d42..78e06b7 100644
--- a/examples/documentation.py
+++ b/examples/documentation.py
@@ -95,12 +95,24 @@ class FileInfo:
     def is_gone(self):
         pass
 
+    def get_file_type(self):
+        pass
+
+    def get_location(self):
+        pass
+
     def get_name(self):
         pass
 
     def get_uri(self):
         pass
 
+    def get_activation_uri(self):
+        pass
+
+    def get_parent_location(self):
+        pass
+
     def get_parent_uri(self):
         pass
 
@@ -127,7 +139,6 @@ class FileInfo:
 
     def invalidate_extension_info(self):
         pass
-
     
 class PropertyPage:
     """
diff --git a/src/Makefile.am b/src/Makefile.am
index 01fb47c..0b93d81 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,6 +40,8 @@ EXTRA_DIST = nautilus.override nautilus.defs
 	    --register $(PYGTK_DEFSDIR)/pango-types.defs \
             --register $(PYGTK_DEFSDIR)/gdk-types.defs \
             --register $(PYGTK_DEFSDIR)/gtk-types.defs \
+            --register $(PYGOBJECT_DEFSDIR)/gio-types.defs \
+            --register $(PYGOBJECT_DEFSDIR)/unix-types.defs \
             --override $*.override \
             --prefix py$* $*.defs) > gen-$*.c \
         && cp gen-$*.c $*.c \
diff --git a/src/nautilus.defs b/src/nautilus.defs
index 29b5f36..2055832 100644
--- a/src/nautilus.defs
+++ b/src/nautilus.defs
@@ -144,7 +144,7 @@
 (define-method get_location
   (of-object "NautilusFileInfo")
   (c-name "nautilus_file_info_get_location")
-  (return-type "GFile")
+  (return-type "GFile*")
 )
 
 (define-method get_name
@@ -168,7 +168,7 @@
 (define-method get_parent_location
   (of-object "NautilusFileInfo")
   (c-name "nautilus_file_info_get_parent_location")
-  (return-type "GFile")
+  (return-type "GFile*")
 )
 
 (define-method get_parent_uri



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