summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-25 17:20:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-26 09:59:54 +0200
commit96c43a21da48e9ef50f199b9418e089da42a8ebb (patch)
treeb1d68c63abc53a37f952f2a57f1711d015e578cf /vcl/unx/gtk3
parent432449d075bb93f624fd64326e8d33543a6bab34 (diff)
Resolves: tdf#118356 freeze/thaw mass language additions
Change-Id: Ifdc2247594d3ddeea0ca7b3b97eb6e392c54f95b Reviewed-on: https://gerrit.libreoffice.org/56409 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 8a7fef26c304..15e0f6612b7a 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3708,6 +3708,7 @@ public:
{
disable_notify_events();
g_object_ref(m_pListStore);
+ gtk_widget_freeze_child_notify(GTK_WIDGET(m_pTreeView));
gtk_tree_view_set_model(m_pTreeView, nullptr);
enable_notify_events();
}
@@ -3716,6 +3717,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));
g_object_unref(m_pListStore);
enable_notify_events();
}
@@ -4723,12 +4725,24 @@ public:
virtual void freeze() override
{
- //do nothing for now
+ gtk_widget_freeze_child_notify(GTK_WIDGET(m_pComboBoxText));
+ if (m_xSorter)
+ {
+ GtkTreeModel* pModel = gtk_combo_box_get_model(GTK_COMBO_BOX(m_pComboBoxText));
+ GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel);
+ gtk_tree_sortable_set_sort_column_id(pSortable, GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING);
+ }
}
virtual void thaw() override
{
- //do nothing for now
+ if (m_xSorter)
+ {
+ GtkTreeModel* pModel = gtk_combo_box_get_model(GTK_COMBO_BOX(m_pComboBoxText));
+ 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));
}
virtual ~GtkInstanceComboBoxText() override