|
|
|
@ -766,10 +766,10 @@ void on_monitor_config_save(GtkWidget *, monitor_edit_window *window){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->ResolutionCombo)))
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->ResolutionCombo)))
|
|
|
|
resolution = yon_char_divide_search(yon_char_new(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->ResolutionCombo)))," ",-1);
|
|
|
|
resolution = yon_char_divide_search(yon_char_new(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->ResolutionCombo)))," ",-1);
|
|
|
|
int rot = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationCombo));
|
|
|
|
int rot = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationCombo));
|
|
|
|
rotate = yon_char_append("rotation:",rot == 0?"normal":rot==1?"left":rot==2?"right":"invert");
|
|
|
|
rotate = yon_char_append("rotate:",rot == 0?"normal":rot==1?"left":rot==2?"right":"invert");
|
|
|
|
int pos = gtk_combo_box_get_active(GTK_COMBO_BOX(window->PositionPosCombo));
|
|
|
|
int pos = gtk_combo_box_get_active(GTK_COMBO_BOX(window->PositionPosCombo));
|
|
|
|
if (pos&>k_combo_box_get_active(GTK_COMBO_BOX(window->PositionPortCombo))){
|
|
|
|
if (pos&>k_combo_box_get_active(GTK_COMBO_BOX(window->PositionPortCombo))){
|
|
|
|
position = yon_char_append(pos==1?"lo:":pos==2?"ro:":pos==3?"ab:":"be",gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->PositionPortCombo)));
|
|
|
|
position = yon_char_append(pos==1?"lo:":pos==2?"ro:":pos==3?"ab:":"be:",gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->PositionPortCombo)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// switch_off = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DoNotSwitchOffCheck));
|
|
|
|
// switch_off = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DoNotSwitchOffCheck));
|
|
|
|
modeline_cvt = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ModelineCVTCheck));
|
|
|
|
modeline_cvt = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ModelineCVTCheck));
|
|
|
|
@ -839,7 +839,7 @@ void yon_monitor_parse(monitor_edit_window *window, char *string){
|
|
|
|
} else if (!strcmp(parsed[i],"disable")){
|
|
|
|
} else if (!strcmp(parsed[i],"disable")){
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->EnableCheck),0);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->EnableCheck),0);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (!strcmp(parsed[i],"ignore")){
|
|
|
|
} else if (!strcmp(parsed[i],"cvt")){
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->ModelineCVTCheck),1);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->ModelineCVTCheck),1);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (!strcmp(parsed[i],"primary")){
|
|
|
|
} else if (!strcmp(parsed[i],"primary")){
|
|
|
|
@ -861,22 +861,22 @@ void yon_monitor_parse(monitor_edit_window *window, char *string){
|
|
|
|
yon_gtk_combo_box_text_find(window->PositionPortCombo,parsed[i]);
|
|
|
|
yon_gtk_combo_box_text_find(window->PositionPortCombo,parsed[i]);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PositionPosCombo),3);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PositionPosCombo),3);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (strstr(parsed[i],"bee:")||strstr(parsed[i],"Below:")){
|
|
|
|
} else if (strstr(parsed[i],"be:")||strstr(parsed[i],"Below:")){
|
|
|
|
yon_char_divide_search(parsed[i],":",-1);
|
|
|
|
yon_char_divide_search(parsed[i],":",-1);
|
|
|
|
yon_gtk_combo_box_text_find(window->PositionPortCombo,parsed[i]);
|
|
|
|
yon_gtk_combo_box_text_find(window->PositionPortCombo,parsed[i]);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PositionPosCombo),4);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PositionPosCombo),4);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (strstr(parsed[i],"rotate:")){
|
|
|
|
} else if (strstr(parsed[i],"rotate:")){
|
|
|
|
yon_char_divide_search(parsed[i],":",-1);
|
|
|
|
free(yon_char_divide_search(parsed[i],":",-1));
|
|
|
|
if (strcmp(parsed[i],"normal")){
|
|
|
|
if (!strcmp(parsed[i],"normal")){
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),0);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),0);
|
|
|
|
} else if (strcmp(parsed[i],"left")){
|
|
|
|
} else if (!strcmp(parsed[i],"left")){
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),1);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),1);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (strcmp(parsed[i],"right")){
|
|
|
|
} else if (!strcmp(parsed[i],"right")){
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),2);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),2);
|
|
|
|
|
|
|
|
|
|
|
|
} else if (strcmp(parsed[i],"invert")){
|
|
|
|
} else if (!strcmp(parsed[i],"invert")){
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),3);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationCombo),3);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1022,6 +1022,18 @@ gboolean yon_proprietary_append(struct proprietary_struct *target){
|
|
|
|
gboolean yon_proprietary_append_kernels(struct proprietary_kernel_append_struct *append){
|
|
|
|
gboolean yon_proprietary_append_kernels(struct proprietary_kernel_append_struct *append){
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(append->widgets->KernelsCombo),append->kernel);
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(append->widgets->KernelsCombo),append->kernel);
|
|
|
|
free(append->kernel);
|
|
|
|
free(append->kernel);
|
|
|
|
|
|
|
|
free(append);
|
|
|
|
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gboolean yon_proprietary_disconnect(main_window *widgets){
|
|
|
|
|
|
|
|
g_object_ref(main_config.list);
|
|
|
|
|
|
|
|
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->DriversTree),NULL);
|
|
|
|
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gboolean yon_proprietary_connect(main_window *widgets){
|
|
|
|
|
|
|
|
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->DriversTree),GTK_TREE_MODEL(main_config.list));
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -1034,6 +1046,7 @@ void *yon_proprietary_local_get(main_window *widgets){
|
|
|
|
yon_ubl_status_box_render_thread(KERNELS_SUPPORTED_UNFOUND_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render_thread(KERNELS_SUPPORTED_UNFOUND_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
yon_debug_output("%s\n","Kernel add");
|
|
|
|
for (int i=0;i<kernels_size;i++){
|
|
|
|
for (int i=0;i<kernels_size;i++){
|
|
|
|
yon_char_remove_last_symbol(kernels_installed[i],'\n');
|
|
|
|
yon_char_remove_last_symbol(kernels_installed[i],'\n');
|
|
|
|
struct proprietary_kernel_append_struct *cur = malloc(sizeof(struct proprietary_kernel_append_struct));
|
|
|
|
struct proprietary_kernel_append_struct *cur = malloc(sizeof(struct proprietary_kernel_append_struct));
|
|
|
|
@ -1049,7 +1062,9 @@ void *yon_proprietary_local_get(main_window *widgets){
|
|
|
|
if (rtn[i][strlen(rtn[i])-1]=='\n') rtn[i][strlen(rtn[i])-1] = '\0';
|
|
|
|
if (rtn[i][strlen(rtn[i])-1]=='\n') rtn[i][strlen(rtn[i])-1] = '\0';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_idle_add((GSourceFunc)yon_proprietary_disconnect,widgets);
|
|
|
|
for (int dr_desc=1;dr_desc<size;dr_desc++){
|
|
|
|
for (int dr_desc=1;dr_desc<size;dr_desc++){
|
|
|
|
|
|
|
|
yon_debug_output("%s\n","Driver add");
|
|
|
|
int current_size;
|
|
|
|
int current_size;
|
|
|
|
config_str current = yon_char_parse(rtn[dr_desc],¤t_size,";");
|
|
|
|
config_str current = yon_char_parse(rtn[dr_desc],¤t_size,";");
|
|
|
|
if ((!strcmp(current[0],"")||yon_char_parsed_check_exist(kernels_installed,kernels_size,current[0])>-1)){
|
|
|
|
if ((!strcmp(current[0],"")||yon_char_parsed_check_exist(kernels_installed,kernels_size,current[0])>-1)){
|
|
|
|
@ -1064,7 +1079,9 @@ void *yon_proprietary_local_get(main_window *widgets){
|
|
|
|
g_idle_add((GSourceFunc)yon_proprietary_append,cur);
|
|
|
|
g_idle_add((GSourceFunc)yon_proprietary_append,cur);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_debug_output("%s\n","Driver end");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
g_idle_add((GSourceFunc)yon_proprietary_connect,widgets);
|
|
|
|
char *status_text = yon_char_unite(yon_char_get_localised_from_lib(SUCCESS_LABEL),". ", !getuid()? main_config.load_mode==1?yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL):yon_char_get_localised_from_lib(GLOBAL_LOAD_SUCCESS_LABEL):yon_char_get_localised_from_lib(ROOT_WARNING_LABEL),NULL);
|
|
|
|
char *status_text = yon_char_unite(yon_char_get_localised_from_lib(SUCCESS_LABEL),". ", !getuid()? main_config.load_mode==1?yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL):yon_char_get_localised_from_lib(GLOBAL_LOAD_SUCCESS_LABEL):yon_char_get_localised_from_lib(ROOT_WARNING_LABEL),NULL);
|
|
|
|
yon_ubl_status_box_render_thread(status_text,!getuid()?BACKGROUND_IMAGE_SUCCESS_TYPE:BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
yon_ubl_status_box_render_thread(status_text,!getuid()?BACKGROUND_IMAGE_SUCCESS_TYPE:BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
free(status_text);
|
|
|
|
free(status_text);
|
|
|
|
|