diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-15 14:49:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-15 21:43:10 +0200 |
commit | 609416ca21aa2912908ef46d1129deec3cd24bae (patch) | |
tree | fb2e1824ca605d5d4cea03c897fb13b2bb4e74f4 /vcl | |
parent | 82b08515fafea688001ec3b77e0874ee87e44ac2 (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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/salvtables.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 20 |
3 files changed, 14 insertions, 18 deletions
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); } |