diff options
Diffstat (limited to 'src/applet/Applet.cpp')
-rw-r--r-- | src/applet/Applet.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/applet/Applet.cpp b/src/applet/Applet.cpp index be9c662d..2f35cab5 100644 --- a/src/applet/Applet.cpp +++ b/src/applet/Applet.cpp @@ -31,7 +31,7 @@ #include "CCApplet.h" -static CApplet* applet; +static struct applet* applet = NULL; static void Crash(DBusMessage* signal) @@ -80,8 +80,8 @@ static void Crash(DBusMessage* signal) if (package_name[0] == '\0') message = _("A crash has been detected"); //applet->AddEvent(uid, package_name); - applet->SetIconTooltip(message, package_name); - applet->ShowIcon(); + SetIconTooltip(applet, message, package_name); + ShowIcon(applet); /* If this crash seems to be repeating, do not annoy user with popup dialog. * (The icon in the tray is not suppressed) @@ -103,7 +103,7 @@ static void Crash(DBusMessage* signal) free(last_crash_id); last_crash_id = xstrdup(crash_id); - applet->CrashNotify(crash_id, message, package_name); + CrashNotify(applet, crash_id, message, package_name); } static void QuotaExceed(DBusMessage* signal) @@ -121,8 +121,8 @@ static void QuotaExceed(DBusMessage* signal) //if (m_pSessionDBus->has_name("com.redhat.abrt.gui")) // return; - applet->ShowIcon(); - applet->MessageNotify("%s", str); + ShowIcon(applet); + MessageNotify(applet, "%s", str); } static void NameOwnerChanged(DBusMessage* signal) @@ -159,7 +159,7 @@ static void NameOwnerChanged(DBusMessage* signal) // hide icon if it's visible - as NM and don't show it, if it's not if (!new_owner[0]) - applet->HideIcon(); + HideIcon(applet); } static DBusHandlerResult handle_message(DBusConnection* conn, DBusMessage* msg, void* user_data) @@ -261,7 +261,7 @@ int main(int argc, char** argv) /* Initialize GUI stuff. * Note: inside CApplet ctor, libnotify hooks session dbus * to glib main loop */ - applet = new CApplet(app_name); + applet = applet_new(app_name); /* dbus_abrt cannot handle more than one bus, and we don't really need to. * The only thing we want to do is to announce ourself on session dbus */ DBusConnection* session_conn = dbus_bus_get(DBUS_BUS_SESSION, &err); @@ -291,6 +291,6 @@ int main(int argc, char** argv) gtk_main(); gdk_threads_leave(); - delete applet; + applet_destroy(applet); return 0; } |