Mercurial > hg > octave-nkf
diff scripts/prefs/preferences.m @ 17019:35a565fed4bd
preferences.m: Issue a warning if called and GUI is not running.
* scripts/prefs/preferences.m: Issue a warning if called and GUI is not
running.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 19 Jul 2013 16:24:45 -0700 |
parents | 8003a4f013be |
children | d6499c14021c |
line wrap: on
line diff
--- a/scripts/prefs/preferences.m +++ b/scripts/prefs/preferences.m @@ -18,22 +18,17 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {} preferences -## Display preferences settings for Octave. -## -## If in GUI mode, display using the preferences dialog, otherwise display -## the preferences with the @code{edit} function. -## -## @seealso{getpref, setpref, addpref, rmpref} +## Display the GUI preferences dialog window for Octave. ## @end deftypefn ## Author: John Donoghue ## Version: 0.01 function preferences () - if (! __octave_link_enabled__ ()) - edit (prefsfile ()); + if (isguirunning ()) + __octave_link_show_preferences__ (); else - __octave_link_show_preferences__ (); + warning ("preferences: GUI must be running to use preferences dialog"); endif endfunction