diff --git a/Makefile b/Makefile
index 65d819d..81f197b 100644
--- a/Makefile
+++ b/Makefile
@@ -119,8 +119,8 @@ install: check uninstall
msgfmt --verbose --use-fuzzy --output-file "$${PATH_FILE_MO}" - < <(msgcat --use-first --no-wrap $${PKGNAME_PO} ./locale/*_$${LANG}.po); \
done
@for SIZE in 16 32 48; do \
- install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
- rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
+ install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
+ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
done
@for FILE_ICON in $(wildcard icons/*/*.svg); do \
SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \
diff --git a/locale/ubl-settings-update.pot b/locale/ubl-settings-update.pot
index 6bff029..10a4ded 100644
--- a/locale/ubl-settings-update.pot
+++ b/locale/ubl-settings-update.pot
@@ -17,6 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#: source/ubl-strings.h:3
+msgid "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-update"
+msgstr ""
+
#: source/ubl-strings.h:4 source/ubl-strings.h:55
msgid "System update"
msgstr ""
diff --git a/locale/ubl-settings-update_ru.po b/locale/ubl-settings-update_ru.po
index e35fd03..0403b4b 100644
--- a/locale/ubl-settings-update_ru.po
+++ b/locale/ubl-settings-update_ru.po
@@ -17,6 +17,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+#: source/ubl-strings.h:3
+msgid "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-update"
+msgstr "https://wiki.ublinux.com/ru/software/programs_and_utilities/all/ubl-settings-update"
+
#: source/ubl-strings.h:4 source/ubl-strings.h:55
msgid "System update"
msgstr "Обновление системы"
@@ -659,11 +663,11 @@ msgstr "Хранилище:"
#: source/ubl-strings.h:171
msgid "Anonymous user"
-msgstr "Аноноимный пользователь"
+msgstr "Анонимный пользователь"
#: source/ubl-strings.h:171
msgid "Anonymous user:"
-msgstr "Аноноимный пользователь:"
+msgstr "Анонимный пользователь:"
#: source/ubl-strings.h:172
msgid "Open user list"
diff --git a/source/ubl-settings-update-ftp.c b/source/ubl-settings-update-ftp.c
index 1fb6b09..a1ff3a1 100644
--- a/source/ubl-settings-update-ftp.c
+++ b/source/ubl-settings-update-ftp.c
@@ -47,7 +47,7 @@ void on_ftp_accept(GtkWidget *, ftp_window *window){
yon_char_return_if_exist(port,""),
yon_char_return_if_exist(user,""),
NULL);
- char *parameter_string = yon_char_parsed_to_string(parameters,size,":");
+ char *parameter_string = yon_char_parsed_to_string_full(parameters,size,":");
char *parameter_name = REPOPUBLIC_FTP(id_string);
char *parameter_command = REPOPUBLIC_FTP_command(id_string);
@@ -174,17 +174,17 @@ void on_ftp_remove(GtkWidget *,main_window *widgets){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->title = REMOVE_FTP_TITLE_LABEL;
data->action_text = REMOVE_REPO_WARNING_LABEL;
- if (yon_confirmation_dialog_call(widgets->Window,data)!=GTK_RESPONSE_CANCEL){
+ if (yon_confirmation_dialog_call(widgets->Window,data)==GTK_RESPONSE_ACCEPT){
char *storage;
char *repos;
gtk_tree_model_get(model,&iter,1,&storage,2,&repos,-1);
char *repos_replaced = yon_char_replace(repos,"\n",",");
- char *parameter_key = yon_char_unite(storage,":",repos_replaced,NULL);
+ char *parameter_key = yon_char_unite(storage,!yon_char_is_empty(repos_replaced)?":":NULL,repos_replaced,NULL);
char *parameter = REPOPUBLIC_FTP(parameter_key);
yon_config_remove_by_key(parameter);
free(parameter);
free(parameter_key);
- free(repos_replaced);
+ if (!yon_char_is_empty(repos_replaced)) free(repos_replaced);
yon_interface_update(widgets);
}
}
diff --git a/source/ubl-settings-update-save.c b/source/ubl-settings-update-save.c
index a16dedf..9e261b2 100644
--- a/source/ubl-settings-update-save.c
+++ b/source/ubl-settings-update-save.c
@@ -27,21 +27,21 @@ void on_config_custom_save(GtkWidget *, main_window *){
void on_config_local_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_LOCAL);
- yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);
+ yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
main_config.load_mode=YON_CONFIG_LOCAL;
yon_interface_update(widgets);
}
void on_config_global_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_GLOBAL);
- yon_ubl_status_box_render(yon_char_get_localised_from_lib(GLOBAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);
+ yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
main_config.load_mode=YON_CONFIG_GLOBAL;
yon_interface_update(widgets);
}
void on_config_custom_load(GtkWidget *,main_window *widgets){
yon_load_proceed(YON_CONFIG_CUSTOM);
- yon_ubl_status_box_render(yon_char_get_localised_from_lib(LOCAL_LOAD_SUCCESS_LABEL),BACKGROUND_IMAGE_SUCCESS_TYPE);
+ yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
main_config.load_mode=YON_CONFIG_CUSTOM;
yon_interface_update(widgets);
}
@@ -60,9 +60,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
yon_config_load_config(type,config_get_command("system"),NULL);
} else if (type==YON_CONFIG_CUSTOM){
char *path="";
- textdomain(template_ui_LocaleName);
GtkWidget *dialog = gtk_file_chooser_dialog_new(template_app_information.app_title,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
- textdomain(LocaleName);
gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-services");
gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
GtkFileFilter *filter = gtk_file_filter_new();
diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c
index e89935b..ef5ab6b 100644
--- a/source/ubl-settings-update.c
+++ b/source/ubl-settings-update.c
@@ -11,7 +11,6 @@ void on_save_done(main_window *, config_str output, int size){
free(final_output);
}
yon_char_parsed_free(output,size);
- textdomain(template_ui_LocaleName);
switch (main_config.save_config){
case 0:
yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
@@ -23,7 +22,6 @@ void on_save_done(main_window *, config_str output, int size){
yon_ubl_status_box_render(GLOBAL_LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
break;
}
- textdomain(LocaleName);
// yon_config_set_ignore(REPOSITORY_parameter);
}
@@ -525,7 +523,13 @@ void yon_interface_update(main_window *widgets){
char *parameter_name = yon_char_divide_search(parameter_string,"=",-1);
char *key = yon_config_parameter_get_key(parameter_name);
char *repos = yon_char_replace(key,",","\n");
- char *storage = yon_char_divide_search(repos,":",-1);
+ char *storage = NULL;
+ if (strstr(repos,":")){
+ storage = yon_char_divide_search(repos,":",-1);
+ } else {
+ storage = repos;
+ repos = NULL;
+ }
int parsed_size;
config_str parsed = yon_char_parse(parameter_string,&parsed_size,":");
@@ -1077,8 +1081,9 @@ void on_repo_source_add(GtkWidget *, repo_add_window *window){
g_signal_connect(gtk_builder_get_object(builder,"PathRemoveButton"),"clicked",G_CALLBACK(on_mirror_path_removed),window);
}
-void on_file_chooser_open(GtkWidget *, GtkEntry *target){
+void on_file_chooser_open(GtkWidget *self, GtkEntry *target){
filechooser_window *window = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_OPEN);
+ yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(gtk_widget_get_toplevel(self)),yon_char_get_localised_from_lib(CHOOSE_FILE_LABEL),icon_path,"file_chooser");
if (yon_file_chooser_start(window)){
char *file = window->last_any_selection;
if (!yon_char_is_empty(file)){
@@ -1094,11 +1099,13 @@ void on_repo_file_chooser_open(GtkWidget *, repo_add_window *window){
if (yon_char_is_empty(source_type)){
GtkFileFilter *filter = gtk_file_filter_new();
fchwindow = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_OPEN);
+ yon_gtk_window_setup(GTK_WINDOW(fchwindow->Window),GTK_WINDOW(window->Window),yon_char_get_localised_from_lib(CHOOSE_FILE_LABEL),icon_path,"file_chooser");
gtk_file_filter_set_name(filter,"*ini");
gtk_file_filter_add_pattern(filter,"*ini");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fchwindow->MainFileChooser),filter);
} else if (!strcmp(source_type,"file://")){
fchwindow = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+ yon_gtk_window_setup(GTK_WINDOW(fchwindow->Window),GTK_WINDOW(window->Window),yon_char_get_localised_from_lib(CHOOSE_FILE_LABEL),icon_path,"file_chooser");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fchwindow->ChooseFolderCheck),1);
} else return;
@@ -1490,9 +1497,10 @@ void yon_main_window_complete(main_window *widgets){
int main(int argc, char *argv[]){
setlocale(LC_ALL, "");
+ g_setenv("GDK_BACKEND","x11",1);
textdomain (LocaleName);
config_init();
-
+
yon_ubl_connect_config((_template_config*)&main_config);
yon_ubl_window_init(TITLE_LABEL,TITLE_INFO_LABEL,LocaleName,CssPath,LocaleName,version_application,WIKI_LINK);
config_str unfound = NULL;
@@ -1506,9 +1514,7 @@ int main(int argc, char *argv[]){
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
yon_window_config_load(path);
if (getuid()!=0){
- textdomain(template_ui_LocaleName);
yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
- textdomain(LocaleName);
}
gtk_main();
return 0;
diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h
index 6df50ae..946bfe4 100644
--- a/source/ubl-settings-update.h
+++ b/source/ubl-settings-update.h
@@ -18,7 +18,6 @@
#endif
#include "ubl-strings.h"
-#define WIKI_LINK "https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-update"
#define _(String) gettext(String)
@@ -46,8 +45,8 @@
#define sha256_encrypt_command(target) yon_char_unite("echo -n \"",target,"\" | sha256sum | cut -f 1 -d ' '",NULL)
#define sha512_encrypt_command(target) yon_char_unite("echo -n \"",target,"\" | sha512sum | cut -f 1 -d ' '",NULL)
-#define config_get_command(target) yon_char_unite("ubconfig --source ",target," -ea get [update] REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp]",NULL)
-#define config_get_default_command "ubconfig --source default get [update] AUTOUPDATE[repos] AUTOUPDATE[interval] AUTOUPDATE[mode] AUTOUPDATE REPOSITORY REPOSITORY[*]"
+#define config_get_command(target) yon_char_unite("ubconfig --source ",target," -ea get [update] REPOPUBLIC_NET REPOPUBLIC_WEB REPOSITORY REPOSITORY[*] REPOPUBLIC_WEB REPOPUBLIC_WEB[*] REPOPUBLIC_CACHE REPOPUBLIC_CACHE[*] AUTOUPDATE AUTOUPDATE[mode] AUTOUPDATE[interval] AUTOUPDATE[repos] AUTOUPDATE[timestamp] REPOPUBLIC_FTP[*]",NULL)
+#define config_get_default_command "ubconfig --source default get [update] AUTOUPDATE[repos] AUTOUPDATE[interval] AUTOUPDATE[mode] AUTOUPDATE REPOSITORY REPOSITORY[*] REPOPUBLIC_FTP[*]"
#define config_get_global_only_parameters ""
#define config_get_local_only_parameters ""
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
index 674f2b7..ae5660a 100644
--- a/source/ubl-strings.h
+++ b/source/ubl-strings.h
@@ -1,9 +1,10 @@
#ifndef UBL_SETTINGS_UPDATE_STRINGS
#define UBL_SETTINGS_UPDATE_STRINGS
+#define WIKI_LINK _("https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-update")
#define TITLE_LABEL _("System update")
#define TITLE_INFO_LABEL _("System update settings management")
- #define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
+ // #define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define EMPTY_IMPORTANT_LABEL _("Empty important field!")
#define ADD_REPO_LABEL _("Add repository")
#define EDIT_REPO_LABEL _("Edit repository")
@@ -34,6 +35,9 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si
#define PASSWORD_INPUT_LABEL _("Password input")
#define REMOVE_FTP_TITLE_LABEL _("Remove repository")
+ #define STORAGE_PATH_LABEL _("Storage path to publish")
+ #define PUBLICATION_DIR_PATH_LABEL _("Path to publication directory:")
+
/*
#define _LABEL _("Signature verification will not be performed")
#define _LABEL _("Signatures will be verified if present, but unsigned databases and packages will also be accepted")
@@ -50,7 +54,6 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si
#define _LABEL _("Add source")
#define _LABEL _("Username")
#define _LABEL _("User password")
- #define _LABEL _("Storage path to publish")
#define _LABEL _("The full URL of where to find the database, packages, and signatures (if available) for this repository. Multiple can be specified, separated by commas (,)")
#define _LABEL _("Update")
#define _LABEL _("System update")
@@ -138,7 +141,6 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si
#define _LABEL _("Enable installation of packages from this repository during --sync operation")
#define _LABEL _("Allow this repository to be a valid source of packages when running --sysupgrade")
#define _LABEL _("Enable publishing of local repository as WEB resource")
- #define _LABEL _("Path to publication directory:")
#define _LABEL _("Port:")
#define _LABEL _("Publishing parameters")
#define _LABEL _("Enable WEB file browser")
diff --git a/ubl-settings-update-ftp-publication.glade b/ubl-settings-update-ftp-publication.glade
index e870698..8ad3da1 100644
--- a/ubl-settings-update-ftp-publication.glade
+++ b/ubl-settings-update-ftp-publication.glade
@@ -13,7 +13,7 @@
@@ -225,7 +225,7 @@
False
True
adjustment1
- 8080
+ 21
False