summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lsof.cpp8
-rw-r--r--src/sysinfo.cpp4
-rw-r--r--src/util.cpp7
3 files changed, 12 insertions, 7 deletions
diff --git a/src/lsof.cpp b/src/lsof.cpp
index 100394a..aaf2fbd 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -122,10 +122,12 @@ namespace
void display_regex_error(const Glib::RegexError& error)
{
- const char * msg = _("<b>Error</b>\n"
- "'%s' is not a valid Perl regular expression.\n"
- "%s");
+ char * msg = g_strdup_printf ("<b>%s</b>\n%s\n%s",
+ _("Error"),
+ _("'%s' is not a valid Perl regular expression."),
+ "%s");
std::string message = make_string(g_strdup_printf(msg, this->pattern().c_str(), error.what().c_str()));
+ g_free(msg);
Gtk::MessageDialog dialog(message,
true, // use markup
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 857570b..257baa1 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -806,7 +806,7 @@ procman_create_sysinfo_view(void)
/* hardware section */
- markup = g_strdup_printf(_("<b>Hardware</b>"));
+ markup = g_strdup_printf("<b>%s</b>", _("Hardware"));
hardware_table = add_section(GTK_BOX(vbox), markup, 1, 2, NULL);
g_free(markup);
@@ -823,7 +823,7 @@ procman_create_sysinfo_view(void)
/* disk space section */
- markup = g_strdup_printf(_("<b>System Status</b>"));
+ markup = g_strdup_printf("<b>%s</b>", _("System Status"));
disk_space_table = add_section(GTK_BOX(vbox), markup, 1, 2, NULL);
g_free(markup);
diff --git a/src/util.cpp b/src/util.cpp
index cdb3287..3573f00 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -416,8 +416,11 @@ namespace procman
g_value_unset(&value);
- if (size == 0)
- g_object_set(renderer, "markup", _("<i>N/A</i>"), NULL);
+ if (size == 0) {
+ char *str = g_strdup_printf ("<i>%s</i>", _("N/A"));
+ g_object_set(renderer, "markup", str, NULL);
+ g_free(str);
+ }
else {
char *str = procman::format_size(size);
g_object_set(renderer, "text", str, NULL);