[Libreoffice-commits] core.git: cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk

Caolán McNamara caolanm at redhat.com
Tue Mar 20 08:54:19 UTC 2018


 cui/UIConfig_cui.mk                     |    1 
 cui/qa/unit/data/cui-dialogs-test_2.txt |    1 
 cui/source/dialogs/dlgname.cxx          |   76 ---------------------
 cui/source/factory/dlgfact.hxx          |    1 
 cui/source/inc/dlgname.hxx              |   26 -------
 cui/uiconfig/ui/messbox.ui              |  113 --------------------------------
 6 files changed, 218 deletions(-)

New commits:
commit 38c153c121fc05c49fa9bb02f3a4edf54a3ddeb1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 19 21:36:56 2018 +0000

    drop now unused SvxMessDialog
    
    Change-Id: I019b73b3ae6bf2d61a90cf893b7f4cb356771192
    Reviewed-on: https://gerrit.libreoffice.org/51605
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index cc8ad828f6d1..234e4d7f3a42 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -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 \
diff --git a/cui/qa/unit/data/cui-dialogs-test_2.txt b/cui/qa/unit/data/cui-dialogs-test_2.txt
index 0507e34f2605..5d87d13ffb73 100644
--- a/cui/qa/unit/data/cui-dialogs-test_2.txt
+++ b/cui/qa/unit/data/cui-dialogs-test_2.txt
@@ -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
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx
index 148c7374df95..73a35e6b9c5b 100644
--- a/cui/source/dialogs/dlgname.cxx
+++ b/cui/source/dialogs/dlgname.cxx
@@ -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: */
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 157e949bebf0..7d74cb2d9dd9 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -41,7 +41,6 @@ class SvxNameDialog;
 class SvxObjectNameDialog;
 class SvxObjectTitleDescDialog;
 
-class SvxMessDialog;
 class SvxMultiPathDialog;
 class SvxHpLinkDlg;
 class FmSearchDialog;
diff --git a/cui/source/inc/dlgname.hxx b/cui/source/inc/dlgname.hxx
index bed7fa68b850..4ac036ff6c10 100644
--- a/cui/source/inc/dlgname.hxx
+++ b/cui/source/inc/dlgname.hxx
@@ -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: */
diff --git a/cui/uiconfig/ui/messbox.ui b/cui/uiconfig/ui/messbox.ui
deleted file mode 100644
index 005d02b919b3..000000000000
--- a/cui/uiconfig/ui/messbox.ui
+++ /dev/null
@@ -1,113 +0,0 @@
-<?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>


More information about the Libreoffice-commits mailing list