[gnote] Replace std::string by Glib::ustring in AddinsTreeModel
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in AddinsTreeModel
- Date: Wed, 25 Jan 2017 21:28:45 +0000 (UTC)
commit 80846fdc9b342d9cc861aa5ea189627aea497146
Author: Aurimas Černius <aurisc4 gmail com>
Date: Wed Jan 25 22:47:57 2017 +0200
Replace std::string by Glib::ustring in AddinsTreeModel
src/sharp/addinstreemodel.cpp | 14 +++++++-------
src/sharp/addinstreemodel.hpp | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/sharp/addinstreemodel.cpp b/src/sharp/addinstreemodel.cpp
index f989672..1baaa1b 100644
--- a/src/sharp/addinstreemodel.cpp
+++ b/src/sharp/addinstreemodel.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2010,2012-2013 Aurimas Cernius
+ * Copyright (C) 2010,2012-2013,2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -51,9 +51,9 @@ namespace sharp {
set_column_types(m_columns);
}
- std::string AddinsTreeModel::get_module_id(const Gtk::TreeIter & iter)
+ Glib::ustring AddinsTreeModel::get_module_id(const Gtk::TreeIter & iter)
{
- std::string id;
+ Glib::ustring id;
if(iter) {
iter->get_value(4, id);
}
@@ -80,7 +80,7 @@ namespace sharp {
const Gtk::TreeIter & iter)
{
Gtk::CellRendererText *text_renderer = dynamic_cast<Gtk::CellRendererText*>(renderer);
- std::string value;
+ Glib::ustring value;
iter->get_value(0, value);
text_renderer->property_text() = value;
const sharp::DynamicModule *module = get_module(iter);
@@ -140,14 +140,14 @@ namespace sharp {
iter->set_value(3, category);
}
iter = Gtk::TreeStore::append(iter->children());
- iter->set_value(0, std::string(module_info.name()));
- iter->set_value(1, std::string(module_info.version()));
+ iter->set_value(0, module_info.name());
+ iter->set_value(1, module_info.version());
iter->set_value(2, module);
iter->set_value(4, module_info.id());
return iter;
}
- std::string AddinsTreeModel::get_addin_category_name(gnote::AddinCategory category)
+ Glib::ustring AddinsTreeModel::get_addin_category_name(gnote::AddinCategory category)
{
switch(category) {
case gnote::ADDIN_CATEGORY_FORMATTING:
diff --git a/src/sharp/addinstreemodel.hpp b/src/sharp/addinstreemodel.hpp
index bcf8289..dd12e95 100644
--- a/src/sharp/addinstreemodel.hpp
+++ b/src/sharp/addinstreemodel.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2010,2012-2013 Aurimas Cernius
+ * Copyright (C) 2010,2012-2013,2017 Aurimas Cernius
* Copyright (C) 2009 Hubert Figuiere
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -44,7 +44,7 @@ public:
typedef Glib::RefPtr<AddinsTreeModel> Ptr;
static Ptr create(Gtk::TreeView * treeview);
- std::string get_module_id(const Gtk::TreeIter &);
+ Glib::ustring get_module_id(const Gtk::TreeIter &);
sharp::DynamicModule * get_module(const Gtk::TreeIter &);
void set_module(const Gtk::TreeIter &, const sharp::DynamicModule *);
@@ -62,15 +62,15 @@ public:
add(id);
}
- Gtk::TreeModelColumn<std::string> name;
- Gtk::TreeModelColumn<std::string> version;
+ Gtk::TreeModelColumn<Glib::ustring> name;
+ Gtk::TreeModelColumn<Glib::ustring> version;
Gtk::TreeModelColumn<const sharp::DynamicModule *> addin;
Gtk::TreeModelColumn<gnote::AddinCategory> category;
- Gtk::TreeModelColumn<std::string> id;
+ Gtk::TreeModelColumn<Glib::ustring> id;
};
AddinsColumns m_columns;
- static std::string get_addin_category_name(gnote::AddinCategory category);
+ static Glib::ustring get_addin_category_name(gnote::AddinCategory category);
protected:
AddinsTreeModel();
void set_columns(Gtk::TreeView *v);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]