summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-30 13:18:42 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-30 13:18:42 +0200
commit749ae5083c2c663eb10a985bf5c27b99c5247542 (patch)
tree3b5ea061332737d15e4d9f8ca8f265377886a1a5 /src
parent842d1a6d7ab1fe62c6e9bce6d776b0d73dab0e23 (diff)
downloadabrt-749ae5083c2c663eb10a985bf5c27b99c5247542.tar.gz
abrt-749ae5083c2c663eb10a985bf5c27b99c5247542.tar.xz
abrt-749ae5083c2c663eb10a985bf5c27b99c5247542.zip
English and message format fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/Applet/CCApplet.cpp28
-rw-r--r--src/CLI/CLI.cpp4
-rw-r--r--src/CLI/dbus.cpp6
-rw-r--r--src/CLI/report.cpp14
-rw-r--r--src/CLI/run-command.cpp2
-rw-r--r--src/Daemon/Daemon.cpp4
-rw-r--r--src/Hooks/dumpoops.cpp2
7 files changed, 32 insertions, 28 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp
index b0da75c7..c5046416 100644
--- a/src/Applet/CCApplet.cpp
+++ b/src/Applet/CCApplet.cpp
@@ -198,7 +198,7 @@ void CApplet::action_report(NotifyNotification *notification, gchar *action, gpo
/* Did not find abrt-gui in installation directory. Oh well */
/* Trying to find it in PATH */
execlp("abrt-gui", "abrt-gui", buf, (char*) NULL);
- perror_msg_and_die("Can't exec abrt-gui");
+ perror_msg_and_die("Can't execute abrt-gui");
}
GError *err = NULL;
notify_notification_close(notification, &err);
@@ -227,7 +227,7 @@ void CApplet::action_open_gui(NotifyNotification *notification, gchar *action, g
/* Did not find abrt-gui in installation directory. Oh well */
/* Trying to find it in PATH */
execlp("abrt-gui", "abrt-gui", (char*) NULL);
- perror_msg_and_die("Can't exec abrt-gui");
+ perror_msg_and_die("Can't execute abrt-gui");
}
GError *err = NULL;
notify_notification_close(notification, &err);
@@ -310,7 +310,7 @@ void CApplet::OnAppletActivate_CB(GtkStatusIcon *status_icon, gpointer user_data
/* Did not find abrt-gui in installation directory. Oh well */
/* Trying to find it in PATH */
execlp("abrt-gui", "abrt-gui", (char*) NULL);
- perror_msg_and_die("Can't exec abrt-gui");
+ perror_msg_and_die("Can't execute abrt-gui");
}
gtk_status_icon_set_visible(applet->m_pStatusIcon, false);
applet->stop_animate_icon();
@@ -383,16 +383,17 @@ void CApplet::Enable(const char *reason)
gboolean CApplet::update_icon(void *user_data)
{
CApplet* applet = (CApplet*)user_data;
- if (applet->m_pStatusIcon && applet->m_iAnimationStage < ICON_STAGE_LAST) {
+ if (applet->m_pStatusIcon && applet->m_iAnimationStage < ICON_STAGE_LAST)
+ {
gtk_status_icon_set_from_pixbuf(applet->m_pStatusIcon,
applet->icon_stages_buff[applet->m_iAnimationStage++]);
}
- else
- error_msg("icon is null");
- if (applet->m_iAnimationStage == ICON_STAGE_LAST) {
+ if (applet->m_iAnimationStage == ICON_STAGE_LAST)
+ {
applet->m_iAnimationStage = 0;
}
- if (--applet->m_iAnimCountdown == 0) {
+ if (--applet->m_iAnimCountdown == 0)
+ {
applet->stop_animate_icon();
}
return true;
@@ -410,7 +411,8 @@ void CApplet::animate_icon()
void CApplet::stop_animate_icon()
{
/* animator should be 0 if icons are not loaded, so this should be safe */
- if (m_iAnimator != 0) {
+ if (m_iAnimator != 0)
+ {
g_source_remove(m_iAnimator);
gtk_status_icon_set_from_pixbuf(m_pStatusIcon, icon_stages_buff[ICON_DEFAULT]);
m_iAnimator = 0;
@@ -426,10 +428,12 @@ bool CApplet::load_icons()
{
char name[sizeof(ICON_DIR"/abrt%02d.png")];
GError *error = NULL;
- if (snprintf(name, sizeof(ICON_DIR"/abrt%02d.png"), ICON_DIR"/abrt%02d.png", stage) > 0) {
+ if (snprintf(name, sizeof(ICON_DIR"/abrt%02d.png"), ICON_DIR"/abrt%02d.png", stage) > 0)
+ {
icon_stages_buff[stage] = gdk_pixbuf_new_from_file(name, &error);
- if (error != NULL) {
- error_msg("Can't load pixbuf from %s, animation is disabled!", name);
+ if (error != NULL)
+ {
+ error_msg("Can't load pixbuf from %s, animation is disabled", name);
return false;
}
}
diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp
index d882161a..c751bd37 100644
--- a/src/CLI/CLI.cpp
+++ b/src/CLI/CLI.cpp
@@ -44,7 +44,7 @@ static void print_crash(const map_crash_data_t &crash)
char timeloc[256];
int success = strftime(timeloc, 128, "%c", localtime(&time));
if (!success)
- error_msg_and_die("Error while converting time to string.");
+ error_msg_and_die("Error while converting time to string");
printf(_("\tUID : %s\n"
"\tUUID : %s\n"
@@ -212,7 +212,7 @@ int main(int argc, char** argv)
#define SET_OP(newop) \
if (op != -1 && op != newop) \
{ \
- error_msg(_("You must specify exactly one operation.")); \
+ error_msg(_("You must specify exactly one operation")); \
return 1; \
} \
op = newop;
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp
index 2eddb5d9..55ebf9db 100644
--- a/src/CLI/dbus.cpp
+++ b/src/CLI/dbus.cpp
@@ -46,7 +46,7 @@ static DBusMessage* send_get_reply_and_unref(DBusMessage* msg)
if (!received)
{
if (FALSE == dbus_connection_read_write(s_dbus_conn, -1))
- error_msg_and_die("DBus connection closed");
+ error_msg_and_die("dbus connection closed");
continue;
}
@@ -100,7 +100,7 @@ static DBusMessage* send_get_reply_and_unref(DBusMessage* msg)
DBUS_TYPE_STRING, &warning_msg,
DBUS_TYPE_INVALID))
{
- error_msg_and_die("dbus Update message: arguments mismatch");
+ error_msg_and_die("dbus Warning message: arguments mismatch");
}
log(">! %s\n", warning_msg);
}
@@ -114,7 +114,7 @@ static DBusMessage* send_get_reply_and_unref(DBusMessage* msg)
if (tp == DBUS_MESSAGE_TYPE_ERROR
&& dbus_message_get_reply_serial(received) == serial
) {
- error_msg_and_die("Dbus call returned error: '%s'", error_str);
+ error_msg_and_die("dbus call returned error: '%s'", error_str);
}
dbus_message_unref(received);
diff --git a/src/CLI/report.cpp b/src/CLI/report.cpp
index ebaeafa1..8316418c 100644
--- a/src/CLI/report.cpp
+++ b/src/CLI/report.cpp
@@ -162,13 +162,13 @@ static void write_crash_report_field(FILE *fp, const map_crash_data_t &report,
if (it == report.end())
{
// exit silently, all fields are optional for now
- //error_msg("Field %s not found.\n", field);
+ //error_msg("Field %s not found", field);
return;
}
if (it->second[CD_TYPE] == CD_SYS)
{
- error_msg("Cannot write field %s because it is a system value\n", field);
+ error_msg("Cannot update field %s because it is a system value", field);
return;
}
@@ -241,13 +241,13 @@ static int read_crash_report_field(const char *text, map_crash_data_t &report,
const map_crash_data_t::iterator it = report.find(field);
if (it == report.end())
{
- error_msg("Field %s not found.\n", field);
+ error_msg("Field %s not found", field);
return 0;
}
if (it->second[CD_TYPE] == CD_SYS)
{
- error_msg("Cannot update field %s because it is a system value.\n", field);
+ error_msg("Cannot update field %s because it is a system value", field);
return 0;
}
@@ -331,9 +331,9 @@ static int launch_editor(const char *path)
editor = getenv("EDITOR");
terminal = getenv("TERM");
- if (!editor && (!terminal || !strcmp(terminal, "dumb")))
+ if (!editor && (!terminal || strcmp(terminal, "dumb") == 0))
{
- error_msg(_("Terminal is dumb but no VISUAL nor EDITOR defined."));
+ error_msg(_("Can't run vi: $TERM, $VISUAL and $EDITOR are not set"));
return 1;
}
@@ -567,7 +567,7 @@ static bool set_echo(bool enabled)
t.c_lflag &= ~ECHO;
if (tcsetattr(STDIN_FILENO, TCSANOW, &t) < 0)
- perror_msg_and_die("tcsetattr failed");
+ perror_msg_and_die("tcsetattr");
return true;
}
diff --git a/src/CLI/run-command.cpp b/src/CLI/run-command.cpp
index 8f9d63ec..1f6836d6 100644
--- a/src/CLI/run-command.cpp
+++ b/src/CLI/run-command.cpp
@@ -28,7 +28,7 @@ static pid_t start_command(char **argv)
pid_t pid = vfork();
if (pid < 0)
{
- perror_msg_and_die("Can't fork");
+ perror_msg_and_die("vfork");
}
if (pid == 0)
{ // new process
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 6c61d4df..02b8b96e 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -770,7 +770,7 @@ int main(int argc, char** argv)
/* fall through to error */
default:
error_msg_and_die(
- "Usage: abrtd [-dv]\n"
+ "Usage: abrtd [-dsv] [-t SEC]\n"
"\nOptions:"
"\n\t-d\tDo not daemonize"
"\n\t-s\tLog to syslog even with -d"
@@ -797,7 +797,7 @@ int main(int argc, char** argv)
pid_t pid = fork();
if (pid < 0)
{
- perror_msg_and_die("Can't fork");
+ perror_msg_and_die("fork");
}
if (pid > 0)
{
diff --git a/src/Hooks/dumpoops.cpp b/src/Hooks/dumpoops.cpp
index 99ecf009..ab4b6ba3 100644
--- a/src/Hooks/dumpoops.cpp
+++ b/src/Hooks/dumpoops.cpp
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
default:
usage:
error_msg_and_die(
- "Usage: %s [-ds] FILE\n\n"
+ "Usage: %s [-dsv] FILE\n\n"
"Options:\n"
"\t-d\tCreate ABRT dump for every oops found\n"
"\t-s\tPrint found oopses on standard output\n"