diff options
Diffstat (limited to 'src/Applet/CCApplet.cpp')
-rw-r--r-- | src/Applet/CCApplet.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index e6b89d2f..5d13ab87 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -114,7 +114,7 @@ CApplet::CApplet() m_iAnimationStage = ICON_DEFAULT; m_bIconsLoaded = load_icons(); /* - animation - */ - if(m_bIconsLoaded == true) + if (m_bIconsLoaded == true) { m_pStatusIcon = gtk_status_icon_new_from_pixbuf(icon_stages_buff[ICON_DEFAULT]); } @@ -244,7 +244,7 @@ void CApplet::ShowIcon() { gtk_status_icon_set_visible(m_pStatusIcon, true); /* only animate if all icons are loaded, use the "gtk-warning" instead */ - if(m_bIconsLoaded) + if (m_bIconsLoaded) animate_icon(); } @@ -300,13 +300,13 @@ void CApplet::Enable(const char *reason) gboolean CApplet::update_icon(void *user_data) { CApplet* applet = (CApplet*)user_data; - if(applet->m_pStatusIcon && applet->m_iAnimationStage < ICON_STAGE_LAST){ + if (applet->m_pStatusIcon && applet->m_iAnimationStage < ICON_STAGE_LAST) { gtk_status_icon_set_from_pixbuf(applet->m_pStatusIcon, applet->icon_stages_buff[applet->m_iAnimationStage++]); } else error_msg("icon is null"); - if(applet->m_iAnimationStage == ICON_STAGE_LAST){ + if (applet->m_iAnimationStage == ICON_STAGE_LAST) { applet->m_iAnimationStage = 0; } if (--applet->m_iAnimCountdown == 0) { @@ -317,7 +317,7 @@ gboolean CApplet::update_icon(void *user_data) void CApplet::animate_icon() { - if(m_iAnimator == 0) + if (m_iAnimator == 0) { m_iAnimator = g_timeout_add(100, update_icon, this); m_iAnimCountdown = 10 * 60; /* 60 sec */ @@ -327,7 +327,7 @@ void CApplet::animate_icon() void CApplet::stop_animate_icon() { /* animator should be 0 if icons are not loaded, so this should be safe */ - if(m_iAnimator != 0){ + if (m_iAnimator != 0) { g_source_remove(m_iAnimator); gtk_status_icon_set_from_pixbuf(m_pStatusIcon, icon_stages_buff[ICON_DEFAULT]); m_iAnimator = 0; @@ -337,13 +337,13 @@ void CApplet::stop_animate_icon() bool CApplet::load_icons() { int stage; - for(stage = ICON_DEFAULT; stage < ICON_STAGE_LAST; stage++) + for (stage = ICON_DEFAULT; stage < ICON_STAGE_LAST; stage++) { char name[sizeof(ICON_DIR"/abrt%02d.png")]; GError *error = NULL; - if(snprintf(name, sizeof(ICON_DIR"/abrt%02d.png"),ICON_DIR"/abrt%02d.png", stage) > 0){ + if (snprintf(name, sizeof(ICON_DIR"/abrt%02d.png"), ICON_DIR"/abrt%02d.png", stage) > 0) { icon_stages_buff[stage] = gdk_pixbuf_new_from_file(name, &error); - if(error != NULL){ + if (error != NULL) { error_msg("Can't load pixbuf from %s, animation is disabled!", name); return false; } |