summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-15 14:49:17 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-15 21:43:10 +0200
commit609416ca21aa2912908ef46d1129deec3cd24bae (patch)
treefb2e1824ca605d5d4cea03c897fb13b2bb4e74f4
parent82b08515fafea688001ec3b77e0874ee87e44ac2 (diff)
inherit LinkButton and Notebook from Widget instead of Container
Change-Id: Ie3940d712e2e60a59234aff34daaf6003301fd15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115660 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--extensions/source/propctrlr/propertyeditor.hxx2
-rw-r--r--include/vcl/weld.hxx4
-rw-r--r--vcl/inc/salvtables.hxx2
-rw-r--r--vcl/source/app/salvtables.cxx10
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx20
5 files changed, 17 insertions, 21 deletions
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index 32625f103409..5ca271d0d14a 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -99,7 +99,7 @@ namespace pcr
Size get_preferred_size() const;
- weld::Container* getWidget() const { return m_xTabControl.get(); }
+ weld::Widget* getWidget() const { return m_xTabControl.get(); }
void Show() { m_xTabControl->show(); }
void Hide() { m_xTabControl->hide(); }
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index b0801ec0ad1d..1101df6b46c4 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -457,7 +457,7 @@ public:
virtual std::unique_ptr<Label> weld_label_widget() const = 0;
};
-class VCL_DLLPUBLIC Notebook : virtual public Container
+class VCL_DLLPUBLIC Notebook : virtual public Widget
{
protected:
Link<const OString&, bool> m_aLeavePageHdl;
@@ -1525,7 +1525,7 @@ class VCL_DLLPUBLIC RadioButton : virtual public ToggleButton
{
};
-class VCL_DLLPUBLIC LinkButton : virtual public Container
+class VCL_DLLPUBLIC LinkButton : virtual public Widget
{
protected:
Link<LinkButton&, bool> m_aActivateLinkHdl;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 8b415b998b4b..a20a862d9a45 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1032,7 +1032,7 @@ public:
virtual ~SalInstanceButton() override;
};
-class SalInstanceNotebook : public SalInstanceContainer, public virtual weld::Notebook
+class SalInstanceNotebook : public SalInstanceWidget, public virtual weld::Notebook
{
private:
VclPtr<TabControl> m_xNotebook;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 771517062a1e..20ad4154d23f 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -2310,7 +2310,7 @@ IMPL_LINK_NOARG(SalInstanceScrolledWindow, HscrollHdl, ScrollBar*, void)
SalInstanceNotebook::SalInstanceNotebook(TabControl* pNotebook, SalInstanceBuilder* pBuilder,
bool bTakeOwnership)
- : SalInstanceContainer(pNotebook, pBuilder, bTakeOwnership)
+ : SalInstanceWidget(pNotebook, pBuilder, bTakeOwnership)
, m_xNotebook(pNotebook)
{
m_xNotebook->SetActivatePageHdl(LINK(this, SalInstanceNotebook, ActivatePageHdl));
@@ -2447,7 +2447,7 @@ IMPL_LINK_NOARG(SalInstanceNotebook, ActivatePageHdl, TabControl*, void)
namespace
{
-class SalInstanceVerticalNotebook : public SalInstanceContainer, public virtual weld::Notebook
+class SalInstanceVerticalNotebook : public SalInstanceWidget, public virtual weld::Notebook
{
private:
VclPtr<VerticalTabControl> m_xNotebook;
@@ -2459,7 +2459,7 @@ private:
public:
SalInstanceVerticalNotebook(VerticalTabControl* pNotebook, SalInstanceBuilder* pBuilder,
bool bTakeOwnership)
- : SalInstanceContainer(pNotebook, pBuilder, bTakeOwnership)
+ : SalInstanceWidget(pNotebook, pBuilder, bTakeOwnership)
, m_xNotebook(pNotebook)
{
m_xNotebook->SetActivatePageHdl(LINK(this, SalInstanceVerticalNotebook, ActivatePageHdl));
@@ -2835,7 +2835,7 @@ public:
namespace
{
-class SalInstanceLinkButton : public SalInstanceContainer, public virtual weld::LinkButton
+class SalInstanceLinkButton : public SalInstanceWidget, public virtual weld::LinkButton
{
private:
VclPtr<FixedHyperlink> m_xButton;
@@ -2846,7 +2846,7 @@ private:
public:
SalInstanceLinkButton(FixedHyperlink* pButton, SalInstanceBuilder* pBuilder,
bool bTakeOwnership)
- : SalInstanceContainer(pButton, pBuilder, bTakeOwnership)
+ : SalInstanceWidget(pButton, pBuilder, bTakeOwnership)
, m_xButton(pButton)
{
m_aOrigClickHdl = m_xButton->GetClickHdl();
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 523cc5cef594..3d06f899e572 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -6729,7 +6729,7 @@ public:
}
};
-class GtkInstanceNotebook : public GtkInstanceContainer, public virtual weld::Notebook
+class GtkInstanceNotebook : public GtkInstanceWidget, public virtual weld::Notebook
{
private:
GtkNotebook* m_pNotebook;
@@ -7172,11 +7172,7 @@ private:
public:
GtkInstanceNotebook(GtkNotebook* pNotebook, GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
-#if !GTK_CHECK_VERSION(4, 0, 0)
- : GtkInstanceContainer(GTK_CONTAINER(pNotebook), pBuilder, bTakeOwnership)
-#else
- : GtkInstanceContainer(GTK_WIDGET(pNotebook), pBuilder, bTakeOwnership)
-#endif
+ : GtkInstanceWidget(GTK_WIDGET(pNotebook), pBuilder, bTakeOwnership)
, m_pNotebook(pNotebook)
, m_pOverFlowBox(nullptr)
, m_pOverFlowNotebook(GTK_NOTEBOOK(gtk_notebook_new()))
@@ -7408,12 +7404,12 @@ public:
gtk_widget_freeze_child_notify(GTK_WIDGET(m_pOverFlowNotebook));
#endif
g_object_freeze_notify(G_OBJECT(m_pOverFlowNotebook));
- GtkInstanceContainer::disable_notify_events();
+ GtkInstanceWidget::disable_notify_events();
}
virtual void enable_notify_events() override
{
- GtkInstanceContainer::enable_notify_events();
+ GtkInstanceWidget::enable_notify_events();
g_object_thaw_notify(G_OBJECT(m_pOverFlowNotebook));
#if !GTK_CHECK_VERSION(4, 0, 0)
gtk_widget_thaw_child_notify(GTK_WIDGET(m_pOverFlowNotebook));
@@ -9629,7 +9625,7 @@ public:
}
};
-class GtkInstanceLinkButton : public GtkInstanceContainer, public virtual weld::LinkButton
+class GtkInstanceLinkButton : public GtkInstanceWidget, public virtual weld::LinkButton
{
private:
GtkLinkButton* m_pButton;
@@ -9644,7 +9640,7 @@ private:
public:
GtkInstanceLinkButton(GtkLinkButton* pButton, GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
- : GtkInstanceContainer(GTK_CONTAINER(pButton), pBuilder, bTakeOwnership)
+ : GtkInstanceWidget(GTK_WIDGET(pButton), pBuilder, bTakeOwnership)
, m_pButton(pButton)
, m_nSignalId(g_signal_connect(pButton, "activate-link", G_CALLBACK(signalActivateLink), this))
{
@@ -9674,12 +9670,12 @@ public:
virtual void disable_notify_events() override
{
g_signal_handler_block(m_pButton, m_nSignalId);
- GtkInstanceContainer::disable_notify_events();
+ GtkInstanceWidget::disable_notify_events();
}
virtual void enable_notify_events() override
{
- GtkInstanceContainer::enable_notify_events();
+ GtkInstanceWidget::enable_notify_events();
g_signal_handler_unblock(m_pButton, m_nSignalId);
}