glibmm r625 - in trunk: . gio/src



Author: murrayc
Date: Tue Feb 26 10:47:47 2008
New Revision: 625
URL: http://svn.gnome.org/viewvc/glibmm?rev=625&view=rev

Log:
2.15.7:

2008-02-26  Murray Cumming  <murrayc murrayc com>

* gio/src/gio_methods.defs: Regenerated.
* gio/src/file.ccg:
* gio/src/file.hg: Added query_filesystem_info_async() and 
query_filesystem_info_finish() because these were added to the C API.
* gio/src/themedicon.hg: Added append_name() because this was added to 
the C API.


Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/configure.in
   trunk/gio/src/file.ccg
   trunk/gio/src/file.hg
   trunk/gio/src/gio_methods.defs
   trunk/gio/src/themedicon.hg

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue Feb 26 10:47:47 2008
@@ -1,4 +1,26 @@
-2.15.6 (unstable)
+2.15.7 (unstable):
+
+* File:
+  - Added query_filesystem_info_async() and 
+  query_filesystem_info_finish() because these were added to the C API.
+  (Murray Cumming)
+  - Renamed contains_file() to file_has_prefix() because this was changed in the 
+  C API.
+  (Wouter Bolsterlee)
+* ThemedIcon: Added append_name() because this was added to the C API.
+  (Murray Cumming)
+
+Glib:
+* Renamed uri_get_scheme() to uri_parse_scheme() because this was changed 
+  in the C API.
+  (Wouter Bolsterlee)
+
+Documentation:
+* Corrections to the .devhelp file generation.
+  (Jonathon Jongsma. Bug #518673)
+
+
+2.15.6 (unstable):
 
 Gio:
 * Removed most vfuncs, because they are not useful to application developers, 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Feb 26 10:47:47 2008
@@ -14,7 +14,7 @@
 
 pushdef([GLIBMM_MAJOR_VERSION],     [2])
 pushdef([GLIBMM_MINOR_VERSION],     [15])
-pushdef([GLIBMM_MICRO_VERSION],     [6])
+pushdef([GLIBMM_MICRO_VERSION],     [7])
 pushdef([GLIBMM_EXTRA_VERSION],     [])
 pushdef([GLIBMM_VERSION], GLIBMM_MAJOR_VERSION.GLIBMM_MINOR_VERSION.GLIBMM_MICRO_VERSION[]GLIBMM_EXTRA_VERSION)
 
@@ -131,7 +131,7 @@
 #  Dependancy checks
 #########################################################################
 gtkmm_min_sigc_version=2.0.0
-gtkmm_min_glib_version=2.15.5
+gtkmm_min_glib_version=2.15.6
 
 PKG_CHECK_MODULES(GLIBMM, sigc++-2.0 >= ${gtkmm_min_sigc_version} glib-2.0 >= ${gtkmm_min_glib_version} gobject-2.0 >= ${gtkmm_min_glib_version} gmodule-2.0 >= ${gtkmm_min_glib_version})
 AC_SUBST(GLIBMM_CFLAGS)

Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg	(original)
+++ trunk/gio/src/file.ccg	Tue Feb 26 10:47:47 2008
@@ -395,6 +395,38 @@
   return retvalue;
 }
 
+void
+File::query_filesystem_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, int io_priority) const
+{
+  // Create a copy of the slot.
+  // A pointer to it will be passed through the callback's data parameter
+  // and deleted in the callback.
+  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+  g_file_query_filesystem_info_async(const_cast<GFile*>(gobj()),
+                          attributes.c_str(),
+                          io_priority,
+                          cancellable->gobj(),
+                          &SignalProxy_async_callback,
+                          slot_copy);
+}
+
+void
+File::query_filesystem_info_async(const SlotAsyncReady& slot, const std::string& attributes, int io_priority) const
+{
+  // Create a copy of the slot.
+  // A pointer to it will be passed through the callback's data parameter
+  // and deleted in the callback.
+  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+  g_file_query_filesystem_info_async(const_cast<GFile*>(gobj()),
+                          attributes.c_str(),
+                          io_priority,
+                          NULL, // cancellable
+                          &SignalProxy_async_callback,
+                          slot_copy);
+}
+
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
 Glib::RefPtr<FileEnumerator> File::enumerate_children(const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes, FileQueryInfoFlags flags)
 #else

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Tue Feb 26 10:47:47 2008
@@ -690,6 +690,45 @@
   _WRAP_METHOD(Glib::RefPtr<Mount> find_enclosing_mount(const Glib::RefPtr<Cancellable>& cancellable), 
                g_file_find_enclosing_mount, retreturn, errthrow)
 
