Added user password quality check

master
parent 6832f5f039
commit 014baf4582

@ -77,7 +77,7 @@ build: depend prepare
uninstall: uninstall:
@echo "Uninstall ..." @echo "Uninstall ..."
@for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \
# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ # PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
$(RM) "$${PATH_FILE_MO}"; \ $(RM) "$${PATH_FILE_MO}"; \
done done
@ -103,9 +103,9 @@ uninstall:
$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ $(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
fi fi
@if [[ -z "${DESTDIR}" ]]; then \ @if [[ -z "${DESTDIR}" ]]; then \
[[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [[ -d "${DESTDIR}/usr/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \
[[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ [[ -d "${DESTDIR}/usr/share/applications" ]] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \
fi fi
@echo "Uninstall: OK" @echo "Uninstall: OK"
@ -120,7 +120,7 @@ install: check uninstall
done done
@for SIZE in 16 32 48; do \ @for SIZE in 16 32 48; do \
install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "icons/apps/com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
done done
@for FILE_ICON in $(wildcard icons/*/*.svg); do \ @for FILE_ICON in $(wildcard icons/*/*.svg); do \
SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \ SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \
@ -134,7 +134,7 @@ install: check uninstall
# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ # install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ # sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \ sed -e "s+/usr/bin+/usr/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
fi fi
@if [[ -z "${DESTDIR}" ]]; then \ @if [[ -z "${DESTDIR}" ]]; then \
ldconfig -n ${DESTDIR}/usr/lib; \ ldconfig -n ${DESTDIR}/usr/lib; \

@ -18,6 +18,11 @@ include_directories(${JSON_INCLUDE_DIRS})
link_directories(${JSON_LIBRARY_DIRS}) link_directories(${JSON_LIBRARY_DIRS})
add_definitions(${JSON_CFLAGS_OTHER}) add_definitions(${JSON_CFLAGS_OTHER})
pkg_check_modules(PWQUALITY REQUIRED pwquality)
include_directories(${PWQUALITY_INCLUDE_DIRS})
link_directories(${PWQUALITY_LIBRARY_DIRS})
add_definitions(${PWQUALITY_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF) option(WEBKIT_FOUND "No" OFF)
@ -148,6 +153,7 @@ set(LIBRARIES
${UTILS_LIBRARIES} ${UTILS_LIBRARIES}
${VTE291_LIBRARIES} ${VTE291_LIBRARIES}
${JSON_LIBRARIES} ${JSON_LIBRARIES}
${PWQUALITY_LIBRARIES}
pthread pthread
ublsettings ublsettings
ublsettings-gtk3 ublsettings-gtk3

@ -341,6 +341,19 @@ void yon_devices_setup(main_window *widgets){
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
} }
void yon_os_password_open(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->OSFormatEncryptionEntry));
yon_password_function_set(window,(double*)yon_password_check_func);
yon_password_hash_list_set(window,NULL,NULL,0);
}
void yon_userdata_password_open(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->OSFormatEncryptionEntry));
yon_password_hash_list_set(window,NULL,NULL,0);
yon_password_function_set(window,(double*)yon_password_check_func);
}
void yon_install_init(main_window *widgets, enum YON_PAGES page){ void yon_install_init(main_window *widgets, enum YON_PAGES page){
yon_devices_setup(widgets); yon_devices_setup(widgets);
@ -349,7 +362,7 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){
GtkWidget *format_switch = NULL; GtkWidget *format_switch = NULL;
GtkWidget *device_label = NULL; GtkWidget *device_label = NULL;
GtkWidget *fs_type_combo = NULL; GtkWidget *fs_type_combo = NULL;
GtkWidget *partition_size_spin = NULL; GtkWidget *partition_size_spin = NULL;
GtkWidget *partition_size_combo = NULL; GtkWidget *partition_size_combo = NULL;
GtkWidget *partition_mark_entry = NULL; GtkWidget *partition_mark_entry = NULL;
GtkWidget *partition_fs_mark_entry = NULL; GtkWidget *partition_fs_mark_entry = NULL;

@ -498,6 +498,19 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){
main_config.install_complete=0; main_config.install_complete=0;
main_config.install_thread=0; main_config.install_thread=0;
} }
} else {
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL);
GtkWidget *image = gtk_button_get_image(GTK_BUTTON(widgets->NextButton));
gtk_image_set_from_icon_name(GTK_IMAGE(image),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LicenseAgreeRadio))){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
} else {
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_WELCOME);
}
yon_page_update(widgets);
main_config.save_done=0;
main_config.install_complete=0;
main_config.install_thread=0;
} }
} }

@ -70,14 +70,14 @@ void on_user_remove_clicked(GtkWidget *,yon_user_struct *user){
void yon_password_root_new(GtkWidget *, main_window *widgets){ void yon_password_root_new(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->UserRootPasswordEntry)); yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->UserRootPasswordEntry));
gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo)); yon_password_function_set(window,(double*)yon_password_check_func);
gtk_widget_show(window->Window); yon_password_hash_list_set(window,NULL,NULL,0);
} }
void yon_password_new(GtkWidget *, yon_user_struct *user){ void yon_password_new(GtkWidget *, yon_user_struct *user){
yon_password_window *window = yon_password_open(GTK_ENTRY(user->PasswordEntry)); yon_password_window *window = yon_password_open(GTK_ENTRY(user->PasswordEntry));
gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo)); yon_password_function_set(window,(double*)yon_password_check_func);
gtk_widget_show(window->Window); yon_password_hash_list_set(window,NULL,NULL,0);
} }
yon_user_struct *yon_user_struct_new(){ yon_user_struct *yon_user_struct_new(){

@ -1,4 +1,5 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
#include "pwquality.h"
config main_config; config main_config;
@ -6,6 +7,30 @@ void yon_license_init(main_window *widgets){
gtk_widget_set_sensitive(widgets->NextButton,0); gtk_widget_set_sensitive(widgets->NextButton,0);
} }
double yon_password_check_func(yon_password_window *window, const char *password_string){
pwquality_settings_t *settings = pwquality_default_settings();
int strength = pwquality_check(settings,password_string,NULL,NULL,NULL);
if (strength<5){
strength=5;
}
double password_strength = strength/100.0;
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(window->PasswordStrengthProgress),password_strength);
if (password_strength<0.3){
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
} else if (password_strength<0.6) {
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
} else {
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
}
return password_strength;
}
void yon_open_browser(GtkWidget *, char *link){ void yon_open_browser(GtkWidget *, char *link){
GtkWidget *window = yon_ubl_browser_window_open(link,TITLE_LABEL); GtkWidget *window = yon_ubl_browser_window_open(link,TITLE_LABEL);
if (window) if (window)
@ -720,6 +745,7 @@ void yon_main_window_create(main_window *widgets){
widgets->OSFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"OSFormatFSMarkEntry"); widgets->OSFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"OSFormatFSMarkEntry");
widgets->OSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo"); widgets->OSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo");
widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry"); widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry");
widgets->OSFormatEncryptionButton = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionButton");
widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree"); widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree");
widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree"); widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree");
@ -734,6 +760,7 @@ void yon_main_window_create(main_window *widgets){
widgets->UserdataFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatFSMarkEntry"); widgets->UserdataFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatFSMarkEntry");
widgets->UserdataFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionCombo"); widgets->UserdataFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionCombo");
widgets->UserdataFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionEntry"); widgets->UserdataFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionEntry");
widgets->UserdataFormatEncryptionButton = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionButton");
widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter")); widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter"));
widgets->LayoutsFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LayoutsFilter")); widgets->LayoutsFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LayoutsFilter"));
@ -904,7 +931,6 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->CommonGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->CommonGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->SameGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->SameGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->NextInstallationGPartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->NextInstallationGPartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->OSGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->UserdataGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->UserdataGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->GrubUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->GrubUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->GrubInstallGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->GrubInstallGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
@ -913,7 +939,6 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->CommonUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->CommonUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->SameUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->SameUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->NextInstallationUpdateGPartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationUpdateGPartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->OSUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->UserdataUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->UserdataUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->GrubUpdateUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->GrubUpdateUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->GrubInstallUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->GrubInstallUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
@ -947,7 +972,6 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->NextInstallationSysDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSysDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
@ -979,9 +1003,19 @@ void yon_main_window_create(main_window *widgets){
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->OSRevealer),GTK_SWITCH(widgets->OSFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->UserdataRevealer),GTK_SWITCH(widgets->UserdataFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->UserdataRevealer),GTK_SWITCH(widgets->UserdataFormatSwitch));
g_signal_connect(G_OBJECT(widgets->OSGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->OSUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->OSFormatEncryptionEntry);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->OSFormatEncryptionButton);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionButton),"clicked",G_CALLBACK(yon_os_password_open),widgets);
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->OSRevealer),GTK_SWITCH(widgets->OSFormatSwitch));
g_signal_connect(G_OBJECT(widgets->UserdataFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserdataFormatEncryptionButton);
g_signal_connect(G_OBJECT(widgets->UserdataFormatEncryptionButton),"clicked",G_CALLBACK(yon_userdata_password_open),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareSearchEntry),"icon-press",G_CALLBACK(on_pacman_icon_press),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareSearchEntry),"icon-press",G_CALLBACK(on_pacman_icon_press),widgets);
@ -1036,6 +1070,8 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(yon_on_about),NULL); g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(yon_on_about),NULL);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK); g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL); yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL);
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL);

