Re: How to draw GtkCellRendererCombo in (inside) a custom cell renderer?

2012-06-06 Thread Vivien Malerba
On 6 June 2012 09:51, Osmo Antero wrote: > Hello, > I wanted to study the GtkCellRendererCombo so I added it directly to the > treeview (as column). > The combobox is initially hidden, only the "text" value is shown. > The combo becomes visible after user clicks or do

Re: How to draw GtkCellRendererCombo in (inside) a custom cell renderer?

2012-06-06 Thread Osmo Antero
Hello, I wanted to study the GtkCellRendererCombo so I added it directly to the treeview (as column). The combobox is initially hidden, only the "text" value is shown. The combo becomes visible after user clicks or double-clicks the column in the row. Unfortunately the click event doe

How to draw GtkCellRendererCombo in (inside) a custom cell renderer?

2012-06-05 Thread Osmo Antero
Hello, I want to create my own cell-renderer for a treeview widget. This custom cell will contain a text string and a combobox with some values. So my custom cell (row) contains both GtkCellRendererText and GtkCellRendererCombo widgets. The cell renderer works well that it displays the text

Problem with GtkCellRendererCombo

2009-04-14 Thread Rudolfo Pinewood
Hello again, I have a problem with GtkCellRendererCombo, for which I did not find a solution yet. I try to use editing-started signal on that renderer to update combobox model based on current selection in my treeview. But it segfaults out when I try to receive the currently selected value

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-19 Thread Murray Cumming
ing type cannot be selected nor the final value > > > extracted when the dialog completes out of the combo as an integer, I have > > > to make the list column a string and insert the appropriate string and > > > decipher the appropriate string at the end as the Combo renderer

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-19 Thread John M Collins
, I have > > to make the list column a string and insert the appropriate string and > > decipher the appropriate string at the end as the Combo renderer is based on > > a text entry so there is no equivalent of _get_active() like I have with > > a "standalone

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-16 Thread Tadej Borovšak
-1 ); > gtk_list_store_append( master, &iter ); > gtk_list_store_set( master, &iter, TYPE_COL, MY_STRUCT_TYPE_INT, > TEXT_COL, "Parameter 1", > TEXT_SENS_COL, FALSE, > I

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-16 Thread John M Collins
TEXT_SENS_COL, FALSE, INT_COL, 5, INT_SENS_COL, TRUE, -1 ); My conclusion was that as the GtkCellRendererCombo was a derivative of the GtkCellRendererText, (and with

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-16 Thread Tadej Borovšak
nd insert the appropriate string and > decipher the appropriate string at the end as the Combo renderer is based on > a text entry so there is no equivalent of _get_active() like I have with > a "standalone" combo box? I don't quite understand what are you trying to say here. But

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-15 Thread John M Collins
Please excuse me asking 3 further questions on this excellent example which does just what I want: 1. Given that this is a dialog which may be popped up and dismissed several times whilst the application runs, do I need to do any g_object_unrefs on any of the list stores or other parts to avoid me

Re: Confusing about memory leak and GtkTreeView, GtkCellRendererCombo & GtkCellRendererSpin

2008-12-11 Thread Yu Feng
; renderer->ref_count = unknown > renderer->is_floating = true > adj->ref_count = 1 > adj->is_floating = -1 > > > the remaining ref_count of adj shouldn't be freed by you. It > will be >

Re: Confusing about memory leak and GtkTreeView, GtkCellRendererCombo & GtkCellRendererSpin

2008-12-11 Thread Keedi Kim
s->dispose of renderer. (that's why that reference > is owned by renderer: who frees, who owns) > > Yu > > On Fri, 2008-12-12 at 14:10 +0900, Keedi Kim wrote: > > HI, :-) > > > > Memory leak and reference counts are very confused. > > I am using GtkTreeView

Re: Confusing about memory leak and GtkTreeView, GtkCellRendererCombo & GtkCellRendererSpin

2008-12-11 Thread Yu Feng
's why that reference is owned by renderer: who frees, who owns) Yu On Fri, 2008-12-12 at 14:10 +0900, Keedi Kim wrote: > HI, :-) > > Memory leak and reference counts are very confused. > I am using GtkTreeView with GtkCellRendererCombo and GtkCellRenderSpin. > So, I use

Confusing about memory leak and GtkTreeView, GtkCellRendererCombo & GtkCellRendererSpin

2008-12-11 Thread Keedi Kim
HI, :-) Memory leak and reference counts are very confused. I am using GtkTreeView with GtkCellRendererCombo and GtkCellRenderSpin. So, I use Adjustment for GtkCellRendererSpin and GtkListStore(or GtkTreeStore) for GtkCellRenderCombo. Some of columns uses same Adj, and TreeModel, so saved them

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-10 Thread John M Collins
Thanks a zillion that's really useful. On Wed, 2008-12-10 at 20:13 +0100, Tadej Borovšak wrote: > Hi. > > I'm afraid that the ideal solution cannot be achieved since you would > need 2 different renderers on the same place. The second proposed > solution can be achieved and it's quite simple to

Re: Question about TreeView particularly GtkCellRendererCombo

2008-12-10 Thread Tadej Borovšak
Hi. I'm afraid that the ideal solution cannot be achieved since you would need 2 different renderers on the same place. The second proposed solution can be achieved and it's quite simple to code. And since the example can say more than a thousand words, I wrote a simple application to demonstrate

Question about TreeView particularly GtkCellRendererCombo

2008-12-10 Thread John M Collins
In my application I am trying to build a dialog box to display and allow the user to create/delete/edit a list of some structures. According to the "type" field in the structures, some variants of the structures use a string as a parameter, others use an integer. (There is a "null" option which do

GtkCellRendererCombo inside GtkTreeView

2007-05-30 Thread Jay Mayers
Hello, I'm searching for an simple example in C of a TreeView with a combobox inside a cell. I've downloaded and study some excellent examples by Tim-Philipp Mueller, but I'm having trouble bridging the gap to create my own Combobox inside a TreeView. The basics steps I've followed are: 1) cre

GtkCellRendererCombo question

2006-07-07 Thread Ludo Van Put
possibly a NULL pointer. Then for the TreeView of ListModelA I create a GtkCellRendererCombo and I use gtk_tree_view_column_set_cell_data_func so I can set the model property of the cell renderer if the model retrieved from ListModelA is not NULL. (LancetSectionSymbolCellRendererSetModel) Then I

Re: GtkCellRendererCombo

2005-09-17 Thread Christian Neumair
to do is pack a column into the treeview along with a > GtkCellRendererCombo and a cell data function. in the cell data > function i create a liststore with a G_TYPE_STRING and a > GDK_TYPE_PIXBUF, fill it with a few rows, and do a > > g_object_set(renderer, "model", GTK_

GtkCellRendererCombo

2005-09-17 Thread Gyözö Both
hello, i can't quite figure out how to use a cell renderer combo. what i'd like to have is a treeview column with cells that contain some text and an icon next to the text. so, what i try to do is pack a column into the treeview along with a GtkCellRendererCombo and a cell data functi