summaryrefslogtreecommitdiff
path: root/cui/source/dialogs/iconcdlg.cxx
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-08-17 13:34:20 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-08-22 21:33:06 -0500
commitf4246fab77113147b36706a1f3d93e8724ff826b (patch)
treed0643b5165f665eaee3b32cf1555fe5728cbbb56 /cui/source/dialogs/iconcdlg.cxx
parentc8a3b2d14c4942aa7d0d325a7b925f93b985161c (diff)
fdo#56456 fdo#75578 fdo#63271 fdo#75805 Improve hyperlink dialog
Changes made: * Rename "Back" to "Reset" like in other dialogs (eg. Writer - Format - Character). * Apply-Button, which reflects the old behavior of the dialog, and doesn't close it automatically. * Added an OK-Button, which applies the changes made and automatically closes the dialog. With this both use cases should be handled: * Inserting one single URI with simple close. * Modifying multiple URIs without closing the dialog. Hopefully all users are happy with this ;) Change-Id: I1881dee083945cd165fbb8f8444395c1b04a0607 Reviewed-on: https://gerrit.libreoffice.org/10946 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'cui/source/dialogs/iconcdlg.cxx')
-rw-r--r--cui/source/dialogs/iconcdlg.cxx23
1 files changed, 21 insertions, 2 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index eed1d13cd671..4b1e48062e32 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -190,9 +190,10 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
bItemsReset ( false )
{
get(m_pOKBtn, "ok");
+ get(m_pApplyBtn, "apply");
get(m_pCancelBtn, "cancel");
get(m_pHelpBtn, "help");
- get(m_pResetBtn, "back");
+ get(m_pResetBtn, "reset");
get(m_pIconCtrl, "icon_control");
get(m_pTabContainer, "tab");
@@ -213,11 +214,13 @@ IconChoiceDialog::IconChoiceDialog ( Window* pParent, const OString& rID,
// Buttons
m_pOKBtn->SetClickHdl ( LINK( this, IconChoiceDialog, OkHdl ) );
m_pOKBtn->SetHelpId( HID_ICCDIALOG_OK_BTN );
+ m_pApplyBtn->SetClickHdl ( LINK( this, IconChoiceDialog, ApplyHdl ) );
+ //m_pApplyBtn->SetHelpId( HID_ICCDIALOG_APPLY_BTN );
m_pCancelBtn->SetHelpId( HID_ICCDIALOG_CANCEL_BTN );
m_pResetBtn->SetClickHdl( LINK( this, IconChoiceDialog, ResetHdl ) );
- m_pResetBtn->SetText( CUI_RESSTR(RID_SVXSTR_ICONCHOICEDLG_RESETBUT) );
m_pResetBtn->SetHelpId( HID_ICCDIALOG_RESET_BTN );
m_pOKBtn->Show();
+ m_pApplyBtn->Show();
m_pCancelBtn->Show();
m_pHelpBtn->Show();
m_pResetBtn->Show();
@@ -392,6 +395,22 @@ IMPL_LINK_NOARG(IconChoiceDialog, OkHdl)
}
+IMPL_LINK_NOARG(IconChoiceDialog, ApplyHdl)
+{
+ bInOK = true;
+
+ if ( OK_Impl() )
+ {
+ if ( bModal )
+ EndDialog( Ok() );
+ else
+ {
+ Ok();
+ Close();
+ }
+ }
+ return 0;
+}
IMPL_LINK_NOARG(IconChoiceDialog, ResetHdl)
{