|
|
|
@ -91,6 +91,7 @@ file_chooser_window *yon_file_chooser_window_new(){
|
|
|
|
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_filechooser);
|
|
|
|
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_filechooser);
|
|
|
|
window->Window = yon_gtk_builder_get_widget(builder,"Window");
|
|
|
|
window->Window = yon_gtk_builder_get_widget(builder,"Window");
|
|
|
|
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
|
|
|
|
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
|
|
|
|
|
|
|
|
window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel");
|
|
|
|
window->ChooseButton = yon_gtk_builder_get_widget(builder,"ChooseButton");
|
|
|
|
window->ChooseButton = yon_gtk_builder_get_widget(builder,"ChooseButton");
|
|
|
|
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
|
|
|
|
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
|
|
|
|
window->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry");
|
|
|
|
window->NameEntry = yon_gtk_builder_get_widget(builder,"NameEntry");
|
|
|
|
@ -103,8 +104,8 @@ file_chooser_window *yon_file_chooser_window_new(){
|
|
|
|
// storage-configure window section
|
|
|
|
// storage-configure window section
|
|
|
|
|
|
|
|
|
|
|
|
void on_storage_open(GtkWidget *self, storage_config_window *window){
|
|
|
|
void on_storage_open(GtkWidget *self, storage_config_window *window){
|
|
|
|
GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,GTK_WINDOW(window->MainWindow),GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,CLOSE_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
|
|
|
|
GtkWidget *dialog = gtk_file_chooser_dialog_new(CHOSE_FOLDER_TITLE_LABEL,GTK_WINDOW(window->MainWindow),GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,CLOSE_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog),GTK_WINDOW(window->MainWindow),TITLE_LABEL,icon_path,"file_chooser");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog),GTK_WINDOW(window->MainWindow),CHOSE_FOLDER_TITLE_LABEL,icon_path,"file_chooser");
|
|
|
|
int responce = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
int responce = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
if (responce == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (responce == GTK_RESPONSE_ACCEPT){
|
|
|
|
char *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
|
|
char *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
|
|
@ -143,8 +144,8 @@ void on_storage_open(GtkWidget *self, storage_config_window *window){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_storage_create(GtkWidget *self, storage_config_window *window){
|
|
|
|
void on_storage_create(GtkWidget *self, storage_config_window *window){
|
|
|
|
GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,GTK_WINDOW(window->MainWindow),GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,CLOSE_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
|
|
|
|
GtkWidget *dialog = gtk_file_chooser_dialog_new(CHOSE_FOLDER_TITLE_LABEL,GTK_WINDOW(window->MainWindow),GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,CLOSE_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog),GTK_WINDOW(window->MainWindow),TITLE_LABEL,icon_path,"file_chooser");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog),GTK_WINDOW(window->MainWindow),CHOSE_FOLDER_TITLE_LABEL,icon_path,"file_chooser");
|
|
|
|
int responce = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
int responce = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
if (responce == GTK_RESPONSE_ACCEPT){
|
|
|
|
if (responce == GTK_RESPONSE_ACCEPT){
|
|
|
|
char *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
|
|
char *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
|
|
@ -337,7 +338,8 @@ storage_config_window *yon_storage_config_window_new(){
|
|
|
|
|
|
|
|
|
|
|
|
void on_storage_configure_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_storage_configure_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
storage_config_window *window = yon_storage_config_window_new();
|
|
|
|
storage_config_window *window = yon_storage_config_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"storage-configuration-window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),MANAGE_STORAGES_TITLE_LABEL,icon_path,"storage-configuration-window");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeadLabel),MANAGE_STORAGES_TITLE_LABEL);
|
|
|
|
gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window));
|
|
|
|
gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window));
|
|
|
|
GtkTreeIter iter,itar;
|
|
|
|
GtkTreeIter iter,itar;
|
|
|
|
for_iter(window->storages_copy,&iter){
|
|
|
|
for_iter(window->storages_copy,&iter){
|
|
|
|
@ -557,7 +559,8 @@ void on_add_accept(GtkWidget *self, dictionary *dict){
|
|
|
|
|
|
|
|
|
|
|
|
void on_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
void on_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),TITLE_LABEL,icon_path,"filechooserWindow");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),CHOSE_PACKAGES_TITLE_LABEL,icon_path,"filechooserWindow");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),CHOSE_PACKAGES_TITLE_LABEL);
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
@ -712,7 +715,8 @@ repo_add_window *yon_repo_add_window_new(){
|
|
|
|
// main window
|
|
|
|
// main window
|
|
|
|
void on_add_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_add_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"add-repo-window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),ADD_PACKAGES_TITLE_LABEL,icon_path,"add-repo-window");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeadLabel),ADD_PACKAGES_TITLE_LABEL);
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
for_iter (window->tree_copy,&iter){
|
|
|
|
for_iter (window->tree_copy,&iter){
|
|
|
|
char *current;
|
|
|
|
char *current;
|
|
|
|
@ -807,7 +811,8 @@ void on_move_add_accept(GtkWidget *self, dictionary *dict){
|
|
|
|
void on_move_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
void on_move_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->MoveTargetArchEntry))>-1&>k_combo_box_get_active(GTK_COMBO_BOX(window->MoveSourceStorageEntry))>-1){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->MoveTargetArchEntry))>-1&>k_combo_box_get_active(GTK_COMBO_BOX(window->MoveSourceStorageEntry))>-1){
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),TITLE_LABEL,icon_path,"ChooseMoveFileChooserWindow");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),CHOSE_PACKAGES_TITLE_LABEL,icon_path,"ChooseMoveFileChooserWindow");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),CHOSE_PACKAGES_TITLE_LABEL);
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
gtk_file_filter_set_name(filter,"*.pkg.tar.*");
|
|
|
|
gtk_file_filter_set_name(filter,"*.pkg.tar.*");
|
|
|
|
@ -884,7 +889,8 @@ void on_move_accept(GtkWidget *self, repo_add_window *window){
|
|
|
|
|
|
|
|
|
|
|
|
void on_move_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_move_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"move-repo-window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),MOVE_PACKAGES_TITLE_LABEL,icon_path,"move-repo-window");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeadLabel),MOVE_PACKAGES_TITLE_LABEL);
|
|
|
|
gtk_button_set_label(GTK_BUTTON(window->AddButton),MOVE_LABEL);
|
|
|
|
gtk_button_set_label(GTK_BUTTON(window->AddButton),MOVE_LABEL);
|
|
|
|
gtk_widget_show(window->MoveSourceFrame);
|
|
|
|
gtk_widget_show(window->MoveSourceFrame);
|
|
|
|
gtk_widget_show(window->MoveTargetFrame);
|
|
|
|
gtk_widget_show(window->MoveTargetFrame);
|
|
|
|
@ -924,7 +930,8 @@ void on_move_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_remove_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
void on_remove_add_package(GtkWidget *self, repo_add_window *window){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->ArchitectureCombo))>-1){
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->ArchitectureCombo))>-1){
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
file_chooser_window *dialog = yon_file_chooser_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),TITLE_LABEL,icon_path,"ChooseMoveFileChooserWindow");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(window->MainWindow),CHOSE_PACKAGES_TITLE_LABEL,icon_path,"ChooseMoveFileChooserWindow");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),CHOSE_PACKAGES_TITLE_LABEL);
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
gtk_file_filter_add_pattern(filter,"*.pkg.tar*[^.sig]");
|
|
|
|
gtk_file_filter_set_name(filter,"*.pkg.tar.*");
|
|
|
|
gtk_file_filter_set_name(filter,"*.pkg.tar.*");
|
|
|
|
@ -999,7 +1006,8 @@ void on_remove_accept(GtkWidget *self, repo_add_window *window){
|
|
|
|
|
|
|
|
|
|
|
|
void on_remove_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_remove_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"add-repo-window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->Window),REMOVE_PACKAGES_TITLE_LABEL,icon_path,"add-repo-window");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeadLabel),REMOVE_PACKAGES_TITLE_LABEL);
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
for_iter (window->tree_copy,&iter){
|
|
|
|
for_iter (window->tree_copy,&iter){
|
|
|
|
char *current;
|
|
|
|
char *current;
|
|
|
|
@ -1280,7 +1288,8 @@ key_creation_window *yon_key_creation_window_new(){
|
|
|
|
|
|
|
|
|
|
|
|
void on_key_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_key_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
key_creation_window *window = yon_key_creation_window_new();
|
|
|
|
key_creation_window *window = yon_key_creation_window_new();
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"key-create-window");
|
|
|
|
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),KEY_CREATION_TITLE_LABEL,icon_path,"key-create-window");
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeadLabel),KEY_CREATION_TITLE_LABEL);
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|