|
|
|
|
@ -425,18 +425,6 @@ void yon_update_config(widgets_dict *widgets)
|
|
|
|
|
|
|
|
|
|
void on_configuration_load_local(GtkWidget *self, widgets_dict *widgets)
|
|
|
|
|
{
|
|
|
|
|
// videoconfig.status_render.text_to_render=LOCAL_LOAD_SUCCESS;
|
|
|
|
|
// videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE;
|
|
|
|
|
// yon_ubl_status_box_render(&videoconfig.status_render);
|
|
|
|
|
// char *command = load_drivers_local_command;
|
|
|
|
|
// dictionary *dct;
|
|
|
|
|
// for(int i=0;i<videoconfig.portssize;i++)
|
|
|
|
|
// {
|
|
|
|
|
// command = yon_char_unite(command," ",XORG_MONITOR(videoconfig.ports[i]),NULL);
|
|
|
|
|
// }
|
|
|
|
|
// int size = 0;
|
|
|
|
|
// char **rtn = yon_ubl_load_global_config(command, &size);
|
|
|
|
|
// char *param = NULL;
|
|
|
|
|
yon_setup_config(load_drivers_local_command);
|
|
|
|
|
on_config_fill_interface(widgets);
|
|
|
|
|
yon_monitor_view_setup(widgets->mainMonitorVisualConfigurationBox);
|
|
|
|
|
@ -486,22 +474,6 @@ void on_monitor_add(GtkWidget *self,monitor_window *window){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// void on_monitor_string_edit(GtkWidget *self,monitor_edit_window *monitor){
|
|
|
|
|
// int size=0;
|
|
|
|
|
// config_str rtn = yon_char_parse((char*)gtk_entry_get_text(GTK_ENTRY(monitor->templateMonitorConfigurationParameterLineEntry)),&size,",");
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"enable")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationEnableCheck));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationResolutionCombo));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationFrequencyCombo));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"rotate")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationRotationCombo));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationPositionPosCombo));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_COMBO_BOX_TEXT(monitor->templateMonitorConfigurationPositionPortCombo));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationDoNotSwitchOffCheck));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationModelineCVTCheck));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationUseCVTReducedCheck));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationModelineGTFCheck));
|
|
|
|
|
// if (yon_char_parsed_check_exist(rtn,size,"")!=-1) GTK_CHECK_BUTTON(monitor->templateMonitorConfigurationMainCheck));
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
void on_monitor_configure(GtkWidget *self,monitor_window *window){
|
|
|
|
|
if(window&&window->config){
|
|
|
|
|
monitor_edit_window *monitors = new(monitor_edit_window);
|
|
|
|
|
@ -621,7 +593,10 @@ void yon_monitor_window_update(monitor_edit_window *window){
|
|
|
|
|
found=0;
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->templateMonitorConfigurationPortCombo),found);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->templateMonitorConfigurationResolutionCombo),found);
|
|
|
|
|
|
|
|
|
|
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo));
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),PARAMETER_DEFAULT_LABEL);
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),"60");
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->templateMonitorConfigurationFrequencyCombo),"75");
|
|
|
|
|
found = yon_gtk_combo_box_text_find(window->templateMonitorConfigurationPositionPortCombo, yon_dictionary_get_data(window->config,monitorconfig*)->position_port);
|
|
|
|
|
if (found==-1)
|
|
|
|
|
found=0;
|
|
|
|
|
@ -1573,29 +1548,34 @@ int main(int argc, char *argv[])
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
|
|
|
|
|
|
GError error;
|
|
|
|
|
yon_setup_config(load_drivers_local_command);
|
|
|
|
|
widgets_dict widgets;
|
|
|
|
|
yon_setup_widgets(&widgets);
|
|
|
|
|
yon_gtk_list_store_fill_with_proprietaries(videoconfig.list);
|
|
|
|
|
// yon_gtk_list_store_fill_with_proprietaries(videoconfig.modulelist);
|
|
|
|
|
gtk_widget_show(widgets.MainWindow);
|
|
|
|
|
// yon_fill_ui(&widgets);
|
|
|
|
|
videoconfig.status_render.text_to_render=LOCAL_LOAD_SUCCESS;
|
|
|
|
|
videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE;
|
|
|
|
|
yon_ubl_status_box_render(&videoconfig.status_render);
|
|
|
|
|
on_config_fill_interface(&widgets);
|
|
|
|
|
yon_monitor_set_resolutions();
|
|
|
|
|
yon_adapter_window_setup(&widgets);
|
|
|
|
|
GtkCssProvider *css = gtk_css_provider_new();
|
|
|
|
|
gtk_css_provider_load_from_path(css, CssPath, NULL);
|
|
|
|
|
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
|
|
|
|
|
GTK_STYLE_PROVIDER(css),
|
|
|
|
|
-1);
|
|
|
|
|
yon_monitor_view_update();
|
|
|
|
|
yon_ubl_setup_sockets(widgets.PlugBox,widgets.PlugLoadBox,widgets.PlugSaveBox,videoconfig.socket_id,videoconfig.load_socket_id,videoconfig.save_socket_id);
|
|
|
|
|
gtk_main();
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (getuid()!=0){
|
|
|
|
|
system("/usr/bin/pkexec /usr/bin/ubl-settings-video");
|
|
|
|
|
exit(0);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
|
GError error;
|
|
|
|
|
yon_setup_config(load_drivers_local_command);
|
|
|
|
|
widgets_dict widgets;
|
|
|
|
|
yon_setup_widgets(&widgets);
|
|
|
|
|
yon_gtk_list_store_fill_with_proprietaries(videoconfig.list);
|
|
|
|
|
// yon_gtk_list_store_fill_with_proprietaries(videoconfig.modulelist);
|
|
|
|
|
gtk_widget_show(widgets.MainWindow);
|
|
|
|
|
// yon_fill_ui(&widgets);
|
|
|
|
|
videoconfig.status_render.text_to_render=LOCAL_LOAD_SUCCESS;
|
|
|
|
|
videoconfig.status_render.type=BACKGROUND_IMAGE_SUCCESS_TYPE;
|
|
|
|
|
yon_ubl_status_box_render(&videoconfig.status_render);
|
|
|
|
|
on_config_fill_interface(&widgets);
|
|
|
|
|
yon_monitor_set_resolutions();
|
|
|
|
|
yon_adapter_window_setup(&widgets);
|
|
|
|
|
GtkCssProvider *css = gtk_css_provider_new();
|
|
|
|
|
gtk_css_provider_load_from_path(css, CssPath, NULL);
|
|
|
|
|
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
|
|
|
|
|
GTK_STYLE_PROVIDER(css),
|
|
|
|
|
-1);
|
|
|
|
|
yon_monitor_view_update();
|
|
|
|
|
yon_ubl_setup_sockets(widgets.PlugBox,widgets.PlugLoadBox,widgets.PlugSaveBox,videoconfig.socket_id,videoconfig.load_socket_id,videoconfig.save_socket_id);
|
|
|
|
|
gtk_main();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|