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


ON Unix, if evolution (the default choice for address data) SDBC
driver fails to load, then the address data wizard is completely
non-functional because it tries to use evolution anyway, even when the
user has selected another choice (e.g. thunderbird or ldap or "other"
- which should maybe be called "custom").

That's because the "evolution" choice is hidden, and never gets
unchecked when another choice is made.

Attached patch fixes that by including the hidden items in the same
selection group, too.

Please apply to libreoffice-3-4 and libreoffice-3-5.

Thanks,

-- 
Lionel
From 748bc453e579c39ff7495302f7fcc1222c2e819f Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Mon, 13 Feb 2012 17:36:23 +0100
Subject: [PATCH 1/2] fdo#43399 hidden radio button should also gets unset

---
 extensions/source/abpilot/typeselectionpage.cxx |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/extensions/source/abpilot/typeselectionpage.cxx 
b/extensions/source/abpilot/typeselectionpage.cxx
index 711159e9..aee5219 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -110,9 +110,13 @@ namespace abp
         m_aAllTypes.push_back( ButtonItem( &m_aOE, AST_OE, bWithMozilla && !bUnx ) );
         m_aAllTypes.push_back( ButtonItem( &m_aOther, AST_OTHER, true ) );
 
-        bool bFirstVisible = true;
         Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected );
         const Size aSpacing( LogicToPixel( Size( 0, 3 ), MAP_APPFONT ) );
+        if ( ! m_aAllTypes.empty() )
+        {
+            ButtonItem aItem = m_aAllTypes[0];
+            aItem.m_pItem->SetStyle( aItem.m_pItem->GetStyle() | WB_GROUP );
+        }
         for ( ::std::vector< ButtonItem >::const_iterator loop = m_aAllTypes.begin();
               loop != m_aAllTypes.end(); ++loop )
         {
@@ -125,12 +129,6 @@ namespace abp
                 aTopLeft.Y() += aItemSize.Height() + aSpacing.Height();
                 aItem.m_pItem->SetClickHdl( aTypeSelectionHandler );
                 aItem.m_pItem->Show();
-
-                if ( bFirstVisible )
-                {
-                    aItem.m_pItem->SetStyle( aItem.m_pItem->GetStyle() | WB_GROUP );
-                    bFirstVisible = false;
-                }
             }
         }
     }
-- 
1.7.7.3


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.