Resolutions file fix

pull/110/head
parent 387c58e48f
commit 6f465e0aee
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -11,5 +11,6 @@
</gresource> </gresource>
<gresource prefix="/com/ublinux/csv"> <gresource prefix="/com/ublinux/csv">
<file>video-drivers.csv</file> <file>video-drivers.csv</file>
<file>resolutions.csv</file>
</gresource> </gresource>
</gresources> </gresources>

@ -1,4 +1,4 @@
RESOLUTION;ASPECT_RATIO;DESC RESOLUTION;ASPECT_RATIO;DESCRIPTION
640x480 ;4:3;VGA 640x480 ;4:3;VGA
800x480 ;5:3;WVGA 800x480 ;5:3;WVGA
800x600 ;4:3;SVGA 800x600 ;4:3;SVGA
@ -23,7 +23,7 @@ RESOLUTION;ASPECT_RATIO;DESC
1920x1080;16:9;FHD 1920x1080;16:9;FHD
1920x1200;16:10;WUXGA 1920x1200;16:10;WUXGA
2048x1080;19:10;2K DCI 2048x1080;19:10;2K DCI
2048x1152;16:9;,QWXGA 2048x1152;16:9;QWXGA
2560x1080;21:9;UWHD 2560x1080;21:9;UWHD
2560x1440;16:9;QHD 2560x1440;16:9;QHD
2560х1600;16:10;WQXGA 2560х1600;16:10;WQXGA

1 RESOLUTION ASPECT_RATIO DESC DESCRIPTION
2 640x480 4:3 VGA
3 800x480 5:3 WVGA
4 800x600 4:3 SVGA
23 1920x1080 16:9 FHD
24 1920x1200 16:10 WUXGA
25 2048x1080 19:10 2K DCI
26 2048x1152 16:9 ,QWXGA QWXGA
27 2560x1080 21:9 UWHD
28 2560x1440 16:9 QHD
29 2560х1600 16:10 WQXGA

@ -43,6 +43,7 @@ set(DEPENDFILES
../gresource.xml ../gresource.xml
../ubl-settings-video.css ../ubl-settings-video.css
../video-drivers.csv ../video-drivers.csv
../resolutions.csv
) )
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

@ -306,7 +306,7 @@ void on_port_chosen_changed(GtkWidget *, monitor_edit_window *window){
dict=yon_dictionary_get(&main_config.supported_resolutions,port_name); dict=yon_dictionary_get(&main_config.supported_resolutions,port_name);
if (dict){ if (dict){
int size; int size;
config_str resolutions = yon_file_open(get_resolutions_supportable_command,&size); config_str resolutions = yon_resource_open_file(get_resolutions_supportable_command,&size);
resolutions = yon_char_parsed_rip(resolutions,&size,0); resolutions = yon_char_parsed_rip(resolutions,&size,0);
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
yon_char_remove_last_symbol(resolutions[i],'\n'); yon_char_remove_last_symbol(resolutions[i],'\n');
@ -366,7 +366,7 @@ void on_resolutions_unsupported_show(GtkToggleButton *self, monitor_edit_window
gtk_combo_box_set_active(GTK_COMBO_BOX(window->ResolutionCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(window->ResolutionCombo),0);
if (gtk_toggle_button_get_active(self)){ if (gtk_toggle_button_get_active(self)){
int size; int size;
config_str resolutions = yon_file_open(get_resolutions_supportable_command,&size); config_str resolutions = yon_resource_open(get_resolutions_supportable_command,&size);
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
yon_char_remove_last_symbol(resolutions[i],'\n'); yon_char_remove_last_symbol(resolutions[i],'\n');
int parsed_size; int parsed_size;

@ -45,7 +45,7 @@
#define get_proprietary_drivers_info_path "resource:///com/ublinux/csv/video-drivers.csv" #define get_proprietary_drivers_info_path "resource:///com/ublinux/csv/video-drivers.csv"
#define get_resolutions_supportable_command "/usr/share/ubl-settings-video/csv/resolutions.csv" #define get_resolutions_supportable_command "resource:///com/ublinux/csv/resolutions.csv"
#define get_frequences_command "xrandr |grep -v -n \"[a-z][a-z]\" |sed 's/ * / /g' |cut -d' ' -f1,3-" #define get_frequences_command "xrandr |grep -v -n \"[a-z][a-z]\" |sed 's/ * / /g' |cut -d' ' -f1,3-"

Loading…
Cancel
Save