diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-02 15:15:05 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-03-02 15:15:05 +0100 |
commit | a83f30394c4d7790b574b66b8fa326430830d706 (patch) | |
tree | cc3cc880ceea29e6ce5a7a7e988f5320a042cd29 /src/Applet/CCApplet.cpp | |
parent | b43d23f520f7fa15c96c52eb52a68926031e4067 (diff) | |
download | abrt-a83f30394c4d7790b574b66b8fa326430830d706.tar.gz abrt-a83f30394c4d7790b574b66b8fa326430830d706.tar.xz abrt-a83f30394c4d7790b574b66b8fa326430830d706.zip |
Removed gcc warnings from applet
Changed new crash info message
Diffstat (limited to 'src/Applet/CCApplet.cpp')
-rw-r--r-- | src/Applet/CCApplet.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index d26e25b2..c2482fef 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -62,10 +62,11 @@ void CApplet::SetIconTooltip(const char *format, ...) { va_list args; // change to smth sane like MAX_TOOLTIP length or rewrite this whole sh*t - size_t n,size = 30; + int n; + size_t size = 30; char *buf = new char[size]; va_start (args, format); - while((n = vsnprintf (buf, size, format, args)) > size) + while((n = vsnprintf (buf, size, format, args)) > (int)size) { // string was larger than our buffer // alloc larger buffer @@ -89,19 +90,20 @@ void CApplet::SetIconTooltip(const char *format, ...) void CApplet::OnAppletActivate_CB(GtkStatusIcon *status_icon,gpointer user_data) { CApplet *applet = (CApplet *)user_data; + FILE *gui = NULL; //FIXME //gtk_status_icon_set_visible(applet->m_pStatusIcon,false); GtkWidget *dialog = NULL; dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - "Do you want to file a report now?"); + "CC has detected a crash.\nDo you want to open the crash analyzer and create a report?"); gint result = gtk_dialog_run(GTK_DIALOG(dialog)); switch (result) { case GTK_RESPONSE_YES: //FIXME - use fork+exec and absolute paths? - popen("/usr/bin/cc-gui","r"); + gui = popen("/usr/bin/cc-gui","r"); gtk_status_icon_set_visible(applet->m_pStatusIcon,false); break; default: @@ -134,11 +136,13 @@ int CApplet::AddEvent(int pUUID, const std::string& pProgname) { m_mapEvents[pUUID] = "pProgname"; SetIconTooltip("Pending events: %i",m_mapEvents.size()); + return 0; } int CApplet::RemoveEvent(int pUUID) { m_mapEvents.erase(pUUID); + return 0; } void CApplet::BlinkIcon(bool pBlink) { |