Removed Main_reload()
... redundant with `Config_autoSaveSession`
This commit is contained in:
parent
a927db0491
commit
7d74dd4fe5
5 changed files with 8 additions and 84 deletions
BIN
bugn.exe
BIN
bugn.exe
Binary file not shown.
|
@ -96,7 +96,7 @@ transparency) or an integer between `0` (fully transparent) and `255` (opaque).
|
|||
At least on Windows >= 8 with `Config_verticalBarPos=tray` the bar won't be
|
||||
visible at all, if `Config_barTransparency` is not set to `off`.
|
||||
|
||||
`Config_barCommands=Run, explore doc;Monitor_toggleBar();Main_reload();Reload;ExitApp`
|
||||
`Config_barCommands=Run, explore doc;Monitor_toggleBar();Reload;ExitApp`
|
||||
> The commands seperated by semicolon, which are listed in the command GUI of
|
||||
the bar (#!) and therewith can be selected rather then typed; bug.n functions
|
||||
(as used in the hotkey configuration), the `Run` and `Send` command of
|
||||
|
|
|
@ -268,22 +268,12 @@ in a multi-monitor environment.
|
|||
`#^s::Config_UI_saveSession()`
|
||||
> Save the current state of monitors, views, layouts to the configuration file.
|
||||
|
||||
`#^r::Main_reload()`
|
||||
> Reload bug.n (i. e. the configuration and its dependent settings) without
|
||||
deleting the window lists of bug.n and restoring windows.
|
||||
- It does not reset internal configuration variables, the tray icon or menu,
|
||||
hotkeys (unless defined in `Config.ini`), individual window settings like
|
||||
`Config_showBorder` (since windows might be hidden) or hiding the title bar, the
|
||||
monitor count or views.
|
||||
- It does not reload the monitor configuration and therefor does not recognize
|
||||
any changes in the number of monitors.
|
||||
- It does not reload functions.
|
||||
- Changed rules are only applied to new windows.
|
||||
|
||||
`#^+r::Reload`
|
||||
> Reload bug.n (i. e. the whole script), which resets the configuration, the
|
||||
bar, the monitor configuration and window lists of bug.n. It is like Quitting
|
||||
and restarting bug.n.
|
||||
> Reload bug.n (i. e. the whole script), which resets i. a. the configuration
|
||||
and internal variables of bug.n, including the window lists. It is like
|
||||
Quitting and restarting bug.n.
|
||||
If `Config_autoSaveSession` is not set to `off`, the window lists can be
|
||||
restored and windows are put to their associated monitor and views.
|
||||
|
||||
`#^q::ExitApp`
|
||||
> Quit bug.n, restore the default Windows UI and show all windows.
|
||||
|
|
|
@ -32,7 +32,7 @@ Config_init() {
|
|||
Config_fontColor_#%A_Index% :=
|
||||
}
|
||||
Config_barTransparency := "off"
|
||||
Config_barCommands := "Run, explore " Main_docDir ";Monitor_toggleBar();Main_reload();Reload;ExitApp"
|
||||
Config_barCommands := "Run, explore " Main_docDir ";Monitor_toggleBar();Reload;ExitApp"
|
||||
Config_readinBat := False
|
||||
Config_readinCpu := False
|
||||
Config_readinDate := True
|
||||
|
@ -496,6 +496,5 @@ Config_UI_saveSession() {
|
|||
;; Administration
|
||||
#^e::Run, edit %Config_filePath%
|
||||
#^s::Config_UI_saveSession()
|
||||
#^r::Main_reload()
|
||||
#^+r::Reload
|
||||
#^r::Reload
|
||||
#^q::ExitApp
|
||||
|
|
65
src/Main.ahk
65
src/Main.ahk
|
@ -145,71 +145,6 @@ Main_quit:
|
|||
ExitApp
|
||||
Return
|
||||
|
||||
Main_reload()
|
||||
{
|
||||
Local i, ncm, ncmSize
|
||||
|
||||
;; Restore border color, padding and witdh.
|
||||
If Config_selBorderColor
|
||||
DllCall("SetSysColors", "Int", 1, "Int*", 10, "UInt*", Manager_normBorderColor)
|
||||
If (Config_borderWidth > 0) Or (Config_borderPadding >= 0 And A_OSVersion = WIN_VISTA)
|
||||
{
|
||||
ncmSize := VarSetCapacity(ncm, 4 * (A_OSVersion = WIN_VISTA ? 11 : 10) + 5 * (28 + 32 * (A_IsUnicode ? 2 : 1)), 0)
|
||||
NumPut(ncmSize, ncm, 0, "UInt")
|
||||
DllCall("SystemParametersInfo", "UInt", 0x0029, "UInt", ncmSize, "UInt", &ncm, "UInt", 0)
|
||||
If (Config_borderWidth > 0)
|
||||
NumPut(Manager_borderWidth, ncm, 4, "Int")
|
||||
If (Config_borderPadding >= 0 And A_OSVersion = WIN_VISTA)
|
||||
NumPut(Manager_borderPadding, ncm, 40 + 5 * (28 + 32 * (A_IsUnicode ? 2 : 1)), "Int")
|
||||
DllCall("SystemParametersInfo", "UInt", 0x002a, "UInt", ncmSize, "UInt", &ncm, "UInt", 0)
|
||||
}
|
||||
DllCall("Shell32.dll\SHAppBarMessage", "UInt", (ABM_REMOVE := 0x1), "UInt", &Bar_appBarData)
|
||||
;; SKAN: Crazy Scripting : Quick Launcher for Portable Apps (http://www.autohotkey.com/forum/topic22398.html)
|
||||
|
||||
Config_init()
|
||||
; Windows UI
|
||||
If Config_selBorderColor {
|
||||
SetFormat, Integer, hex
|
||||
Manager_normBorderColor := DllCall("GetSysColor", "Int", 10)
|
||||
SetFormat, Integer, d
|
||||
DllCall("SetSysColors", "Int", 1, "Int*", 10, "UInt*", Config_selBorderColor)
|
||||
}
|
||||
If (Config_borderWidth > 0) Or (Config_borderPadding >= 0 And A_OSVersion = WIN_VISTA) {
|
||||
ncmSize := VarSetCapacity(ncm, 4 * (A_OSVersion = WIN_VISTA ? 11 : 10) + 5 * (28 + 32 * (A_IsUnicode ? 2 : 1)), 0)
|
||||
NumPut(ncmSize, ncm, 0, "UInt")
|
||||
DllCall("SystemParametersInfo", "UInt", 0x0029, "UInt", ncmSize, "UInt", &ncm, "UInt", 0)
|
||||
Manager_borderWidth := NumGet(ncm, 4, "Int")
|
||||
Manager_borderPadding := NumGet(ncm, 40 + 5 * (28 + 32 * (A_IsUnicode ? 2 : 1)), "Int")
|
||||
If (Config_borderWidth > 0)
|
||||
NumPut(Config_borderWidth, ncm, 4, "Int")
|
||||
If (Config_borderPadding >= 0 And A_OSVersion = WIN_VISTA)
|
||||
NumPut(Config_borderPadding, ncm, 40 + 5 * (28 + 32 * (A_IsUnicode ? 2 : 1)), "Int")
|
||||
DllCall("SystemParametersInfo", "UInt", 0x002a, "UInt", ncmSize, "UInt", &ncm, "UInt", 0)
|
||||
}
|
||||
Bar_getHeight()
|
||||
Loop, % Manager_monitorCount
|
||||
{
|
||||
Monitor_getWorkArea(A_Index)
|
||||
Bar_init(A_Index)
|
||||
If Monitor_%A_Index%_taskBarClass And Not (Monitor_%A_Index%_showTaskBar = Config_showTaskBar)
|
||||
Monitor_toggleTaskBar()
|
||||
}
|
||||
Bar_initCmdGui()
|
||||
Bar_updateStatus()
|
||||
Bar_updateTitle()
|
||||
Loop, % Manager_monitorCount
|
||||
{
|
||||
i := A_Index
|
||||
Loop, % Config_viewCount
|
||||
{
|
||||
Bar_updateView(i, A_Index)
|
||||
}
|
||||
View_arrange(i, Monitor_#%i%_aView_#1)
|
||||
}
|
||||
Manager_registerShellHook()
|
||||
SetTimer, Bar_loop, %Config_readinInterval%
|
||||
}
|
||||
|
||||
Main_setup() {
|
||||
Local winAppDir
|
||||
|
||||
|
|
Loading…
Reference in a new issue