Mercurial > hg > octave-jordi
changeset 19591:37d37297acf8
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 09:55:41 -0500 |
parents | 6b09dd576521 (current diff) 6d75f1683ce8 (diff) |
children | 0e1f5a750d00 |
files | configure.ac libgui/src/m-editor/find-dialog.cc libgui/src/main-window.cc libgui/src/main-window.h libgui/src/settings-dialog.cc |
diffstat | 7 files changed, 73 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -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=""
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -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 ());
--- a/libgui/src/m-editor/find-dialog.cc +++ b/libgui/src/m-editor/find-dialog.cc @@ -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); } }
--- a/libgui/src/main-window.cc +++ b/libgui/src/main-window.cc @@ -174,11 +174,13 @@ if (dock) break; // it is a QDockWidget ==> exit loop +#ifdef HAVE_QSCINTILLA if (qobject_cast <octave_qscintilla *> (w_new)) { dock = static_cast <octave_dock_widget *> (editor_window); break; // it is the editor window ==> exit loop } +#endif w_new = qobject_cast <QWidget *> (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; }
--- a/libgui/src/main-window.h +++ b/libgui/src/main-window.h @@ -404,6 +404,7 @@ QMutex _dbg_queue_mutex; bool _prevent_readline_conflicts; + bool _suppress_dbg_location; }; class news_reader : public QObject
--- a/libgui/src/settings-dialog.cc +++ b/libgui/src/settings-dialog.cc @@ -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 ());
--- a/libgui/src/settings-dialog.ui +++ b/libgui/src/settings-dialog.ui @@ -32,7 +32,7 @@ </size> </property> <property name="currentIndex"> - <number>1</number> + <number>3</number> </property> <widget class="QWidget" name="tab_general"> <property name="enabled"> @@ -1528,6 +1528,24 @@ </layout> </item> <item> + <layout class="QGridLayout" name="gridLayout_15"> + <item row="0" column="0"> + <widget class="QCheckBox" name="terminal_focus_command"> + <property name="text"> + <string>Set focus to terminal when running a command from within another widget</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QCheckBox" name="terminal_print_dbg_location"> + <property name="text"> + <string>Print debug location in terminal window in addition to the marker in the editor</string> + </property> + </widget> + </item> + </layout> + </item> + <item> <widget class="Line" name="line_7"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -1561,13 +1579,6 @@ </widget> </item> <item> - <widget class="QCheckBox" name="terminal_focus_command"> - <property name="text"> - <string>Set focus to terminal when running a command from within another widget</string> - </property> - </widget> - </item> - <item> <widget class="Line" name="line_6"> <property name="orientation"> <enum>Qt::Horizontal</enum>