From 64be7b89afc0822cf24aeeec588ff5f5af5fe8b4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Sep 2009 17:32:01 +0200 Subject: remove a few C++-isms where they did not buy any convenience anyway text data bss dec hex filename 182372 2624 2320 187316 2dbb4 abrt.t2/abrt-0.0.8.5/src/Daemon/.libs/abrtd 180635 2584 1968 185187 2d363 abrt.t3/abrt-0.0.8.5/src/Daemon/.libs/abrtd 34110 1340 768 36218 8d7a abrt.t2/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 30202 1292 224 31718 7be6 abrt.t3/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 22116 1688 376 24180 5e74 abrt.t2/abrt-0.0.8.5/src/Applet/.libs/abrt-applet 21254 1648 88 22990 59ce abrt.t3/abrt-0.0.8.5/src/Applet/.libs/abrt-applet Signed-off-by: Denys Vlasenko --- src/Applet/CCApplet.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/Applet/CCApplet.cpp') diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index 3bd0dbc..6d841a5 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -17,10 +17,6 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include -#include -#include -#include #if HAVE_CONFIG_H #include #endif @@ -199,7 +195,7 @@ void CApplet::OnAppletActivate_CB(GtkStatusIcon *status_icon,gpointer user_data) { pid_t pid = vfork(); if (pid < 0) - std::cerr << "vfork failed\n"; + perror_msg("vfork"); if (pid == 0) { /* child */ signal(SIGCHLD, SIG_DFL); /* undo SIG_IGN in abrt-applet */ @@ -207,8 +203,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); - std::cerr << "can't exec abrt-gui\n"; - exit(1); + perror_msg_and_die("Can't exec abrt-gui"); } gtk_status_icon_set_visible(applet->m_pStatusIcon, false); } @@ -264,7 +259,7 @@ void CApplet::Disable(const char *reason) gtk_status_icon_set_from_pixbuf(m_pStatusIcon, gray_scaled); } else - std::cerr << "Cannot load icon!" << std::endl; + error_msg("Can't load icon"); SetIconTooltip(reason); ShowIcon(); } -- cgit