Filechooser re-opening fix

pull/38/head
parent 9a8169194a
commit ea1d7ff0ac

@ -70,6 +70,10 @@ void yon_file_chooser_set_button_label(char *label){
}
void on_file_chooser_exit(GtkWidget *, filechooser_window *){
__yon_filechooser_window = NULL;
}
filechooser_window *yon_file_chooser_window_new(GtkFileChooserAction action){
if (!__yon_filechooser_window){
filechooser_window *window = malloc(sizeof(filechooser_window));
@ -87,6 +91,7 @@ filechooser_window *yon_file_chooser_window_new(GtkFileChooserAction action){
g_signal_connect(G_OBJECT(window->MainFileChooser),"selection-changed",G_CALLBACK(on_file_chooser_selected),window);
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);
gtk_file_chooser_set_action(GTK_FILE_CHOOSER(window->MainFileChooser),action);
switch(action){

Loading…
Cancel
Save