[gnote] Replace std::string by Glib::ustring in todo
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace std::string by Glib::ustring in todo
- Date: Sun, 12 Feb 2017 15:15:35 +0000 (UTC)
commit 0f57c4f9b9074bd0f4c37cf103e4d31b0df043cb
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Feb 12 16:37:37 2017 +0200
Replace std::string by Glib::ustring in todo
src/addins/todo/todonoteaddin.cpp | 8 ++++----
src/addins/todo/todonoteaddin.hpp | 3 +--
2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/addins/todo/todonoteaddin.cpp b/src/addins/todo/todonoteaddin.cpp
index 79b415a..e3b7835 100644
--- a/src/addins/todo/todonoteaddin.cpp
+++ b/src/addins/todo/todonoteaddin.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2017 Aurimas Cernius
* Copyright (c) 2009 Romain Tartière <romain blogreen org>
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
namespace todo {
-static std::vector<std::string> s_todo_patterns;
+static std::vector<Glib::ustring> s_todo_patterns;
TodoModule::TodoModule()
{
@@ -41,7 +41,7 @@ TodoModule::TodoModule()
void Todo::initialize()
{
- FOREACH(const std::string & s, s_todo_patterns) {
+ for(auto s : s_todo_patterns) {
if(!get_note()->get_tag_table()->lookup(s)) {
Glib::RefPtr<Gtk::TextTag> tag = Gtk::TextTag::create(s);
tag->property_foreground() = "#0080f0";
@@ -91,7 +91,7 @@ void Todo::highlight_region(Gtk::TextIter start, Gtk::TextIter end)
end.forward_line();
}
- FOREACH(const std::string & pattern, s_todo_patterns) {
+ for(auto pattern : s_todo_patterns) {
highlight_region(pattern, start, end);
}
}
diff --git a/src/addins/todo/todonoteaddin.hpp b/src/addins/todo/todonoteaddin.hpp
index d2c47a8..216f351 100644
--- a/src/addins/todo/todonoteaddin.hpp
+++ b/src/addins/todo/todonoteaddin.hpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013 Aurimas Cernius
+ * Copyright (C) 2013,2017 Aurimas Cernius
* Copyright (c) 2009 Romain Tartière <romain blogreen org>
*
* This program is free software: you can redistribute it and/or modify
@@ -22,7 +22,6 @@
#ifndef _TODO_NOTE_ADDIN_
#define _TODO_NOTE_ADDIN_
-#include "base/macros.hpp"
#include "noteaddin.hpp"
#include "sharp/dynamicmodule.hpp"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]