comparison scripts/ui/private/message_dialog.m @ 16512:7f2395651a1c

dialog boxes with Qt widgets * dialog.h, dialog.cc: New files. * libgui/src/module.mk: Update file lists. * main-window.h, main-window.ccmain_window::connect_uiwidget_links, main_window::handle_create_dialog, main_window::handle_create_listview, main_window::handle_create_inputlayout): New functions. (main_window::construct): Call connect_uiwidget_links. * octave-link.h, octave-link.cc (octave_link::message_dialog, octave_link::do_message_dialog, octave_link::list_dialog, octave_link::do_list_dialog, octave_link::input_dialog, octave_link::do_input_dialog): New functions. * octave-qt-link.h, octave-qt-link.cc (octave_qt_link::message_dialog, octave_qt_link::do_message_dialog, octave_qt_link::list_dialog, octave_qt_link::do_list_dialog, octave_qt_link::input_dialog, octave_qt_link::do_input_dialog, make_qstring_list): New functions. * octave-link.cc (F__octave_link_edit_file__): Call flush_octave_stdout before running the edit file action. (F__octave_link_message_dialog__, F__octave_link_list_dialog__, __octave_link_input_dialog__): New functions. * errordlg.m, helpdlg.m, inputdlg.m, listdlg.m, msgbox.m, warndlg.m: New demos adapted from dlgtest.m * dlgtest.m: Delete. * scripts/java/module.mk: Remove it from the list of files. * inputdlg.m: Try __octave_link_input_dialog__ first. Only try java method if JAVA feature is available. * listdlg.m: Likwise, for __octave_link_list_dialog__. * private/message_dialog.m: Likewise, for __octave_link_message_dialog__.
author Daniel J Sebald <daniel.sebald@ieee.org>, John W. Eaton <jwe@octave.org>
date Sat, 13 Apr 2013 15:22:34 -0400
parents f19e24c97b20
children 6ae555fc8c43
comparison
equal deleted inserted replaced
16511:eee1b78d031f 16512:7f2395651a1c
50 otherwise 50 otherwise
51 error ("%s: ICON is not a valid type", caller); 51 error ("%s: ICON is not a valid type", caller);
52 endswitch 52 endswitch
53 endif 53 endif
54 54
55 retval = __octave_link_message_dialog__ (dlg, msg, title);
56 if (retval > 0)
57 return;
58 endif
59
55 if (__have_feature__ ("JAVA")) 60 if (__have_feature__ ("JAVA"))
56 retval = javaMethod (dlg, "org.octave.JDialogBox", msg, title); 61 retval = javaMethod (dlg, "org.octave.JDialogBox", msg, title);
57 if (retval) 62 if (retval > 0)
58 return; 63 return;
59 endif 64 endif
60 endif 65 endif
61 66
62 ## FIXME -- provide terminal-based implementation here? 67 ## FIXME -- provide terminal-based implementation here?
63 68
64 if (! retval) 69 if (retval <= 0)
65 error ("%s is not available in this version of Octave", dlg); 70 error ("%s is not available in this version of Octave", dlg);
66 endif 71 endif
67 72
68 endfunction 73 endfunction