@ -612,6 +612,7 @@ typedef struct
GtkWidget *OSFormatFSMarkEntry; GtkWidget *OSFormatFSMarkEntry;
GtkWidget *OSFormatEncryptionCombo; GtkWidget *OSFormatEncryptionCombo;
GtkWidget *OSFormatEncryptionEntry; GtkWidget *OSFormatEncryptionEntry;
GtkWidget *OSFormatEncryptionButton;
GtkWidget *OSSpinner; GtkWidget *OSSpinner;
GtkWidget *OSOverlay; GtkWidget *OSOverlay;
@ -628,6 +629,7 @@ typedef struct
GtkWidget *UserdataFormatFSMarkEntry; GtkWidget *UserdataFormatFSMarkEntry;
GtkWidget *UserdataFormatEncryptionCombo; GtkWidget *UserdataFormatEncryptionCombo;
GtkWidget *UserdataFormatEncryptionEntry; GtkWidget *UserdataFormatEncryptionEntry;
GtkWidget *UserdataFormatEncryptionButton;
GtkTreeModel *LanguagesFilter; GtkTreeModel *LanguagesFilter;
GtkTreeModel *LayoutsFilter; GtkTreeModel *LayoutsFilter;
@ -1450,4 +1452,7 @@ void yon_menu_open_submenu(yon_menu_window *window, yon_menu_item *item);
yon_menu_item *yon_menu_add_item(yon_menu_window *target_menu,const char *id, const char *name, int children); yon_menu_item *yon_menu_add_item(yon_menu_window *target_menu,const char *id, const char *name, int children);
void yon_menu_ungrab(yon_menu_window *window); void yon_menu_ungrab(yon_menu_window *window);
void on_menu_chosen(GtkWidget *, GtkListBoxRow* row, yon_menu_window *window); void on_menu_chosen(GtkWidget *, GtkListBoxRow* row, yon_menu_window *window);
gboolean yon_locale_window_load(language_window *window); gboolean yon_locale_window_load(language_window *window);
void yon_os_password_open(GtkWidget *, main_window *widgets);
void yon_userdata_password_open(GtkWidget *, main_window *widgets);
double yon_password_check_func(yon_password_window *window, const char *password_string);

