diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-18 16:17:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-18 20:28:37 +0200 |
commit | d989619895a1215d0f701247d5d8368069da8962 (patch) | |
tree | e8d644e2623f5e45d2f24b4ac53fac62110a4cbb /fpicker | |
parent | ed92e40aea759d435ec1c05877e6480654a06ab6 (diff) |
tdf#145169 have one button per response
not two sharing the same response, so the other buttons response
handler is not a candidate to be called on pressing return
which is the circumstance which causes the dialog to return even
after cancel was selected in its child dialog warning about overwrite
Change-Id: I09eb0ea5e94c89ce0860be362e1c7632887e7a4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123753
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 6 | ||||
-rw-r--r-- | fpicker/uiconfig/ui/remotefilesdialog.ui | 21 |
2 files changed, 5 insertions, 22 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index 9c12a1efc25b..544887795da4 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -33,6 +33,7 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, PickerFlags nBits ) , m_xContext( comphelper::getProcessComponentContext() ) , m_xMasterPasswd( PasswordContainer::create( m_xContext ) ) , m_bIsInExecute( false ) + , m_xOk_btn(m_xBuilder->weld_button("ok")) , m_xCancel_btn(m_xBuilder->weld_button("cancel")) , m_xManageServices(m_xBuilder->weld_menu_button("add_service_btn")) , m_xServices_lb(m_xBuilder->weld_combo_box("services_lb")) @@ -62,13 +63,11 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, PickerFlags nBits ) if( m_eMode == REMOTEDLG_MODE_OPEN ) { - m_xOk_btn = m_xBuilder->weld_button("open"); - m_xNewFolder->hide(); } else { - m_xOk_btn = m_xBuilder->weld_button("save"); + m_xOk_btn->set_label(FpsResId(STR_EXPLORERFILE_BUTTONSAVE)); m_xNewFolder->connect_clicked( LINK( this, RemoteFilesDialog, NewFolderHdl ) ); } @@ -76,7 +75,6 @@ RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, PickerFlags nBits ) m_xIconView_btn->connect_clicked( LINK( this, RemoteFilesDialog, IconViewHdl ) ); m_xListView_btn->connect_clicked( LINK( this, RemoteFilesDialog, ListViewHdl ) ); - m_xOk_btn->show(); m_xOk_btn->set_sensitive(false); m_xOk_btn->connect_clicked( LINK( this, RemoteFilesDialog, OkHdl ) ); diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui b/fpicker/uiconfig/ui/remotefilesdialog.ui index 9f4034deefc7..be7e83f43e03 100644 --- a/fpicker/uiconfig/ui/remotefilesdialog.ui +++ b/fpicker/uiconfig/ui/remotefilesdialog.ui @@ -138,8 +138,9 @@ </packing> </child> <child> - <object class="GtkButton" id="open"> + <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="remotefilesdialog|open">_Open</property> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> <property name="has_default">True</property> @@ -152,21 +153,6 @@ <property name="position">2</property> </packing> </child> - <child> - <object class="GtkButton" id="save"> - <property name="label" translatable="yes" context="remotefilesdialog|save">_Save</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> @@ -565,8 +551,7 @@ <action-widgets> <action-widget response="-11">help</action-widget> <action-widget response="-6">cancel</action-widget> - <action-widget response="-5">open</action-widget> - <action-widget response="-5">save</action-widget> + <action-widget response="-5">ok</action-widget> </action-widgets> </object> </interface> |