[gnote] Remove boost::format from statistics plugin
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove boost::format from statistics plugin
- Date: Fri, 13 Jan 2017 20:54:52 +0000 (UTC)
commit 7c8f5ffcc0a4a46cdce56df49be55e8e3d965e37
Author: Aurimas Černius <aurisc4 gmail com>
Date: Fri Jan 13 22:46:39 2017 +0200
Remove boost::format from statistics plugin
src/addins/statistics/statistics.desktop.in.in | 2 +-
src/addins/statistics/statisticswidget.cpp | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/addins/statistics/statistics.desktop.in.in b/src/addins/statistics/statistics.desktop.in.in
index e754fca..1ef2a34 100644
--- a/src/addins/statistics/statistics.desktop.in.in
+++ b/src/addins/statistics/statistics.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Statistics
_Description=Show various statistics about notes.
_Authors=Aurimas Černius
Category=Tools
-Version=0.3
+Version=0.4
DefaultEnabled=false
Module=libstatistics
LibgnoteRelease=@LIBGNOTE_RELEASE@
diff --git a/src/addins/statistics/statisticswidget.cpp b/src/addins/statistics/statisticswidget.cpp
index e8623b7..d03153b 100644
--- a/src/addins/statistics/statisticswidget.cpp
+++ b/src/addins/statistics/statisticswidget.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2013-2014 Aurimas Cernius
+ * Copyright (C) 2013-2014,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,8 +18,6 @@
*/
-#include <boost/format.hpp>
-
#include <glibmm/i18n.h>
#include <gtkmm/treestore.h>
@@ -124,9 +122,9 @@ private:
for(std::map<std::string, int>::iterator nb = notebook_stats.begin(); nb != notebook_stats.end();
++nb) {
Gtk::TreeIter nb_stat = append(iter->children());
nb_stat->set_value(0, nb->first);
- // TRANSLATORS: %1%: boost format placeholder for the number of notes.
- char *fmt = ngettext("%1% note", "%1% notes", nb->second);
- nb_stat->set_value(1, str(boost::format(fmt) % nb->second));
+ // TRANSLATORS: %1 is the format placeholder for the number of notes.
+ char *fmt = ngettext("%1 note", "%1 notes", nb->second);
+ nb_stat->set_value(1, Glib::ustring::compose(fmt, nb->second));
}
DBG_OUT("Statistics updated");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]