annotate scripts/legacy/setstr.m @ 33625:d213a148b3f1 default tip @

ensure exp. terminal widget has focus at startup * main-window.cc (main_window): call focus_command_window only if event loop is idle by using a single shot timer * main-window.h: make focus_command_window a public slot
author Torsten Lilge <ttl-octave@mailbox.org>
date Sun, 26 May 2024 02:29:44 +0200
parents 2e484f9f1f18
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
32632
2e484f9f1f18 maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 31706
diff changeset
3 ## Copyright (C) 2003-2024 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 27898
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ##
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 ## This file is part of Octave.
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 ##
28944
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
28944
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
13 ## (at your option) any later version.
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 ##
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
28944
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
18 ## GNU General Public License for more details.
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 ##
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
28944
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
22 ## <https://www.gnu.org/licenses/>.
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
23 ##
d39b09b4c5db maint: Use identical Copyright text in scripts/.
Rik <rik@octave.org>
parents: 27923
diff changeset
24 ########################################################################
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 ## -*- texinfo -*-
25726
a0923a7878e3 Update legacy function docstrings.
Rik <rik@octave.org>
parents: 25720
diff changeset
27 ## @deftypefn {} {@var{s} =} setstr (@var{x})
a0923a7878e3 Update legacy function docstrings.
Rik <rik@octave.org>
parents: 25720
diff changeset
28 ## This function is obsolete. Use @code{char} instead.
a0923a7878e3 Update legacy function docstrings.
Rik <rik@octave.org>
parents: 25720
diff changeset
29 ## @seealso{char}
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 ## @end deftypefn
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31
25720
e9f107d31799 warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents: 25718
diff changeset
32 ## At one time, Matlab docs stated that this function is obsolete and would be
e9f107d31799 warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents: 25718
diff changeset
33 ## removed in some future version. Now users are told that it should be
e9f107d31799 warning_ids.m: Document new Octave:legacy-function warning.
Rik <rik@octave.org>
parents: 25718
diff changeset
34 ## avoided, but there is no mention of possible future removal.
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 function retval = setstr (varargin)
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 persistent warned = false;
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 if (! warned)
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 warned = true;
25718
a3448e97ccc8 new scripts/legacy directory for Matlab functions that refuse to die
John W. Eaton <jwe@octave.org>
parents: 25715
diff changeset
41 warning ("Octave:legacy-function",
a3448e97ccc8 new scripts/legacy directory for Matlab functions that refuse to die
John W. Eaton <jwe@octave.org>
parents: 25715
diff changeset
42 "setstr is obsolete; please use char instead");
25715
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 endif
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 retval = char (varargin{:});
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46
216321ca4cc4 revive setstr (bug #54417)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 endfunction