ui/gtk/tree.c

changeset 69
419c8c3209e8
parent 59
eb6611be50c7
child 75
efe2f65bea17
equal deleted inserted replaced
68:bd9fb6476b80 69:419c8c3209e8
242 e.document = event->obj->ctx->document; 242 e.document = event->obj->ctx->document;
243 e.eventdata = selection; 243 e.eventdata = selection;
244 e.intval = selection->count > 0 ? selection->rows[0] : -1; 244 e.intval = selection->count > 0 ? selection->rows[0] : -1;
245 event->activate(&e, event->userdata); 245 event->activate(&e, event->userdata);
246 246
247 if(selection->count > 0) {
248 free(selection->rows);
249 }
247 free(selection); 250 free(selection);
248 } 251 }
249 252
250 void ui_listview_selection_event( 253 void ui_listview_selection_event(
251 GtkTreeSelection *treeselection, 254 GtkTreeSelection *treeselection,
259 e.document = event->obj->ctx->document; 262 e.document = event->obj->ctx->document;
260 e.eventdata = selection; 263 e.eventdata = selection;
261 e.intval = selection->count > 0 ? selection->rows[0] : -1; 264 e.intval = selection->count > 0 ? selection->rows[0] : -1;
262 event->selection(&e, event->userdata); 265 event->selection(&e, event->userdata);
263 266
267 if(selection->count > 0) {
268 free(selection->rows);
269 }
264 free(selection); 270 free(selection);
265 } 271 }
266 272
267 UiListSelection* ui_listview_selection( 273 UiListSelection* ui_listview_selection(
268 GtkTreeSelection *selection, 274 GtkTreeSelection *selection,

mercurial