[gnote] Replace std::string by Glib::ustring in AddinInfo
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in AddinInfo
- Date: Mon, 30 Jan 2017 21:02:11 +0000 (UTC)
commit 0c910c6b4b6a6c8c675bef065a46b6cf1a89ed50
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Jan 30 22:25:33 2017 +0200
Replace std::string by Glib::ustring in AddinInfo
src/addininfo.cpp | 6 +++---
src/addininfo.hpp | 37 ++++++++++++++++++-------------------
2 files changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/src/addininfo.cpp b/src/addininfo.cpp
index 02a7e7a..cfea95a 100644
--- a/src/addininfo.cpp
+++ b/src/addininfo.cpp
@@ -35,7 +35,7 @@ namespace gnote {
const char * ADDIN_ATTS = "AddinAttributes";
const char * ADDIN_ACTIONS = "Actions";
- AddinCategory resolve_addin_category(const std::string & cat)
+ AddinCategory resolve_addin_category(const Glib::ustring & cat)
{
if(cat == "Tools") {
return ADDIN_CATEGORY_TOOLS;
@@ -57,14 +57,14 @@ namespace gnote {
-AddinInfo::AddinInfo(const std::string & info_file)
+AddinInfo::AddinInfo(const Glib::ustring & info_file)
: m_category(ADDIN_CATEGORY_UNKNOWN)
, m_default_enabled(false)
{
load_from_file(info_file);
}
-void AddinInfo::load_from_file(const std::string & info_file)
+void AddinInfo::load_from_file(const Glib::ustring & info_file)
{
try {
Glib::KeyFile addin_info;
diff --git a/src/addininfo.hpp b/src/addininfo.hpp
index 30935e5..71745a3 100644
--- a/src/addininfo.hpp
+++ b/src/addininfo.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013-2016 Aurimas Cernius
+ * Copyright (C) 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
@@ -20,7 +20,6 @@
#ifndef _ADDININFO_HPP_
#define _ADDININFO_HPP_
-#include <string>
#include <map>
#include <glibmm/keyfile.h>
@@ -42,22 +41,22 @@ class AddinInfo
{
public:
AddinInfo(){}
- explicit AddinInfo(const std::string & info_file);
- void load_from_file(const std::string & info_file);
+ explicit AddinInfo(const Glib::ustring & info_file);
+ void load_from_file(const Glib::ustring & info_file);
- const std::string & id() const
+ const Glib::ustring & id() const
{
return m_id;
}
- const std::string & name() const
+ const Glib::ustring & name() const
{
return m_name;
}
- const std::string & description() const
+ const Glib::ustring & description() const
{
return m_description;
}
- const std::string & authors() const
+ const Glib::ustring & authors() const
{
return m_authors;
}
@@ -65,11 +64,11 @@ public:
{
return m_category;
}
- const std::string & version() const
+ const Glib::ustring & version() const
{
return m_version;
}
- const std::string & copyright() const
+ const Glib::ustring & copyright() const
{
return m_copyright;
}
@@ -77,11 +76,11 @@ public:
{
return m_default_enabled;
}
- const std::string & addin_module() const
+ const Glib::ustring & addin_module() const
{
return m_addin_module;
}
- void addin_module(const std::string & module)
+ void addin_module(const Glib::ustring & module)
{
m_addin_module = module;
}
@@ -100,15 +99,15 @@ public:
Glib::ustring get_attribute(const Glib::ustring & att);
bool validate(const Glib::ustring & release, const Glib::ustring & version_info) const;
private:
- std::string m_id;
- std::string m_name;
- std::string m_description;
- std::string m_authors;
+ Glib::ustring m_id;
+ Glib::ustring m_name;
+ Glib::ustring m_description;
+ Glib::ustring m_authors;
AddinCategory m_category;
- std::string m_version;
- std::string m_copyright;
+ Glib::ustring m_version;
+ Glib::ustring m_copyright;
bool m_default_enabled;
- std::string m_addin_module;
+ Glib::ustring m_addin_module;
Glib::ustring m_libgnote_release;
Glib::ustring m_libgnote_version_info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]