OSDN Git Service

RAD-268: Disallow closing merged tabs. This time also by pressing big red X :P
authorLatif Khalifa <latifer@streamgrid.net>
Fri, 9 Sep 2011 00:10:25 +0000 (00:10 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Fri, 9 Sep 2011 00:10:25 +0000 (00:10 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@1144 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Consoles/TabsConsole.cs

index e8d8c64..19aeb78 100644 (file)
@@ -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();