@ -4,17 +4,13 @@
#define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install system on your computer") #define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install system on your computer")
#define OPEN_LABEL _("Open")
#define ADDITIONAL_ARGS yon_char_unite(\ #define ADDITIONAL_ARGS yon_char_unite(\
" --dry-run ",_("Dry run; Installation will not start"),"\n",\ " --dry-run ",_("Dry run; Installation will not start"),"\n",\
" --ini <PATH> ", _("Set ini file for configuration mode"),\ " --ini <PATH> ", _("Set ini file for configuration mode"),\
NULL) NULL)
#define KEYBOARD_TITLE_LABEL _("Keyboard layout") #define KEYBOARD_TITLE_LABEL _("Keyboard layout")
#define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed")
#define CANCEL_LABEL _("Cancel")
#define BACK_LABEL _("Back") #define BACK_LABEL _("Back")
#define NEXT_LABEL _("Next") #define NEXT_LABEL _("Next")
#define ROOT_ONLY_LABEL _("Root only") #define ROOT_ONLY_LABEL _("Root only")
@ -47,7 +43,7 @@ NULL)
#define ACCOUNT_NAME_LABEL _("Administrator name:") #define ACCOUNT_NAME_LABEL _("Administrator name:")
#define LOGIN__LABEL _("Administrator login:") #define LOGIN__LABEL _("Administrator login:")
#define PASSWORD__LABEL _("Administrator password:") #define PASSWORD__LABEL _("Administrator password:")
#define DEFAULT_LABEL _("Default") // #define DEFAULT_LABEL _("Default")
#define SET_PASSWORD_LABEL _("Set a password") #define SET_PASSWORD_LABEL _("Set a password")
#define DO_NOT_SET_PASSWORD_LABEL _("Do no set a password") #define DO_NOT_SET_PASSWORD_LABEL _("Do no set a password")
#define AUTOMATIC_LOGIN_LABEL _("Automatic login without password prompt") #define AUTOMATIC_LOGIN_LABEL _("Automatic login without password prompt")
@ -123,9 +119,6 @@ NULL)
#define INSTALL_BEGIN_HEADER_LABEL _("Installation configuration has ended") #define INSTALL_BEGIN_HEADER_LABEL _("Installation configuration has ended")
#define INSTALL_BEGIN_LABEL _("System installation is about to begin") #define INSTALL_BEGIN_LABEL _("System installation is about to begin")
#define DOCUMENTATION_LABEL _("Documentation")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_QUESTION_LABEL _("Would you like to read documentation in the Web?") #define DOCUMENTATION_QUESTION_LABEL _("Would you like to read documentation in the Web?")
#define DOCUMENTATION_HEAD_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") #define DOCUMENTATION_HEAD_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.")
#define DOCUMENTATION_CHECK_LABEL _("Always redirect to online documentation") #define DOCUMENTATION_CHECK_LABEL _("Always redirect to online documentation")
@ -143,18 +136,6 @@ NULL)
#define ERROR_LABEL _("Error has occured while installation process") #define ERROR_LABEL _("Error has occured while installation process")
#define LOG_VIEW_LABEL _("Log exploration") #define LOG_VIEW_LABEL _("Log exploration")
#define SAVE_LABEL _("Save")
#define LOAD_LABEL _("Load")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_CUSTOM_LABEL _("Load from specific file")
#define SAVE_ALL_LABEL _("Save configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_CUSTOM_LABEL _("Save to specific file")
#define CONFIGURATION_TITLE_LABEL _("Configuration") #define CONFIGURATION_TITLE_LABEL _("Configuration")
#define CONFIGURATION_FINISH_HEAD_LABEL _("Installer configuration has been finished") #define CONFIGURATION_FINISH_HEAD_LABEL _("Installer configuration has been finished")

@ -343,3 +343,15 @@ button {
color:@theme_selected_fg_color; color:@theme_selected_fg_color;
opacity: 1; opacity: 1;
} }
.greenBox > trough > progress{
background-color: #99eaab;
}
.redBox > trough > progress{
background-color: #ea9999;
}
.yellowBox > trough > progress{
background-color: #f3f0ac;
}
Loading…
Cancel
Save