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

Use new widget UI dialogs in line style ctor

Change-Id: I2b646d71fe4ab28137d88ebf638b28674eab3c91
üst 4dfb3378
......@@ -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 \
......
......@@ -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)
......
......@@ -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." ;
......
......@@ -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++ )
......
......@@ -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();
}
}
......
......@@ -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();
}
}
......
<?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>
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