From d33d3451549862125dcd89ff386c3a1f2ee47f69 Mon Sep 17 00:00:00 2001 From: joten Date: Fri, 27 Feb 2015 21:58:59 +0100 Subject: [PATCH] Revert "Possibly fixed bug from issue #23" This reverts commit 9bc942afa9b952f49ffec150c2217c953ce35970. --- src/Bar.ahk | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/Bar.ahk b/src/Bar.ahk index 14c580a..07add82 100644 --- a/src/Bar.ahk +++ b/src/Bar.ahk @@ -392,23 +392,14 @@ Bar_updateStatic(m) { Bar_updateStatus() { Local anyContent, anyText, bat1, bat2, bat3, GuiN, m, mute, vol - anyText := Config_readinAny() - If Config_readinBat { - ResourceMonitor_getBatteryStatus(bat1, bat2) - bat3 := SubStr(" " bat1, -2) - } - If Config_readinVolume { - SoundGet, vol, MASTER, VOLUME - SoundGet, mute, MASTER, MUTE - vol := Round(vol) - } - Loop, % Manager_monitorCount { m := A_Index GuiN := (m - 1) + 1 Debug_logMessage("DEBUG[6] Bar_updateStatus(): Gui, " . GuiN . ": Default", 6) Gui, %GuiN%: Default If Config_readinBat { + ResourceMonitor_getBatteryStatus(bat1, bat2) + bat3 := SubStr(" " bat1, -2) If (bat1 < 10) And (bat2 = "off") { ;; Change the color, if the battery level is below 10% GuiControl, +Background%Config_backColor_#3_#8% +c%Config_foreColor_#3_#8%, Bar_#%m%_batteryStatus_highlighted @@ -424,9 +415,16 @@ Bar_updateStatus() { GuiControl, , Bar_#%m%_batteryStatus_highlighted, %bat3% GuiControl, , Bar_#%m%_batteryStatus, % " BAT: " bat3 "% " } - If anyText - GuiControl, , Bar_#%m%_anyText, % anyText + anyText := Config_readinAny() + If anyText { + GuiControlGet, anyContent, , Bar_#%m%_anyText + If Not (anyText = anyContent) + GuiControl, , Bar_#%m%_anyText, % anyText + } If Config_readinVolume { + SoundGet, vol, MASTER, VOLUME + SoundGet, mute, MASTER, MUTE + vol := Round(vol) If (mute = "On") { ;; Change the color, if the mute is on GuiControl, +Background%Config_backColor_#1_#9% +c%Config_foreColor_#1_#9%, Bar_#%m%_volume_highlighted