diff --git a/source/libublsettingsui-gtk3-filechooser.c b/source/libublsettingsui-gtk3-filechooser.c index cdb88e0..4930a8c 100644 --- a/source/libublsettingsui-gtk3-filechooser.c +++ b/source/libublsettingsui-gtk3-filechooser.c @@ -4,6 +4,10 @@ void on_file_chooser_accept(GtkWidget *, filechooser_window *window){ switch (gtk_file_chooser_get_action(GTK_FILE_CHOOSER(window->MainFileChooser))){ case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER: case GTK_FILE_CHOOSER_ACTION_SAVE: + if (yon_char_is_empty(window->last_success_selection)){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(NOTHING_CHOSEN_LABEL),5,BACKGROUND_IMAGE_FAIL_TYPE); + return; + } window->responce=GTK_RESPONSE_APPLY; break; @@ -84,7 +88,7 @@ filechooser_window *yon_file_chooser_window_new(GtkFileChooserAction action){ g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_file_chooser_cancel),window); g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_file_chooser_accept),window); g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_file_chooser_exit),window); - + yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"file_chooser_window"); gtk_file_chooser_set_action(GTK_FILE_CHOOSER(window->MainFileChooser),action); switch(action){ case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER: