diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index faa09e2..5a173c2 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -5357,4 +5357,7 @@ msgid "Application is already running" msgstr "" msgid "Select installation sources" +msgstr "" + +msgid "Database update" msgstr "" \ No newline at end of file diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 8b3c854..b786b71 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -5552,4 +5552,7 @@ msgid "Application is already running" msgstr "Приложение уже запущено" msgid "Select installation sources" -msgstr "Выберите источники для " \ No newline at end of file +msgstr "Выберите источники для " + +msgid "Database update" +msgstr "Обновление баз данных" \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 7bc1a19..f9ac8e4 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -18,6 +18,11 @@ include_directories(${PWQUALITY_INCLUDE_DIRS}) link_directories(${PWQUALITY_LIBRARY_DIRS}) add_definitions(${PWQUALITY_CFLAGS_OTHER}) +pkg_check_modules(VTE291 REQUIRED vte-2.91) +include_directories(${VTE291_INCLUDE_DIRS}) +link_directories(${VTE291_LIBRARY_DIRS}) +add_definitions(${VTE291_CFLAGS_OTHER}) +add_definitions(-DVTE_INCLUDE) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(TIMEZONEMAP_LIBRARIES_FOUND timezonemap) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index c76d43e..50d99ce 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -315,7 +315,27 @@ void yon_licence_load(main_window *widgets){ } } +// void on_database_update(void *,main_window *widgets){ +// // vte_revealer_struct *revealer = yon_vte_revealer_new(); +// yon_terminal_window_launch(GTK_WINDOW(widgets->MainWindow),"pacman -Sy",SUCCESS_LABEL,FAIL_LABEL); +// yon_terminal_integrated_start_shell(widgets->InstallTerminal,yon_debug_output("%s\n",pacman_update_command),NULL,NULL); +// g_signal_connect(G_OBJECT(widgets->InstallTerminal),"child-exited",G_CALLBACK(on_db_update_done),widgets); +// gtk_button_clicked(GTK_BUTTON(widgets->MoreButton)); +// gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->MenusTab),1); +// } + void on_status_update(GtkWidget *,main_window *widgets){ + // on_database_update(NULL,widgets); + yon_window *window = yon_window_new(); + GtkWidget *terminal = vte_terminal_new(); + yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),DB_UPDATE_LABEL,icon_path,NULL); + gtk_widget_show(terminal); + gtk_box_pack_start(GTK_BOX(window->MainBox),terminal,1,1,0); + yon_terminal_integrated_start_shell(terminal,"pacman -Sy",NULL,NULL); + gtk_widget_show(window->Window); + // yon_terminal_window_launch(GTK_WINDOW(widgets->MainWindow),"pacman -Sy",SUCCESS_LABEL,FAIL_LABEL); + yon_packages_update(); + if (system(yon_check_database_command)){ gtk_image_set_from_icon_name(GTK_IMAGE(widgets->KernelPacmanStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(widgets->KernelAddonPacmanStatusImage),inactive_icon_path,GTK_ICON_SIZE_BUTTON); @@ -339,6 +359,10 @@ void on_status_update(GtkWidget *,main_window *widgets){ gtk_label_set_text(GTK_LABEL(widgets->AdditionalComponentsStatusLabel),ACCESSED_LABEL); gtk_label_set_text(GTK_LABEL(widgets->PackagesStatusLabel),ACCESSED_LABEL); } + enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)); + page = yon_page_get_next(widgets,page); + yon_page_init(widgets,page); + } void yon_scroll_block_for_builder(GtkBuilder *builder){ diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 6f7b099..1cf8735 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e972d3f..2a8bf70 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -305,6 +305,7 @@ NULL) #define UNACCESSED_LABEL _("Unaccessed") #define INFO_LABEL _("Package information") #define ALREADY_RUNNING_LABEL _("Application is already running") +#define DB_UPDATE_LABEL _("Database update") // #define _LABEL _("Chosen size:") // #define _LABEL _("Overall size:")