private static void AddToHistory(QTabItem closingTab) { string currentPath = closingTab.CurrentPath; if((!QTUtility.CheckConfig(Settings.NoHistory) && !string.IsNullOrEmpty(currentPath)) && !IsSearchResultFolder(currentPath)) { if(QTUtility2.IsShellPathButNotFileSystem(currentPath) && (currentPath.IndexOf("???") == -1)) { currentPath = currentPath + "???" + closingTab.GetLogHash(true, 0); } QTUtility.ClosedTabHistoryList.Add(currentPath); SyncButtonBarBroadCast(2); } }
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { QTabItem selectedTab = (QTabItem)tabControl1.SelectedTab; string currentPath = selectedTab.CurrentPath; if(IsSpecialFolderNeedsToTravel(currentPath) && LogEntryDic.ContainsKey(selectedTab.GetLogHash(true, 0))) { NavigatedByCode = true; CurrentTab = selectedTab; while(lstActivatedTabs.Remove(CurrentTab)) { } lstActivatedTabs.Add(CurrentTab); if(lstActivatedTabs.Count > 15) { lstActivatedTabs.RemoveAt(0); } fNavigatedByTabSelection = NavigateToPastSpecialDir(CurrentTab.GetLogHash(true, 0)); if(pluginManager != null) { pluginManager.OnTabChanged(tabControl1.SelectedIndex, selectedTab.CurrentIDL, selectedTab.CurrentPath); } if(tabControl1.Focused) { listView.SetFocus(); } } else { IDLWrapper idlw = null; if((selectedTab.CurrentIDL != null) && (selectedTab.CurrentIDL.Length > 0)) { idlw = new IDLWrapper(selectedTab.CurrentIDL); } if((idlw == null) || !idlw.Available) { idlw = new IDLWrapper(selectedTab.CurrentPath); } using(idlw) { if(!idlw.Available) { CancelFailedTabChanging(currentPath); return; } CurrentTab = selectedTab; while(lstActivatedTabs.Remove(CurrentTab)) { } lstActivatedTabs.Add(CurrentTab); if(lstActivatedTabs.Count > 15) { lstActivatedTabs.RemoveAt(0); } if(((currentPath != CurrentAddress) || (QTUtility.IsXP && (currentPath == QTUtility.PATH_SEARCHFOLDER))) || NowTabCloned) { NavigatedByCode = true; fNavigatedByTabSelection = true; NowTabCloned = false; if(ShellBrowser.Navigate(idlw) != 0) { CancelFailedTabChanging(currentPath); return; } } else { SyncTravelState(); } } if(tabControl1.Focused) { listView.SetFocus(); } if(pluginManager != null) { pluginManager.OnTabChanged(tabControl1.SelectedIndex, CurrentTab.CurrentIDL, CurrentTab.CurrentPath); } } }
private static void AddToHistory(QTabItem closingTab) { string currentPath = closingTab.CurrentPath; if((Config.Misc.KeepHistory && !string.IsNullOrEmpty(currentPath)) && !IsSearchResultFolder(currentPath)) { if(QTUtility2.IsShellPathButNotFileSystem(currentPath) && (currentPath.IndexOf("???") == -1)) { currentPath = currentPath + "???" + closingTab.GetLogHash(true, 0); } StaticReg.ClosedTabHistoryList.Add(currentPath); InstanceManager.ButtonBarBroadcast(bbar => bbar.RefreshButtons(), true); } }