client/uiclient.c

changeset 982
9102a53c5385
parent 976
e2763e880938
child 983
1d7d24147961
equal deleted inserted replaced
981:1d47e71f26b6 982:9102a53c5385
173 } 173 }
174 return client_get_mapped_obj(obj_id->value.string); 174 return client_get_mapped_obj(obj_id->value.string);
175 } 175 }
176 176
177 int msg_simple_window(UiObject *parent, const CxJsonValue *value) { 177 int msg_simple_window(UiObject *parent, const CxJsonValue *value) {
178 cxmutstr obj_id = jsonobj_getstring(value, "obj_id");
178 cxmutstr id = jsonobj_getstring(value, "id"); 179 cxmutstr id = jsonobj_getstring(value, "id");
179 cxmutstr title = jsonobj_getstring(value, "title"); 180 cxmutstr title = jsonobj_getstring(value, "title");
180 181
181 if(!id.ptr) { 182 if(!obj_id.ptr) {
183 return 1;
184 }
185 if(!id) {
182 return 1; 186 return 1;
183 } 187 }
184 188
185 UiObject *obj = ui_simple_window(title.ptr, NULL); 189 UiObject *obj = ui_simple_window(title.ptr, NULL);
186 client_add_obj_mapping(obj, id); 190 client_add_obj_mapping(obj, obj_id);
191
192 if(obj->widget) {
193 client_reg_widget(obj, id, obj->widget);
194 }
187 195
188 return client_handle_children(obj, value); 196 return client_handle_children(obj, value);
189 } 197 }
190 198
191 int msg_show(UiObject *parent, const CxJsonValue *value) { 199 int msg_show(UiObject *parent, const CxJsonValue *value) {

mercurial