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 */
|
||||
if (!(title && *title))
|
||||
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);
|
||||
window->user_data(NULL);
|
||||
|
||||
@ -479,7 +479,7 @@ int a_Dialog_user_password(const char *title, const char *msg,
|
||||
window_h = y;
|
||||
window->size(window_w, window_h);
|
||||
window->size_range(window_w, window_h, window_w, window_h);
|
||||
window->resizable(window);
|
||||
window->resizable(window.get());
|
||||
|
||||
window->show();
|
||||
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);
|
||||
(*cb)(user, password, vp);
|
||||
}
|
||||
delete window;
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
Reference in New Issue
Block a user