lint
parent
2cd5be77d3
commit
da542c84e8
|
@ -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);
|
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.ax as _);
|
||||||
g_object_unref(rend.ay as _);
|
g_object_unref(rend.ay as _);
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ unsafe fn setup_about_dlg(b: *mut GtkBuilder)
|
||||||
connect_hide(dlg as _);
|
connect_hide(dlg as _);
|
||||||
connect(btn as _, c_str!("activate"), c_show_act as _, 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.
|
/// 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 = edit as *mut Option<MapEditorState>;
|
||||||
let edit = &mut *edit;
|
let edit = &mut *edit;
|
||||||
|
|
||||||
if let Some(_) = *edit {
|
if edit.is_some() {
|
||||||
let titl = c_str!("Confirm");
|
let titl = c_str!("Confirm");
|
||||||
let text = c_str!("Are you sure you want to create a new project? \
|
let text = c_str!("Are you sure you want to create a new project? \
|
||||||
Data may be lost.");
|
Data may be lost.");
|
||||||
|
|
||||||
match run_ok_cancel_dlg(titl, text) {
|
if !run_ok_cancel_dlg(titl, text) {
|
||||||
true => {}
|
return;
|
||||||
false => return,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue