cui/UIConfig_cui.mk | 1 cui/source/tabpages/tplneend.cxx | 14 ++++++++----- cui/uiconfig/ui/queryduplicatedialog.ui | 34 ++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-)
New commits: commit 73b7213a772d3ed0ff4afe2a41bef3b3f6de2f7e Author: Olivier Hallot <olivier.hal...@edx.srv.br> Date: Tue Aug 6 23:20:15 2013 -0300 Convert duplicate name dialog to widget UI Change-Id: I943a04b487af463559b140f358c8af601f4f6ce9 Reviewed-on: https://gerrit.libreoffice.org/5299 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 6c0b01b..2218837 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -92,6 +92,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/querydeletechartcolordialog \ cui/uiconfig/ui/querydeletedictionarydialog \ cui/uiconfig/ui/querydeletelineenddialog \ + cui/uiconfig/ui/queryduplicatedialog \ cui/uiconfig/ui/scriptorganizer \ cui/uiconfig/ui/securityoptionsdialog \ cui/uiconfig/ui/select_persona_dialog \ diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 9a2f5ee..6972b4b 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -325,8 +325,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) // if yes, repeat and demand a new name if ( !bDifferent ) { - WarningBox aWarningBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); - aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); + MessageDialog aWarningBox( GetParentDialog() + ,"DuplicateNameDialog" + ,"cui/ui/queryduplicatedialog.ui"); +// aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aWarningBox.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -426,7 +428,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) { aName = aNewName; aName += sal_Unicode(' '); - aName += OUString::valueOf( j++ ); + aName += OUString::number( j++ ); bDifferent = sal_True; for( long i = 0; i < nCount && bDifferent; i++ ) @@ -469,8 +471,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) } else { - WarningBox aBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); - aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); + MessageDialog aBox( GetParentDialog() + ,"DuplicateNameDialog" + ,"cui/ui/queryduplicatedialog.ui"); + //aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } } diff --git a/cui/uiconfig/ui/queryduplicatedialog.ui b/cui/uiconfig/ui/queryduplicatedialog.ui new file mode 100644 index 0000000..b1ee98e --- /dev/null +++ b/cui/uiconfig/ui/queryduplicatedialog.ui @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.6 --> + <object class="GtkMessageDialog" id="DuplicateNameDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Duplicate name</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">warning</property> + <property name="buttons">ok</property> + <property name="text" translatable="yes">The name you have entered already exists.</property> + <property name="secondary_text" translatable="yes">Please choose another name.</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits