+2.39.92 (unstable):
+
+Gio:
+* Application: Add add_main_option_entry() and add_option_group().
+ (Murray Cumming)
+
+Documentation:
+* Glib::ustring: Say more clearly that it must be only UTF-8.
+ (Kjell Ahlstedt) Bug #681560 (vurentjie)
+
+Build:
+* win32: Surround content_type_get_symbolic_icon() with ifdefs.
+ (Giuseppe Penone)
+
+
2.39.91 (unstable):
Documenation:
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([glibmm], [2.39.91],
+AC_INIT([glibmm], [2.39.92],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library])
])
-glibreq='2.0 >= 2.39.91'
+glibreq='2.0 >= 2.39.92'
GLIBMM_MODULES="sigc++-2.0 >= 2.2.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
return retvalue;
}
+#ifdef G_OS_UNIX
Glib::RefPtr<Gio::Icon> content_type_get_symbolic_icon(const Glib::ustring& type)
{
Glib::RefPtr<Icon> retvalue = Glib::wrap(g_content_type_get_symbolic_icon(type.c_str()));
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
+#endif
bool content_type_can_be_executable(const Glib::ustring& type)
{
*/
Glib::RefPtr<Icon> content_type_get_icon(const Glib::ustring& type);
+#ifdef G_OS_UNIX
/**
* Gets the symbolic icon for a content type.
*
* @newin{2,34}
*/
Glib::RefPtr<Icon> content_type_get_symbolic_icon(const Glib::ustring& type);
+#endif
/**
* Checks if a content type can be executable. Note that for instance
#include <giomm/file.h>
#include <giomm/actiongroup.h>
#include <giomm/init.h>
+#include <cstring> // std::memset()
namespace
{
open(files, hint);
}
+void Application::add_main_option_entry(Glib::OptionEntry& entry)
+{
+ //Create a temporary array, just so we can give the correct thing to g_application_add_main_option_entries():
+ GOptionEntry array[2];
+ array[0] = *(entry.gobj()); //Copy contents.
+ std::memset(&array[1], 0, sizeof(GOptionEntry));
+
+ g_application_add_main_option_entries(gobj(), array);
+}
+
} // namespace Gio
#include <giomm/applicationcommandline.h>
#include <giomm/file.h>
#include <glibmm/object.h>
+#include <glibmm/optiongroup.h>
#include <glibmm/variant.h>
#include <giomm/dbusconnection.h>
#include <giomm/notification.h>
_WRAP_METHOD(void set_action_group(const Glib::RefPtr<ActionGroup>& action_group), g_application_set_action_group)
+
+ //TODO: Custom write the documentation for this method?
+ _WRAP_METHOD_DOCS_ONLY(g_application_add_main_option_entries)
+ void add_main_option_entry(Glib::OptionEntry& entry);
+ _IGNORE(g_application_add_main_option_entries)
+
+ _WRAP_METHOD(void add_option_group(Glib::OptionGroup& group), g_application_add_option_group)
+
+
+
_WRAP_METHOD(bool is_registered() const, g_application_get_is_registered)
_WRAP_METHOD(bool is_remote() const, g_application_get_is_remote)
<function name="g_subprocess_get_identifier">
<description>
-On UNIX, returns the process ID as a decimal string. On Windows,
-returns the result of GetProcessId() also as a string.
+On UNIX, returns the process ID as a decimal string.
+On Windows, returns the result of GetProcessId() also as a string.
</description>
<parameters>
(gtype-id "G_TYPE_ACTION_GROUP")
)
+(define-object ActionMap
+ (in-module "Gio")
+ (c-name "GActionMap")
+ (gtype-id "G_TYPE_ACTION_MAP")
+)
+
(define-object DBusConnection
(in-module "Gio")
(c-name "GDBusConnection")
* the old UTF-8 character and the new one to write could be different.
* Therefore, any write operation would invalidate all other iterators
* pointing into the same string.
+ *
+ * The Glib::ustring iterated over must contain only valid UTF-8 data.
+ * If it does not, operator++(), operator-\-() and operator*() may make
+ * accesses outside the bounds of the string. A loop such as the following
+ * one would not stop at the end of the string.
+ * @code
+ * // Bad code! Don't do this!
+ * const char not_utf8[] = { '\x80', '\xef', '\x80', '\x80', '\xef', '\x80' };
+ * const Glib::ustring s(not_utf8, not_utf8 + sizeof not_utf8);
+ * for (Glib::ustring::const_iterator it = s.begin(); it != s.end(); ++it)
+ * std::cout << *it << std::endl;
+ * @endcode
+ *
+ * @tparam T std::string::iterator or std::string::const_iterator
*/
template <class T>
class ustring_Iterator
* character, and <tt>std::string::length()</tt> returns the number of bytes
* rather than characters. So don't do that without a good reason.
* @par
+ * Many member functions and operators of Glib::ustring and Glib::ustring_Iterator
+ * assume that the string contains only valid UTF-8 data. If it does not, memory
+ * outside the bounds of the string can be accessed.
+ * @par
* In a perfect world the C++ Standard Library would contain a UTF-8 string
- * class. Unfortunately, the C++ standard doesn't mention UTF-8 at all. Note
+ * class. Unfortunately, the C++98 standard doesn't mention UTF-8 at all.
+ * C++11 has UTF-8 literals but no UTF-8 string class. Note
* that std::wstring is not a UTF-8 string class because it contains only
* fixed-width characters (where width could be 32, 16, or even 8 bits).
*
dnl OptionGroup
_CONVERSION(`OptionGroup&',`GOptionGroup*',`($3).gobj()')
-#_CONVERSION(`GOptionGroup*',`OptionGroup',`Glib::wrap(($3), true /* take_copy */)')
+_CONVERSION(`Glib::OptionGroup&',`GOptionGroup*',`($3).gobj()')
dnl Bytes
_CONVERSION(`GBytes*',`Glib::RefPtr<Glib::Bytes>',`Glib::wrap($3)')