summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-23 20:40:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-25 15:38:09 +0100
commit51e408533aadd1de62271b986ef0e2ba90c4947d (patch)
tree41fd773cd4c9f7a5d47b19512217400da2f2a76f /vcl/unx
parent260002b16f18634a7e1d10d4160378beb0cc0c5f (diff)
weld SwFrameDlg
and now can remove... commit 5d84af7e83404f22d3c9cd0b0bb88fb84d0550e7 Date: Tue Dec 4 22:43:46 2012 +0100 fdo#57553: Picture dialog Macro tab page: lazily init ... because JVM startup is annoying, so delay it until really activating Macro tab. This patch is sort of lame but with the change in bd2c14ec78a7549d4a19738154cdd5ea890f61c4 what can you do... and description is revealed to be a text_view not an entry Change-Id: Ibc92cf11870d4349ddc728ec17c846e4158e82ac Reviewed-on: https://gerrit.libreoffice.org/63916 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b2800cf970ee..ee4ec85daaa9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4058,13 +4058,19 @@ namespace
comphelper::string::NaturalStringSorter* pSorter = static_cast<comphelper::string::NaturalStringSorter*>(data);
gchar* pName1;
gchar* pName2;
- gtk_tree_model_get(pModel, a, 0, &pName1, -1);
- gtk_tree_model_get(pModel, b, 0, &pName2, -1);
+ GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(pModel);
+ gint sort_column_id(0);
+ GtkSortType order(GTK_SORT_ASCENDING);
+ gtk_tree_sortable_get_sort_column_id(pSortable, &sort_column_id, &order);
+ gtk_tree_model_get(pModel, a, sort_column_id, &pName1, -1);
+ gtk_tree_model_get(pModel, b, sort_column_id, &pName2, -1);
gint ret = pSorter->compare(OUString(pName1, strlen(pName1), RTL_TEXTENCODING_UTF8),
OUString(pName2, strlen(pName2), RTL_TEXTENCODING_UTF8));
g_free(pName1);
g_free(pName2);
- return ret;
+ if (ret == 0)
+ return ret;
+ return order == GTK_SORT_ASCENDING ? ret : -ret;
}
}
@@ -4359,8 +4365,8 @@ public:
::comphelper::getProcessComponentContext(),
Application::GetSettings().GetUILanguageTag().getLocale()));
GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(m_pTreeStore);
- gtk_tree_sortable_set_sort_func(pSortable, m_nTextCol, sort_func, m_xSorter.get(), nullptr);
gtk_tree_sortable_set_sort_column_id(pSortable, m_nTextCol, GTK_SORT_ASCENDING);
+ gtk_tree_sortable_set_sort_func(pSortable, m_nTextCol, sort_func, m_xSorter.get(), nullptr);
}
virtual int n_children() const override
@@ -4388,6 +4394,7 @@ public:
virtual void scroll_to_row(int pos) override
{
+ assert(gtk_tree_view_get_model(m_pTreeView) && "don't select when frozen");
disable_notify_events();
GtkTreePath* path = gtk_tree_path_new_from_indices(pos, -1);
gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 0);
@@ -4583,6 +4590,7 @@ public:
virtual void scroll_to_row(const weld::TreeIter& rIter) override
{
+ assert(gtk_tree_view_get_model(m_pTreeView) && "don't select when frozen");
disable_notify_events();
const GtkInstanceTreeIter& rGtkIter = static_cast<const GtkInstanceTreeIter&>(rIter);
GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore);
@@ -6080,8 +6088,8 @@ public:
::comphelper::getProcessComponentContext(),
Application::GetSettings().GetUILanguageTag().getLocale()));
GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(m_pTreeModel);
- gtk_tree_sortable_set_sort_func(pSortable, 0, sort_func, m_xSorter.get(), nullptr);
gtk_tree_sortable_set_sort_column_id(pSortable, 0, GTK_SORT_ASCENDING);
+ gtk_tree_sortable_set_sort_func(pSortable, 0, sort_func, m_xSorter.get(), nullptr);
}
virtual bool has_entry() const override