diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-08-07 09:06:52 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-08 09:05:14 +0100 |
commit | 786f0eae0673bc18a6e2a71323c70af671e46e66 (patch) | |
tree | f4f2aaad2074bc457aae54e3e862c2d521a6c577 /cui | |
parent | 4dfb33788de68c827cb7a768efe2012cc0ed1ac5 (diff) |
Use new widget UI dialogs in line style ctor
Change-Id: I2b646d71fe4ab28137d88ebf638b28674eab3c91
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 2 | ||||
-rw-r--r-- | cui/source/tabpages/strings.src | 4 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tplnedef.cxx | 23 | ||||
-rw-r--r-- | cui/source/tabpages/tplneend.cxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/querydeletelinestyledialog.ui | 33 |
7 files changed, 52 insertions, 15 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 69ea08c0bde6..485edaebd08d 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/querydeletelinestyledialog \ cui/uiconfig/ui/queryduplicatedialog \ cui/uiconfig/ui/querynoloadedfiledialog \ cui/uiconfig/ui/querysavelistdialog \ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index bf0a9c5583f3..737ebbba1c63 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -85,7 +85,7 @@ #define RID_SVXSTR_DESC_NEW_BITMAP (RID_SVX_START + 168) #define RID_SVXSTR_DESC_EXT_BITMAP (RID_SVX_START + 169) #define RID_SVXSTR_DESC_LINESTYLE (RID_SVX_START + 174) -#define RID_SVXSTR_ASK_DEL_LINESTYLE (RID_SVX_START + 176) + #define RID_SVXSTR_ASK_CHANGE_LINESTYLE (RID_SVX_START + 177) #define RID_SVXSTR_DESC_HATCH (RID_SVX_START + 232) #define RID_SVXSTR_ASK_DEL_HATCH (RID_SVX_START + 234) diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src index 3b3160678701..cf42f8d2036e 100644 --- a/cui/source/tabpages/strings.src +++ b/cui/source/tabpages/strings.src @@ -51,10 +51,6 @@ String RID_SVXSTR_DESC_LINESTYLE { Text [ en-US ] = "Please enter a name for the line style:" ; }; -String RID_SVXSTR_ASK_DEL_LINESTYLE -{ - Text [ en-US ] = "Do you want to delete the line style?" ; -}; String RID_SVXSTR_ASK_CHANGE_LINESTYLE { Text [ en-US ] = "The line style was modified without saving. \nModify the selected line style or add a new line style." ; diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index d8860cc90d92..36b773a59efb 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -419,7 +419,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, 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++ ) diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 5adb24710999..07a530581c00 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -589,8 +589,10 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, 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.Execute(); } } @@ -667,8 +669,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_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.Execute(); } } @@ -685,7 +688,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl) if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - QueryBox aQueryBox( GetParentDialog(), WinBits( WB_YES_NO | WB_DEF_NO ), OUString( CUI_RES( RID_SVXSTR_ASK_DEL_LINESTYLE ) ) ); + MessageDialog aQueryBox( GetParentDialog() + ,"AskDelLineStyleDialog" + ,"cui/ui/querydeletelinestyledialog.ui"); if ( aQueryBox.Execute() == RET_YES ) { @@ -721,7 +726,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl) if ( *pnDashListState & CT_MODIFIED ) { - nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ), OUString( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute(); + nReturn = MessageDialog( GetParentDialog() + ,"AskSaveList" + ,"cui/ui/querysavelistdialog.ui").Execute(); if ( nReturn == RET_YES ) pDashList->Save(); @@ -762,7 +769,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl) } else //aIStream.Close(); - ErrorBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); + MessageDialog( GetParentDialog() + ,"NoLoadedFileDialog" + ,"cui/ui/querynoloadedfiledialog.ui").Execute(); } } diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 87b2f5275040..310f7fa4c353 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -328,7 +328,6 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl) MessageDialog aWarningBox( GetParentDialog() ,"DuplicateNameDialog" ,"cui/ui/queryduplicatedialog.ui"); -// aWarningBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aWarningBox.Execute(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -474,7 +473,6 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl) MessageDialog aBox( GetParentDialog() ,"DuplicateNameDialog" ,"cui/ui/queryduplicatedialog.ui"); - //aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); aBox.Execute(); } } diff --git a/cui/uiconfig/ui/querydeletelinestyledialog.ui b/cui/uiconfig/ui/querydeletelinestyledialog.ui new file mode 100644 index 000000000000..3a4bf2b1bee1 --- /dev/null +++ b/cui/uiconfig/ui/querydeletelinestyledialog.ui @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.6 --> + <object class="GtkMessageDialog" id="AskDelLineStyleDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Delete line style?</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">question</property> + <property name="buttons">yes-no</property> + <property name="text" translatable="yes">Do you want to delete the line style?</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">24</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> |