Kaydet (Commit) 4e84484c authored tarafından Caolán McNamara's avatar Caolán McNamara

convert MessBox with custom buttons to .ui

Change-Id: I05704746ce5f098a2caaafafdc574009b279e458
üst a548b48c
......@@ -84,9 +84,6 @@
#define MENU_FM_TEXTATTRIBITES_SPACING (RID_FORMS_START + 9)
#define RID_MENU_DATANAVIGATOR (RID_FORMS_START + 10)
// QueryBox-Id's -----------------------------------------------------------
#define RID_QRY_LINK_WARNING (RID_FORMS_START + 6)
// String-Id's -----------------------------------------------------------
#define RID_STR_INVALID_XMLNAME (RID_FORMS_START + 1)
#define RID_STR_INVALID_XMLPREFIX (RID_FORMS_START + 2)
......@@ -199,7 +196,6 @@
#define RID_STR_DATANAV_ADD_SUBMISSION (RID_FORMS_START + 141)
#define RID_STR_DATANAV_EDIT_SUBMISSION (RID_FORMS_START + 142)
#define RID_STR_DATANAV_REMOVE_SUBMISSION (RID_FORMS_START + 143)
#define RID_STR_DATANAV_LINKWARN_BUTTON (RID_FORMS_START + 144)
#define RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY (RID_FORMS_START + 145)
#define RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS (RID_FORMS_START + 146)
#define RID_STR_SVT_SQL_SYNTAX_QUERY_EXISTS (RID_FORMS_START + 147)
......
......@@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/fontworkgallerydialog \
svx/uiconfig/ui/fontworkspacingdialog \
svx/uiconfig/ui/formlinkwarndialog \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/imapdialog \
svx/uiconfig/ui/linkwarndialog \
......
......@@ -3322,20 +3322,11 @@ namespace svxform
return 0;
}
LinkedInstanceWarningBox::LinkedInstanceWarningBox( Window* pParent ) :
MessBox( pParent, SVX_RES( RID_QRY_LINK_WARNING ) )
LinkedInstanceWarningBox::LinkedInstanceWarningBox( Window* pParent )
: MessageDialog(pParent, "FormLinkWarnDialog", "svx/ui/formlinkwarndialog.ui")
{
SetText( Application::GetDisplayName() );
SetImage( QueryBox::GetStandardImage() );
AddButton( SVX_RESSTR( RID_STR_DATANAV_LINKWARN_BUTTON ), RET_OK, BUTTONDIALOG_DEFBUTTON );
AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
}
} // namespace svxform
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -90,12 +90,6 @@ String RID_STR_QRY_REMOVE_BINDING
Text [ en-US ] = "Deleting the binding '$BINDINGNAME' affects all controls currently bound to this binding.\n\nDo you really want to delete this binding?" ;
};
MessBox RID_QRY_LINK_WARNING
{
Buttons = 0 ;
Message [ en-US ] = "This instance is linked with the form.\n\nThe changes you make to this instance will be lost when the form is reloaded.\n\nHow do you want to proceed?" ;
};
String RID_STR_INVALID_XMLNAME
{
Text [ en-US ] = "The name '%1' is not valid in XML. Please enter a different name." ;
......@@ -293,11 +287,6 @@ String RID_STR_DATANAV_REMOVE_SUBMISSION
Text [ en-US ] = "Delete Submission" ;
};
String RID_STR_DATANAV_LINKWARN_BUTTON
{
Text [ en-US ] = "~Edit" ;
};
String RID_STR_ELEMENT
{
Text [ en-US ] = "Element" ;
......
......@@ -25,7 +25,6 @@
#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/menubtn.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
#include <vcl/toolbox.hxx>
......@@ -648,7 +647,7 @@ namespace svxform
};
class LinkedInstanceWarningBox : public MessBox
class LinkedInstanceWarningBox : public MessageDialog
{
public:
LinkedInstanceWarningBox( Window* pParent );
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkMessageDialog" id="FormLinkWarnDialog">
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="text" translatable="yes">This instance is linked with the form.
The changes you make to this instance will be lost when the form is reloaded.
How do you want to proceed?</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>
<child>
<object class="GtkButton" id="ok">
<property name="label">_Edit</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</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>
<action-widgets>
<action-widget response="1">ok</action-widget>
<action-widget response="0">cancel</action-widget>
</action-widgets>
</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