summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2013-08-06 23:20:15 -0300
committerCaolán McNamara <caolanm@redhat.com>2013-08-08 07:47:53 +0000
commit73b7213a772d3ed0ff4afe2a41bef3b3f6de2f7e (patch)
tree79cb31738ddc28d61a81d6a3cc578a89d0c99e58 /cui
parent7fd15394ad721fd2f954488c16e709d87d03ea2e (diff)
Convert duplicate name dialog to widget UI
Change-Id: I943a04b487af463559b140f358c8af601f4f6ce9 Reviewed-on: https://gerrit.libreoffice.org/5299 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/tabpages/tplneend.cxx14
-rw-r--r--cui/uiconfig/ui/queryduplicatedialog.ui34
3 files changed, 44 insertions, 5 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 6c0b01b0d171..22188378985e 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 9a2f5ee5331a..6972b4b267eb 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 000000000000..b1ee98eea227
--- /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>