gui-branch
an 2019-03-27 05:42:22 -04:00
parent 2cd5be77d3
commit da542c84e8
1 changed files with 5 additions and 6 deletions

View File

@ -50,7 +50,7 @@ unsafe fn setup_draw_area(b: *mut GtkBuilder, edit: Rc<Option<MapEditorState>>)
{
let rend = Box::from_raw(rend as *mut RenderState);
g_object_unref(rend.im_nomap as _);
g_object_unref(rend.im_nomap as gpointer as _);
g_object_unref(rend.ax as _);
g_object_unref(rend.ay as _);
@ -159,7 +159,7 @@ unsafe fn setup_about_dlg(b: *mut GtkBuilder)
connect_hide(dlg as _);
connect(btn as _, c_str!("activate"), c_show_act as _, dlg as _);
g_object_unref(img as _);
g_object_unref(img as gpointer as _);
}
/// Sets up explicit window finalization for the main window.
@ -231,14 +231,13 @@ unsafe fn setup_win_main(b: *mut GtkBuilder,
let edit = edit as *mut Option<MapEditorState>;
let edit = &mut *edit;
if let Some(_) = *edit {
if edit.is_some() {
let titl = c_str!("Confirm");
let text = c_str!("Are you sure you want to create a new project? \
Data may be lost.");
match run_ok_cancel_dlg(titl, text) {
true => {}
false => return,
if !run_ok_cancel_dlg(titl, text) {
return;
}
}