# HG changeset patch # User Rik # Date 1395520901 25200 # Node ID 3985333e13fa4627f3d2b4d4cc05efcdbb680237 # Parent 70cff922a42dfe472b09f6ac3e0c605fec587fe8# Parent e7b347dcfc635b1daab33942eb2bb8e88bde275e maint: Periodic merge of gui-release to default. diff -r 70cff922a42d -r 3985333e13fa configure.ac --- a/configure.ac Fri Mar 21 10:21:28 2014 -0700 +++ b/configure.ac Sat Mar 22 13:41:41 2014 -0700 @@ -245,14 +245,14 @@ fi ### Use atomic operations for internal reference counting. This is required -### for thread-safe behavior but incurs a significant slowdown, and is thus -### disabled by default. - -USE_ATOMIC_REFCOUNT=no +### for thread-safe behavior (Qt Handles) but incurs a significant slowdown. +### Enabled by default until a higher performing solution can be found. + +USE_ATOMIC_REFCOUNT=yes AC_ARG_ENABLE([atomic-refcount], - [AS_HELP_STRING([--enable-atomic-refcount], - [use atomic operations for internal reference counting. This is required for thread-safe behavior but does not by itself make Octave internals thread safe.])], - [if test "$enableval" = yes; then USE_ATOMIC_REFCOUNT=yes; fi], []) + [AS_HELP_STRING([--disable-atomic-refcount], + [Do not use atomic operations for internal reference counting. This option is required for thread-safe behavior as used in the GUI's Qt plotting toolkit. Performance for CLI-only builds is improved by disabling this feature.])], + [if test "$enableval" = no; then USE_ATOMIC_REFCOUNT=no; fi], []) if test $USE_ATOMIC_REFCOUNT = yes; then AC_DEFINE(USE_ATOMIC_REFCOUNT, 1, [Define to 1 to use atomic operations for reference counting.]) @@ -3075,17 +3075,19 @@ warn_msg_printed=true fi -if test $USE_ATOMIC_REFCOUNT = yes; then +if test $USE_ATOMIC_REFCOUNT = no; then AC_MSG_WARN([]) - AC_MSG_WARN([Using atomic reference counting.]) + AC_MSG_WARN([atomic reference counting disabled.]) AC_MSG_WARN([This feature allows access to Octave data safely from]) - AC_MSG_WARN([another thread, for instance from a GUI. However this]) - AC_MSG_WARN([results in a small performance penalty in the Octave]) - AC_MSG_WARN([interpreter.]) + AC_MSG_WARN([another thread, and is required when using the GUI's Qt toolkit]) + AC_MSG_WARN([for plotting.]) AC_MSG_WARN([]) +fi +if test $USE_ATOMIC_REFCOUNT = yes; then if test $USE_OCTAVE_ALLOCATOR = yes; then - AC_MSG_WARN([Thread-safe behavior is not guaranteed unless you also]) - AC_MSG_WARN([disable the use of the octave_allocator class.]) + AC_MSG_WARN([Using atomic reference counting.]) + AC_MSG_WARN([Thread-safe behavior is not guaranteed unless the]) + AC_MSG_WARN([octave_allocator class is also disabled.]) AC_MSG_WARN([]) fi warn_msg_printed=true diff -r 70cff922a42d -r 3985333e13fa doc/interpreter/contributors.in --- a/doc/interpreter/contributors.in Fri Mar 21 10:21:28 2014 -0700 +++ b/doc/interpreter/contributors.in Sat Mar 22 13:41:41 2014 -0700 @@ -73,6 +73,7 @@ Stephen Fegan Ramon Garcia Fernandez Torsten Finke +Colin Foster Jose Daniel Munoz Frias Brad Froehle Castor Fu diff -r 70cff922a42d -r 3985333e13fa scripts/gui/listdlg.m --- a/scripts/gui/listdlg.m Fri Mar 21 10:21:28 2014 -0700 +++ b/scripts/gui/listdlg.m Sat Mar 22 13:41:41 2014 -0700 @@ -94,21 +94,21 @@ ## handle key, value pairs for i = 1:2:nargin-1 - if (strcmp (varargin{i}, "ListString")) + if (strcmpi (varargin{i}, "ListString")) listcell = varargin{i+1}; - elseif (strcmp (varargin{i}, "SelectionMode")) + elseif (strcmpi (varargin{i}, "SelectionMode")) selmode = varargin{i+1}; - elseif (strcmp (varargin{i}, "ListSize")) + elseif (strcmpi (varargin{i}, "ListSize")) listsize = varargin{i+1}; - elseif (strcmp (varargin{i}, "InitialValue")) + elseif (strcmpi (varargin{i}, "InitialValue")) initialvalue = varargin{i+1}; - elseif (strcmp (varargin{i}, "Name")) + elseif (strcmpi (varargin{i}, "Name")) name = varargin{i+1}; - elseif (strcmp (varargin{i}, "PromptString")) + elseif (strcmpi (varargin{i}, "PromptString")) prompt = varargin{i+1}; - elseif (strcmp (varargin{i}, "OKString")) + elseif (strcmpi (varargin{i}, "OKString")) okstring = varargin{i+1}; - elseif (strcmp (varargin{i}, "CancelString")) + elseif (strcmpi (varargin{i}, "CancelString")) cancelstring = varargin{i+1}; endif endfor @@ -130,8 +130,8 @@ if (__octave_link_enabled__ ()) [sel, ok] = __octave_link_list_dialog__ (listcell, selmode, listsize, - initialvalue, name, prompt, - okstring, cancelstring); + initialvalue, name, prompt, + okstring, cancelstring); elseif (__have_feature__ ("JAVA")) ## transform matrices to cell arrays of strings ## swap width and height to correct calling format for JDialogBox @@ -146,10 +146,14 @@ okstring, cancelstring); if (numel (ret) > 0) - sel = ret; + sel = zeros (1, numel (ret)); + ## for loop needed to convert Java array ret into Octave double sel + for i = 1:numel (ret) + sel(i) = ret(i); + endfor ok = 1; else - sel = {}; + sel = []; ok = 0; endif else diff -r 70cff922a42d -r 3985333e13fa scripts/gui/waitbar.m --- a/scripts/gui/waitbar.m Fri Mar 21 10:21:28 2014 -0700 +++ b/scripts/gui/waitbar.m Sat Mar 22 13:41:41 2014 -0700 @@ -130,9 +130,7 @@ endif title (ax, msg); - if (! isempty (cf)) - set (0, "currentfigure", cf); - endif + set (0, "currentfigure", cf); endif drawnow (); diff -r 70cff922a42d -r 3985333e13fa scripts/io/textscan.m --- a/scripts/io/textscan.m Fri Mar 21 10:21:28 2014 -0700 +++ b/scripts/io/textscan.m Sat Mar 22 13:41:41 2014 -0700 @@ -1,4 +1,4 @@ -## Copyright (C) 2010-2013 Ben Abbott +## Copyright (C) 2010-2014 Ben Abbott ## ## This file is part of Octave. ## @@ -135,6 +135,7 @@ if (! (isempty (args{ipos+1}) && has_str_fmt)) args{ipos+1} = unique ([" ", args{ipos+1}]); endif + whitespace = args{ipos+1}; endif if (! any (strcmpi (args, "delimiter"))) @@ -661,3 +662,7 @@ %! unlink (f); %! assert (msg1, lasterr); +%% Bug #41824 +%!test +%! assert (textscan ("123", "", "whitespace", " "){:}, 123); + diff -r 70cff922a42d -r 3985333e13fa scripts/java/org/octave/JDialogBox.java --- a/scripts/java/org/octave/JDialogBox.java Fri Mar 21 10:21:28 2014 -0700 +++ b/scripts/java/org/octave/JDialogBox.java Sat Mar 22 13:41:41 2014 -0700 @@ -1,5 +1,6 @@ /* +Copyright (C) 2014 Colin Foster Copyright (C) 2010, 2013 Martin Hepperle This file is part of Octave. @@ -551,24 +552,28 @@ { lst[i] = theTranslator.replace (list[i]); } + + JScrollPane scrollPane = new JScrollPane(); m_List = new JList (lst); + scrollPane.setViewportView(m_List); + // replace ugly monospaced font - m_List.setFont (p.getFont ()); + scrollPane.setFont (p.getFont ()); - m_List.setMinimumSize (new Dimension (Math.max (1, - Integer.parseInt (RowsCols[0].toString ())), - Math.max (1, - Integer.parseInt (RowsCols[1].toString ())))); - m_List.setPreferredSize (new Dimension (Math.max (1, - Integer.parseInt (RowsCols[1].toString ())), - Math.max (1, - Integer.parseInt (RowsCols[0].toString ())))); - m_List.setBorder (new javax.swing.border.EtchedBorder ()); + scrollPane.setMinimumSize ( + new Dimension ( + Math.max (1, Integer.parseInt (RowsCols[0].toString ())), + Math.max (1, Integer.parseInt (RowsCols[1].toString ())))); + scrollPane.setPreferredSize ( + new Dimension ( + Math.max (1, Integer.parseInt (RowsCols[1].toString ())), + Math.max (1, Integer.parseInt (RowsCols[0].toString ())))); + scrollPane.setBorder (new javax.swing.border.EtchedBorder ()); gbc.gridy = message.length; gbc.fill = GridBagConstraints.HORIZONTAL; - p.add (m_List, gbc); + p.add (scrollPane, gbc); if (on.toLowerCase ().equals ("single")) {