glibmm r513 - in trunk: . gio/src glib/src



Author: murrayc
Date: Wed Jan 16 15:11:01 2008
New Revision: 513
URL: http://svn.gnome.org/viewvc/glibmm?rev=513&view=rev

Log:
2008-01-16  Murray Cumming  <murrayc murrayc com>

* gio/src/file.hg: Added query_file_exists().
* glib/src/uriutils.hg:uri_unescape_string(), uri_escape_string():
Change the illegal_characters and reserved_chars_allowed parameters 
to std::string, because they may not be UTF-8 
See bug #508773.

Modified:
   trunk/ChangeLog
   trunk/gio/src/file.hg
   trunk/glib/src/uriutils.hg

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Wed Jan 16 15:11:01 2008
@@ -286,10 +286,13 @@
                g_file_query_info,
                refreturn, errthrow)
 
+  //TOOD: Add a version without the Cancellable?
+  _WRAP_METHOD(bool query_exists(const Glib::RefPtr<Cancellable>& cancellable), g_file_query_exists)
+
 
   /** Asynchronously gets the requested information about specified file. The result is a FileInfo object that contains key-value attributes (such as type or size for the file).
    *
-   * For more details, see query_info(() which is the synchronous version of this call.
+   * For more details, see query_info() which is the synchronous version of this call.
    * When the operation is finished, @a slot will be called. You can then call query_info_finish() to get the result of the operation.
    *
    * @param slot A callback slot which will be called when the request is satisfied.
@@ -302,7 +305,7 @@
 
   /** Asynchronously gets the requested information about specified file. The result is a FileInfo object that contains key-value attributes (such as type or size for the file).
    *
-   * For more details, see query_info(() which is the synchronous version of this call.
+   * For more details, see query_info() which is the synchronous version of this call.
    * When the operation is finished, @a slot will be called. You can then call query_info_finish() to get the result of the operation.
    *
    * @param slot A callback slot which will be called when the request is satisfied.

Modified: trunk/glib/src/uriutils.hg
==============================================================================
--- trunk/glib/src/uriutils.hg	(original)
+++ trunk/glib/src/uriutils.hg	Wed Jan 16 15:11:01 2008
@@ -19,9 +19,11 @@
 
 _DEFS(glibmm,glib)
 
-#include <glibmm/ustring.h>
+#include <string>
 #include <glibmmconfig.h>
 
+GLIBMM_USING_STD(string)
+
 
 namespace Glib
 {
@@ -30,6 +32,8 @@
  * Various uri-related functions.
  */
 
+//Note that the illegal_characters and reserved_chars_allowed parameters are bytes and may not be UTF-8 
+//so they are not Glib::ustring. See http://bugzilla.gnome.org/show_bug.cgi?id=508773
 
 /** Unescapes a whole escaped string.
  * If any of the characters in @a illegal_characters or the character zero appears
@@ -45,7 +49,7 @@
  * @ingroup UriUtils
  * @newin2p16
  */
-std::string uri_unescape_string(const Glib::ustring& escaped_string, const Glib::ustring& illegal_characters = Glib::ustring());
+std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = std::string());
 
 //TODO: Use iterator? 
 //char *   g_uri_unescape_segment      (const char *escaped_string,
@@ -83,7 +87,7 @@
  * @ingroup UriUtils
  * @newin2p16
  */
-std::string uri_escape_string(const std::string& unescaped, const Glib::ustring& reserved_chars_allowed = Glib::ustring(), bool allow_utf8 = true);
+std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = std::string(), bool allow_utf8 = true);
 
 } // namespace Glib
 



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