summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-12-10 11:32:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-12-12 13:01:28 +0100
commit6236051a3496278fe2768b40ebf1f4e82a44bb44 (patch)
treee2d83af4598ad8b13e4bda6f269acc4b7554c54f /vcl/unx/gtk3
parent3911bf8364dae4c855ad37237c114f9007f70657 (diff)
weld SwAddStylesDlg
Change-Id: I1dfdf0cea69585991bc0fa8dc38ebdf78abe97bf Reviewed-on: https://gerrit.libreoffice.org/64976 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.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index d48b1883d820..ca4c8e989511 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4899,7 +4899,7 @@ private:
pThis->signal_toggled(path, reinterpret_cast<sal_IntPtr>(pData));
}
- void signal_toggled(const gchar *path, int nIndex)
+ void signal_toggled(const gchar *path, int nCol)
{
GtkTreePath *tree_path = gtk_tree_path_new_from_string(path);
@@ -4908,9 +4908,15 @@ private:
gtk_tree_model_get_iter(pModel, &iter, tree_path);
gboolean bRet(false);
- gtk_tree_model_get(pModel, &iter, nIndex, &bRet, -1);
+ gtk_tree_model_get(pModel, &iter, nCol, &bRet, -1);
bRet = !bRet;
- gtk_tree_store_set(m_pTreeStore, &iter, nIndex, bRet, -1);
+ gtk_tree_store_set(m_pTreeStore, &iter, nCol, bRet, -1);
+
+ if (std::find(m_aRadioIndexes.begin(), m_aRadioIndexes.end(), nCol) != m_aRadioIndexes.end())
+ {
+ int nRow = gtk_tree_path_get_indices(tree_path)[0];
+ signal_radio_toggled(std::make_pair(nRow, nCol));
+ }
gtk_tree_path_free(tree_path);
}
@@ -4988,6 +4994,15 @@ public:
return sRet;
}
+ virtual void set_column_title(int nColumn, const OUString& rTitle) override
+ {
+ GList *pColumns = gtk_tree_view_get_columns(m_pTreeView);
+ GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(pColumns, nColumn));
+ assert(pColumn && "wrong count");
+ gtk_tree_view_column_set_title(pColumn, OUStringToOString(rTitle, RTL_TEXTENCODING_UTF8).getStr());
+ g_list_free(pColumns);
+ }
+
virtual void insert(weld::TreeIter* pParent, int pos, const OUString* pText, const OUString* pId, const OUString* pIconName,
VirtualDevice* pImageSurface, const OUString* pExpanderName, bool bChildrenOnDemand) override
{