Mercurial > octave-nkf
changeset 18408:a9cec5517d92 gui-release
maint: Periodic merge of stable to gui-release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 29 Jan 2014 15:28:13 -0500 |
parents | 187f3a3429e1 (current diff) 61d9ef05b06b (diff) |
children | 1e148ecdeedd 073fbe7e6a3a |
files | configure.ac examples/fortdemo.cc examples/fortsub.f libgui/languages/be_BY.ts libgui/languages/de_DE.ts libgui/languages/en_US.ts libgui/languages/es_ES.ts libgui/languages/fr_FR.ts libgui/languages/nl_NL.ts libgui/languages/pt_BR.ts libgui/languages/pt_PT.ts libgui/languages/ru_RU.ts libgui/languages/uk_UA.ts libgui/src/files-dock-widget.cc libinterp/octave-value/ov-class.cc |
diffstat | 34 files changed, 287 insertions(+), 182 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Tue Jan 28 18:19:39 2014 -0500 +++ b/configure.ac Wed Jan 29 15:28:13 2014 -0500 @@ -2726,9 +2726,14 @@ case $host_os in *darwin*) ## Qt might be installed in framework - QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" - QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" - AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes || test -n $QT_LDFLAGS]) + if test -z "$QT_LIBS"; then + QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" + QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" + ## Enabling link_all_deps works around libtool's imperfect handling + ## of the -F flag + AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], + [test $link_all_deps = yes || test -n "$QT_LDFLAGS"]) + fi ;; esac
--- a/doc/interpreter/Makefile.am Tue Jan 28 18:19:39 2014 -0500 +++ b/doc/interpreter/Makefile.am Wed Jan 29 15:28:13 2014 -0500 @@ -59,8 +59,8 @@ $(top_srcdir)/examples/addtwomatrices.cc \ $(top_srcdir)/examples/celldemo.cc \ $(top_srcdir)/examples/embedded.cc \ - $(top_srcdir)/examples/fortdemo.cc \ - $(top_srcdir)/examples/fortsub.f \ + $(top_srcdir)/examples/fortrandemo.cc \ + $(top_srcdir)/examples/fortransub.f \ $(top_srcdir)/examples/funcdemo.cc \ $(top_srcdir)/examples/globaldemo.cc \ $(top_srcdir)/examples/helloworld.cc \
--- a/doc/interpreter/debug.txi Tue Jan 28 18:19:39 2014 -0500 +++ b/doc/interpreter/debug.txi Wed Jan 29 15:28:13 2014 -0500 @@ -44,10 +44,10 @@ There are two basic means of interrupting the execution of an Octave script. These are breakpoints (@pxref{Breakpoints}), discussed in the next -section and interruption based on some condition. +section, and interruption based on some condition. Octave supports three means to stop execution based on the values set in -the functions @code{debug_on_interrupt}, @code{debug_on_warning} and +the functions @code{debug_on_interrupt}, @code{debug_on_warning}, and @code{debug_on_error}. @DOCSTRING(debug_on_interrupt) @@ -59,13 +59,13 @@ @node Leaving Debug Mode @section Leaving Debug Mode -To leave the debug mode, use either @code{dbcont} -or @code{return}. +Use either @code{dbcont} or @code{return} to leave the debug mode and +continue the normal execution of the script. @DOCSTRING(dbcont) -To quit debug mode and return directly to the prompt @code{dbquit} -should be used instead +To quit debug mode and return directly to the prompt without executing +any additional code use @code{dbquit}. @DOCSTRING(dbquit) @@ -75,21 +75,21 @@ @node Breakpoints @section Breakpoints -Breakpoints can be set in any Octave function, using the @code{dbstop} +Breakpoints can be set in any m-file function by using the @code{dbstop} function. @DOCSTRING(dbstop) @noindent Breakpoints in class methods are also supported (e.g., -@code{dbstop("@@class/method")}). However, breakpoints cannot be set in -built-in functions (e.g., @code{sin}, etc.) or dynamically loaded function +@code{dbstop ("@@class/method")}). However, breakpoints cannot be set in +built-in functions (e.g., @code{sin}, etc.) or dynamically loaded functions (i.e., oct-files). -To set a breakpoint immediately on entering a function, the breakpoint -should be set to line 1. The leading comment block will be ignored and -the breakpoint will be set to the first executable statement in the -function. For example: +To set a breakpoint immediately upon entering a function use line number 1, or +omit the line number entirely and just give the function name. When setting +the breakpoint Octave will ignore the leading comment block, and the breakpoint +will be set on the first executable statement in the function. For example: @example @group @@ -101,7 +101,7 @@ @noindent Note that the return value of @code{29} means that the breakpoint was effectively set to line 29. The status of breakpoints in a function can -be queried with the @code{dbstatus} function. +be queried with @code{dbstatus}. @DOCSTRING(dbstatus) @@ -113,12 +113,6 @@ @DOCSTRING(dbclear) @noindent -These functions can be used together to clear all the breakpoints in a -particular function. For example: - -@example -dbclear ("asind", dbstatus ("asind")); -@end example A breakpoint may also be set in a subfunction. For example, if a file contains the functions @@ -135,8 +129,7 @@ @end example @noindent -then a breakpoint can be set at the start of the subfunction directly -with +then a breakpoint can be set at the start of the subfunction directly with @example @group @@ -145,8 +138,14 @@ @end group @end example -Note that @code{filemarker} returns a character that marks the -subfunctions from the file containing them. +Note that @code{filemarker} returns the character that marks subfunctions from +the file containing them. Unless the default has been changed this character +is @samp{>}. Thus, a quicker and more normal way to set the breakpoint would +be + +@example +dbstop func1>func2 +@end example Another simple way of setting a breakpoint in an Octave script is the use of the @code{keyboard} function. @@ -154,16 +153,16 @@ @DOCSTRING(keyboard) @noindent -The @code{keyboard} function is typically placed in a script at the -point where the user desires that the execution be stopped. It -automatically sets the running script into the debug mode. +The @code{keyboard} function is placed in a script at the point where the user +desires that the execution be stopped. It automatically sets the running +script into the debug mode. @node Debug Mode @section Debug Mode There are three additional support functions that allow the user to -interrogate where in the execution of a script Octave entered the debug -mode and to print the code in the script surrounding the point where +find out where in the execution of a script Octave entered the debug +mode, and to print the code in the script surrounding the point where Octave entered debug mode. @DOCSTRING(dbwhere) @@ -182,14 +181,21 @@ @DOCSTRING(dbstep) -When in debug mode the @key{RETURN} will execute the last entered command. +When in debug mode the @key{RETURN} key will execute the last entered command. This is useful, for example, after hitting a breakpoint and entering -@code{dbstep}. After that one can advance line by line through the code +@code{dbstep} once. After that, one can advance line by line through the code with only a single key stroke. @node Call Stack @section Call Stack +The function being debugged may be the leaf node of a series of function calls. +After examining values in the current subroutine it may turn out that the +problem occurred in earlier pieces of code. Use @code{dbup} and @code{dbdown} +to move up and down through the series of function calls to locate where +variables first took on the wrong values. @code{dbstack} shows the entire +series of function calls and at what level debugging is currently taking place. + @DOCSTRING(dbstack) @DOCSTRING(dbup)
--- a/doc/interpreter/external.txi Tue Jan 28 18:19:39 2014 -0500 +++ b/doc/interpreter/external.txi Wed Jan 29 15:28:13 2014 -0500 @@ -1037,14 +1037,14 @@ given in the following example, where the C++ wrapper is @example -@EXAMPLEFILE(fortdemo.cc) +@EXAMPLEFILE(fortrandemo.cc) @end example @noindent and the Fortran function is @example -@EXAMPLEFILE(fortsub.f) +@EXAMPLEFILE(fortransub.f) @end example This example demonstrates most of the features needed to link to an @@ -1054,13 +1054,13 @@ @example @group -mkoctfile fortdemo.cc fortsub.f -[b, s] = fortdemo (1:3) +mkoctfile fortrandemo.cc fortransub.f +[b, s] = fortrandemo (1:3) @result{} b = 1.00000 0.50000 0.33333 s = There are 3 values in the input vector -[b, s] = fortdemo (0:3) -error: fortdemo: fortsub: divide by zero +[b, s] = fortrandemo (0:3) +error: fortrandemo: fortransub: divide by zero @end group @end example @@ -1712,12 +1712,11 @@ @example @group -myfeval ("sin", 1) a = myfeval ("sin", 1) -@result{} Hello, World! - I have 2 inputs and 1 outputs - I'm going to call the interpreter function sin - a = 0.84147 +@result{} Starting file myfeval.mex + I have 2 inputs and 1 outputs + I'm going to call the interpreter function sin + a = 0.84147 @end group @end example @@ -1811,8 +1810,7 @@ This is the norm of the matrix: 34.4952 - +$ @end group @end example -
--- a/doc/interpreter/linalg.txi Tue Jan 28 18:19:39 2014 -0500 +++ b/doc/interpreter/linalg.txi Wed Jan 29 15:28:13 2014 -0500 @@ -20,10 +20,19 @@ @chapter Linear Algebra @cindex linear algebra -This chapter documents the linear algebra functions of Octave. -Reference material for many of these functions may be found in -Golub and Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins, -1989, and in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992. +This chapter documents the linear algebra functions provided in Octave. +Reference material for many of these functions may be found in Golub and +Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins, 1989, and +in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992. The +@cite{@sc{lapack} Users' Guide} is available at: +@cite{http://www.netlib.org/lapack/lug/} + +A common text for engineering courses is G. Strang, @cite{Linear Algebra +and Its Applications, 4th Edition}. It has become a widespread reference +for linear algebra. An alternative is P. Lax @cite{Linear Algebra and +Its Applications}, and also is a good choice. It claims to be suitable +for high school students with substantial mathematical interests as well +as first-year undergraduates. @menu * Techniques Used for Linear Algebra:: @@ -37,18 +46,18 @@ @section Techniques Used for Linear Algebra @cindex linear algebra, techniques -Octave includes a polymorphic solver, that selects an appropriate -matrix factorization depending on the properties of the matrix itself. -Generally, the cost of determining the matrix type is small relative to -the cost of factorizing the matrix itself, but in any case the matrix -type is cached once it is calculated, so that it is not re-determined -each time it is used in a linear equation. +Octave includes a polymorphic solver that selects an appropriate matrix +factorization depending on the properties of the matrix itself. +Generally, the cost of determining the matrix type is small relative to +the cost of factorizing the matrix itself. In any case the matrix type +is cached once it is calculated so that it is not re-determined each +time it is used in a linear equation. -The selection tree for how the linear equation is solve or a matrix -inverse is form is given by +The selection tree for how the linear equation is solved or a matrix +inverse is formed is given by: @enumerate 1 -@item If the matrix is upper or lower triangular sparse a forward or +@item If the matrix is upper or lower triangular sparse use a forward or backward substitution using the @sc{lapack} xTRTRS function, and goto 4. @c Permuted triangular matrices currently disabled in the code @@ -76,10 +85,10 @@ used with care. It should be noted that the test for whether a matrix is a candidate for -Cholesky@tie{}factorization, performed above and by the @code{matrix_type} -function, does not give a certainty that the matrix is +Cholesky@tie{}factorization, performed above, and by the @code{matrix_type} +function, does not make certain that the matrix is Hermitian. However, the attempt to factorize the matrix will quickly -flag a non-Hermitian matrix. +detect a non-Hermitian matrix. @node Basic Matrix Functions @section Basic Matrix Functions
--- a/examples/Makefile.am Tue Jan 28 18:19:39 2014 -0500 +++ b/examples/Makefile.am Wed Jan 29 15:28:13 2014 -0500 @@ -34,8 +34,8 @@ addtwomatrices.cc \ celldemo.cc \ embedded.cc \ - fortdemo.cc \ - fortsub.f \ + fortrandemo.cc \ + fortransub.f \ funcdemo.cc \ globaldemo.cc \ helloworld.cc \
--- a/examples/fortdemo.cc Tue Jan 28 18:19:39 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -#include <octave/oct.h> -#include <octave/f77-fcn.h> - -extern "C" -{ - F77_RET_T - F77_FUNC (fortsub, FORTSUB) - (const int&, double*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); -} - -DEFUN_DLD (fortdemo, args, , "Fortran Demo") -{ - octave_value_list retval; - int nargin = args.length (); - - if (nargin != 1) - print_usage (); - else - { - NDArray a = args(0).array_value (); - if (! error_state) - { - double *av = a.fortran_vec (); - octave_idx_type na = a.numel (); - OCTAVE_LOCAL_BUFFER (char, ctmp, 128); - - F77_XFCN (fortsub, FORTSUB, - (na, av, ctmp F77_CHAR_ARG_LEN (128))); - - retval(1) = std::string (ctmp); - retval(0) = a; - } - } - return retval; -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/fortrandemo.cc Wed Jan 29 15:28:13 2014 -0500 @@ -0,0 +1,35 @@ +#include <octave/oct.h> +#include <octave/f77-fcn.h> + +extern "C" +{ + F77_RET_T + F77_FUNC (fortransub, FORTSUB) + (const int&, double*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL); +} + +DEFUN_DLD (fortrandemo, args, , "Fortran Demo") +{ + octave_value_list retval; + int nargin = args.length (); + + if (nargin != 1) + print_usage (); + else + { + NDArray a = args(0).array_value (); + if (! error_state) + { + double *av = a.fortran_vec (); + octave_idx_type na = a.numel (); + OCTAVE_LOCAL_BUFFER (char, ctmp, 128); + + F77_XFCN (fortransub, FORTSUB, + (na, av, ctmp F77_CHAR_ARG_LEN (128))); + + retval(1) = std::string (ctmp); + retval(0) = a; + } + } + return retval; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/fortransub.f Wed Jan 29 15:28:13 2014 -0500 @@ -0,0 +1,21 @@ + subroutine fortransub (n, a, s) + implicit none + character*(*) s + real*8 a(*) + integer*4 i, n, ioerr + do i = 1, n + if (a(i) .eq. 0d0) then + call xstopx ('fortransub: divide by zero') + else + a(i) = 1d0 / a(i) + endif + enddo + write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr) + $ 'There are ', n, + $ ' values in the input vector', char(0) + if (ioerr .ne. 0) then + call xstopx ('fortransub: error writing string') + endif + return + end +
--- a/examples/fortsub.f Tue Jan 28 18:19:39 2014 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - subroutine fortsub (n, a, s) - implicit none - character*(*) s - real*8 a(*) - integer*4 i, n, ioerr - do i = 1, n - if (a(i) .eq. 0d0) then - call xstopx ('fortsub: divide by zero') - else - a(i) = 1d0 / a(i) - endif - enddo - write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr) - $ 'There are ', n, - $ ' values in the input vector', char(0) - if (ioerr .ne. 0) then - call xstopx ('fortsub: error writing string') - endif - return - end -
--- a/examples/mex_demo.c Tue Jan 28 18:19:39 2014 -0500 +++ b/examples/mex_demo.c Wed Jan 29 15:28:13 2014 -0500 @@ -10,13 +10,13 @@ // // To compile this file, type the command // -// mkoctfile mex_demo.c +// mkoctfile --mex mex_demo.c // // from within Octave or from the shell prompt. This will create a file // called mex_demo.mex that can be loaded by Octave. To test the mex_demo.mex // file, start Octave and type the command // -// [d] = mex_demo ("easy as", 1, 2, 3) +// d = mex_demo ("easy as", 1, 2, 3) // // at the Octave prompt. Octave should respond by printing //
--- a/examples/myfeval.c Tue Jan 28 18:19:39 2014 -0500 +++ b/examples/myfeval.c Wed Jan 29 15:28:13 2014 -0500 @@ -6,7 +6,7 @@ { char *str; - mexPrintf ("Hello, World!\n"); + mexPrintf ("Starting file myfeval.mex\n"); mexPrintf ("I have %d inputs and %d outputs\n", nrhs, nlhs); @@ -17,7 +17,11 @@ mexPrintf ("I'm going to call the function %s\n", str); - mexCallMATLAB (nlhs, plhs, nrhs-1, (mxArray*)prhs+1, str); + if (nlhs == 0) + nlhs = 1; // Octave's automatic 'ans' variable + + /* Cast prhs just to get rid of 'const' qualifier and stop compile warning */ + mexCallMATLAB (nlhs, plhs, nrhs-1, (mxArray**)prhs+1, str); mxFree (str); }
--- a/libgui/languages/be_BY.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/be_BY.ts Wed Jan 29 15:28:13 2014 -0500 @@ -898,7 +898,7 @@ </message> <message> <location line="+71"/> - <source>Print To File ...</source> + <source>Print To File...</source> <translation>Друк у файл...</translation> </message> <message> @@ -2065,7 +2065,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation>Шукаць файлы...</translation> </message> <message> @@ -2111,6 +2111,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Шукаць каталог...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Шукаць файлы...</translation> </message>
--- a/libgui/languages/de_DE.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/de_DE.ts Wed Jan 29 15:28:13 2014 -0500 @@ -525,8 +525,8 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> - <translation>Dateien suchen ...</translation> + <source>Find Files...</source> + <translation>Dateien suchen...</translation> </message> <message> <location line="+13"/> @@ -571,9 +571,14 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Verzeichnis suchen...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translatorcomment>Dateien suchen...</translatorcomment> - <translation>Suche Dateien...</translation> + <translation>Dateien suchen...</translation> </message> <message> <location line="+4"/> @@ -914,7 +919,7 @@ <message> <location line="+3"/> <source>Browse...</source> - <translation>Suche ...</translation> + <translation>Suche...</translation> </message> <message> <location line="+1"/> @@ -1024,7 +1029,7 @@ <message> <location line="+105"/> <source>Searching...</source> - <translation>Suche ...</translation> + <translation>Suche...</translation> </message> <message> <location line="+23"/>
--- a/libgui/languages/en_US.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/en_US.ts Wed Jan 29 15:28:13 2014 -0500 @@ -508,7 +508,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation type="unfinished"></translation> </message> <message> @@ -554,6 +554,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation type="unfinished"></translation> </message>
--- a/libgui/languages/es_ES.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/es_ES.ts Wed Jan 29 15:28:13 2014 -0500 @@ -508,8 +508,8 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> - <translation>Buscar archivos ...</translation> + <source>Find Files...</source> + <translation>Buscar archivos...</translation> </message> <message> <location line="+13"/> @@ -554,6 +554,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Buscar directorio...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Buscar archivos...</translation> </message>
--- a/libgui/languages/fr_FR.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/fr_FR.ts Wed Jan 29 15:28:13 2014 -0500 @@ -524,7 +524,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation>Rechercher des fichiers...</translation> </message> <message> @@ -570,6 +570,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Rechercher dans le répertoire...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Rechercher des fichiers...</translation> </message>
--- a/libgui/languages/nl_NL.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/nl_NL.ts Wed Jan 29 15:28:13 2014 -0500 @@ -897,7 +897,7 @@ </message> <message> <location line="+71"/> - <source>Print To File ...</source> + <source>Print To File...</source> <translation>Druk af naar bestand...</translation> </message> <message> @@ -2063,8 +2063,8 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> - <translation>Zoek bestanden ...</translation> + <source>Find Files...</source> + <translation>Zoek bestanden...</translation> </message> <message> <location line="+13"/> @@ -2109,6 +2109,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Zoek in map...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Zoek bestanden...</translation> </message> @@ -2453,7 +2458,7 @@ <message> <location line="+3"/> <source>Browse...</source> - <translation>Bladeren ...</translation> + <translation>Bladeren...</translation> </message> <message> <location line="+1"/>
--- a/libgui/languages/pt_BR.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/pt_BR.ts Wed Jan 29 15:28:13 2014 -0500 @@ -388,7 +388,7 @@ <message> <location filename="../src/m-editor/file-editor-tab.cc" line="+824"/> <source>Goto line</source> - <translation>Vá para linha...</translation> + <translation>Vá para linha</translation> </message> <message> <location line="+1"/> @@ -522,7 +522,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation>Buscar Arquivos...</translation> </message> <message> @@ -554,20 +554,25 @@ <message> <location line="+5"/> <source>Set Octave directory</source> - <translation>Definir o diretório do Octave</translation> + <translation>Escolher o diretório do Octave</translation> </message> <message> <location line="+2"/> <source>Set Octave directroy to current browser directory</source> - <translation>Definir diretório do Octave igual ao diretório atual no navegador</translation> + <translation>Configurar o diretório do Octave igual ao diretório atual no navegador</translation> </message> <message> <location line="+7"/> <source>Show Home Directory</source> - <translation>Exibir diretório pessoal</translation> + <translation>Exibir Diretório Pessoal</translation> </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Buscar no Diretório...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Buscar Arquivos...</translation> </message> @@ -629,7 +634,7 @@ <message> <location line="+6"/> <source>Set Current Directory</source> - <translation>Definir Diretório Atual</translation> + <translation>Escolher Diretório Atual</translation> </message> <message> <location line="+8"/> @@ -679,7 +684,7 @@ <message> <location line="+144"/> <source>Set directory of file browser</source> - <translation>Definir diretório do Navegador de Arquivos</translation> + <translation>Escolher diretório do Navegador de Arquivos</translation> </message> <message> <location line="+29"/> @@ -743,9 +748,9 @@ You can find more information about each of these by visiting <a href="http://octave.org/support.html">http://octave.org/support.html</a> (opens in external browser).</p> </body></html></source> <translation><html><body> -<p>Esperamos que o Octave seja uma ferramenta últil.</p> -<p>Se encontrar problemas, existem várias maneiras de pedir ajuda incluindo suporte comercial, lista de email, wiki, e outros canais de suporte da comunidade. -Você pode encontrar mais informações sobre cada um deles visitando <a href="http://octave.org/support.html">http://octave.org/support.html</a> (opens in external browser).</p> +<p>Esperamos que você ache o Octave uma ferramenta útil.</p> +<p>Se encontrar dificuldades, existem várias formas de obter assistência, incluindo suporte comercial, listas de email, wiki, e outros canais de suporte comunitários. +Você pode encontrar mais informações sobre cada um deles visitando <a href="http://octave.org/support.html">http://octave.org/support.html</a> (link abre em navegador externo).</p> </body></html></translation> </message> <message> @@ -831,7 +836,7 @@ <message> <location line="+2"/> <source>&More...</source> - <translation>&Mais...</translation> + <translation>&Mais opções...</translation> </message> <message> <location line="+13"/> @@ -846,7 +851,7 @@ <message> <location line="+1"/> <source>Search &backward</source> - <translation>Buscar de trás para frente</translation> + <translation>Buscar de &trás para frente</translation> </message> <message> <location line="+1"/> @@ -1109,7 +1114,7 @@ </body></html></source> <translation><html><body> <p>Parece que você está usando a interface gráfica pela primeira vez neste computador. -Clique em próximo para criar um arquivo de configuração e lançar o Octave.</p> +Clique em 'Avançar' para criar um arquivo de configuração e iniciar o Octave.</p> <p>O arquivo de configuração é armazenado em<br>%1.</p> </body></html></translation> </message> @@ -1119,7 +1124,7 @@ <message> <location filename="../src/main-window.cc" line="-1758"/> <source>Load Workspace</source> - <translation>Carregar Ambiente de Trabalho...</translation> + <translation>Carregar Ambiente de Trabalho</translation> </message> <message> <location line="+678"/> @@ -1180,7 +1185,7 @@ <message> <location line="-1327"/> <source>Save Workspace As</source> - <translation>Salvar Ambiente de Trabalho Como...</translation> + <translation>Salvar Ambiente de Trabalho Como</translation> </message> <message> <location line="+84"/> @@ -1286,7 +1291,7 @@ <message> <location line="+1160"/> <source>Load Workspace...</source> - <translation>Carregar ambiente de trabalho...</translation> + <translation>Carregar Ambiente de Trabalho...</translation> </message> <message> <location line="+3"/> @@ -1777,7 +1782,7 @@ <message> <location line="+17"/> <source><html><head/><body><p>Select font, font size (as a difference from the default size), font style (<b>b</b>old, <b>i</b>talic, <b>u</b>nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).</p></body></html></source> - <translation><html><head/><body><p>Selecionar fonte, tamanho da fonte (como uma diferença do tamanho padrão), estilo da fonte (<b>n</b>egrito, <b>i</b>tálico, <b>s</b>ublinhado), cor de texto e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).</p></body></html></translation> + <translation><html><head/><body><p>Selecionar fonte, tamanho da fonte (variacão com relacão ao tamanho padrão), estilo da fonte (<b>n</b>egrito, <b>i</b>tálico, <b>s</b>ublinhado), cor da fonte e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).</p></body></html></translation> </message> <message> <location line="+191"/>
--- a/libgui/languages/pt_PT.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/pt_PT.ts Wed Jan 29 15:28:13 2014 -0500 @@ -1191,7 +1191,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation>Procurar Ficheiros...</translation> </message> <message> @@ -1237,6 +1237,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation>Procurar no directório...</translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Encontrar Ficheiros...</translation> </message>
--- a/libgui/languages/ru_RU.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/ru_RU.ts Wed Jan 29 15:28:13 2014 -0500 @@ -524,7 +524,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation>Найти файлы...</translation> </message> <message> @@ -570,6 +570,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation></translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation>Найти файлы...</translation> </message>
--- a/libgui/languages/uk_UA.ts Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/languages/uk_UA.ts Wed Jan 29 15:28:13 2014 -0500 @@ -1174,7 +1174,7 @@ </message> <message> <location line="+379"/> - <source>Find Files ...</source> + <source>Find Files...</source> <translation type="unfinished"></translation> </message> <message> @@ -1220,6 +1220,11 @@ </message> <message> <location line="+16"/> + <source>Search Directory...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Find Files...</source> <translation type="unfinished"></translation> </message>
--- a/libgui/src/files-dock-widget.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libgui/src/files-dock-widget.cc Wed Jan 29 15:28:13 2014 -0500 @@ -477,12 +477,23 @@ QMenu menu (this); QModelIndex index = _file_tree_view->indexAt (mpos); - //QAbstractItemModel *m = _file_tree_view->model (); if (index.isValid ()) { QFileInfo info = _file_system_model->fileInfo (index); + QItemSelectionModel *m = _file_tree_view->selectionModel (); + QModelIndexList sel = m->selectedRows (); + + // check if item at mouse position is seleccted + if (! sel.contains (index)) + { // is not selected -> clear actual selection and select this item + m->setCurrentIndex(index, + QItemSelectionModel::Clear | QItemSelectionModel::Select | + QItemSelectionModel::Rows); + } + + // construct the context menu depending on item menu.addAction (QIcon (":/actions/icons/fileopen.png"), tr ("Open"), this, SLOT (contextmenu_open (bool))); @@ -506,7 +517,8 @@ tr ("Set Current Directory"), this, SLOT (contextmenu_setcurrentdir (bool))); menu.addSeparator (); - menu.addAction (tr ("Find Files..."), this, + menu.addAction (QIcon (":/actions/icons/findf.png"), + tr ("Find Files..."), this, SLOT (contextmenu_findfiles (bool))); } @@ -526,6 +538,7 @@ this, SLOT (contextmenu_newdir (bool))); } + // show the menu menu.exec (_file_tree_view->mapToGlobal (mpos)); } @@ -540,7 +553,14 @@ for ( QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++) { - item_double_clicked (*it); + QFileInfo file = _file_system_model->fileInfo (*it); + if (file.exists ()) + { + if (file.isFile ()) + emit open_file (file.absoluteFilePath ()); + else + set_current_directory (file.absoluteFilePath ()); + } } }
--- a/libinterp/corefcn/ls-mat4.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/corefcn/ls-mat4.cc Wed Jan 29 15:28:13 2014 -0500 @@ -585,5 +585,5 @@ else gripe_wrong_type_arg ("save", tc, false); - return os; + return ! os.fail (); }
--- a/libinterp/corefcn/urlwrite.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/corefcn/urlwrite.cc Wed Jan 29 15:28:13 2014 -0500 @@ -418,7 +418,7 @@ url_transfer curl = url_transfer (url, ofile); - if (! curl.is_valid ()) + if (curl.is_valid ()) { curl.http_action (param, method);
--- a/libinterp/octave-value/ov-cell.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/octave-value/ov-cell.cc Wed Jan 29 15:28:13 2014 -0500 @@ -780,7 +780,7 @@ bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); if (! b) - return os; + return ! os.fail (); } } else @@ -802,7 +802,7 @@ bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0); if (! b) - return os; + return ! os.fail (); } os << "\n";
--- a/libinterp/octave-value/ov-class.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/octave-value/ov-class.cc Wed Jan 29 15:28:13 2014 -0500 @@ -1355,7 +1355,7 @@ bool b = save_ascii_data (os, val, m.key (i), false, 0); if (! b) - return os; + return ! os.fail (); i++; } @@ -1484,7 +1484,7 @@ bool b = save_binary_data (os, val, m.key (i), "", 0, save_as_floats); if (! b) - return os; + return ! os.fail (); i++; }
--- a/libinterp/octave-value/ov-fcn-handle.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/octave-value/ov-fcn-handle.cc Wed Jan 29 15:28:13 2014 -0500 @@ -380,7 +380,7 @@ p = vars.begin (); p != vars.end (); p++) { if (! save_ascii_data (os, p->varval (0), p->name (), false, 0)) - return os; + return ! os.fail (); } } } @@ -556,7 +556,7 @@ { if (! save_binary_data (os, p->varval (0), p->name (), "", 0, save_as_floats)) - return os; + return ! os.fail (); } } }
--- a/libinterp/octave-value/ov-struct.cc Tue Jan 28 18:19:39 2014 -0500 +++ b/libinterp/octave-value/ov-struct.cc Wed Jan 29 15:28:13 2014 -0500 @@ -769,7 +769,7 @@ bool b = save_ascii_data (os, val, key, false, 0); if (! b) - return os; + return ! os.fail (); } return true; @@ -894,7 +894,7 @@ bool b = save_binary_data (os, val, key, "", 0, save_as_floats); if (! b) - return os; + return ! os.fail (); } return true; @@ -1471,7 +1471,7 @@ bool b = save_ascii_data (os, val, key, false, 0); if (! b) - return os; + return ! os.fail (); } return true; @@ -1555,7 +1555,7 @@ bool b = save_binary_data (os, val, key, "", 0, save_as_floats); if (! b) - return os; + return ! os.fail (); } return true;
--- a/scripts/help/__makeinfo__.m Tue Jan 28 18:19:39 2014 -0500 +++ b/scripts/help/__makeinfo__.m Wed Jan 29 15:28:13 2014 -0500 @@ -129,10 +129,10 @@ ## Take action depending on output type switch (lower (output_type)) case "plain text" - cmd = sprintf ("%s --no-headers --no-warn --force --no-validate %s", + cmd = sprintf ("%s --no-headers --no-warn --force --no-validate --output=- %s", makeinfo_program (), name); case "html" - cmd = sprintf ("%s --no-headers --html --no-warn --no-validate --force %s", + cmd = sprintf ("%s --no-headers --html --no-warn --no-validate --force --output=- %s", makeinfo_program (), name); otherwise error ("__makeinfo__: unsupported output type: '%s'", output_type);
--- a/scripts/miscellaneous/debug.m Tue Jan 28 18:19:39 2014 -0500 +++ b/scripts/miscellaneous/debug.m Wed Jan 29 15:28:13 2014 -0500 @@ -37,9 +37,13 @@ ## Report the current file and line number where execution is stopped. ## ## @item dbtype -## List the function where execution is currently stopped, enumerating +## Display the code of the function being debugged, enumerating ## the line numbers. ## +## @item dblist +## List 10 lines of code centered around the line number where execution is +## stopped. +## ## @item dbstep ## @itemx dbnext ## Execute (step) one or more lines, follow execution into (step into) a
--- a/scripts/plot/util/graphics_toolkit.m Tue Jan 28 18:19:39 2014 -0500 +++ b/scripts/plot/util/graphics_toolkit.m Wed Jan 29 15:28:13 2014 -0500 @@ -66,6 +66,10 @@ endif endif + if (! any (strcmp (available_graphics_toolkits (), name))) + error ("graphics_toolkit: %s toolkit is not available", name); + endif + if (! any (strcmp (loaded_graphics_toolkits (), name))) feval (["__init_", name, "__"]); if (! any (strcmp (loaded_graphics_toolkits (), name)))
--- a/scripts/testfun/assert.m Tue Jan 28 18:19:39 2014 -0500 +++ b/scripts/testfun/assert.m Wed Jan 29 15:28:13 2014 -0500 @@ -56,7 +56,7 @@ function assert (cond, varargin) - if (nargin == 0 || nargin > 3) + if (nargin == 0) print_usage (); endif @@ -84,8 +84,10 @@ expected = varargin{1}; if (nargin < 3) tol = 0; + elseif (nargin == 3) + tol = varargin{2}; else - tol = varargin{2}; + print_usage (); endif ## Add to list as the errors accumulate. If empty at end then no errors. @@ -396,6 +398,8 @@ %!error assert ([1,0,1]) %!error assert ([1;1;0]) %!error assert ([1,0;1,1]) +%!error <2-part error> assert (false, "%s %s", "2-part", "error") +%!error <2-part error> assert (false, "TST:msg_id", "%s %s", "2-part", "error") ## scalars %!error <Dimensions don't match> assert (3, [3,3])