summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-03-02 15:15:05 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-03-02 15:15:05 +0100
commita83f30394c4d7790b574b66b8fa326430830d706 (patch)
treecc3cc880ceea29e6ce5a7a7e988f5320a042cd29
parentb43d23f520f7fa15c96c52eb52a68926031e4067 (diff)
downloadabrt-a83f30394c4d7790b574b66b8fa326430830d706.tar.gz
abrt-a83f30394c4d7790b574b66b8fa326430830d706.tar.xz
abrt-a83f30394c4d7790b574b66b8fa326430830d706.zip
Removed gcc warnings from applet
Changed new crash info message
-rw-r--r--src/Applet/CCApplet.cpp12
-rw-r--r--src/Applet/Makefile.am2
2 files changed, 9 insertions, 5 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)
{
diff --git a/src/Applet/Makefile.am b/src/Applet/Makefile.am
index 1a09cc25..8e743d5e 100644
--- a/src/Applet/Makefile.am
+++ b/src/Applet/Makefile.am
@@ -1,6 +1,6 @@
bin_PROGRAMS = cc-applet
cc_applet_SOURCES = Applet.cpp CCApplet.cpp CCApplet.h DBusClientProxy.h
-cc_applet_CPPFLAGS = -I../Daemon/ \
+cc_applet_CPPFLAGS = -Wall -Werror -I../Daemon/ \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
$(DBUS_GLIB_CFLAGS) $(GTK_CFLAGS) $(DBUSCPP_CFLAGS) \
-I../../lib/MiddleWare -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include