Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

I have here a small patch to disable the remove-button at the chart-colors if there is no color to remove. This makes it more consistent for the GUI.

--
Greetings,
Rob Snelders
From 0f64b62344f6c0fdc2f6d1460bdfb1cb3bd3f2ed Mon Sep 17 00:00:00 2001
From: Rob Snelders <programming@ertai.nl>
Date: Wed, 8 Jun 2011 18:21:02 +0200
Subject: [PATCH] Disable Removebutton in optchart

---
 cui/source/options/optchart.cxx |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 422c720..6293a8f 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -196,6 +196,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ResetToDefaults, void *, EMPTYARG )
 
         aLbChartColors.GetFocus();
         aLbChartColors.SelectEntryPos( 0 );
+        aPBRemove.Enable( sal_True );
     }
 
     return 0L;
@@ -217,6 +218,7 @@ IMPL_LINK( SvxDefaultColorOptPage, AddChartColor, void *, EMPTYARG )
 
         aLbChartColors.GetFocus();
         aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
+        aPBRemove.Enable( sal_True );
     }
 
     return 0L;
@@ -251,6 +253,8 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
                 aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
             else if (aLbChartColors.GetEntryCount() > 0)
                 aLbChartColors.SelectEntryPos( nIndex );
+            else
+                aPBRemove.Enable( sal_False );
         }
     }
 
-- 
1.7.0.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.