@@ -68,12 +68,6 @@ closeifinactivated =
6868
6969selectedIndex := 1
7070
71- ; 0 = all windows
72- ; 1 = tray icons
73- ; 2 = command list
74- contentTypeAllWindows := 0
75- contentTypeTrayIcons := 1
76- contentTypeCommands := 2
7771contentType := contentTypeAllWindows
7872lastContentType := contentTypeAllWindows
7973
@@ -154,8 +148,6 @@ if nomatchsound <>
154148; from the window list
155149;
156150; ----------------------------------------------------------------------
157- xdListView := new XDListView()
158- xdListView.setup(VD, S, CLV, digiShortcuts)
159151
160152allwinDesktopIndex := Array()
161153allwinProcessName := Array()
@@ -208,8 +200,6 @@ windowIsOpen := 0
208200
209201
210202#Include %A_ScriptDir%\includes\inc_gui.ahk
211-
212-
213203return
214204
215205#If S.hotkeyReload()
@@ -260,7 +250,7 @@ HotkeyAction:
260250 search =
261251 numallwin = 0
262252 if (S.alwaysStartWithTasks()) {
263- if (contentType = contentTypeTrayIcons) {
253+ if (contentType = S. contentTypeTrayIcons() ) {
264254 forceWindowListRefresh = 1
265255 contentType := contentTypeAllWindows
266256 }
@@ -383,15 +373,15 @@ HotkeyAction:
383373 first_letter := SubStr (search, 1 , 1 )
384374 if first_letter = :
385375 {
386- if (lastContentType ! = contentTypeCommands) {
376+ if (lastContentType ! = S. contentTypeCommands() ) {
387377 forceWindowListRefresh := 1
388378 }
389379 lastContentType := contentType
390380 contentType := contentTypeCommands
391381 GoSub , RefreshWindowList
392382 } else if length > 1
393383 {
394- if (contentType = contentTypeCommands) {
384+ if (contentType = S. contentTypeCommands() ) {
395385 contentType := lastContentType
396386 }
397387 GoSub , RefreshWindowList
@@ -410,7 +400,7 @@ RefreshWindowList:
410400 {
411401 ; allWindows.clear()
412402 forceWindowListRefresh := 0
413- if (contentType = contentTypeTrayIcons) {
403+ if (contentType = S. contentTypeTrayIcons() ) {
414404 trayIcons := trayControl.list()
415405 numallwin := trayControl.Length()
416406
@@ -421,10 +411,12 @@ RefreshWindowList:
421411 ; replace pipe (|) characters in the window title,
422412 ; because Gui Add uses it for separating listbox items
423413 StringReplace , title, title, | , - , all
414+ if title =
415+ continue
424416 allTrayWindows.addNew(this_id, title, 0 ,0 )
425417
426418 }
427- } else if(contentType = contentTypeCommands) {
419+ } else if(contentType = S. contentTypeCommands() ) {
428420
429421 } else {
430422 WinGet , id , list , , , Program Manager
@@ -509,10 +501,10 @@ RefreshWindowList:
509501 }
510502
511503 allWindowsAndHistory := new WindowManager()
512- if (contentType = contentTypeTrayIcons) {
504+ if (contentType = S. contentTypeTrayIcons() ) {
513505 allWindowsAndHistory.addArray(allTrayWindows.getArray())
514506 allWindowsAndHistory.sort ()
515- } else if(contentType = contentTypeCommands) {
507+ } else if(contentType = S. contentTypeCommands() ) {
516508 allWindowsAndHistory.addArray(commandList.getArray())
517509 ; allWindowsAndHistory.sort()
518510 } else {
@@ -538,7 +530,7 @@ RefreshWindowList:
538530 ; M sgBox, title %title%
539531 if (length > 1 ) {
540532 searchString := search
541- if (contentType = contentTypeCommands) {
533+ if (contentType = S. contentTypeCommands() ) {
542534 ; remove the : at the start
543535 searchString := SubStr (search, 1 , length)
544536 }
@@ -562,13 +554,11 @@ RefreshWindowList:
562554 }
563555 else
564556 {
565- ToolTip , do it
566557 match := matchesSearchString(title, searchString)
567558 match2 :=
568559 if S.searchInProcessName()
569560 {
570561 procname := window.getProcessName()
571- ToolTip , %procname%
572562 match2 := matchesSearchString(procname, searchString)
573563
574564 }
@@ -620,7 +610,7 @@ RefreshWindowList:
620610 if amount = 1
621611 if autoActivateIfOnlyOne
622612 {
623- if (contentType ! = contentTypeTrayIcons)
613+ if (contentType ! = S. contentTypeTrayIcons() )
624614 {
625615 ; only autoactivate if the search string is not empty
626616 ; otherwise the gui would close if only one windows is available
@@ -821,7 +811,7 @@ return
821811
822812#If guiActive = 1 and S.useDelToEndTask()
823813 DEL ::
824- if (contentType ! = contentTypeAllWindows) {
814+ if (contentType ! = S. contentTypeAllWindows() ) {
825815 ; trayControl.remove(winid)
826816 return
827817 } else {
@@ -857,10 +847,10 @@ return
857847
858848#If guiActive = 1
859849 F1 ::
860- if (contentType = contentTypeTrayIcons) {
861- contentType := contentTypeAllWindows
850+ if (contentType = S. contentTypeTrayIcons() ) {
851+ contentType := S. contentTypeAllWindows()
862852 } else {
863- contentType := contentTypeTrayIcons
853+ contentType := S. contentTypeTrayIcons()
864854 }
865855 lastContentType := contentType
866856 forceWindowListRefresh = 1
@@ -872,7 +862,7 @@ return
872862 if (selectedIndex < 1 ) {
873863 return
874864 }
875- if (contentType ! = contentTypeAllWindows) {
865+ if (contentType ! = S. contentTypeAllWindows() ) {
876866 return
877867 }
878868 window := filteredWindows.get(selectedIndex)
@@ -888,7 +878,7 @@ return
888878;
889879ActivateWindow :
890880 window := filteredWindows.get(selectedIndex)
891- if (contentType = contentTypeTrayIcons) {
881+ if (contentType = S. contentTypeTrayIcons() ) {
892882 window_id := window.getHwnd()
893883 if (S.moveMouse()) {
894884 winTools := new WinTools()
0 commit comments