[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Please test new grids for GTK PCB



Hi!

On Thu, 03 Mar 2011 15:39:22 +0100, Krzysztof KoÅciuszkiewicz wrote:

> I was asking why in the model you keep strings and not ints/floats?

I don't know if i can directly place user-editable numeric values into 
treeview, instead of strings, it's possible? This is due to absence of 
examples: all treeview's C code samples found (with user-editing) are 
text/string. But also it's due to probably in future, user input can be 
in form '50 mil' or '2e3 mkm', i don't know useful it or no, but 
currently it can be easy added.

> custom implementation of GtkTreeModel ...

It can work only in my dreams, because currently i even don't know how to 
write gtk callback procedure header...:(
Example:
I need to write "Set by Mark Distance" button press procedure (as you 
see, currently tied to dummy write (and it work well :D ) )
I copypaste your new cb_edited_mm_or_mil proc, because *it has access to 
treeview items* and contains all i need; only small modifications need.
I don't touch the header because i don't know how to rewrite it correctly:
/(GtkCellRendererText *cell,
                          gchar *path,
                          gchar *text,
                          GtkTreeView *treeview)/
but it tied not here
/  g_signal_connect(renderer, "edited", (GCallback) cb_edited_mm_or_mil, 
treeview);/
but i place it here :
/  ghid_button_connected (hbox_btn_grids, NULL, FALSE, FALSE, FALSE, 4, 
      cb_grid_setbymarkdistance, NULL, _("Set by Mark Distance"),  ....../
and it of course not work: program crashes silently, no any debug info, 
no way to read anything or things how to rewrite the header, no suitable 
examples... compiles without warnings.

> Each signal handler has its required signature. This can be found in
the GTK docs.

Is there any success-story about it or example using docs IRL ?

Thanks! :)





_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user