Manage a window.
This commit is contained in:
@ -429,7 +429,7 @@ int a_Dialog_user_password(const char *title, const char *msg,
|
|||||||
/* window is resized below */
|
/* window is resized below */
|
||||||
if (!(title && *title))
|
if (!(title && *title))
|
||||||
title = "Flenser: User/Password";
|
title = "Flenser: User/Password";
|
||||||
Fl_Window *window = new Fl_Window(window_w,window_h,title);
|
auto window = std::make_unique< Fl_Window >(window_w,window_h,title);
|
||||||
Fl_Group::current(0);
|
Fl_Group::current(0);
|
||||||
window->user_data(NULL);
|
window->user_data(NULL);
|
||||||
|
|
||||||
@ -479,7 +479,7 @@ int a_Dialog_user_password(const char *title, const char *msg,
|
|||||||
window_h = y;
|
window_h = y;
|
||||||
window->size(window_w, window_h);
|
window->size(window_w, window_h);
|
||||||
window->size_range(window_w, window_h, window_w, window_h);
|
window->size_range(window_w, window_h, window_w, window_h);
|
||||||
window->resizable(window);
|
window->resizable(window.get());
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
while (window->shown())
|
while (window->shown())
|
||||||
@ -495,7 +495,6 @@ int a_Dialog_user_password(const char *title, const char *msg,
|
|||||||
_MSG("a_Dialog_user_passwd: ok = %d\n", ok);
|
_MSG("a_Dialog_user_passwd: ok = %d\n", ok);
|
||||||
(*cb)(user, password, vp);
|
(*cb)(user, password, vp);
|
||||||
}
|
}
|
||||||
delete window;
|
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user