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

Use new file load error dialog in widget UI

Change-Id: Ifa31cb9113fc497992d029f401cdadb12cf83c96
üst d39feeb2
...@@ -93,6 +93,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ ...@@ -93,6 +93,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/querydeletedictionarydialog \ cui/uiconfig/ui/querydeletedictionarydialog \
cui/uiconfig/ui/querydeletelineenddialog \ cui/uiconfig/ui/querydeletelineenddialog \
cui/uiconfig/ui/queryduplicatedialog \ cui/uiconfig/ui/queryduplicatedialog \
cui/uiconfig/ui/querynoloadedfiledialog \
cui/uiconfig/ui/querysavelistdialog \ cui/uiconfig/ui/querysavelistdialog \
cui/uiconfig/ui/scriptorganizer \ cui/uiconfig/ui/scriptorganizer \
cui/uiconfig/ui/securityoptionsdialog \ cui/uiconfig/ui/securityoptionsdialog \
......
...@@ -814,8 +814,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl) ...@@ -814,8 +814,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
else else
{ {
LeaveWait(); LeaveWait();
ErrorBox( GetParentDialog(), WinBits( WB_OK ), MessageDialog( GetParentDialog()
String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); ,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
} }
} }
} }
......
...@@ -179,9 +179,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl) ...@@ -179,9 +179,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
} }
else else
{ {
ErrorBox aErrorBox( mpTopDlg, WinBits( WB_OK ), MessageDialog( mpTopDlg
String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ); ,"NoLoadedFileDialog"
aErrorBox.Execute(); ,"cui/ui/querynoloadedfiledialog.ui").Execute();
} }
} }
} }
......
...@@ -683,8 +683,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl) ...@@ -683,8 +683,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
else else
{ {
LeaveWait(); LeaveWait();
ErrorBox( GetParentDialog(), WinBits( WB_OK ), MessageDialog( GetParentDialog()
String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); ,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
} }
} }
} }
......
...@@ -673,9 +673,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) ...@@ -673,9 +673,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
if ( nReturn != RET_CANCEL ) if ( nReturn != RET_CANCEL )
{ {
::sfx2::FileDialogHelper aDlg( ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
0 );
String aStrFilterType( "*.soh" ); String aStrFilterType( "*.soh" );
aDlg.AddFilter( aStrFilterType, aStrFilterType ); aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() ); INetURLObject aFile( SvtPathOptions().GetPalettePath() );
...@@ -720,8 +718,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) ...@@ -720,8 +718,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
*pnHatchingListState &= ~CT_MODIFIED; *pnHatchingListState &= ~CT_MODIFIED;
} }
else else
ErrorBox( GetParentDialog(), WinBits( WB_OK ), MessageDialog( GetParentDialog()
String( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); ,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
} }
} }
...@@ -745,8 +744,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl) ...@@ -745,8 +744,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl) IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl)
{ {
::sfx2::FileDialogHelper aDlg( ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
String aStrFilterType( "*.soh" ); String aStrFilterType( "*.soh" );
aDlg.AddFilter( aStrFilterType, aStrFilterType ); aDlg.AddFilter( aStrFilterType, aStrFilterType );
......
...@@ -578,7 +578,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl) ...@@ -578,7 +578,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl)
*pnLineEndListState &= ~CT_MODIFIED; *pnLineEndListState &= ~CT_MODIFIED;
} }
else else
ErrorBox( GetParentDialog(), WinBits( WB_OK ), OUString( ResId( RID_SVXSTR_READ_DATA_ERROR, rMgr ) ) ).Execute(); MessageDialog( GetParentDialog()
,"NoLoadedFileDialog"
,"cui/ui/querynoloadedfiledialog.ui").Execute();
} }
} }
......
<?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>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- interface-requires gtk+ 3.6 --> <!-- interface-requires gtk+ 3.6 -->
<object class="GtkMessageDialog" id="AskSaveList"> <object class="GtkMessageDialog" id="AskSaveList">
<property name="can_focus">False</property> <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="title" translatable="yes">Save list?</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property> <property name="skip_taskbar_hint">True</property>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<object class="GtkBox" id="messagedialog-vbox"> <object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">2</property> <property name="spacing">24</property>
<child internal-child="action_area"> <child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area"> <object class="GtkButtonBox" id="messagedialog-action_area">
<property name="can_focus">False</property> <property name="can_focus">False</property>
......
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