Re: How to customize GtkCellRendererCombo ?
- From: Miroslav Rajcic <support notecasepro com>
- To: Stefan Salewski <mail ssalewski de>, ML-gtk <gtk-list gnome org>
- Subject: Re: How to customize GtkCellRendererCombo ?
- Date: Mon, 07 Dec 2015 07:55:13 +0100
Hi Stefan,
I was not aware of this sample, and it turns out that this sample works
fine.
I rewrote the following function from my sample, and the combo works
fine now:
void on_tree_cell_combo_editing_start(GtkCellRenderer *renderer,
GtkCellEditable *editable, gchar *path, gpointer user_data)
{
if (GTK_IS_COMBO_BOX(editable)) {
GtkComboBox *combo = GTK_COMBO_BOX(editable);
GtkCellView *view = (GtkCellView
*)gtk_bin_get_child(GTK_BIN(editable));
GList *list = gtk_cell_view_get_cell_renderers(view);
while (list){
GtkCellRenderer *renderer1 = (GtkCellRenderer *)list->data;
list = list->next;
gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(combo), renderer1,
TaskStatusComboCellData, NULL, NULL);
}
}
}
It seems that the renderer parameter being passed to this function is
not to be touched.
Thank you very much for your help.
Regards,
Miroslav
On 6.12.2015. 18:19, Stefan Salewski wrote:
On Sun, 2015-12-06 at 15:26 +0100, Miroslav Rajcic wrote:
Hi Stefan,
thank you for the nice idea.
I was not really happy with that fix myself.
You may have seen
http://www.kksou.com/php-gtk2/sample-codes/set-up-combobox-in-treeview-with-colors-Part-1.php
Seems to be a related task, but in php, so I can not really understand it well.
Maybe Emmanuele Bassi can help us tomorrow.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]