
26 Jul
2013
26 Jul
'13
11:41 a.m.
Hi, I need to get the number of selected objects on the canvas. I was using the following code:
GSList const *items = selection->itemList(); int selObj = g_slist_length (const_cast<GSList*>(items));
the const_cast was required because:
guint http://www.gtk.org/api/2.6/glib/glib-Basic-Types.html#guint g_slist_length http://www.gtk.org/api/2.6/glib/glib-Singly-Linked-Lists.html#g-slist-length (GSList http://www.gtk.org/api/2.6/glib/glib-Singly-Linked-Lists.html#GSList *list);
If I comment out the g_slist_length command, there is no runtime error. And Inkscape run's perfect. In this scenario, what can I do to get the length of the GSList ?
--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614
https://sites.google.com/site/adsingh1729/home