diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2016-12-18 12:20:19 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2016-12-18 12:20:19 +0100 |
commit | d21708ed12fe3ccbcfcf28eb4b845bfa3d1fe255 (patch) | |
tree | 246fc2f5c46e830fad8bc31319ad21cc4b6ad4da | |
parent | 392f1a88d558ee1022bfc2433790a7b0d3ece232 (diff) | |
download | glibmm-d21708ed12fe3ccbcfcf28eb4b845bfa3d1fe255.tar.gz |
Gio: Use Glib::ustring for file attributes of string type
Use Glib::ustring for values of file attributes of type
G_FILE_ATTRIBUTE_TYPE_STRING (UTF-8 encoded string). Changed methods:
* gio/src/file.hg: set_attribute_string()
* gio/src/fileinfo.hg: set/get_attribute_string(), set/get_display_name(),
set/get_edit_name(), set/get_content_type(), get_etag()
* gio/src/fileiostream.hg: get_etag()
* gio/src/fileoutputstream.hg: get_etag()
Bug 615950
-rw-r--r-- | gio/src/file.hg | 2 | ||||
-rw-r--r-- | gio/src/fileinfo.hg | 29 | ||||
-rw-r--r-- | gio/src/fileiostream.hg | 4 | ||||
-rw-r--r-- | gio/src/fileoutputstream.hg | 2 |
4 files changed, 12 insertions, 25 deletions
diff --git a/gio/src/file.hg b/gio/src/file.hg index cbe8bac1..f2b595a0 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -1399,7 +1399,7 @@ public: bool set_attributes_finish(const Glib::RefPtr<AsyncResult>& result, const Glib::RefPtr<FileInfo>& info); - _WRAP_METHOD(bool set_attribute_string(const std::string& attribute, const std::string& value, FileQueryInfoFlags flags, const Glib::RefPtr<Cancellable>& cancellable{?}), + _WRAP_METHOD(bool set_attribute_string(const std::string& attribute, const Glib::ustring& value, FileQueryInfoFlags flags, const Glib::RefPtr<Cancellable>& cancellable{?}), g_file_set_attribute_string, errthrow) diff --git a/gio/src/fileinfo.hg b/gio/src/fileinfo.hg index 54841f9c..6596e472 100644 --- a/gio/src/fileinfo.hg +++ b/gio/src/fileinfo.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2007 The gtkmm Development Team * * This library is free software; you can redistribute it and/or @@ -109,8 +107,7 @@ public: _WRAP_METHOD(FileAttributeStatus get_attribute_status(const std::string& attribute) const, g_file_info_get_attribute_status) - //TODO: This should return a ustring instead: https://bugzilla.gnome.org/show_bug.cgi?id=615950#c7 - _WRAP_METHOD(std::string get_attribute_string(const std::string& attribute) const, + _WRAP_METHOD(Glib::ustring get_attribute_string(const std::string& attribute) const, g_file_info_get_attribute_string) #m4 _CONVERSION(`char**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_NONE)') @@ -135,8 +132,7 @@ public: _WRAP_METHOD(bool set_attribute_status(const std::string& attribute, FileAttributeStatus status), g_file_info_set_attribute_status) - //TODO: This should take a ustring value instead: https://bugzilla.gnome.org/show_bug.cgi?id=615950#c7 - _WRAP_METHOD(void set_attribute_string(const std::string& attribute, const std::string& attr_value), + _WRAP_METHOD(void set_attribute_string(const std::string& attribute, const Glib::ustring& attr_value), g_file_info_set_attribute_string) #m4 _CONVERSION(`const std::vector<Glib::ustring>&',`char**',`const_cast<char**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array($3).data())') @@ -167,11 +163,9 @@ public: _WRAP_METHOD(bool is_symlink() const, g_file_info_get_is_symlink) _WRAP_METHOD(std::string get_name() const, g_file_info_get_name) - //TODO: This should return a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(std::string get_display_name() const, g_file_info_get_display_name) + _WRAP_METHOD(Glib::ustring get_display_name() const, g_file_info_get_display_name) - //TODO: This should return a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(std::string get_edit_name() const, g_file_info_get_edit_name) + _WRAP_METHOD(Glib::ustring get_edit_name() const, g_file_info_get_edit_name) _WRAP_METHOD(Glib::RefPtr<Icon> get_icon(), g_file_info_get_icon, refreturn) _WRAP_METHOD(Glib::RefPtr<const Icon> get_icon() const, g_file_info_get_icon, refreturn, constversion) @@ -179,8 +173,7 @@ public: _WRAP_METHOD(Glib::RefPtr<Icon> get_symbolic_icon(), g_file_info_get_symbolic_icon, refreturn) _WRAP_METHOD(Glib::RefPtr<const Icon> get_symbolic_icon() const, g_file_info_get_symbolic_icon, refreturn, constversion) - //TODO: This should return a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(std::string get_content_type() const, g_file_info_get_content_type) + _WRAP_METHOD(Glib::ustring get_content_type() const, g_file_info_get_content_type) _WRAP_METHOD(goffset get_size() const, g_file_info_get_size) @@ -189,8 +182,7 @@ public: _WRAP_METHOD(std::string get_symlink_target() const, g_file_info_get_symlink_target) - //TODO: This should return a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(std::string get_etag() const, g_file_info_get_etag) + _WRAP_METHOD(Glib::ustring get_etag() const, g_file_info_get_etag) _WRAP_METHOD(gint32 get_sort_order() const, g_file_info_get_sort_order) _WRAP_METHOD(void set_attribute_mask(const Glib::RefPtr<FileAttributeMatcher>& mask), @@ -204,17 +196,14 @@ public: _WRAP_METHOD(void set_is_symlink(bool symlink = true), g_file_info_set_is_symlink) _WRAP_METHOD(void set_name(const std::string& name), g_file_info_set_name) - //TODO: This should take a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(void set_display_name(const std::string& display_name), g_file_info_set_display_name) + _WRAP_METHOD(void set_display_name(const Glib::ustring& display_name), g_file_info_set_display_name) - //TODO: This should take a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(void set_edit_name(const std::string& edit_name), g_file_info_set_edit_name) + _WRAP_METHOD(void set_edit_name(const Glib::ustring& edit_name), g_file_info_set_edit_name) _WRAP_METHOD(void set_icon(const Glib::RefPtr<Icon>& icon), g_file_info_set_icon) _WRAP_METHOD(void set_symbolic_icon(const Glib::RefPtr<Icon>& icon), g_file_info_set_symbolic_icon) - //TODO: This should take a ustring instead. See https://bugzilla.gnome.org/show_bug.cgi?id=615950#c4 - _WRAP_METHOD(void set_content_type(const std::string& content_type), g_file_info_set_content_type) + _WRAP_METHOD(void set_content_type(const Glib::ustring& content_type), g_file_info_set_content_type) _WRAP_METHOD(void set_size(goffset size), g_file_info_set_size) diff --git a/gio/src/fileiostream.hg b/gio/src/fileiostream.hg index b015268b..3f2ca9cc 100644 --- a/gio/src/fileiostream.hg +++ b/gio/src/fileiostream.hg @@ -1,5 +1,3 @@ -// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- - /* Copyright (C) 2007 The gtkmm Development Team * * This library is free software; you can redistribute it and/or @@ -100,7 +98,7 @@ public: _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result), g_file_io_stream_query_info_finish, errthrow) - _WRAP_METHOD(std::string get_etag() const, g_file_io_stream_get_etag) + _WRAP_METHOD(Glib::ustring get_etag() const, g_file_io_stream_get_etag) }; diff --git a/gio/src/fileoutputstream.hg b/gio/src/fileoutputstream.hg index a31567bd..3539c4c5 100644 --- a/gio/src/fileoutputstream.hg +++ b/gio/src/fileoutputstream.hg @@ -135,7 +135,7 @@ public: g_file_output_stream_query_info_finish, refreturn, errthrow) - _WRAP_METHOD(std::string get_etag() const, g_file_output_stream_get_etag) + _WRAP_METHOD(Glib::ustring get_etag() const, g_file_output_stream_get_etag) }; } // namespace Gio |