#include #include #include #include #include #include #include #include #include #include #include #include #ifdef WEBKIT_FOUND #include #endif #include "ubl-strings.h" #define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-TEMPLATE" #define _(String) gettext(String) #define glade_path "/com/ublinux/ui/ubl-settings-kernel.glade" #define glade_info_path "/com/ublinux/ui/ubl-settings-kernel-info.glade" #define glade_install_path "/com/ublinux/ui/ubl-settings-kernel-install.glade" #define glade_table_row_path "/com/ublinux/ui/ubl-settings-kernel-table-row.glade" #define banner_path "/com/ublinux/images/ubl-settings-kernel-banner.png" #define CssPath "/com/ublinux/css/ubl-settings-kernel.css" #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) #define kernels_path "resource:///com/ublinux/csv/kernel-list.csv" #define kernels_addon_path "resource:///com/ublinux/csv/kernel-list-addon.csv" #define module_icon_path "com.ublinux.libublsettingsui-gtk3.cubes-symbolic" #define package_icon_path "com.ublinux.libublsettingsui-gtk3.dropbox-symbolic" #define LocalePath "/usr/share/locale" #define LocaleName "ubl-settings-kernel" #define icon_path "com.ublinux.ubl-settings-kernel" #define get_kernel_changelog_command(target) yon_char_unite("find /usr/lib/modules/ -maxdepth 2 -type f -iname \"pkgbase\" -exec grep -il \"",target,"\" {} + | xargs dirname | xargs -I {} cat \"{}/changelog\"", NULL) #define get_package_info_command(target) yon_char_append("pacman -Q --info ",target) #define get_package_is_installed_command(target) yon_char_append("pacman -Qqs ",target) #define yon_config_get_custom_command(target) yon_char_unite("ubconfig --source ",target," get boot KERNEL_BOOT",NULL) #define config_get_local_command "ubconfig --source system get boot KERNEL_BOOT" #define config_get_global_command "ubconfig --source global get boot KERNEL_BOOT" #define config_get_default_command "ubconfig --source default get boot KERNEL_BOOT" #define config_get_global_only_parameters "" #define config_get_local_only_parameters "" typedef char* string; string version_application; char *local; typedef struct { template_config_fields } config; typedef struct { template_window_fields GtkWidget *UpdateButton; GtkWidget *InfoButton; GtkWidget *LogButton; GtkWidget *BuildingButton; GtkWidget *KernelsUpperTree; GtkWidget *KernelsTree; GtkWidget *AdditionsUpperTree; GtkWidget *AdditionsTree; GtkWidget *MainNotebook; GtkWidget *KernelsPackageBox; GtkWidget *AdditionsPackageBox; GtkListStore *KernelsList; GtkListStore *AdditionsList; GtkSizeGroup *StatusSizeGroup; GtkSizeGroup *KernelSizeGroup; GtkSizeGroup *TagsSizeGroup; GtkSizeGroup *InstallSizeGroup; GtkSizeGroup *RunSizeGroup; GtkSizeGroup *DescriptionSizeGroup; } main_window; typedef struct { GtkWidget *window; GtkWidget *HeadLabel; GtkWidget *InfoLabel; }info_window; typedef struct { GtkWidget *window; GtkWidget *HeadLabel; GtkWidget *StatusBox; GtkWidget *CancelButton; GtkWidget *ExecuteButton; GtkWidget *KernelVersionCombo; GtkWidget *DebugCheck; GtkWidget *DriversCheck; }install_window; void yon_load_proceed(YON_CONFIG_TYPE type); void config_init(); void yon_main_window_complete(main_window *widgets); int yon_tag_add(GtkBox *target,char *tag_label, char *tag_style, char *icon_name); GtkWidget *yon_tab_row_new(GtkListBox *target, char *target_string, main_window *widgets); void on_update_clicked(GtkWidget *, main_window *widgets); void on_info_clicked(GtkWidget *, main_window *widgets); void on_changelog_clicked(GtkWidget *, main_window *widgets); void on_building_clicked(GtkWidget *, main_window *widgets); void on_install_module_toggled(GtkWidget *, char *path, main_window *widgets); void on_install_package_toggled(GtkWidget *, char *path, main_window *widgets); void on_boot_toggled(GtkWidget *, char *path, main_window *widgets); info_window *yon_info_window_new(); install_window *yon_install_window_new();