Kaydet (Commit) 73b7213a authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Convert duplicate name dialog to widget UI

Change-Id: I943a04b487af463559b140f358c8af601f4f6ce9
Reviewed-on: https://gerrit.libreoffice.org/5299Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7fd15394
...@@ -92,6 +92,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ ...@@ -92,6 +92,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/querydeletechartcolordialog \ cui/uiconfig/ui/querydeletechartcolordialog \
cui/uiconfig/ui/querydeletedictionarydialog \ cui/uiconfig/ui/querydeletedictionarydialog \
cui/uiconfig/ui/querydeletelineenddialog \ cui/uiconfig/ui/querydeletelineenddialog \
cui/uiconfig/ui/queryduplicatedialog \
cui/uiconfig/ui/scriptorganizer \ cui/uiconfig/ui/scriptorganizer \
cui/uiconfig/ui/securityoptionsdialog \ cui/uiconfig/ui/securityoptionsdialog \
cui/uiconfig/ui/select_persona_dialog \ cui/uiconfig/ui/select_persona_dialog \
......
...@@ -325,8 +325,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) ...@@ -325,8 +325,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
// if yes, repeat and demand a new name // if yes, repeat and demand a new name
if ( !bDifferent ) if ( !bDifferent )
{ {
WarningBox aWarningBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); MessageDialog aWarningBox( GetParentDialog()
aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui");
// aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE );
aWarningBox.Execute(); aWarningBox.Execute();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
...@@ -426,7 +428,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) ...@@ -426,7 +428,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
{ {
aName = aNewName; aName = aNewName;
aName += sal_Unicode(' '); aName += sal_Unicode(' ');
aName += OUString::valueOf( j++ ); aName += OUString::number( j++ );
bDifferent = sal_True; bDifferent = sal_True;
for( long i = 0; i < nCount && bDifferent; i++ ) for( long i = 0; i < nCount && bDifferent; i++ )
...@@ -469,8 +471,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) ...@@ -469,8 +471,10 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
} }
else else
{ {
WarningBox aBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); MessageDialog aBox( GetParentDialog()
aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); ,"DuplicateNameDialog"
,"cui/ui/queryduplicatedialog.ui");
//aBox.SetHelpId( HID_WARN_NAME_DUPLICATE );
aBox.Execute(); aBox.Execute();
} }
} }
......
<?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>
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