Skip to content

Commit

Permalink
Fix dialogs on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
paolostivanin committed Mar 1, 2024
1 parent 1a8e6ff commit 145cb3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/change-db-cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ change_db (AppData *app_data)
g_free (old_db_path);
break;
case GTK_RESPONSE_CANCEL:
gtk_widget_destroy (changedb_diag);
return QUIT_APP;
default:
break;
gtk_widget_hide (changedb_diag);
return QUIT_APP;
}
gtk_widget_destroy (changedb_diag);

Expand Down
1 change: 1 addition & 0 deletions src/message-dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ get_confirmation_from_dialog (GtkWidget *parent,
NULL);

gtk_container_set_border_width (GTK_CONTAINER(dialog), 5);
gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(dialog))), 8);

GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG(dialog));
GtkWidget *label = gtk_label_new (NULL);
Expand Down
5 changes: 2 additions & 3 deletions src/new-db-cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ new_db (AppData *app_data)
g_string_free (new_db_path_with_suffix, TRUE);
break;
case GTK_RESPONSE_CANCEL:
gtk_widget_destroy (newdb_diag);
return QUIT_APP;
default:
break;
gtk_widget_hide (newdb_diag);
return QUIT_APP;
}
gtk_widget_destroy (newdb_diag);

Expand Down

0 comments on commit 145cb3b

Please sign in to comment.