diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-08-07 01:00:10 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-08 09:02:03 +0100 |
commit | 4dfb33788de68c827cb7a768efe2012cc0ed1ac5 (patch) | |
tree | 25862620280adab4c8ea64f54d8315cc4cce996c /cui | |
parent | d39feeb20027e9c0ded324c9d0df9784a6707194 (diff) |
Use new file load error dialog in widget UI
Change-Id: Ifa31cb9113fc497992d029f401cdadb12cf83c96
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 6 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 12 | ||||
-rw-r--r-- | cui/source/tabpages/tplneend.cxx | 4 | ||||
-rw-r--r-- | cui/uiconfig/ui/querynoloadfiledialog.ui | 33 | ||||
-rw-r--r-- | cui/uiconfig/ui/querysavelistdialog.ui | 4 |
8 files changed, 53 insertions, 17 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 76cd91f93f3e..69ea08c0bde6 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -93,6 +93,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/querydeletedictionarydialog \ cui/uiconfig/ui/querydeletelineenddialog \ cui/uiconfig/ui/queryduplicatedialog \ + cui/uiconfig/ui/querynoloadedfiledialog \ cui/uiconfig/ui/querysavelistdialog \ cui/uiconfig/ui/scriptorganizer \ cui/uiconfig/ui/securityoptionsdialog \ diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 7143a9acbc92..fe837183d524 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -814,8 +814,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl) else { LeaveWait(); - ErrorBox( GetParentDialog(), WinBits( WB_OK ), - String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); + MessageDialog( GetParentDialog() + ,"NoLoadedFileDialog" + ,"cui/ui/querynoloadedfiledialog.ui").Execute(); } } } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index e20b648b59b0..a8cfb7cc63f4 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -179,9 +179,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl) } else { - ErrorBox aErrorBox( mpTopDlg, WinBits( WB_OK ), - String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ); - aErrorBox.Execute(); + MessageDialog( mpTopDlg + ,"NoLoadedFileDialog" + ,"cui/ui/querynoloadedfiledialog.ui").Execute(); } } } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index e8a8fef048a4..d8860cc90d92 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -683,8 +683,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl) else { LeaveWait(); - ErrorBox( GetParentDialog(), WinBits( WB_OK ), - String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); + MessageDialog( GetParentDialog() + ,"NoLoadedFileDialog" + ,"cui/ui/querynoloadedfiledialog.ui").Execute(); } } } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index eb2da03ad40f..c65bf712a541 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -673,9 +673,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) if ( nReturn != RET_CANCEL ) { - ::sfx2::FileDialogHelper aDlg( - com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, - 0 ); + ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); String aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); INetURLObject aFile( SvtPathOptions().GetPalettePath() ); @@ -720,8 +718,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) *pnHatchingListState &= ~CT_MODIFIED; } else - ErrorBox( GetParentDialog(), WinBits( WB_OK ), - String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); + MessageDialog( GetParentDialog() + ,"NoLoadedFileDialog" + ,"cui/ui/querynoloadedfiledialog.ui").Execute(); } } @@ -745,8 +744,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl) { - ::sfx2::FileDialogHelper aDlg( - com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); + ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 ); String aStrFilterType( "*.soh" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx index 6e5b817c7b41..87b2f5275040 100644 --- a/cui/source/tabpages/tplneend.cxx +++ b/cui/source/tabpages/tplneend.cxx @@ -578,7 +578,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl) *pnLineEndListState &= ~CT_MODIFIED; } else - 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/uiconfig/ui/querynoloadfiledialog.ui b/cui/uiconfig/ui/querynoloadfiledialog.ui new file mode 100644 index 000000000000..35975775c6ca --- /dev/null +++ b/cui/uiconfig/ui/querynoloadfiledialog.ui @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.6 --> + <object class="GtkMessageDialog" id="NoLoadedFileDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">No loaded file</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">error</property> + <property name="buttons">ok</property> + <property name="text" translatable="yes">The file could not be loaded!</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> diff --git a/cui/uiconfig/ui/querysavelistdialog.ui b/cui/uiconfig/ui/querysavelistdialog.ui index 3d4c81e58b23..7c47ea49703d 100644 --- a/cui/uiconfig/ui/querysavelistdialog.ui +++ b/cui/uiconfig/ui/querysavelistdialog.ui @@ -3,7 +3,7 @@ <!-- interface-requires gtk+ 3.6 --> <object class="GtkMessageDialog" id="AskSaveList"> <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="border_width">12</property> <property name="title" translatable="yes">Save list?</property> <property name="type_hint">dialog</property> <property name="skip_taskbar_hint">True</property> @@ -15,7 +15,7 @@ <object class="GtkBox" id="messagedialog-vbox"> <property name="can_focus">False</property> <property name="orientation">vertical</property> - <property name="spacing">2</property> + <property name="spacing">24</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="messagedialog-action_area"> <property name="can_focus">False</property> |