Merge pull request #63 from odknt/master

Add configuration variables for custom time format
This commit is contained in:
joten 2015-11-25 20:03:17 +01:00
commit 67389cced0
2 changed files with 8 additions and 4 deletions

View file

@ -164,7 +164,7 @@ Bar_init(m) {
Bar_initCmdGui()
{
Global Bar_#0_#0, Bar_#0_#0H, Bar_#0_#0W, Bar_#0_#1, Bar_cmdGuiIsVisible, Config_backColor_#1_#3, Config_barCommands, Config_fontName, Config_fontSize, Config_foreColor_#1_#3
Global Bar_#0_#0, Bar_#0_#0H, Bar_#0_#0W, Bar_#0_#1, Bar_cmdGuiIsVisible, Config_backColor_#1_#3, Config_barCommands, Config_fontName, Config_fontSize, Config_foreColor_#1_#3, Config_dateFormat, Config_timeFormat
Bar_cmdGuiIsVisible := False
wndTitle := "bug.n_BAR_0"
@ -392,7 +392,7 @@ Bar_updateStatic(m) {
}
Bar_updateStatus() {
Local anyText, bat1, bat2, bat3, GuiN, m, mute, vol
Local anyText, bat1, bat2, bat3, GuiN, m, mute, vol, date
anyText := Config_readinAny()
If Config_readinBat {
@ -441,9 +441,11 @@ Bar_updateStatus() {
GuiControl, , Bar_#%m%_volume, % " VOL: " SubStr(" " vol, -2) "% "
}
If Config_readinDate
GuiControl, , Bar_#%m%_date, % " " A_DDD ", " A_DD ". " A_MMM ". " A_YYYY " "
FormatTime, date, , % Config_dateFormat
GuiControl, , Bar_#%m%_date, % date
If Config_readinTime
GuiControl, , Bar_#%m%_time, % " " A_Hour ":" A_Min " "
FormatTime, time, , % Config_timeFormat
GuiControl, , Bar_#%m%_time, % time
}
}

View file

@ -42,6 +42,8 @@ Config_init() {
Config_readinTime := True
Config_readinVolume := False
Config_readinInterval := 30000
Config_dateFormat := "ddd, dd, MM, yyyy"
Config_timeFormat := "HH:mm"
;; Windows ui elements
Config_bbCompatibility := False