| 243 entry_data); |
243 entry_data); |
| 244 |
244 |
| 245 GtkEventController *focus_controller = gtk_event_controller_focus_new(); |
245 GtkEventController *focus_controller = gtk_event_controller_focus_new(); |
| 246 g_signal_connect(focus_controller, "leave", G_CALLBACK(cell_entry_leave_focus), entry_data); |
246 g_signal_connect(focus_controller, "leave", G_CALLBACK(cell_entry_leave_focus), entry_data); |
| 247 gtk_widget_add_controller(textfield, focus_controller); |
247 gtk_widget_add_controller(textfield, focus_controller); |
| 248 } else { |
248 } else if(type == UI_BOOL_EDITABLE) { |
| |
249 GtkWidget *checkbox = gtk_check_button_new(); |
| |
250 gtk_list_item_set_child(item, checkbox); |
| |
251 }else { |
| 249 GtkWidget *label = gtk_label_new(NULL); |
252 GtkWidget *label = gtk_label_new(NULL); |
| 250 gtk_label_set_xalign(GTK_LABEL(label), 0); |
253 gtk_label_set_xalign(GTK_LABEL(label), 0); |
| 251 gtk_list_item_set_child(item, label); |
254 gtk_list_item_set_child(item, label); |
| 252 } |
255 } |
| 253 } |
256 } |
| 386 entry->row = obj->i; |
389 entry->row = obj->i; |
| 387 entry->col = col->data_column; |
390 entry->col = col->data_column; |
| 388 entry->previous_value = strdup(data); |
391 entry->previous_value = strdup(data); |
| 389 } |
392 } |
| 390 ENTRY_SET_TEXT(child, data); |
393 ENTRY_SET_TEXT(child, data); |
| |
394 break; |
| |
395 } |
| |
396 case UI_BOOL_EDITABLE: { |
| |
397 intptr_t i = (intptr_t)data; |
| |
398 gtk_check_button_set_active(GTK_CHECK_BUTTON(child), (gboolean)i); |
| 391 break; |
399 break; |
| 392 } |
400 } |
| 393 } |
401 } |
| 394 |
402 |
| 395 if(attributes != listview->current_row_attributes) { |
403 if(attributes != listview->current_row_attributes) { |