|
|
|
@ -7,6 +7,17 @@ void on_subwindow_close(GtkWidget *self)
|
|
|
|
gtk_widget_destroy(gtk_widget_get_toplevel(self));
|
|
|
|
gtk_widget_destroy(gtk_widget_get_toplevel(self));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_resized(GtkWidget *window, GdkEventConfigure *event){
|
|
|
|
|
|
|
|
float time_passed = (float)clock()/(float)CLOCKS_PER_SEC;
|
|
|
|
|
|
|
|
if (time_passed>2){
|
|
|
|
|
|
|
|
int width = gdk_window_get_width(gtk_widget_get_window(videoconfig.pack_box));
|
|
|
|
|
|
|
|
int children_width = 138*g_list_length(gtk_container_get_children(GTK_CONTAINER((GtkWidget*)videoconfig.monitor_output_layers->first->data)));
|
|
|
|
|
|
|
|
if (width<children_width||width>children_width+150)
|
|
|
|
|
|
|
|
yon_monitor_view_draw_all();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_monitor_config_save(GtkWidget *self, monitor_edit_window *window){
|
|
|
|
void on_monitor_config_save(GtkWidget *self, monitor_edit_window *window){
|
|
|
|
monitorconfig *config = yon_dictionary_get_data(window->config,monitorconfig*);
|
|
|
|
monitorconfig *config = yon_dictionary_get_data(window->config,monitorconfig*);
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->templateMonitorConfigurationPortCombo))==0){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->templateMonitorConfigurationPortCombo))==0){
|
|
|
|
@ -741,14 +752,16 @@ void yon_monitor_window_update(monitor_edit_window *window){
|
|
|
|
/**void yon_monitor_view_draw_all(GtkWidget *cnt)
|
|
|
|
/**void yon_monitor_view_draw_all(GtkWidget *cnt)
|
|
|
|
* [EN]
|
|
|
|
* [EN]
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
void yon_monitor_view_draw_all(GtkWidget *cnt){
|
|
|
|
void yon_monitor_view_draw_all(){
|
|
|
|
monitor_view dict=NULL;
|
|
|
|
monitor_view dict=NULL;
|
|
|
|
GtkWidget *container=NULL;
|
|
|
|
GtkWidget *container=NULL;
|
|
|
|
if(!container&&cnt) container=cnt;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(videoconfig.monitor_visuals){
|
|
|
|
if(videoconfig.monitor_visuals){
|
|
|
|
for_dictionaries(dict,videoconfig.monitor_visuals){
|
|
|
|
for_dictionaries(dict,videoconfig.monitor_visuals){
|
|
|
|
monitor_window *window = yon_dictionary_get_data(dict,monitor_window*);
|
|
|
|
monitor_window *window = yon_dictionary_get_data(dict,monitor_window*);
|
|
|
|
if (!container) container = gtk_widget_get_parent(window->templateMonitorscreenOverlay);
|
|
|
|
container = gtk_widget_get_parent(window->templateMonitorscreenOverlay);
|
|
|
|
if(container){
|
|
|
|
if(container){
|
|
|
|
g_object_ref(G_OBJECT(window->templateMonitorscreenOverlay));
|
|
|
|
g_object_ref(G_OBJECT(window->templateMonitorscreenOverlay));
|
|
|
|
gtk_container_remove(GTK_CONTAINER(container),window->templateMonitorscreenOverlay);
|
|
|
|
gtk_container_remove(GTK_CONTAINER(container),window->templateMonitorscreenOverlay);
|
|
|
|
@ -764,44 +777,36 @@ void yon_monitor_view_draw_all(GtkWidget *cnt){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(boxes);
|
|
|
|
free(boxes);
|
|
|
|
videoconfig.monitor_output_layers=NULL;
|
|
|
|
videoconfig.monitor_output_layers=NULL;
|
|
|
|
int overall_width=10;
|
|
|
|
int overall_width=0;
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(videoconfig.monitor_output_layers,"Box",gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0));
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(videoconfig.monitor_output_layers,"Box",gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0));
|
|
|
|
gtk_box_pack_start(GTK_BOX(videoconfig.pack_box),(GtkWidget*)videoconfig.monitor_output_layers->data,0,0,0);
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context((GtkWidget*)videoconfig.monitor_output_layers->data),"primary-toolbar");
|
|
|
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(videoconfig.pack_box),&*(GtkWidget*)videoconfig.monitor_output_layers->data,0,0,0);
|
|
|
|
gtk_widget_show((GtkWidget*)videoconfig.monitor_output_layers->data);
|
|
|
|
gtk_widget_show((GtkWidget*)videoconfig.monitor_output_layers->data);
|
|
|
|
for_dictionaries(dict,videoconfig.monitor_visuals){
|
|
|
|
for_dictionaries(dict,videoconfig.monitor_visuals){
|
|
|
|
monitor_window *window = yon_dictionary_get_data(dict,monitor_window*);
|
|
|
|
monitor_window *window = yon_dictionary_get_data(dict,monitor_window*);
|
|
|
|
if(dict->first==dict) {}
|
|
|
|
if(dict->first==dict) {}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
overall_width+=150;
|
|
|
|
overall_width+=138;
|
|
|
|
gtk_box_pack_start(GTK_BOX(((GtkWidget*)videoconfig.monitor_output_layers->data)),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
GtkWidget *boxpack=(GtkWidget*)videoconfig.monitor_output_layers->data;
|
|
|
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(boxpack),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int width=0;
|
|
|
|
int width=0;
|
|
|
|
GdkWindow *cur_window = gtk_widget_get_window(videoconfig.pack_box);
|
|
|
|
GdkWindow *cur_window = gtk_widget_get_window(videoconfig.pack_box);
|
|
|
|
if(cur_window)
|
|
|
|
if(cur_window)
|
|
|
|
width = gdk_window_get_width(cur_window);
|
|
|
|
width = gdk_window_get_width(cur_window);
|
|
|
|
printf("%d - %d\n",width,overall_width);
|
|
|
|
if (overall_width+138>width){
|
|
|
|
if (overall_width+150>width){
|
|
|
|
overall_width=0;
|
|
|
|
overall_width=10;
|
|
|
|
GtkWidget *boxpack=NULL;
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(videoconfig.monitor_output_layers,"Box",gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0));
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(videoconfig.monitor_output_layers,"Box",(boxpack=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0)));
|
|
|
|
gtk_box_pack_start(GTK_BOX(videoconfig.pack_box),(GtkWidget*)videoconfig.monitor_output_layers->data,0,0,0);
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context((GtkWidget*)videoconfig.monitor_output_layers->data),"primary-toolbar");
|
|
|
|
|
|
|
|
gtk_widget_show((GtkWidget*)videoconfig.monitor_output_layers->data);
|
|
|
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(videoconfig.pack_box),boxpack,0,0,0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_widget_show((GtkWidget*)videoconfig.monitor_output_layers->data);
|
|
|
|
gtk_widget_show((GtkWidget*)videoconfig.monitor_output_layers->data);
|
|
|
|
monitor_window *window = yon_dictionary_get_data(videoconfig.monitor_visuals->first,monitor_window*);
|
|
|
|
monitor_window *window = yon_dictionary_get_data(videoconfig.monitor_visuals->first,monitor_window*);
|
|
|
|
gtk_box_pack_start(GTK_BOX(((GtkWidget*)videoconfig.monitor_output_layers->data)),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
gtk_box_pack_start(GTK_BOX(((GtkWidget*)videoconfig.monitor_output_layers->data)),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (container)
|
|
|
|
|
|
|
|
// for_dictionaries(dict,videoconfig.monitor_visuals){
|
|
|
|
|
|
|
|
// monitor_window *window = yon_dictionary_get_data(dict,monitor_window*);
|
|
|
|
|
|
|
|
// if(dict->first==dict) {}
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
|
|
|
// gtk_box_pack_start(GTK_BOX(container),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// monitor_window *window = yon_dictionary_get_data(videoconfig.monitor_visuals->first,monitor_window*);
|
|
|
|
|
|
|
|
// gtk_box_pack_start(GTK_BOX(container),window->templateMonitorscreenOverlay,0,0,0);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_monitor_view_update();
|
|
|
|
yon_monitor_view_update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1594,6 +1599,7 @@ void yon_setup_widgets(widgets_dict *widgets)
|
|
|
|
widgets->driverDescriptionColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(widgets->builder, "driverDescriptionColumn"));
|
|
|
|
widgets->driverDescriptionColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(widgets->builder, "driverDescriptionColumn"));
|
|
|
|
widgets->driverSupportedColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(widgets->builder, "driverSupportedColumn"));
|
|
|
|
widgets->driverSupportedColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(widgets->builder, "driverSupportedColumn"));
|
|
|
|
videoconfig.pack_box=widgets->mainMonitorVisualConfigurationBox;
|
|
|
|
videoconfig.pack_box=widgets->mainMonitorVisualConfigurationBox;
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MainWindow), "check-resize", G_CALLBACK(on_resized), NULL);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),SETTINGS_VIDEO_TITLE_LABEL);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),SETTINGS_VIDEO_TITLE_LABEL);
|
|
|
|
|
|
|
|
|
|
|
|
videoconfig.list = GTK_LIST_STORE(gtk_builder_get_object(widgets-> builder, "liststore6"));
|
|
|
|
videoconfig.list = GTK_LIST_STORE(gtk_builder_get_object(widgets-> builder, "liststore6"));
|
|
|
|
|