Mercurial > hg > octave-nkf
changeset 19547:ef3d0cf7aed5
maint: Periodic merge of gui-release to default.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 24 Nov 2014 16:37:36 -0800 |
parents | 112fc552ea22 (current diff) 2d8728156ba4 (diff) |
children | dbde327460be |
files | configure.ac libgui/src/module.mk libgui/src/settings-dialog.cc scripts/plot/draw/private/__patch__.m |
diffstat | 8 files changed, 131 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -716,7 +716,7 @@ ### Check for the Qhull library OCTAVE_CHECK_LIB(qhull, QHull, - [Qhull library not found -- this will result in loss of functionality of some geometry functions.], + [Qhull library not found. This will result in loss of functionality of some geometry functions.], [libqhull/libqhull.h qhull/libqhull.h libqhull.h qhull/qhull.h qhull.h], [qh_qhull], [], [], [warn_qhull= @@ -724,7 +724,7 @@ OCTAVE_CHECK_LIB_QHULL_OK( [TEXINFO_QHULL="@set HAVE_QHULL" AC_DEFINE(HAVE_QHULL, 1, [Define to 1 if Qhull is available.])], - [warn_qhull="Qhull library found, but does not seem to work properly -- this will result in loss of functionality of some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) + [warn_qhull="Qhull library found, but does not seem to work properly. This will result in loss of functionality of some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) ### Check for PCRE regex library. @@ -777,7 +777,7 @@ [zlib.h], [gzclearerr]) ### Also define HAVE_ZLIB if libz is found. -if test $octave_cv_lib_z = yes; then +if test -z "$warn_z"; then AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if ZLIB is available.]) fi @@ -1426,7 +1426,8 @@ [sqr1up], [Fortran 77], [don't use qrupdate, disable QR & Cholesky updating functions]) -if test $octave_cv_lib_qrupdate = yes; then +## Additional check to see if qrupdate lib found supports LU updates +if test -z "$warn_qrupdate"; then AC_CACHE_CHECK([for slup1up in $QRUPDATE_LIBS], [octave_cv_func_slup1up], [LIBS="$LIBS $QRUPDATE_LIBS"
--- a/libgui/default-qt-settings.in +++ b/libgui/default-qt-settings.in @@ -550,10 +550,10 @@ Bash\style2\eolfill=false Bash\style2\font=__default_font__, __default_font_size__, 0, 0, 0 Bash\style2\paper=16777215 -Bash\style3\color=11184640 +Bash\style3\color=43647 Bash\style3\eolfill=false Bash\style3\font=__default_font__, __default_font_size__, 0, 0, 0 -Bash\style3\paper=16711680 +Bash\style0\paper=16777215 Bash\style4\color=127 Bash\style4\eolfill=false Bash\style4\font=__default_font__, __default_font_size__, 1, 0, 0 @@ -600,3 +600,11 @@ Bash\defaultpaper=16777215 Bash\defaultfont=__default_font__, __default_font_size__, 0, 0, 0 Bash\autoindentstyle=-1 +Text\style0\color=0 +Text\style0\eolfill=false +Text\style0\font=__default_font__, __default_font_size__, 0, 0, 0 +Text\style0\paper=16777215 +Text\defaultcolor=0 +Text\defaultpaper=16777215 +Text\defaultfont=__default_font__, __default_font_size__, 0, 0, 0 +Text\autoindentstyle=-1
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -52,6 +52,7 @@ #include "file-editor-tab.h" #include "file-editor.h" +#include "octave-txt-lexer.h" #include "file-ops.h" @@ -396,6 +397,8 @@ lexer = new QsciLexerOctave (); #elif defined (HAVE_LEXER_MATLAB) lexer = new QsciLexerMatlab (); +#else + lexer = new octave_txt_lexer (); #endif _is_octave_file = true; } @@ -426,6 +429,10 @@ { lexer = new QsciLexerDiff (); } + else if (_file_name.endsWith (".sh")) + { + lexer = new QsciLexerBash (); + } else if (! valid_file_name ()) { // new, no yet named file: let us assume it is octave @@ -436,13 +443,13 @@ lexer = new QsciLexerMatlab (); _is_octave_file = true; #else - lexer = new QsciLexerBash (); + lexer = new octave_txt_lexer (); #endif } else { // other or no extension - lexer = new QsciLexerBash (); + lexer = new octave_txt_lexer (); } }
new file mode 100644 --- /dev/null +++ b/libgui/src/m-editor/octave-txt-lexer.cc @@ -0,0 +1,52 @@ +/* + +Copyright (C) 2014 Torsten + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +<http://www.gnu.org/licenses/>. + +*/ + +// Author: Torsten <ttl@justmail.de> + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifdef HAVE_QSCINTILLA + +#include <Qsci/qscilexer.h> + +#include "octave-txt-lexer.h" + +QString +octave_txt_lexer::description (int style) const +{ + if (style == 0) + return tr ("Default"); + else + return QString (); +}; + + +const char* +octave_txt_lexer::language () const +{ + return "Text"; +} + + +#endif
new file mode 100644 --- /dev/null +++ b/libgui/src/m-editor/octave-txt-lexer.h @@ -0,0 +1,43 @@ +/* + +Copyright (C) 2013 Torsten + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +<http://www.gnu.org/licenses/>. + +*/ + +// Author: Torsten <ttl@justmail.de> + +#if !defined (octave_txt_lexer_h) +#define octave_txt_lexer_h 1 + +#include <Qsci/qsciscintilla.h> +#include <Qsci/qscilexer.h> + + +class octave_txt_lexer : public QsciLexer +{ + Q_OBJECT + +public: + + virtual const char *language () const; + virtual QString description (int style) const; + +}; + +#endif \ No newline at end of file
--- a/libgui/src/module.mk +++ b/libgui/src/module.mk @@ -81,7 +81,8 @@ src/m-editor/moc-file-editor-tab.cc \ src/m-editor/moc-file-editor.cc \ src/m-editor/moc-find-dialog.cc \ - src/m-editor/moc-octave-qscintilla.cc + src/m-editor/moc-octave-qscintilla.cc \ + src/m-editor/moc-octave-txt-lexer.cc endif octave_gui_MOC += \ @@ -126,6 +127,7 @@ src/m-editor/file-editor.h \ src/m-editor/find-dialog.h \ src/m-editor/octave-qscintilla.h \ + src/m-editor/octave-txt-lexer.h \ src/main-window.h \ src/octave-gui.h \ src/octave-interpreter.h \ @@ -153,6 +155,7 @@ src/m-editor/file-editor.cc \ src/m-editor/find-dialog.cc \ src/m-editor/octave-qscintilla.cc \ + src/m-editor/octave-txt-lexer.cc \ src/main-window.cc \ src/octave-dock-widget.cc \ src/octave-gui.cc \
--- a/libgui/src/settings-dialog.cc +++ b/libgui/src/settings-dialog.cc @@ -37,6 +37,7 @@ #ifdef HAVE_QSCINTILLA #include "octave-qscintilla.h" +#include "octave-txt-lexer.h" #include <QScrollArea> #if defined (HAVE_QSCI_QSCILEXEROCTAVE_H) @@ -358,6 +359,9 @@ lexer = new QsciLexerBash (); read_lexer_settings (lexer,settings); delete lexer; + lexer = new octave_txt_lexer (); + read_lexer_settings (lexer,settings); + delete lexer; #endif // which tab is the desired one? @@ -757,6 +761,9 @@ lexer = new QsciLexerBash (); write_lexer_settings (lexer,settings); delete lexer; + lexer = new octave_txt_lexer (); + write_lexer_settings (lexer,settings); + delete lexer; #endif // Workspace