[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - fpicker/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Jul 11 08:06:30 PDT 2012
fpicker/source/office/PlacesListBox.cxx | 46 ++++++++++++++++----------------
fpicker/source/office/PlacesListBox.hxx | 7 +++-
fpicker/source/office/iodlg.cxx | 2 -
3 files changed, 28 insertions(+), 27 deletions(-)
New commits:
commit 631230c2c2b3a67a1620a233ad5b99bcde8457b2
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jul 11 16:58:10 2012 +0200
fpicker: don't edit local places with double-click
Change-Id: Ibb8330dd088f6b630058fc023ad7efdea59e08bf
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index f8e438d..e16753e 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -168,30 +168,30 @@ IMPL_LINK( PlacesListBox, Selection, void* , EMPTYARG )
IMPL_LINK ( PlacesListBox, DoubleClick, void*, EMPTYARG )
{
- sal_uInt16 nSelected = mpImpl->GetCurrRow();
- PlacePtr pPlace = maPlaces[nSelected];
- if ( pPlace->IsEditable() == true )
- {
- PlaceEditDialog aDlg( mpDlg, pPlace );
- short aRetCode = aDlg.Execute();
- switch(aRetCode) {
- case RET_OK :
- {
- pPlace->SetName ( aDlg.GetServerName() );
- pPlace->SetUrl( aDlg.GetServerUrl() );
+ sal_uInt16 nSelected = mpImpl->GetCurrRow();
+ PlacePtr pPlace = maPlaces[nSelected];
+ if ( pPlace->IsEditable() == true && !pPlace->IsLocal( ) )
+ {
+ PlaceEditDialog aDlg( mpDlg, pPlace );
+ short aRetCode = aDlg.Execute();
+ switch(aRetCode) {
+ case RET_OK :
+ {
+ pPlace->SetName ( aDlg.GetServerName() );
+ pPlace->SetUrl( aDlg.GetServerUrl() );
mbUpdated = true;
- break;
- }
- case RET_NO :
- {
- RemovePlace(nSelected);
- break;
- }
- default:
- break;
- };
- }
- return 0;
+ break;
+ }
+ case RET_NO :
+ {
+ RemovePlace(nSelected);
+ break;
+ }
+ default:
+ break;
+ };
+ }
+ return 0;
}
void PlacesListBox::updateView( )
commit 0b076591e7b44b2dd86e8e42fb1efbb267379468
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Wed Jul 11 16:15:00 2012 +0200
fpicker: fixed delete button (dis)enabling
Change-Id: I94fff429507da5f9d3fa4b6fcdb33c600a7a5b5b
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index 49dc83e..26daca4 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -48,14 +48,17 @@ class Place
public:
- Place( rtl::OUString sName, rtl::OUString sUrl, bool bEditable = false) :
+ Place( rtl::OUString sName, rtl::OUString sUrl, bool bEditable = false ) :
msName( sName ),
maUrl( sUrl ),
mbEditable( bEditable ) {};
~Place( ) {};
- Place( const Place& rCopy ) : msName( rCopy.msName ), maUrl( rCopy.maUrl ) { };
+ Place( const Place& rCopy ) :
+ msName( rCopy.msName ),
+ maUrl( rCopy.maUrl ),
+ mbEditable( rCopy.mbEditable ) { };
void SetName(const rtl::OUString& aName ) { msName = aName; }
void SetUrl(const rtl::OUString& aUrl ) { maUrl.SetURL( aUrl ); }
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index cc57c5b..b68edbe 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1982,8 +1982,6 @@ void SvtFileDialog::onAsyncOperationFinished()
_pImp->_pEdFileName->GrabFocus();
// (if m_bInExecuteAsync is true, then the operation was finished within the minium wait time,
// and to the user, the operation appears to be synchronous)
-
- _pImp->_pBtnRemovePlace->Disable();
}
//-----------------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list