[glibmm/glibmm-2-60] Gio::ThemedIcon: Add create(const std::vector<Glib::ustring>& iconnames)
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-60] Gio::ThemedIcon: Add create(const std::vector<Glib::ustring>& iconnames)
- Date: Mon, 18 Mar 2019 15:36:21 +0000 (UTC)
commit 2b96b961c36e4db7d731d580f24512abe064bdbc
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Mon Mar 18 16:32:41 2019 +0100
Gio::ThemedIcon: Add create(const std::vector<Glib::ustring>& iconnames)
gio/src/themedicon.ccg | 5 +++++
gio/src/themedicon.hg | 21 ++++++++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/gio/src/themedicon.ccg b/gio/src/themedicon.ccg
index 48b76861..fbb6d471 100644
--- a/gio/src/themedicon.ccg
+++ b/gio/src/themedicon.ccg
@@ -24,4 +24,9 @@ ThemedIcon::ThemedIcon(const std::string& iconname, bool use_default_fallbacks)
{
}
+ThemedIcon::ThemedIcon(const std::vector<Glib::ustring>& iconnames)
+: _CONSTRUCT("names", Glib::ArrayHandler<Glib::ustring>::vector_to_array(iconnames).data())
+{
+}
+
} // namespace Gio
diff --git a/gio/src/themedicon.hg b/gio/src/themedicon.hg
index ab0bed11..249b1d11 100644
--- a/gio/src/themedicon.hg
+++ b/gio/src/themedicon.hg
@@ -44,6 +44,10 @@ class ThemedIcon
_IMPLEMENTS_INTERFACE(Icon)
protected:
+ //TODO: When we can break ABI, change the type of icon names to Glib::ustring
+ // in methods where it is std::string. Gtkmm consistently uses Glib::ustring
+ // for icon names, but Gio::ThemedIcon is inconsistent.
+
/** Creates a new themed icon for @a iconname, and optionally all the names that can be created by
shortening @a iconname at '-' characters.
*
* @param iconname A string containing an icon name.
@@ -52,6 +56,15 @@ protected:
explicit ThemedIcon(const std::string& iconname, bool use_default_fallbacks = false);
_IGNORE(g_themed_icon_new, g_themed_icon_new_with_default_fallbacks)
+ /** Creates a new themed icon for @a iconnames.
+ *
+ * @param iconnames A vector of strings containing icon names.
+ *
+ * @newin{2,60}
+ */
+ explicit ThemedIcon(const std::vector<Glib::ustring>& iconnames);
+ _IGNORE(g_themed_icon_new_from_names)
+
public:
/** Creates a new themed icon for @a iconname, and optionally all the names that can be created by
shortening @a iconname at '-' characters.
*
@@ -72,7 +85,13 @@ public:
*/
_WRAP_CREATE(const std::string& iconname, bool use_default_fallbacks = false)
- //TODO: GIcon *g_themed_icon_new_from_names (char **iconnames, int len);
+ /** Creates a new themed icon for @a iconnames.
+ *
+ * @param iconnames A vector of strings containing icon names.
+ *
+ * @newin{2,60}
+ */
+ _WRAP_CREATE(const std::vector<Glib::ustring>& iconnames)
_WRAP_METHOD(void prepend_name(const std::string& iconname), g_themed_icon_prepend_name)
_WRAP_METHOD(void append_name(const std::string& iconname), g_themed_icon_append_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]