summaryrefslogtreecommitdiffstats
path: root/src/Applet
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:04:51 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:04:51 +0100
commit86930df464c57f84a461e4a98e5f813bff73952d (patch)
tree130d30a5e0e46a9a1409bac6e427d0c12e5331d6 /src/Applet
parent5df5f62db1e067674fe01eaf925255eb82fcd020 (diff)
downloadabrt-86930df464c57f84a461e4a98e5f813bff73952d.tar.gz
abrt-86930df464c57f84a461e4a98e5f813bff73952d.tar.xz
abrt-86930df464c57f84a461e4a98e5f813bff73952d.zip
applet: make animation stop after 1 minute. (closes bug 108)
See https://fedorahosted.org/abrt/ticket/108 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Applet')
-rw-r--r--src/Applet/CCApplet.cpp4
-rw-r--r--src/Applet/CCApplet.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp
index b73b41d0..e6b89d2f 100644
--- a/src/Applet/CCApplet.cpp
+++ b/src/Applet/CCApplet.cpp
@@ -309,6 +309,9 @@ gboolean CApplet::update_icon(void *user_data)
if(applet->m_iAnimationStage == ICON_STAGE_LAST){
applet->m_iAnimationStage = 0;
}
+ if (--applet->m_iAnimCountdown == 0) {
+ applet->stop_animate_icon();
+ }
return true;
}
@@ -317,6 +320,7 @@ void CApplet::animate_icon()
if(m_iAnimator == 0)
{
m_iAnimator = g_timeout_add(100, update_icon, this);
+ m_iAnimCountdown = 10 * 60; /* 60 sec */
}
}
diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h
index 6c47c0a1..15ac2f7f 100644
--- a/src/Applet/CCApplet.h
+++ b/src/Applet/CCApplet.h
@@ -41,6 +41,7 @@ class CApplet
bool m_bDaemonRunning;
int m_iAnimationStage;
guint m_iAnimator;
+ unsigned m_iAnimCountdown;
bool m_bIconsLoaded;
enum ICON_STAGES