diff options
-rw-r--r-- | include/svtools/RemoteFilesDialog.hxx | 7 | ||||
-rw-r--r-- | svtools/source/dialogs/RemoteFilesDialog.cxx | 30 | ||||
-rw-r--r-- | svtools/uiconfig/ui/remotefilesdialog.ui | 1 |
3 files changed, 14 insertions, 24 deletions
diff --git a/include/svtools/RemoteFilesDialog.hxx b/include/svtools/RemoteFilesDialog.hxx index 1e9afcbfb2c0..8bd9361b0f21 100644 --- a/include/svtools/RemoteFilesDialog.hxx +++ b/include/svtools/RemoteFilesDialog.hxx @@ -110,8 +110,8 @@ public: virtual bool getShowState(); - virtual Control* getControl( sal_Int16 _nControlId, bool _bLabelControl = false ) const SAL_OVERRIDE; - virtual void enableControl( sal_Int16 _nControlId, bool _bEnable ); + virtual Control* getControl( sal_Int16 nControlId, bool bLabelControl = false ) const SAL_OVERRIDE; + virtual void enableControl( sal_Int16 nControlId, bool bEnable ); virtual OUString getCurFilter( ) const; private: @@ -130,8 +130,7 @@ private: ::com::sun::star::uno::Sequence< OUString > m_aBlackList; ::svt::IFilePickerListener* m_pFileNotifier; - VclPtr< PushButton > m_pOpen_btn; - VclPtr< PushButton > m_pSave_btn; + VclPtr< PushButton > m_pOk_btn; VclPtr< CancelButton > m_pCancel_btn; VclPtr< MenuButton > m_pAddService_btn; VclPtr< ListBox > m_pServices_lb; diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 03c7bcf43492..704f287a0d2b 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -240,8 +240,6 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) , m_pFileView( NULL ) , m_pContainer( NULL ) { - get( m_pOpen_btn, "open" ); - get( m_pSave_btn, "save" ); get( m_pCancel_btn, "cancel" ); get( m_pAddService_btn, "add_service_btn" ); get( m_pServices_lb, "services_lb" ); @@ -254,23 +252,18 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) m_bIsUpdated = false; m_nCurrentFilter = LISTBOX_ENTRY_NOTFOUND; - m_pOpen_btn->Enable( false ); - m_pSave_btn->Enable( false ); m_pFilter_lb->Enable( false ); m_pName_ed->Enable( false ); if( m_eMode == REMOTEDLG_MODE_OPEN ) - { - m_pSave_btn->Hide(); - m_pOpen_btn->Show(); - } + get( m_pOk_btn, "open" ); else - { - m_pSave_btn->Show(); - m_pOpen_btn->Hide(); - } + get( m_pOk_btn, "save" ); + + m_pOk_btn->Show(); + m_pOk_btn->Enable( false ); - m_pOpen_btn->SetClickHdl( LINK( this, RemoteFilesDialog, OkHdl ) ); + m_pOk_btn->SetClickHdl( LINK( this, RemoteFilesDialog, OkHdl ) ); m_pPath = VclPtr<Breadcrumb>::Create( get< vcl::Window >( "breadcrumb_container" ) ); m_pPath->set_hexpand( true ); @@ -365,8 +358,7 @@ void RemoteFilesDialog::dispose() m_pContainer.disposeAndClear(); m_pPath.disposeAndClear(); - m_pOpen_btn.clear(); - m_pSave_btn.clear(); + m_pOk_btn.clear(); m_pCancel_btn.clear(); m_pAddService_btn.clear(); m_pServices_lb.clear(); @@ -670,11 +662,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl ) m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) ); - m_pOpen_btn->Enable( true ); + m_pOk_btn->Enable( true ); } else { - m_pOpen_btn->Enable( false ); + m_pOk_btn->Enable( false ); m_sPath = ""; m_pName_ed->SetText( "" ); } @@ -693,9 +685,9 @@ IMPL_LINK_NOARG( RemoteFilesDialog, FileNameModifyHdl ) m_pFileView->SetNoSelection(); if( !m_pName_ed->GetText().isEmpty() ) - m_pOpen_btn->Enable( true ); + m_pOk_btn->Enable( true ); else - m_pOpen_btn->Enable( false ); + m_pOk_btn->Enable( false ); return 1; } diff --git a/svtools/uiconfig/ui/remotefilesdialog.ui b/svtools/uiconfig/ui/remotefilesdialog.ui index f4a591fd96b6..0ba817b95086 100644 --- a/svtools/uiconfig/ui/remotefilesdialog.ui +++ b/svtools/uiconfig/ui/remotefilesdialog.ui @@ -35,7 +35,6 @@ <child> <object class="GtkButton" id="open"> <property name="label">gtk-open</property> - <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="receives_default">True</property> |