| 43 #include "toolbar.h" |
43 #include "toolbar.h" |
| 44 #include "container.h" |
44 #include "container.h" |
| 45 #include "headerbar.h" |
45 #include "headerbar.h" |
| 46 #include "button.h" |
46 #include "button.h" |
| 47 #include "window.h" |
47 #include "window.h" |
| |
48 #include "widget.h" |
| 48 |
49 |
| 49 static int nwindows = 0; |
50 static int nwindows = 0; |
| 50 |
51 |
| 51 static int window_default_width = 650; |
52 static int window_default_width = 650; |
| 52 static int window_default_height = 550; |
53 static int window_default_height = 550; |
| 479 splitview_window_use_prop = enable; |
480 splitview_window_use_prop = enable; |
| 480 } |
481 } |
| 481 |
482 |
| 482 UIEXPORT void ui_splitview_window_set_visible(UiObject *obj, int pane, UiBool visible) { |
483 UIEXPORT void ui_splitview_window_set_visible(UiObject *obj, int pane, UiBool visible) { |
| 483 GtkWidget *panel = NULL; |
484 GtkWidget *panel = NULL; |
| |
485 CxList *backup_items = NULL; |
| 484 if(pane == 0) { |
486 if(pane == 0) { |
| 485 panel = g_object_get_data(G_OBJECT(obj->widget), "ui_left_panel_top"); |
487 panel = g_object_get_data(G_OBJECT(obj->widget), "ui_left_panel_top"); |
| |
488 backup_items = g_object_get_data(G_OBJECT(obj->widget), "ui_toolbar_center_backup"); |
| 486 } else if(pane == 1) { |
489 } else if(pane == 1) { |
| 487 panel = g_object_get_data(G_OBJECT(obj->widget), "ui_right_panel_top"); |
490 panel = g_object_get_data(G_OBJECT(obj->widget), "ui_right_panel_top"); |
| |
491 // TODO: backup toolbar items |
| 488 } |
492 } |
| 489 |
493 |
| 490 if(panel == NULL) { |
494 if(panel == NULL) { |
| 491 fprintf(stderr, "Error: obj is not a splitview window or invalid pane %d specified\n", pane); |
495 fprintf(stderr, "Error: obj is not a splitview window or invalid pane %d specified\n", pane); |
| 492 return; |
496 return; |
| 493 } |
497 } |
| 494 |
498 |
| 495 gtk_widget_set_visible(panel, visible); |
499 gtk_widget_set_visible(panel, visible); |
| |
500 |
| |
501 if(backup_items) { |
| |
502 CxIterator i = cxListIterator(backup_items); |
| |
503 cx_foreach(GtkWidget*, w, i) { |
| |
504 ui_set_visible(w, !visible); |
| |
505 } |
| |
506 } |
| 496 } |
507 } |
| 497 |
508 |
| 498 #ifdef UI_LIBADWAITA |
509 #ifdef UI_LIBADWAITA |
| 499 |
510 |
| 500 static void dialog_response(AdwAlertDialog *self, gchar *response, UiEventData *data) { |
511 static void dialog_response(AdwAlertDialog *self, gchar *response, UiEventData *data) { |