[gnote] Replace std::string by Glib::ustring in IconManager
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in IconManager
- Date: Mon, 30 Jan 2017 21:02:36 +0000 (UTC)
commit ed389d1987e479fe15392fac8c5f9c578f972096
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Jan 30 23:01:22 2017 +0200
Replace std::string by Glib::ustring in IconManager
src/iconmanager.cpp | 6 +++---
src/iconmanager.hpp | 9 ++++-----
2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index 338e570..198ffdc 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2013 Aurimas Cernius
+ * Copyright (C) 2012-2013,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ const char *IconManager::SPECIAL_NOTES = "special-notes";
IconManager IconManager::s_obj;
-Glib::RefPtr<Gdk::Pixbuf> IconManager::get_icon(const std::string & name, int size)
+Glib::RefPtr<Gdk::Pixbuf> IconManager::get_icon(const Glib::ustring & name, int size)
{
try {
IconDef icon = std::make_pair(name, size);
@@ -68,7 +68,7 @@ Glib::RefPtr<Gdk::Pixbuf> IconManager::get_icon(const std::string & name, int si
return Glib::RefPtr<Gdk::Pixbuf>();
}
-Gtk::IconInfo IconManager::lookup_icon(const std::string & name, int size)
+Gtk::IconInfo IconManager::lookup_icon(const Glib::ustring & name, int size)
{
return Gtk::IconTheme::get_default()->lookup_icon(name, size, (Gtk::IconLookupFlags) 0);
}
diff --git a/src/iconmanager.hpp b/src/iconmanager.hpp
index bed890a..e67e78a 100644
--- a/src/iconmanager.hpp
+++ b/src/iconmanager.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2012-2013 Aurimas Cernius
+ * Copyright (C) 2012-2013,2017 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
*/
#include <map>
-#include <string>
#include <gdkmm/pixbuf.h>
#include <glibmm/refptr.h>
@@ -48,10 +47,10 @@ public:
static const char *ACTIVE_NOTES;
static const char *SPECIAL_NOTES;
- Glib::RefPtr<Gdk::Pixbuf> get_icon(const std::string &, int);
- Gtk::IconInfo lookup_icon(const std::string &, int);
+ Glib::RefPtr<Gdk::Pixbuf> get_icon(const Glib::ustring &, int);
+ Gtk::IconInfo lookup_icon(const Glib::ustring &, int);
private:
- typedef std::pair<std::string, int> IconDef;
+ typedef std::pair<Glib::ustring, int> IconDef;
typedef std::map<IconDef, Glib::RefPtr<Gdk::Pixbuf> > IconMap;
IconMap m_icons;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]