diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-08 09:06:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-11 15:37:05 +0100 |
commit | 3a42ee3284df7020ef111293a4d11148c1bf3a50 (patch) | |
tree | d12e7c85bb5e58c0ede3a500d56856e24a9ade0a /vcl | |
parent | 231c06c5c2320c0465df0cbeab4c754937a05a9b (diff) |
weld SvxConfigDialog
Change-Id: Ia6983fd658521cf8704ca1ed95ecff6590ddde09
Reviewed-on: https://gerrit.libreoffice.org/68906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 30 |
2 files changed, 38 insertions, 4 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 572ed4aa3694..815be92d1241 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -610,6 +610,17 @@ public: virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) override; + virtual OUString strip_mnemonic(const OUString &rLabel) const override + { + return rLabel.replaceFirst("~", ""); + } + + virtual VclPtr<VirtualDevice> create_virtual_device() const override + { + // create with (annoying) seperate alpha layer that LibreOffice itself uses + return VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); + } + SystemWindow* getSystemWindow() { return m_xWidget->GetSystemWindow(); @@ -2846,6 +2857,7 @@ public: virtual void expand_row(const weld::TreeIter& rIter) override { + assert(m_xTreeView->IsUpdateMode() && "don't expand when frozen"); const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter); if (!m_xTreeView->IsExpanded(rVclIter.iter) && signal_expanding(rIter)) m_xTreeView->Expand(rVclIter.iter); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 3e17f6e09b27..51deeb6064f0 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1859,6 +1859,19 @@ public: } virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) override; + + virtual OUString strip_mnemonic(const OUString &rLabel) const override + { + return rLabel.replaceFirst("_", ""); + } + + virtual VclPtr<VirtualDevice> create_virtual_device() const override + { + // create with no seperate alpha layer like everything sane does + auto xRet = VclPtr<VirtualDevice>::Create(); + xRet->SetBackground(COL_TRANSPARENT); + return xRet; + } }; namespace @@ -5548,6 +5561,7 @@ private: bool signal_test_expand_row(GtkTreeIter& iter) { + disable_notify_events(); GtkInstanceTreeIter aIter(nullptr); // if there's a preexisting placeholder child, required to make this @@ -5576,6 +5590,7 @@ private: insert_row(subiter, &iter, -1, nullptr, &sDummy, nullptr, nullptr, nullptr); } + enable_notify_events(); return bRet; } @@ -5642,7 +5657,7 @@ private: return m_aModelColToViewCol[modelcol]; } - static void signalRowDeleted(GtkTreeModel*, GtkTreePath*, GtkTreeIter*, gpointer widget) + static void signalRowDeleted(GtkTreeModel*, GtkTreePath*, gpointer widget) { GtkInstanceTreeView* pThis = static_cast<GtkInstanceTreeView*>(widget); pThis->signal_model_changed(); @@ -5855,7 +5870,8 @@ public: m_xSorter.reset(new comphelper::string::NaturalStringSorter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetUILanguageTag().getLocale())); - set_sort_order(true); + GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(m_pTreeStore); + gtk_tree_sortable_set_sort_column_id(pSortable, m_nTextCol, GTK_SORT_ASCENDING); } virtual void set_sort_order(bool bAscending) override @@ -6084,8 +6100,11 @@ public: virtual void set_sensitive(int pos, bool bSensitive, int col) override { - col = get_model_col(col); - ++col; // skip over id column + if (col == -1) + col = m_nTextCol; + else + col = get_model_col(col); + col += m_nIdCol + 1; // skip over id column col += m_aToggleVisMap.size(); // skip over toggle columns set(pos, col, bSensitive); } @@ -6349,12 +6368,15 @@ public: virtual void expand_row(const weld::TreeIter& rIter) override { + assert(gtk_tree_view_get_model(m_pTreeView) && "don't expand when frozen"); + const GtkInstanceTreeIter& rGtkIter = static_cast<const GtkInstanceTreeIter&>(rIter); GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore); GtkTreePath* path = gtk_tree_model_get_path(pModel, const_cast<GtkTreeIter*>(&rGtkIter.iter)); if (!gtk_tree_view_row_expanded(m_pTreeView, path)) gtk_tree_view_expand_to_path(m_pTreeView, path); gtk_tree_path_free(path); + } virtual void collapse_row(const weld::TreeIter& rIter) override |