Kaydet (Commit) c9840227 authored tarafından Szymon Kłos's avatar Szymon Kłos

RemoteFilesDialog: handled save button

Change-Id: Iec9129eac618d21370b8e5ecb331eb9518ecf082
üst a26defa1
...@@ -110,8 +110,8 @@ public: ...@@ -110,8 +110,8 @@ public:
virtual bool getShowState(); virtual bool getShowState();
virtual Control* getControl( sal_Int16 _nControlId, bool _bLabelControl = false ) const SAL_OVERRIDE; virtual Control* getControl( sal_Int16 nControlId, bool bLabelControl = false ) const SAL_OVERRIDE;
virtual void enableControl( sal_Int16 _nControlId, bool _bEnable ); virtual void enableControl( sal_Int16 nControlId, bool bEnable );
virtual OUString getCurFilter( ) const; virtual OUString getCurFilter( ) const;
private: private:
...@@ -130,8 +130,7 @@ private: ...@@ -130,8 +130,7 @@ private:
::com::sun::star::uno::Sequence< OUString > m_aBlackList; ::com::sun::star::uno::Sequence< OUString > m_aBlackList;
::svt::IFilePickerListener* m_pFileNotifier; ::svt::IFilePickerListener* m_pFileNotifier;
VclPtr< PushButton > m_pOpen_btn; VclPtr< PushButton > m_pOk_btn;
VclPtr< PushButton > m_pSave_btn;
VclPtr< CancelButton > m_pCancel_btn; VclPtr< CancelButton > m_pCancel_btn;
VclPtr< MenuButton > m_pAddService_btn; VclPtr< MenuButton > m_pAddService_btn;
VclPtr< ListBox > m_pServices_lb; VclPtr< ListBox > m_pServices_lb;
......
...@@ -240,8 +240,6 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) ...@@ -240,8 +240,6 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
, m_pFileView( NULL ) , m_pFileView( NULL )
, m_pContainer( NULL ) , m_pContainer( NULL )
{ {
get( m_pOpen_btn, "open" );
get( m_pSave_btn, "save" );
get( m_pCancel_btn, "cancel" ); get( m_pCancel_btn, "cancel" );
get( m_pAddService_btn, "add_service_btn" ); get( m_pAddService_btn, "add_service_btn" );
get( m_pServices_lb, "services_lb" ); get( m_pServices_lb, "services_lb" );
...@@ -254,23 +252,18 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) ...@@ -254,23 +252,18 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
m_bIsUpdated = false; m_bIsUpdated = false;
m_nCurrentFilter = LISTBOX_ENTRY_NOTFOUND; m_nCurrentFilter = LISTBOX_ENTRY_NOTFOUND;
m_pOpen_btn->Enable( false );
m_pSave_btn->Enable( false );
m_pFilter_lb->Enable( false ); m_pFilter_lb->Enable( false );
m_pName_ed->Enable( false ); m_pName_ed->Enable( false );
if( m_eMode == REMOTEDLG_MODE_OPEN ) if( m_eMode == REMOTEDLG_MODE_OPEN )
{ get( m_pOk_btn, "open" );
m_pSave_btn->Hide();
m_pOpen_btn->Show();
}
else else
{ get( m_pOk_btn, "save" );
m_pSave_btn->Show();
m_pOpen_btn->Hide(); 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 = VclPtr<Breadcrumb>::Create( get< vcl::Window >( "breadcrumb_container" ) );
m_pPath->set_hexpand( true ); m_pPath->set_hexpand( true );
...@@ -365,8 +358,7 @@ void RemoteFilesDialog::dispose() ...@@ -365,8 +358,7 @@ void RemoteFilesDialog::dispose()
m_pContainer.disposeAndClear(); m_pContainer.disposeAndClear();
m_pPath.disposeAndClear(); m_pPath.disposeAndClear();
m_pOpen_btn.clear(); m_pOk_btn.clear();
m_pSave_btn.clear();
m_pCancel_btn.clear(); m_pCancel_btn.clear();
m_pAddService_btn.clear(); m_pAddService_btn.clear();
m_pServices_lb.clear(); m_pServices_lb.clear();
...@@ -670,11 +662,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl ) ...@@ -670,11 +662,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectHdl )
m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) ); m_pName_ed->SetText( INetURLObject::decode( aURL.GetLastName(), INetURLObject::DECODE_WITH_CHARSET ) );
m_pOpen_btn->Enable( true ); m_pOk_btn->Enable( true );
} }
else else
{ {
m_pOpen_btn->Enable( false ); m_pOk_btn->Enable( false );
m_sPath = ""; m_sPath = "";
m_pName_ed->SetText( "" ); m_pName_ed->SetText( "" );
} }
...@@ -693,9 +685,9 @@ IMPL_LINK_NOARG( RemoteFilesDialog, FileNameModifyHdl ) ...@@ -693,9 +685,9 @@ IMPL_LINK_NOARG( RemoteFilesDialog, FileNameModifyHdl )
m_pFileView->SetNoSelection(); m_pFileView->SetNoSelection();
if( !m_pName_ed->GetText().isEmpty() ) if( !m_pName_ed->GetText().isEmpty() )
m_pOpen_btn->Enable( true ); m_pOk_btn->Enable( true );
else else
m_pOpen_btn->Enable( false ); m_pOk_btn->Enable( false );
return 1; return 1;
} }
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
<child> <child>
<object class="GtkButton" id="open"> <object class="GtkButton" id="open">
<property name="label">gtk-open</property> <property name="label">gtk-open</property>
<property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property> <property name="can_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment