# HG changeset patch # User John W. Eaton # Date 1421765741 18000 # Node ID 37d37297acf8d331d1ce23286d4b93fe6bc81dc2 # Parent 6b09dd57652111fb925eddaeb82199873537fffc# Parent 6d75f1683ce822a2fae79be0d3086bb801ec1bcf maint: Periodic merge of gui-release to default. diff -r 6b09dd576521 -r 37d37297acf8 configure.ac --- a/configure.ac Mon Jan 19 21:05:39 2015 -0800 +++ b/configure.ac Tue Jan 20 09:55:41 2015 -0500 @@ -2786,6 +2786,16 @@ [AS_HELP_STRING([--disable-gui], [don't build the GUI])], [if test "$enableval" = no; then build_gui=no; fi], []) +if test -z "$OPENGL_LIBS"; then + build_gui=no + if test $check_opengl = yes; then + warn_gui="OpenGL libs (GL and GLU) not found -- disabling GUI" + else + warn_gui="--without-opengl was specified -- disabling GUI" + fi + OCTAVE_CONFIGURE_WARNING([warn_gui]) +fi + if test $build_gui = yes; then warn_gui="" diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Jan 20 09:55:41 2015 -0500 @@ -1908,6 +1908,7 @@ _edit_area->SendScintilla (QsciScintillaBase::SCI_SETHSCROLLBAR, settings->value ("editor/show_hscroll_bar",true).toBool ()); _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTH,-1); + _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTHTRACKING,true); _long_title = settings->value ("editor/longWindowTitle", false).toBool (); update_window_title (_edit_area->isModified ()); diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/m-editor/find-dialog.cc --- a/libgui/src/m-editor/find-dialog.cc Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/m-editor/find-dialog.cc Tue Jan 20 09:55:41 2015 -0500 @@ -291,8 +291,9 @@ else if (! do_forward) { // search from previous character if search backward + _edit_area->getCursorPosition (&line,&col); int currpos = _edit_area->positionFromLineIndex(line,col); - if(currpos > 0) currpos --; + if (currpos > 0) currpos --; _edit_area->lineIndexFromPosition(currpos, &line,&col); } } diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/main-window.cc --- a/libgui/src/main-window.cc Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/main-window.cc Tue Jan 20 09:55:41 2015 -0500 @@ -174,11 +174,13 @@ if (dock) break; // it is a QDockWidget ==> exit loop +#ifdef HAVE_QSCINTILLA if (qobject_cast (w_new)) { dock = static_cast (editor_window); break; // it is the editor window ==> exit loop } +#endif w_new = qobject_cast (w_new->previousInFocusChain ()); if (w_new == start) @@ -750,6 +752,9 @@ configure_shortcuts (); set_global_shortcuts (command_window_has_focus ()); + _suppress_dbg_location = + ! settings->value ("terminal/print_debug_location", false).toBool (); + resource_manager::update_network_settings (); } @@ -1079,7 +1084,9 @@ foreach (octave_dock_widget *widget, dock_widget_list ()) widget->connect_visibility_changed (); +#ifdef HAVE_QSCINTILLA editor_window->enable_menu_shortcuts (false); +#endif } void @@ -2030,6 +2037,7 @@ command_editor::redisplay (); // We are executing inside the command editor event loop. Force // the current line to be returned for processing. + Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location)); command_editor::accept_line (); } @@ -2086,19 +2094,19 @@ if (debug == "step") { - Fdb_next_breakpoint_quiet (); + Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location)); Fdbstep (); } else if (debug == "cont") { - Fdb_next_breakpoint_quiet (); + Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location)); Fdbcont (); } else if (debug == "quit") Fdbquit (); else { - Fdb_next_breakpoint_quiet (); + Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location)); Fdbstep (ovl (debug.toStdString ())); } @@ -2349,7 +2357,9 @@ } +#ifdef HAVE_QSCINTILLA closenow = editor_window->check_closing (1); // 1: exit request from gui +#endif return closenow; } diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/main-window.h --- a/libgui/src/main-window.h Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/main-window.h Tue Jan 20 09:55:41 2015 -0500 @@ -404,6 +404,7 @@ QMutex _dbg_queue_mutex; bool _prevent_readline_conflicts; + bool _suppress_dbg_location; }; class news_reader : public QObject diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/settings-dialog.cc Tue Jan 20 09:55:41 2015 -0500 @@ -256,6 +256,31 @@ settings->value ("terminal/fontSize", 10).toInt ()); ui->terminal_history_buffer->setValue ( settings->value ("terminal/history_buffer",1000).toInt ()); + ui->terminal_cursorBlinking->setChecked ( + settings->value ("terminal/cursorBlinking",true).toBool ()); + ui->terminal_cursorUseForegroundColor->setChecked ( + settings->value ("terminal/cursorUseForegroundColor",true).toBool ()); + ui->terminal_focus_command->setChecked ( + settings->value ("terminal/focus_after_command",false).toBool ()); + ui->terminal_print_dbg_location->setChecked ( + settings->value ("terminal/print_debug_location",false).toBool ()); + + QString cursorType + = settings->value ("terminal/cursorType", "ibeam").toString (); + + QStringList items; + items << QString ("0") << QString ("1") << QString ("2"); + ui->terminal_cursorType->addItems (items); + ui->terminal_cursorType->setItemText (0, tr ("IBeam Cursor")); + ui->terminal_cursorType->setItemText (1, tr ("Block Cursor")); + ui->terminal_cursorType->setItemText (2, tr ("Underline Cursor")); + + if (cursorType == "ibeam") + ui->terminal_cursorType->setCurrentIndex (0); + else if (cursorType == "block") + ui->terminal_cursorType->setCurrentIndex (1); + else if (cursorType == "underline") + ui->terminal_cursorType->setCurrentIndex (2); // file browser ui->showFileSize->setChecked ( @@ -284,29 +309,6 @@ ui->useProxyServer->setChecked ( settings->value ("useProxyServer", false).toBool ()); ui->proxyHostName->setText (settings->value ("proxyHostName").toString ()); - ui->terminal_cursorBlinking->setChecked ( - settings->value ("terminal/cursorBlinking",true).toBool ()); - ui->terminal_cursorUseForegroundColor->setChecked ( - settings->value ("terminal/cursorUseForegroundColor",true).toBool ()); - ui->terminal_focus_command->setChecked ( - settings->value ("terminal/focus_after_command",false).toBool ()); - - QString cursorType - = settings->value ("terminal/cursorType", "ibeam").toString (); - - QStringList items; - items << QString ("0") << QString ("1") << QString ("2"); - ui->terminal_cursorType->addItems (items); - ui->terminal_cursorType->setItemText (0, tr ("IBeam Cursor")); - ui->terminal_cursorType->setItemText (1, tr ("Block Cursor")); - ui->terminal_cursorType->setItemText (2, tr ("Underline Cursor")); - - if (cursorType == "ibeam") - ui->terminal_cursorType->setCurrentIndex (0); - else if (cursorType == "block") - ui->terminal_cursorType->setCurrentIndex (1); - else if (cursorType == "underline") - ui->terminal_cursorType->setCurrentIndex (2); int currentIndex = 0; QString proxyTypeString = settings->value ("proxyType").toString (); @@ -748,6 +750,8 @@ ui->terminal_cursorUseForegroundColor->isChecked ()); settings->setValue ("terminal/focus_after_command", ui->terminal_focus_command->isChecked ()); + settings->setValue ("terminal/print_debug_location", + ui->terminal_print_dbg_location->isChecked ()); settings->setValue ("terminal/history_buffer", ui->terminal_history_buffer->value ()); diff -r 6b09dd576521 -r 37d37297acf8 libgui/src/settings-dialog.ui --- a/libgui/src/settings-dialog.ui Mon Jan 19 21:05:39 2015 -0800 +++ b/libgui/src/settings-dialog.ui Tue Jan 20 09:55:41 2015 -0500 @@ -32,7 +32,7 @@ - 1 + 3 @@ -1528,6 +1528,24 @@ + + + + + Set focus to terminal when running a command from within another widget + + + + + + + Print debug location in terminal window in addition to the marker in the editor + + + + + + Qt::Horizontal @@ -1561,13 +1579,6 @@ - - - Set focus to terminal when running a command from within another widget - - - - Qt::Horizontal