WIP FTP page

pull/121/head
parent ab6104178b
commit b5fbead952

@ -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 ""

@ -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 ресурса"

@ -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
)

@ -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);
}

@ -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);
}

@ -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

@ -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

@ -25,6 +25,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<!-- interface-license-type gplv2 -->
<!-- interface-name ubl-settings-update -->
<!-- interface-copyright UBGroup -->
<object class="GtkListStore" id="FtpList">
<columns>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
<!-- column-name gchararray3 -->
<column type="gchararray"/>
<!-- column-name gchararray4 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">True</col>
<col id="1" translatable="yes">file:///home/testrepo</col>
<col id="2" translatable="yes">main</col>
<col id="3" translatable="yes">8080</col>
<col id="4" translatable="yes">superadmin</col>
</row>
</data>
</object>
<object class="GtkListStore" id="MirrorList">
<columns>
<!-- column-name Repository -->
@ -131,11 +154,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.settings-symbolic</property>
</object>
<object class="GtkImage" id="image19">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.sync-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.sync-symbolic</property>
</object>
<object class="GtkImage" id="image20">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property>
</object>
<object class="GtkImage" id="image21">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">document-edit-symbolic</property>
</object>
<object class="GtkImage" id="image22">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -1474,6 +1517,242 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Setting up publishing of a repository and/or repositories as a local FTP resource</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="foreground" value="#33722f2e7a06"/>
<attribute name="size" value="12288"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="WebPublicationUpdateButton1">
<property name="width-request">26</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Update</property>
<property name="image">image19</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="WebPublicationAddButton1">
<property name="width-request">26</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Add</property>
<property name="image">image20</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="WebPublicationEditButton1">
<property name="width-request">26</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Edit</property>
<property name="image">image21</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="WebPublicationRemoveButton1">
<property name="width-request">26</property>
<property name="height-request">26</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Remove</property>
<property name="image">image22</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="FTPPublicationTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">FtpList</property>
<property name="enable-grid-lines">both</property>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Enabled</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">autosize</property>
<property name="title" translatable="yes">Storage</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Repositories</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Port</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Anonymous user</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">4</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">FTP-publication</property>
</object>
<packing>
<property name="position">4</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -1713,7 +1992,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</child>
</object>
<packing>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child type="tab">
@ -1724,7 +2003,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="label" translatable="yes">Mirror publication</property>
</object>
<packing>
<property name="position">4</property>
<property name="position">5</property>
<property name="tab-fill">False</property>
</packing>
</child>

Loading…
Cancel
Save