ui/gtk/list.c

changeset 1181
469929a55765
parent 1179
2f4c73ff962f
equal deleted inserted replaced
1180:9f3b4129631f 1181:469929a55765
1807 UiEvent e; 1807 UiEvent e;
1808 e.obj = event->obj; 1808 e.obj = event->obj;
1809 e.window = event->obj->window; 1809 e.window = event->obj->window;
1810 e.document = event->obj->ctx->document; 1810 e.document = event->obj->ctx->document;
1811 e.eventdata = &selection; 1811 e.eventdata = &selection;
1812 e.eventdatatype = UI_EVENT_DATA_LIST_SELECTION;
1812 e.intval = selection.count > 0 ? selection.rows[0] : -1; 1813 e.intval = selection.count > 0 ? selection.rows[0] : -1;
1813 e.set = ui_get_setop(); 1814 e.set = ui_get_setop();
1814 1815
1815 if(event->activate) { 1816 if(event->activate) {
1816 event->activate(&e, event->activatedata); 1817 event->activate(&e, event->activatedata);
1835 UiEvent e; 1836 UiEvent e;
1836 e.obj = event->obj; 1837 e.obj = event->obj;
1837 e.window = event->obj->window; 1838 e.window = event->obj->window;
1838 e.document = event->obj->ctx->document; 1839 e.document = event->obj->ctx->document;
1839 e.eventdata = &selection; 1840 e.eventdata = &selection;
1841 e.eventdatatype = UI_EVENT_DATA_LIST_SELECTION;
1840 e.intval = selection.count > 0 ? selection.rows[0] : -1; 1842 e.intval = selection.count > 0 ? selection.rows[0] : -1;
1841 e.set = ui_get_setop(); 1843 e.set = ui_get_setop();
1842 if(event->selection) { 1844 if(event->selection) {
1843 event->selection(&e, event->selectiondata); 1845 event->selection(&e, event->selectiondata);
1844 } 1846 }

mercurial