[gnote] * Fix format causing crashes. (Closes #580868)
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnote] * Fix format causing crashes. (Closes #580868)
- Date: Thu, 30 Apr 2009 17:20:35 -0400 (EDT)
commit dd5597f4de4029e7ac8763a0dcc2c14484d8e2cc
Author: Hubert Figuiere <hub figuiere net>
Date: Thu Apr 30 11:23:25 2009 -0400
* Fix format causing crashes. (Closes #580868)
---
NEWS | 1 +
po/de.po | 6 +++---
src/recentchanges.cpp | 24 ++++++++++++++++++------
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
index 858ec4f..255bf13 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Translations:
* Updated translations:
- Arabic (ar)
+ * Fix format causing crashes. (Closes #580868)
0.3.0 - 2009/04/29
diff --git a/po/de.po b/po/de.po
index 534655a..0bc37ee 100644
--- a/po/de.po
+++ b/po/de.po
@@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: tomboy\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-04-27 14:43+0200\n"
-"PO-Revision-Date: 2009-04-27 14:50+0100\n"
+"PO-Revision-Date: 2009-04-30 11:22-0400\n"
"Last-Translator: Mario Blättermann <mariobl gnome org>\n"
"Language-Team: German <gnome-de gnome org>\n"
"MIME-Version: 1.0\n"
@@ -1079,8 +1079,8 @@ msgstr[1] "Gesamt: %1% Notizen"
#: ../src/recentchanges.cpp:588
msgid "Matches: %1% note"
msgid_plural "Matches: %1% notes"
-msgstr[0] "Treffer: %s% Notiz"
-msgstr[1] "Treffer: %s% Notizen"
+msgstr[0] "Treffer: %1% Notiz"
+msgstr[1] "Treffer: %1% Notizen"
#: ../src/recentchanges.cpp:723
msgid "Notes"
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index 39f1efe..6c1d1a5 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -576,17 +576,29 @@ namespace gnote {
void NoteRecentChanges::update_total_note_count (int total)
{
- const char * fmt;
- fmt = ngettext("Total: %1% note", "Total: %1% notes", total);
- m_note_count.set_text(str(boost::format (fmt) % total));
+ try {
+ const char * fmt;
+ fmt = ngettext("Total: %1% note", "Total: %1% notes", total);
+ m_note_count.set_text(str(boost::format (fmt) % total));
+ }
+ catch(const std::exception & e)
+ {
+ ERR_OUT("exception: %s", e.what());
+ }
}
void NoteRecentChanges::update_match_note_count (int matches)
{
- const char * fmt;
- fmt = ngettext("Matches: %1% note", "Matches: %1% notes", matches);
- m_note_count.set_text(str(boost::format (fmt) % matches));
+ try {
+ const char * fmt;
+ fmt = ngettext("Matches: %1% note", "Matches: %1% notes", matches);
+ m_note_count.set_text(str(boost::format (fmt) % matches));
+ }
+ catch(const std::exception & e)
+ {
+ ERR_OUT("exception: %s", e.what());
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]