[gnote] Remove boost::format from gnote.cpp
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove boost::format from gnote.cpp
- Date: Sun, 8 Jan 2017 12:43:27 +0000 (UTC)
commit d548e7dfdec071ce1c658199452a89deef119ab3
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Jan 8 13:33:19 2017 +0200
Remove boost::format from gnote.cpp
src/gnote.cpp | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 93c0834..dcb905c 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2010-2016 Aurimas Cernius
+ * Copyright (C) 2010-2017 Aurimas Cernius
* Copyright (C) 2010 Debarshi Ray
* Copyright (C) 2009 Hubert Figuiere
*
@@ -28,7 +28,6 @@
#include <iostream>
#include <boost/bind.hpp>
-#include <boost/format.hpp>
#include <glibmm/thread.h>
#include <glibmm/i18n.h>
@@ -674,7 +673,7 @@ namespace gnote {
if (!note_id.empty()) {
// Attempt to load the note, assuming it might already
// be part of our notes list.
- if (!display_note(remote, str(boost::format("note://gnote/%1%") % note_id))) {
+ if (!display_note(remote, "note://gnote/" + note_id)) {
sharp::StreamReader sr;
sr.init(m_open_external_note_path);
if (sr.file()) {
@@ -697,7 +696,7 @@ namespace gnote {
// Check for conflicting titles
std::string baseTitle = noteTitle;
for (int i = 1; !remote->FindNote (noteTitle).empty(); i++) {
- noteTitle = str(boost::format("%1% (%2%)") % baseTitle % i);
+ noteTitle = Glib::ustring::compose("%1 (%2)", baseTitle, i);
}
std::string note_uri = remote->CreateNamedNote (noteTitle);
@@ -732,8 +731,7 @@ namespace gnote {
void GnoteCommandLine::print_version()
{
// TRANSLATORS: %1%: boost format placeholder for the version string.
- Glib::ustring version = str(boost::format(_("Version %1%"))
- % VERSION);
+ Glib::ustring version = Glib::ustring::compose(_("Version %1"), VERSION);
std::cerr << version << std::endl;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]