From: Latif Khalifa Date: Fri, 9 Sep 2011 00:10:25 +0000 (+0000) Subject: RAD-268: Disallow closing merged tabs. This time also by pressing big red X :P X-Git-Tag: 2.8~233 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=71374c627defcffc919fa2c7dae7c22d67a9165d;p=radegast%2Fradegast.git RAD-268: Disallow closing merged tabs. This time also by pressing big red X :P git-svn-id: https://radegast.googlecode.com/svn/trunk@1144 f7a694da-4d33-11de-9ad6-1127a62b9fcd --- diff --git a/Radegast/GUI/Consoles/TabsConsole.cs b/Radegast/GUI/Consoles/TabsConsole.cs index e8d8c64..19aeb78 100644 --- a/Radegast/GUI/Consoles/TabsConsole.cs +++ b/Radegast/GUI/Consoles/TabsConsole.cs @@ -788,7 +788,7 @@ namespace Radegast selectedTab = tab; - tbtnCloseTab.Enabled = tab.AllowClose || tab.AllowHide; + tbtnCloseTab.Enabled = !tab.Merged && (tab.AllowClose || tab.AllowHide); if (owner != null) { @@ -1121,7 +1121,9 @@ namespace Radegast private void tbtnCloseTab_Click(object sender, EventArgs e) { RadegastTab tab = selectedTab; - if (tab.AllowClose) + if (tab.Merged) + return; + else if (tab.AllowClose) tab.Close(); else if (tab.AllowHide) tab.Hide();