diff --git a/locale/ubl-settings-update.pot b/locale/ubl-settings-update.pot index ea70c51..fe962fb 100644 --- a/locale/ubl-settings-update.pot +++ b/locale/ubl-settings-update.pot @@ -610,3 +610,6 @@ msgstr "" #: source/ubl-strings.h:167 msgid "Repeat password" msgstr "" + +msgid "Setting up publishing of a repository and/or repositories as a local FTP resource" +mststr "" \ No newline at end of file diff --git a/locale/ubl-settings-update_ru.po b/locale/ubl-settings-update_ru.po index 843d6d4..b8c3b01 100644 --- a/locale/ubl-settings-update_ru.po +++ b/locale/ubl-settings-update_ru.po @@ -649,3 +649,12 @@ msgstr "дней" msgid "Cancel" msgstr "Отмена" + +msgid "FTP-publication" +msgstr "FTP-публикация" + +msgid "Anonymous user" +msgstr "Аноноимный пользователь" + +msgid "Setting up publishing of a repository and/or repositories as a local FTP resource" +msgstr "Настройка публикации хранилища и/или репозиториев в виде локального FTP ресурса" \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e4dcc64..ee87502 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -82,6 +82,7 @@ set(SOURCE_FILES ubl-settings-update-web.c ubl-settings-update-mirror.c ubl-settings-update-repo.c + ubl-settings-update-ftp.c ubl-settings-update.h ubl-strings.h ) diff --git a/source/ubl-settings-update-ftp.c b/source/ubl-settings-update-ftp.c new file mode 100644 index 0000000..e476ff5 --- /dev/null +++ b/source/ubl-settings-update-ftp.c @@ -0,0 +1,38 @@ +#include "ubl-settings-update.h" + + +void on_ftp_accept(GtkWidget *, ftp_window *){ + +} + +ftp_window *yon_ftp_window_new(){ + ftp_window *window = malloc(sizeof(ftp_window)); + memset(window,0,sizeof(ftp_window)); + + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ftp); + + window->Window = yon_gtk_builder_get_widget(builder,"Window"); + window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox"); + window->EnableCheck = yon_gtk_builder_get_widget(builder,"EnableCheck"); + window->StorageEntry = yon_gtk_builder_get_widget(builder,"StorageEntry"); + window->StorageButton = yon_gtk_builder_get_widget(builder,"StorageButton"); + window->ReposTree = yon_gtk_builder_get_widget(builder,"ReposTree"); + window->PortCheck = yon_gtk_builder_get_widget(builder,"PortCheck"); + window->PortSpin = yon_gtk_builder_get_widget(builder,"PortSpin"); + window->AnonUserCheck = yon_gtk_builder_get_widget(builder,"AnonUserCheck"); + window->AnonUserEntry = yon_gtk_builder_get_widget(builder,"AnonUserEntry"); + window->AnonUserButton = yon_gtk_builder_get_widget(builder,"AnonUserButton"); + window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton"); + window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); + + g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_ftp_accept),NULL); + + return window; +} + +void yon_ftp_window_open(GtkWidget *, main_window *widgets){ + ftp_window *window = yon_ftp_window_new(); + g_object_set_data(G_OBJECT(window->AcceptButton),"main_window",widgets); + +} \ No newline at end of file diff --git a/source/ubl-settings-update.c b/source/ubl-settings-update.c index 5c64934..ae53fe9 100644 --- a/source/ubl-settings-update.c +++ b/source/ubl-settings-update.c @@ -1044,7 +1044,7 @@ void on_repo_source_add(GtkWidget *, repo_add_window *window){ void on_file_chooser_open(GtkWidget *, GtkEntry *target){ filechooser_window *window = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_OPEN); if (yon_file_chooser_start(window)){ - char *file = window->last_success_selection; + char *file = window->last_any_selection; if (!yon_char_is_empty(file)){ gtk_entry_set_text(target,file); } diff --git a/source/ubl-settings-update.h b/source/ubl-settings-update.h index f46879e..887c72c 100644 --- a/source/ubl-settings-update.h +++ b/source/ubl-settings-update.h @@ -32,7 +32,7 @@ #define glade_mirror_path_add_path "/com/ublinux/ui/ubl-settings-update-mirror-path-add.glade" #define glade_repo_path_add_path "/com/ublinux/ui/ubl-settings-update-repo-path-add.glade" #define glade_password_path "/com/ublinux/ui/ubl-settings-update-password.glade" -#define banner_path "/com/ublinux/images/ubl-settings-update-banner.png" +#define glade_path_ftp "/com/ublinux/ui/ubl-settings-update-ftp.glade" #define CssPath "/com/ublinux/css/ubl-settings-update.css" #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) @@ -303,6 +303,23 @@ typedef struct { int edits; } path_section; +typedef struct { + GtkWidget *Window; + GtkWidget *StatusBox; + GtkWidget *EnableCheck; + GtkWidget *StorageEntry; + GtkWidget *StorageButton; + GtkWidget *ReposTree; + GtkWidget *PortCheck; + GtkWidget *PortSpin; + GtkWidget *AnonUserCheck; + GtkWidget *AnonUserEntry; + GtkWidget *AnonUserButton; + GtkWidget *CancelButton; + GtkWidget *AcceptButton; + +} ftp_window; + void on_save_done(main_window *, config_str output, int size); void on_toggle_button_toggled(GtkWidget *self, main_window *widgets); @@ -392,5 +409,7 @@ void on_repo_move_up(GtkWidget *,main_window *widgets); void on_repo_move_down(GtkWidget *,main_window *widgets); void on_save_start(main_window *widgets, char* path); void on_repo_file_chooser_open(GtkWidget *, repo_add_window *window); - +void on_ftp_accept(GtkWidget *, ftp_window *); +ftp_window *yon_ftp_window_new(); +void yon_ftp_window_open(GtkWidget *, main_window *widgets); #endif \ No newline at end of file diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 561871e..225a7c4 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -165,6 +165,7 @@ mirrorlist - mirrors file, make sure server URL is NOT included in this file! Si #define _LABEL _("Encryption") #define _LABEL _("Password") #define _LABEL _("Repeat password") + #define _LABEL _("Setting up publishing of a repository and/or repositories as a local WEB resource") */ #endif \ No newline at end of file diff --git a/ubl-settings-update.desktop b/ubl-settings-update.desktop old mode 100644 new mode 100755 diff --git a/ubl-settings-update.glade b/ubl-settings-update.glade index 6e3e4b1..b962515 100644 --- a/ubl-settings-update.glade +++ b/ubl-settings-update.glade @@ -25,6 +25,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + + + + + + + + + + + + + + + True + file:///home/testrepo + main + 8080 + superadmin + + + @@ -131,11 +154,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False com.ublinux.libublsettingsui-gtk3.settings-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.sync-symbolic + True False com.ublinux.libublsettingsui-gtk3.sync-symbolic + + True + False + com.ublinux.libublsettingsui-gtk3.increase-symbolic + + + True + False + document-edit-symbolic + + + True + False + com.ublinux.libublsettingsui-gtk3.trash-symbolic + True False @@ -1474,6 +1517,242 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + 5 + + + True + False + Setting up publishing of a repository and/or repositories as a local FTP resource + 0 + + + + + + + + False + True + 0 + + + + + True + False + 5 + + + True + False + vertical + 5 + + + 26 + 26 + True + True + True + Update + image19 + + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + 26 + 26 + True + True + True + Add + image20 + + + + False + True + 2 + + + + + 26 + 26 + True + False + True + True + Edit + image21 + + + + False + True + 3 + + + + + 26 + 26 + True + False + True + True + Remove + image22 + + + + False + True + 4 + + + + + False + True + 0 + + + + + True + True + in + + + True + True + FtpList + both + + + Enabled + + + + 0 + + + + + + + autosize + Storage + + + + 1 + + + + + + + Repositories + + + + 2 + + + + + + + Port + + + + 3 + + + + + + + Anonymous user + + + + 4 + + + + + + + + + True + True + 1 + + + + + True + True + 1 + + + + + 4 + + + + + True + False + FTP-publication + + + 4 + False + + True @@ -1713,7 +1992,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - 4 + 5 @@ -1724,7 +2003,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Mirror publication - 4 + 5 False