Kaydet (Commit) 38c153c1 authored tarafından Caolán McNamara's avatar Caolán McNamara

drop now unused SvxMessDialog

Change-Id: I019b73b3ae6bf2d61a90cf893b7f4cb356771192
Reviewed-on: https://gerrit.libreoffice.org/51605Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 87d30320
......@@ -98,7 +98,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/macroassignpage \
cui/uiconfig/ui/macroselectordialog \
cui/uiconfig/ui/menuassignpage \
cui/uiconfig/ui/messbox \
cui/uiconfig/ui/mosaicdialog \
cui/uiconfig/ui/movemenu \
cui/uiconfig/ui/multipathdialog \
......
......@@ -49,7 +49,6 @@ cui/ui/macroassigndialog.ui
cui/ui/macroassignpage.ui
cui/ui/macroselectordialog.ui
cui/ui/menuassignpage.ui
cui/ui/messbox.ui
cui/ui/mosaicdialog.ui
cui/ui/movemenu.ui
cui/ui/multipathdialog.ui
......
......@@ -95,80 +95,4 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const
m_xEdtTitle->select_region(0, -1);
}
/*************************************************************************
|*
|* dialog for cancelling, saving or adding
|*
\************************************************************************/
SvxMessDialog::SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image const * pImg )
: ModalDialog(pWindow, "MessBox", "cui/ui/messbox.ui")
, pImage(nullptr)
{
get(pBtn1, "mess_box_btn1");
get(pBtn2, "mess_box_btn2");
get(pFtDescription, "mess_box_description");
get(pFtImage, "mess_box_image");
if( pImg )
{
pImage = new Image( *pImg );
pFtImage->SetImage( *pImage );
pFtImage->SetStyle( ( pFtImage->GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
pFtImage->Show();
}
SetText( rText );
pFtDescription->SetText( rDesc );
pBtn1->SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
pBtn2->SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
}
SvxMessDialog::~SvxMessDialog()
{
disposeOnce();
}
void SvxMessDialog::dispose()
{
delete pImage;
pImage = nullptr;
pFtDescription.clear();
pBtn1.clear();
pBtn2.clear();
pFtImage.clear();
ModalDialog::dispose();
}
/*************************************************************************/
IMPL_LINK_NOARG(SvxMessDialog, Button1Hdl, Button*, void)
{
EndDialog( RET_BTN_1 );
}
/*************************************************************************/
IMPL_LINK_NOARG(SvxMessDialog, Button2Hdl, Button*, void)
{
EndDialog( RET_BTN_2 );
}
/*************************************************************************/
void SvxMessDialog::SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt )
{
switch ( nBtnId )
{
case SvxMessDialogButton::N1:
pBtn1->SetText( rNewTxt );
break;
case SvxMessDialogButton::N2:
pBtn2->SetText( rNewTxt );
break;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -41,7 +41,6 @@ class SvxNameDialog;
class SvxObjectNameDialog;
class SvxObjectTitleDescDialog;
class SvxMessDialog;
class SvxMultiPathDialog;
class SvxHpLinkDlg;
class FmSearchDialog;
......
......@@ -119,32 +119,6 @@ public:
OUString GetDescription() const { return m_xEdtDescription->get_text(); }
};
enum class SvxMessDialogButton {
N1, N2
};
/// Dialog to cancel, save, or add
class SvxMessDialog : public ModalDialog
{
private:
VclPtr<FixedText> pFtDescription;
VclPtr<PushButton> pBtn1;
VclPtr<PushButton> pBtn2;
VclPtr<FixedImage> pFtImage;
Image* pImage;
DECL_LINK(Button1Hdl, Button*, void);
DECL_LINK(Button2Hdl, Button*, void);
public:
SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image const * pImg );
virtual ~SvxMessDialog() override;
virtual void dispose() override;
void SetButtonText( SvxMessDialogButton nBtnId, const OUString& rNewTxt );
};
#endif // INCLUDED_CUI_SOURCE_INC_DLGNAME_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="MessBox">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox6">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area6">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="mess_box_btn1">
<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>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="mess_box_btn2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">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>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="mess_box_image">
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="stock">gtk-missing-image</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">12</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="mess_box_description">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">mess_box_btn1</action-widget>
<action-widget response="0">mess_box_btn2</action-widget>
<action-widget response="-6">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