diff --git a/gresource.xml b/gresource.xml
index 78ff5f5..4522480 100644
--- a/gresource.xml
+++ b/gresource.xml
@@ -9,4 +9,8 @@
ubl-settings-video.css
+
+ video-drivers.csv
+ resolutions.csv
+
\ No newline at end of file
diff --git a/resolutions.csv b/resolutions.csv
index ec81494..d1c5411 100644
--- a/resolutions.csv
+++ b/resolutions.csv
@@ -1,4 +1,4 @@
-RESOLUTION;ASPECT_RATIO;DESC
+RESOLUTION;ASPECT_RATIO;DESCRIPTION
640x480 ;4:3;VGA
800x480 ;5:3;WVGA
800x600 ;4:3;SVGA
@@ -23,7 +23,7 @@ RESOLUTION;ASPECT_RATIO;DESC
1920x1080;16:9;FHD
1920x1200;16:10;WUXGA
2048x1080;19:10;2K DCI
-2048x1152;16:9;,QWXGA
+2048x1152;16:9;QWXGA
2560x1080;21:9;UWHD
2560x1440;16:9;QHD
2560х1600;16:10;WQXGA
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 7569c83..18c4c79 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -42,6 +42,8 @@ set(DEPENDFILES
../ubl-settings-video-configuration.glade
../gresource.xml
../ubl-settings-video.css
+ ../video-drivers.csv
+ ../resolutions.csv
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/source/ubl-settings-video.c b/source/ubl-settings-video.c
index 02dfb51..ff8ea05 100644
--- a/source/ubl-settings-video.c
+++ b/source/ubl-settings-video.c
@@ -306,7 +306,7 @@ void on_port_chosen_changed(GtkWidget *, monitor_edit_window *window){
dict=yon_dictionary_get(&main_config.supported_resolutions,port_name);
if (dict){
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);
for (int i=0;iResolutionCombo),0);
if (gtk_toggle_button_get_active(self)){
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);
for (int i=1;iDriversTree),GTK_TREE_MODEL(main_config.list));
+ gtk_widget_set_sensitive(widgets->LoadDriversButton,1);
+ return G_SOURCE_REMOVE;
+}
+
gboolean yon_proprietary_append(struct proprietary_struct *target){
GtkTreeIter iter;
@@ -1083,7 +1089,7 @@ void *yon_proprietary_local_get(main_window *widgets){
int size;
config_str rtn=NULL;
- rtn = yon_file_open(get_proprietary_drivers_info_path,&size);
+ rtn = yon_resource_open_file(get_proprietary_drivers_info_path,&size);
for (int i=1;iDriversTree),GTK_TREE_MODEL(main_config.list));
- gtk_widget_set_sensitive(widgets->LoadDriversButton,1);
+ g_idle_add((GSourceFunc)yon_proprietary_set,widgets);
g_thread_exit (NULL);
}
diff --git a/source/ubl-settings-video.h b/source/ubl-settings-video.h
index ecf0041..0ae38e7 100644
--- a/source/ubl-settings-video.h
+++ b/source/ubl-settings-video.h
@@ -43,9 +43,9 @@
#define get_resolutions_command "xrandr |grep -noP \"\\d+x+\\d+\""
#define get_resolution_ports_command "xrandr |grep -nwP \"connected\" |grep -oE \"[-0-9a-zA-Z:]{1,} connected\" |grep -oE \"[-0-9a-zA-Z:]{1,} \""
-#define get_proprietary_drivers_info_path "/usr/share/ubl-settings-video/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-"
@@ -400,5 +400,6 @@ gboolean yon_proprietary_connect(main_window *widgets);
void on_app_chooser_open(GtkWidget *self, main_window *widgets);
gpointer yon_driver_info_launch(void *command);
void on_command_cancel(GtkWidget *,main_window *widgets);
+gboolean yon_proprietary_set(main_window *widgets);
#endif
\ No newline at end of file