Mercurial > hg > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
17018:abe91fe896a8 | 17019:35a565fed4bd |
---|---|
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {} preferences | 20 ## @deftypefn {Function File} {} preferences |
21 ## Display preferences settings for Octave. | 21 ## Display the GUI preferences dialog window for Octave. |
22 ## | |
23 ## If in GUI mode, display using the preferences dialog, otherwise display | |
24 ## the preferences with the @code{edit} function. | |
25 ## | |
26 ## @seealso{getpref, setpref, addpref, rmpref} | |
27 ## @end deftypefn | 22 ## @end deftypefn |
28 | 23 |
29 ## Author: John Donoghue | 24 ## Author: John Donoghue |
30 ## Version: 0.01 | 25 ## Version: 0.01 |
31 | 26 |
32 function preferences () | 27 function preferences () |
33 if (! __octave_link_enabled__ ()) | 28 if (isguirunning ()) |
34 edit (prefsfile ()); | 29 __octave_link_show_preferences__ (); |
35 else | 30 else |
36 __octave_link_show_preferences__ (); | 31 warning ("preferences: GUI must be running to use preferences dialog"); |
37 endif | 32 endif |
38 endfunction | 33 endfunction |
39 | 34 |