summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/weld.hxx9
-rw-r--r--vcl/source/app/salvtables.cxx30
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx18
3 files changed, 27 insertions, 30 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 39ee0c867886..5cb39276ea62 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -103,6 +103,9 @@ public:
virtual bool get_direction() const = 0;
virtual void set_direction(bool bRTL) = 0;
+ virtual void freeze() = 0;
+ virtual void thaw() = 0;
+
virtual Container* weld_parent() const = 0;
virtual ~Widget() {}
@@ -277,9 +280,6 @@ public:
virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) = 0;
virtual void set_entry_completion(bool bEnable) = 0;
- virtual void freeze() = 0;
- virtual void thaw() = 0;
-
void connect_entry_activate(const Link<ComboBoxText&, void>& rLink)
{
m_aEntryActivateHdl = rLink;
@@ -313,9 +313,6 @@ public:
virtual void clear() = 0;
virtual int get_height_rows(int nRows) const = 0;
- virtual void freeze() = 0;
- virtual void thaw() = 0;
-
virtual void set_selection_mode(bool bMultiple) = 0;
virtual int count_selected_rows() const = 0;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 7f03aed3e6c2..b89ad836136c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -398,6 +398,16 @@ public:
m_xWidget->EnableRTL(bRTL);
}
+ virtual void freeze() override
+ {
+ m_xWidget->SetUpdateMode(false);
+ }
+
+ virtual void thaw() override
+ {
+ m_xWidget->SetUpdateMode(true);
+ }
+
virtual weld::Container* weld_parent() const override;
virtual ~SalInstanceWidget() override
@@ -1588,16 +1598,6 @@ public:
return nRet;
}
- virtual void freeze() override
- {
- m_xTreeView->SetUpdateMode(false);
- }
-
- virtual void thaw() override
- {
- m_xTreeView->SetUpdateMode(true);
- }
-
virtual void set_selection_mode(bool bMultiple) override
{
m_xTreeView->EnableMultiSelection(bMultiple);
@@ -2122,16 +2122,6 @@ public:
m_xComboBoxText->SetStyle(m_xComboBoxText->GetStyle() | WB_SORT);
}
- virtual void freeze() override
- {
- m_xComboBoxText->SetUpdateMode(false);
- }
-
- virtual void thaw() override
- {
- m_xComboBoxText->SetUpdateMode(true);
- }
-
virtual ~SalInstanceComboBoxText() override
{
clear();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 26bc4dbb0e3a..89655fd1b654 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1462,6 +1462,16 @@ public:
gtk_widget_set_direction(m_pWidget, bRTL ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
}
+ virtual void freeze() override
+ {
+ gtk_widget_freeze_child_notify(m_pWidget);
+ }
+
+ virtual void thaw() override
+ {
+ gtk_widget_thaw_child_notify(m_pWidget);
+ }
+
virtual ~GtkInstanceWidget() override
{
if (m_nFocusInSignalId)
@@ -3745,7 +3755,7 @@ public:
{
disable_notify_events();
g_object_ref(m_pListStore);
- gtk_widget_freeze_child_notify(GTK_WIDGET(m_pTreeView));
+ GtkInstanceContainer::freeze();
gtk_tree_view_set_model(m_pTreeView, nullptr);
enable_notify_events();
}
@@ -3754,7 +3764,7 @@ public:
{
disable_notify_events();
gtk_tree_view_set_model(m_pTreeView, GTK_TREE_MODEL(m_pListStore));
- gtk_widget_thaw_child_notify(GTK_WIDGET(m_pTreeView));
+ GtkInstanceContainer::thaw();
g_object_unref(m_pListStore);
enable_notify_events();
}
@@ -4762,7 +4772,7 @@ public:
virtual void freeze() override
{
- gtk_widget_freeze_child_notify(GTK_WIDGET(m_pComboBoxText));
+ GtkInstanceContainer::freeze();
if (m_xSorter)
{
GtkTreeModel* pModel = gtk_combo_box_get_model(GTK_COMBO_BOX(m_pComboBoxText));
@@ -4779,7 +4789,7 @@ public:
GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel);
gtk_tree_sortable_set_sort_column_id(pSortable, 0, GTK_SORT_ASCENDING);
}
- gtk_widget_thaw_child_notify(GTK_WIDGET(m_pComboBoxText));
+ GtkInstanceContainer::thaw();
}
virtual ~GtkInstanceComboBoxText() override