ui/gtk/model.c

changeset 164
1d912f78fd1d
parent 152
62921b370c60
child 253
087cc9216f28
equal deleted inserted replaced
163:b70e2a77dea0 164:1d912f78fd1d
134 instance->stamp = g_random_int(); 134 instance->stamp = g_random_int();
135 } 135 }
136 136
137 static GType ui_gtk_type(UiModelType type) { 137 static GType ui_gtk_type(UiModelType type) {
138 switch(type) { 138 switch(type) {
139 default: break;
139 case UI_STRING: return G_TYPE_STRING; 140 case UI_STRING: return G_TYPE_STRING;
140 case UI_INTEGER: return G_TYPE_INT; 141 case UI_INTEGER: return G_TYPE_INT;
141 } 142 }
142 return G_TYPE_INVALID; 143 return G_TYPE_INVALID;
143 } 144 }
144 145
145 static void ui_model_set_value(GType type, void *data, GValue *value) { 146 static void ui_model_set_value(GType type, void *data, GValue *value) {
146 switch(type) { 147 switch(type) {
148 default: break;
147 case G_TYPE_OBJECT: { 149 case G_TYPE_OBJECT: {
148 value->g_type = G_TYPE_OBJECT; 150 value->g_type = G_TYPE_OBJECT;
149 g_value_set_object(value, data); 151 g_value_set_object(value, data);
150 return; 152 return;
151 } 153 }

mercurial