Commit 2ea31da6 authored by Claes Sjofors's avatar Claes Sjofors

wb_wnav code cleaned

parent a6e5d6f3
......@@ -693,67 +693,5 @@ int WNavGtk::prompt_dialog( char *title, char *text, char **value)
return 0;
}
return 0;
#if 0
Widget dialog;
XmString text_str;
XmString title_str;
Arg args[10];
int i;
XEvent Event;
text_str = XmStringCreateLocalized( wnav_dialog_convert_text(text));
title_str = XmStringCreateLocalized( title);
i = 0;
XtSetArg( args[i], XmNselectionLabelString, text_str); i++;
XtSetArg( args[i], XmNdialogTitle, title_str); i++;
if ( dialog_width && dialog_height)
{
XtSetArg( args[i], XmNwidth, dialog_width); i++;
XtSetArg( args[i], XmNheight, dialog_height); i++;
XtSetArg( args[i], XmNx, dialog_x); i++;
XtSetArg( args[i], XmNy, dialog_y); i++;
}
// XtSetArg( args[i], XmNautoUnmanage, False); i++;
dialog = XmCreatePromptDialog( parent_wid, "Info", args, i);
XmStringFree( text_str);
XmStringFree( title_str);
XtUnmanageChild( XmSelectionBoxGetChild( dialog, XmDIALOG_HELP_BUTTON));
XtAddCallback( dialog, XmNokCallback, wnav_message_dialog_read, this);
XtAddCallback( dialog, XmNcancelCallback, wnav_message_dialog_cancel, this);
// Connect the window manager close-button to exit
flow_AddCloseVMProtocolCb( XtParent(dialog),
(XtCallbackProc)wnav_message_dialog_cancel, this);
XtManageChild( dialog);
XtPopup( XtParent(dialog), XtGrabNone);
dialog_ok = 0;
dialog_cancel = 0;
dialog_help = 0;
for (;;)
{
XtAppNextEvent( XtWidgetToApplicationContext( dialog), &Event);
XtDispatchEvent( &Event);
if ( dialog_ok)
{
*value = dialog_value;
XtDestroyWidget( dialog);
return 1;
}
if ( dialog_cancel)
{
strcpy( dialog_value, "");
*value = dialog_value;
XtDestroyWidget( dialog);
return 0;
}
}
#endif
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment