Skip to content

Commit

Permalink
ShowFailNavMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
indiff committed Mar 4, 2024
1 parent 9284991 commit d11e5e6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions QTTabBar/QTTabBarClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7416,6 +7416,9 @@ public bool HideExplorer
protected ToolStripDropDownButton buttonNavHistoryMenu;
protected IntPtr TravelToolBarHandle;

/**
* 添加到历史目录
*/
protected void AddToHistory(QTabItem closingTab)
{
string currentPath = closingTab.CurrentPath;
Expand All @@ -7426,6 +7429,7 @@ protected void AddToHistory(QTabItem closingTab)
currentPath = currentPath + "???" + closingTab.GetLogHash(true, 0);
}
StaticReg.ClosedTabHistoryList.Add(currentPath);
// windows 11 ,有可能调用 WindowsUtil.close 方法导致报错
InstanceManager.ButtonBarBroadcast(bbar => bbar.RefreshButtons(), true);
}
}
Expand Down Expand Up @@ -7555,12 +7559,15 @@ protected void ShowMessageNavCanceled(string failedPath, bool fModal)
{
QTUtility2.log("QTTabBarClass ShowMessageNavCanceled: " + failedPath);
QTUtility2.MakeErrorLog(null, string.Format("Failed navigation: {0}", failedPath));
MessageForm.Show(ExplorerHandle,
string.Format(QTUtility.TextResourcesDic["TabBar_Message"][0], failedPath),
string.Empty,
MessageBoxIcon.Asterisk,
0x2710,
fModal);
if (Config.Window.ShowFailNavMsg)
{
MessageForm.Show(ExplorerHandle,
string.Format(QTUtility.TextResourcesDic["TabBar_Message"][0], failedPath),
string.Empty,
MessageBoxIcon.Asterisk,
0x2710,
fModal);
}
}

protected void CancelFailedTabChanging(string newPath)
Expand Down

0 comments on commit d11e5e6

Please sign in to comment.