|
|
|
@ -541,13 +541,24 @@ void on_confugure_monitor_settings(GtkWidget *self, MonitorSettings *settings)
|
|
|
|
monitors->templateMonitorConfigurationFrequencyCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationFrequencyCombo"));
|
|
|
|
monitors->templateMonitorConfigurationFrequencyCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationFrequencyCombo"));
|
|
|
|
monitors->templateMonitorConfigurationRotationCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationRotationCombo"));
|
|
|
|
monitors->templateMonitorConfigurationRotationCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationRotationCombo"));
|
|
|
|
monitors->templateMonitorConfigurationRotationLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationRotationLabel"));
|
|
|
|
monitors->templateMonitorConfigurationRotationLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationRotationLabel"));
|
|
|
|
monitors->templateMonitorConfigurationMainRadio = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationMainRadio"));
|
|
|
|
monitors->templateMonitorConfigurationMainRadio = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationMainCheck"));
|
|
|
|
monitors->templateMonitorConfigurationParameterLineCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationParameterLineCheck"));
|
|
|
|
monitors->templateMonitorConfigurationParameterLineCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationParameterLineCheck"));
|
|
|
|
monitors->templateMonitorConfigurationParameterLineEntry = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationParameterLineEntry"));
|
|
|
|
monitors->templateMonitorConfigurationParameterLineEntry = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationParameterLineEntry"));
|
|
|
|
monitors->templateMonitorConfigurationDoNotSwitchOffLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationDoNotSwitchOffLabel"));
|
|
|
|
// monitors->templateMonitorConfigurationDoNotSwitchOffLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationDoNotSwitchOffLabel"));
|
|
|
|
monitors->templateMonitorConfigurationDoNotSwitchOffCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationDoNotSwitchOffCheck"));
|
|
|
|
monitors->templateMonitorConfigurationDoNotSwitchOffCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationDoNotSwitchOffCheck"));
|
|
|
|
monitors->templateMonitorConfigurationCancelButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationCancelButton"));
|
|
|
|
monitors->templateMonitorConfigurationCancelButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationCancelButton"));
|
|
|
|
monitors->templateMonitorConfigurationSaveButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationSaveButton"));
|
|
|
|
monitors->templateMonitorConfigurationSaveButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationSaveButton"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationEnableCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationEnableCheck"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationPortLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationPortLabel"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationPortCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationPortCombo"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationShowUnsupportedCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationShowUnsupportedCheck"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationPositionLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationPositionLabel"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationPositionPosCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationPositionPosCombo"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationPositionPortCombo = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationPositionPortCombo"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationModelineCVTCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationModelineCVTCheck"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationUseCVTReducedCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationUseCVTReducedCheck"));
|
|
|
|
|
|
|
|
monitors->templateMonitorConfigurationModelineGTFCheck = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorConfigurationModelineGTFCheck"));
|
|
|
|
monitors->curconfig=settings->curconfig;
|
|
|
|
monitors->curconfig=settings->curconfig;
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationParameterLineCheck), "toggled", G_CALLBACK(on_sensitive_change_reversed), monitors->templateMonitorConfigurationBox);
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationParameterLineCheck), "toggled", G_CALLBACK(on_sensitive_change_reversed), monitors->templateMonitorConfigurationBox);
|
|
|
|
@ -556,7 +567,16 @@ void on_confugure_monitor_settings(GtkWidget *self, MonitorSettings *settings)
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationCancelButton), "clicked", G_CALLBACK(on_closed_configuration), monitors);
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationCancelButton), "clicked", G_CALLBACK(on_closed_configuration), monitors);
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationSaveButton), "clicked", G_CALLBACK(on_save_window_configuration), monitors);
|
|
|
|
g_signal_connect(G_OBJECT(monitors->templateMonitorConfigurationSaveButton), "clicked", G_CALLBACK(on_save_window_configuration), monitors);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
videoconfig.ports = yon_config_load(get_ports_command,&videoconfig.portssize);
|
|
|
|
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationMonitorLabel), _("Monitor: "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationMonitorLabel), _("Monitor: "));
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationPortLabel), _("Port: "));
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationPositionLabel), _("Position: "));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(monitors->templateMonitorConfigurationShowUnsupportedCheck), _("Show unsupported: "));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(monitors->templateMonitorConfigurationEnableCheck), _("Enabled"));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(monitors->templateMonitorConfigurationModelineCVTCheck), _("Create modeline for current resolution with CVT"));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(monitors->templateMonitorConfigurationUseCVTReducedCheck), _("Use \"CVT Reduced Blanking\" "));
|
|
|
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(monitors->templateMonitorConfigurationModelineGTFCheck), _("Create modeline for current resolution with GTF"));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationResolutionLabel), _("Resolution (px): "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationResolutionLabel), _("Resolution (px): "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationFrequencyLabel), _("Frequency (Hz): "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationFrequencyLabel), _("Frequency (Hz): "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationRotationLabel), _("Rotation: "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors->templateMonitorConfigurationRotationLabel), _("Rotation: "));
|
|
|
|
@ -612,8 +632,11 @@ MonitorSettings *yon_setup_monitor_settings()
|
|
|
|
monitors[i].templateMonitorscreenOverlay = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorscreenOverlay"));
|
|
|
|
monitors[i].templateMonitorscreenOverlay = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorscreenOverlay"));
|
|
|
|
monitors[i].templateMonitorInfoBox = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoBox"));
|
|
|
|
monitors[i].templateMonitorInfoBox = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoBox"));
|
|
|
|
monitors[i].templateMonitorInfoNameLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoNameLabel"));
|
|
|
|
monitors[i].templateMonitorInfoNameLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoNameLabel"));
|
|
|
|
|
|
|
|
monitors[i].templateMonitorImage = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorImage"));
|
|
|
|
monitors[i].templateMonitorInfoResolutionLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoResolutionLabel"));
|
|
|
|
monitors[i].templateMonitorInfoResolutionLabel = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoResolutionLabel"));
|
|
|
|
monitors[i].templateMonitorInfoConfigureButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoConfigureButton"));
|
|
|
|
monitors[i].templateMonitorInfoConfigureButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorInfoConfigureButton"));
|
|
|
|
|
|
|
|
monitors[i].templateMonitorDeleteButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorDeleteButton"));
|
|
|
|
|
|
|
|
monitors[i].templateMonitorSwitchButton = GTK_WIDGET(gtk_builder_get_object(builder, "templateMonitorSwitchButton"));
|
|
|
|
monitors[i].curconfig = yon_dictionary_get_nth(videoconfig.monitors, i);
|
|
|
|
monitors[i].curconfig = yon_dictionary_get_nth(videoconfig.monitors, i);
|
|
|
|
printf("%d\n", i);
|
|
|
|
printf("%d\n", i);
|
|
|
|
if (yon_dictionary_get_data(monitors[i].curconfig,monitorconfig*)->main==0)
|
|
|
|
if (yon_dictionary_get_data(monitors[i].curconfig,monitorconfig*)->main==0)
|
|
|
|
@ -621,11 +644,15 @@ MonitorSettings *yon_setup_monitor_settings()
|
|
|
|
if (yon_dictionary_get_data(monitors[i].curconfig,monitorconfig*)->main==1)
|
|
|
|
if (yon_dictionary_get_data(monitors[i].curconfig,monitorconfig*)->main==1)
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors[i].templateMonitorInfoNameLabel), yon_char_get_augumented("Monitor ", yon_char_get_augumented(((monitorconfig *)monitors[i].curconfig->data)->port,"*")));
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors[i].templateMonitorInfoNameLabel), yon_char_get_augumented("Monitor ", yon_char_get_augumented(((monitorconfig *)monitors[i].curconfig->data)->port,"*")));
|
|
|
|
char *res = yon_char_get_augumented(((monitorconfig *)monitors[i].curconfig->data)->resolution, "");
|
|
|
|
char *res = yon_char_get_augumented(((monitorconfig *)monitors[i].curconfig->data)->resolution, "");
|
|
|
|
|
|
|
|
if (yon_dictionary_get_data(monitors[i].curconfig,monitorconfig*)->enable==1)
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(monitors[i].templateMonitorImage,1);
|
|
|
|
if (!res)
|
|
|
|
if (!res)
|
|
|
|
res = _("Default settings");
|
|
|
|
res = _("Default settings");
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors[i].templateMonitorInfoResolutionLabel), res);
|
|
|
|
gtk_label_set_text(GTK_LABEL(monitors[i].templateMonitorInfoResolutionLabel), res);
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(monitors[i].templateMonitorscreenOverlay), monitors[i].templateMonitorInfoBox);
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(monitors[i].templateMonitorscreenOverlay), monitors[i].templateMonitorInfoBox);
|
|
|
|
g_signal_connect(G_OBJECT(monitors[i].templateMonitorInfoConfigureButton), "clicked", G_CALLBACK(on_confugure_monitor_settings), &monitors[i]);
|
|
|
|
g_signal_connect(G_OBJECT(monitors[i].templateMonitorInfoConfigureButton), "clicked", G_CALLBACK(on_confugure_monitor_settings), &monitors[i]);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(monitors[i].templateMonitorDeleteButton), "clicked", G_CALLBACK(on_confugure_monitor_settings), &monitors[i]);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(monitors[i].templateMonitorSwitchButton), "clicked", G_CALLBACK(on_confugure_monitor_settings), &monitors[i]);
|
|
|
|
if (i==0)
|
|
|
|
if (i==0)
|
|
|
|
videoconfig.videoconfig = yon_dictionary_create_with_data(((monitorconfig *)monitors[i].curconfig->data)->port,&monitors[i]);
|
|
|
|
videoconfig.videoconfig = yon_dictionary_create_with_data(((monitorconfig *)monitors[i].curconfig->data)->port,&monitors[i]);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|