+
+  /** Asynchronously gets the requested information about the filesystem
+   * that the file is on. The result is a FileInfo object
+   * that contains key-value attributes (such as type or size for the
+   * file).
+   * 
+   * For more details, see query_filesystem_info() which is the synchronous version of this call.
+   *
+   * When the operation is finished, @a slot will be called. You can then call query_filesystem_info_finish() to get the result of the operation.
+   *
+   * @param slot A callback slot which will be called when the request is satisfied.
+   * @param cancellable A Cancellable object which can be used to cancel the operation.
+   * @param attributes An attribute query string.
+   * @param io_priority The I/O priority of the request.
+   */
+  void query_filesystem_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT) const;
+
+  /** Asynchronously gets the requested information about the filesystem
+   * that the file is on. The result is a FileInfo object
+   * that contains key-value attributes (such as type or size for the
+   * file).
+   * 
+   * For more details, see query_filesystem_info() which is the synchronous version of this call.
+   *
+   * When the operation is finished, @a slot will be called. You can then call query_filesystem_info_finish() to get the result of the operation.
+   *
+   * @param slot A callback slot which will be called when the request is satisfied.
+   * @param attributes An attribute query string.
+   * @param io_priority The I/O priority of the request.
+   */
+  void query_filesystem_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT) const;
+  _IGNORE(g_file_query_filesystem_info_async)
+
+
+  _WRAP_METHOD(Glib::RefPtr<FileInfo> query_filesystem_info_finish(const Glib::RefPtr<AsyncResult>& result),
+               g_file_query_filesystem_info_finish,
+               refreturn, errthrow)
+
+
   /** Gets a Mount for the File. 
    * 
    * If the FileIface for the file does not have a mount (e.g. possibly a 

Modified: trunk/gio/src/gio_methods.defs
==============================================================================
--- trunk/gio/src/gio_methods.defs	(original)
+++ trunk/gio/src/gio_methods.defs	Tue Feb 26 10:47:47 2008
@@ -381,6 +381,17 @@
   )
 )
 
+(define-enum PreviewType
+  (in-module "GFilesystem")
+  (c-name "GFilesystemPreviewType")
+  (gtype-id "G_TYPE_FILESYSTEM_PREVIEW_TYPE")
+  (values
+    '("if-always" "G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS")
+    '("if-local" "G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL")
+    '("never" "G_FILESYSTEM_PREVIEW_TYPE_NEVER")
+  )
+)
+
 (define-enum MonitorEvent
   (in-module "GFile")
   (c-name "GFileMonitorEvent")
@@ -1995,6 +2006,29 @@
   )
 )
 
+(define-method query_filesystem_info_async
+  (of-object "GFile")
+  (c-name "g_file_query_filesystem_info_async")
+  (return-type "none")
+  (parameters
+    '("const-char*" "attributes")
+    '("int" "io_priority")
+    '("GCancellable*" "cancellable")
+    '("GAsyncReadyCallback" "callback")
+    '("gpointer" "user_data")
+  )
+)
+
+(define-method query_filesystem_info_finish
+  (of-object "GFile")
+  (c-name "g_file_query_filesystem_info_finish")
+  (return-type "GFileInfo*")
+  (parameters
+    '("GAsyncResult*" "res")
+    '("GError**" "error")
+  )
+)
+
 (define-method find_enclosing_mount
   (of-object "GFile")
   (c-name "g_file_find_enclosing_mount")
@@ -3585,6 +3619,11 @@
   (return-type "GType")
 )
 
+(define-function g_filesystem_preview_type_get_type
+  (c-name "g_filesystem_preview_type_get_type")
+  (return-type "GType")
+)
+
 (define-function g_file_monitor_event_get_type
   (c-name "g_file_monitor_event_get_type")
   (return-type "GType")
@@ -4683,6 +4722,15 @@
   )
 )
 
+(define-method append_name
+  (of-object "GThemedIcon")
+  (c-name "g_themed_icon_append_name")
+  (return-type "none")
+  (parameters
+    '("const-char*" "iconname")
+  )
+)
+
 
 
 ;; From gunionvolumemonitor.h

Modified: trunk/gio/src/themedicon.hg
==============================================================================
--- trunk/gio/src/themedicon.hg	(original)
+++ trunk/gio/src/themedicon.hg	Tue Feb 26 10:47:47 2008
@@ -56,10 +56,13 @@
   //TODO: GIcon *g_themed_icon_new_with_default_fallbacks (const char *iconname);
   //TODO: GIcon *g_themed_icon_new_from_names (char **iconnames, int len);
 
+  _WRAP_METHOD(void append_name(const std::string& iconname), g_themed_icon_append_name)
+
 #m4 _CONVERSION(`const char*const*',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
   //TODO: gmmproc complains about the wrong number of arguments, but I can't see why. murrayc.
   //_WRAP_METHOD(Glib::StringArrayHandle get_names() const, g_themed_icon_get_names)
 
+
   //There are no signals or properties.
 };
 



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