diff --git a/fonts.csv b/fonts.csv
index e09d0b7..46e6cc0 100644
--- a/fonts.csv
+++ b/fonts.csv
@@ -1,2 +1,3 @@
+FONT
cyr-sun16
terminus-bold-16
\ No newline at end of file
diff --git a/gresource.xml b/gresource.xml
index 0b49684..7c9a2e1 100644
--- a/gresource.xml
+++ b/gresource.xml
@@ -10,4 +10,9 @@
ubl-settings-system.css
+
+ auth-profile.csv
+ fonts.csv
+ locales.csv
+
\ No newline at end of file
diff --git a/locales.csv b/locales.csv
index 543d3ee..0910f87 100644
--- a/locales.csv
+++ b/locales.csv
@@ -1,3 +1,4 @@
+CODE;NAME
af_ZA.UTF-8;Afrikaans, South Africa
ar_AE.UTF-8;Arabic, United Arab Emirates
ar_BH.UTF-8;Arabic, Bahrain
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index a92858d..ec678ee 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -38,6 +38,9 @@ set(DEPENDFILES
../ubl-settings-system-layouts.glade
../gresource.xml
../ubl-settings-system.css
+ ../fonts.csv
+ ../locales.csv
+ ../auth-profile.csv
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c
index 084d0c2..0b62ec1 100644
--- a/source/ubl-settings-system.c
+++ b/source/ubl-settings-system.c
@@ -70,6 +70,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
gtk_widget_destroy(dialog);
}
char *command = yon_char_unite(config_get_command(path),NULL);
+ yon_debug_output("%s\n",command);
yon_config_load_config(type,command,NULL);
}
}
@@ -787,17 +788,17 @@ main_window *yon_main_window_complete(main_window *widgets){
gtk_combo_box_set_model(GTK_COMBO_BOX(widgets->LanguageCombo),main_config.localefilter);
gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(main_config.localefilter),2);
int size;
- config_str locales = yon_file_open(get_locales_command,&size);
+ config_str locales = yon_resource_open_file(get_locales_command,&size);
GtkTreeIter iter;
- for (int i=0;ilanguagelist,&iter);
gtk_list_store_set(widgets->languagelist,&iter,0,_(loc_parsed[1]),1,loc_parsed[0],2,0,-1);
}
- config_str fonts = yon_file_open(get_fonts_command,&size);
- for (int i=0;ifontlist,&iter);
gtk_list_store_set(widgets->fontlist,&iter,0,fonts[i],-1);
diff --git a/source/ubl-settings-system.h b/source/ubl-settings-system.h
index c985a4e..06b83d3 100644
--- a/source/ubl-settings-system.h
+++ b/source/ubl-settings-system.h
@@ -36,11 +36,11 @@
#define config_global_load_command "ubconfig --source global get "
#define config_local_load_command "ubconfig --source system get "
-#define get_locales_command "/usr/share/ubl-settings-system/csv/locales.csv"
-#define get_fonts_command "/usr/share/ubl-settings-system/csv/fonts.csv"
+#define get_locales_command "resource:///com/ublinux/csv/locales.csv"
+#define get_fonts_command "resource:///com/ublinux/csv/fonts.csv"
#define get_id_command "/etc/machine-id"
-#define config_get_command(source) yon_char_unite("ubconfig --source ", source, " get system HOSTNAME MACHINEID",NULL), yon_char_unite("ubconfig --source ", source, " get locale CONSOLE_FONT LOCALE LANG",NULL), yon_char_unite("ubconfig --source ", source, " get [network] DOMAIN DOMAIN[admanger] DOMAIN[server] DOMAIN[dns] DOMAIN[client]",NULL)
+#define config_get_command(source) yon_char_unite("ubconfig --source ", source, " get system HOSTNAME MACHINEID",NULL), yon_char_unite("; ubconfig --source ", source, " get locale CONSOLE_FONT LOCALE LANG",NULL), yon_char_unite("; ubconfig --source ", source, " get [network] DOMAIN DOMAIN[admanger] DOMAIN[server] DOMAIN[dns] DOMAIN[client]",NULL)
#define config_get_default_command ""
#define config_get_global_only_parameters ""