summaryrefslogtreecommitdiffstats
path: root/src/Applet
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-09-02 11:19:06 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-09-02 11:19:06 +0200
commit6f27b31e64229bf15670b48a19b0348888b0ca28 (patch)
treeda9ce671c4927dff3578c9e04e17981016a41b0d /src/Applet
parentc1805ac5a42372811b454d881559276a34ff7a87 (diff)
downloadabrt-6f27b31e64229bf15670b48a19b0348888b0ca28.tar.gz
abrt-6f27b31e64229bf15670b48a19b0348888b0ca28.tar.xz
abrt-6f27b31e64229bf15670b48a19b0348888b0ca28.zip
APPLET: removed the warning bubble about not running abrt service (walters)
Diffstat (limited to 'src/Applet')
-rw-r--r--src/Applet/Applet.cpp4
-rw-r--r--src/Applet/CCApplet.cpp17
-rw-r--r--src/Applet/CCApplet.h1
3 files changed, 19 insertions, 3 deletions
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp
index 3f6abb8c..530a8462 100644
--- a/src/Applet/Applet.cpp
+++ b/src/Applet/Applet.cpp
@@ -42,11 +42,13 @@ CApplet *applet;
static void
crash_notify_cb(const char* progname)
{
+ const char *message = _("A crash in package %s has been detected!");
#ifdef DEBUG
std::cerr << "Application " << progname << " has crashed!" << std::endl;
#endif
//applet->AddEvent(uid, std::string(progname));
- applet->SetIconTooltip(_("A crash in package %s has been detected!"), progname);
+ applet->SetIconTooltip(message, progname);
+ applet->CrashNotify(message, progname);
applet->ShowIcon();
}
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp
index 1d6ae171..75c2fbe6 100644
--- a/src/Applet/CCApplet.cpp
+++ b/src/Applet/CCApplet.cpp
@@ -157,7 +157,6 @@ void CApplet::SetIconTooltip(const char *format, ...)
va_end(args);
if (n >= 0 && buf)
{
- notify_notification_update(m_pNotification, _("Warning"), buf, NULL);
gtk_status_icon_set_tooltip_text(m_pStatusIcon, buf);
free(buf);
}
@@ -167,6 +166,21 @@ void CApplet::SetIconTooltip(const char *format, ...)
}
}
+void CApplet::CrashNotify(const char *format, ...)
+{
+ va_list args;
+ char *buf;
+ int n;
+
+ va_start(args, format);
+ buf = NULL;
+ n = vasprintf(&buf, format, args);
+ va_end(args);
+
+ notify_notification_update(m_pNotification, _("Warning"), buf, NULL);
+ notify_notification_show(m_pNotification, NULL);
+}
+
void CApplet::OnAppletActivate_CB(GtkStatusIcon *status_icon,gpointer user_data)
{
CApplet *applet = (CApplet *)user_data;
@@ -203,7 +217,6 @@ void CApplet::OnMenuPopup_cb(GtkStatusIcon *status_icon,
void CApplet::ShowIcon()
{
gtk_status_icon_set_visible(m_pStatusIcon, true);
- notify_notification_show(m_pNotification, NULL);
}
void CApplet::onHide_cb(GtkMenuItem *menuitem, gpointer applet)
{
diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h
index ff6be8e5..e1b56e0e 100644
--- a/src/Applet/CCApplet.h
+++ b/src/Applet/CCApplet.h
@@ -52,6 +52,7 @@ class CApplet
//void DisableIcon();
void BlinkIcon(bool pBlink);
void SetIconTooltip(const char *format, ...);
+ void CrashNotify(const char *format, ...);
void Disable(const char *reason);
void Enable(const char *reason);
// create some event storage, to let user choose