# HG changeset patch # User Torsten # Date 1390033533 -3600 # Node ID e8176099889cfa12ff6cfc8e1671bb5ac85104e6 # Parent 6736fc9bce24ebe1cd4be03ddb99493eb7d49e72 settings dialog with varaible size (bug #41197) * settings-dialog.ui: add a scroll area to each tab and make the widget resizable by the user * settings-dialog.cc (constructor): restore geoemtry read from the settings; (write_changed_settings): save geoemtry into settings file; (write_lexer_settings): add a sync after writing to the settings file diff -r 6736fc9bce24 -r e8176099889c libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Fri Jan 17 19:51:22 2014 -0500 +++ b/libgui/src/settings-dialog.cc Sat Jan 18 09:25:33 2014 +0100 @@ -57,7 +57,9 @@ ui->setupUi (this); QSettings *settings = resource_manager::get_settings (); - // FIXME: what should happen if settings is 0? + + // restore last geometry + restoreGeometry (settings->value("settings/geometry").toByteArray ()); // look for available language files and the actual settings QString qm_dir_name = resource_manager::get_gui_translation_dir (); @@ -622,6 +624,8 @@ write_terminal_colors (settings); settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ()); + settings->setValue ("settings/geometry",saveGeometry ()); + settings->sync (); } #ifdef HAVE_QSCINTILLA @@ -705,6 +709,7 @@ settings->setValue ( "settings/last_editor_styles_tab",ui->tabs_editor_lexers->currentIndex ()); + settings->sync (); } #endif diff -r 6736fc9bce24 -r e8176099889c libgui/src/settings-dialog.ui --- a/libgui/src/settings-dialog.ui Fri Jan 17 19:51:22 2014 -0500 +++ b/libgui/src/settings-dialog.ui Sat Jan 18 09:25:33 2014 +0100 @@ -9,20 +9,14 @@ 0 0 - 700 + 720 480 - 700 - 480 - - - - - 700 - 480 + 400 + 400 @@ -31,8 +25,14 @@ + + + 0 + 0 + + - 1 + 0 @@ -41,243 +41,252 @@ General - - - - 9 - 10 - 651 - 371 - - - - - - - - - Icon set for dock widgets - - - - - - - Language (requires restart) - - - - - - - Icon size - - - - - - - - - 16 - - - 32 - - - 4 - - - 24 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - QComboBox::InsertAtBottom - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Octave logo only - - - true - - - - - - - Letter icons - - - - - - - Graphic icons - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Dock widget title bar - - - - - - - - - Custom style - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 40 - 20 - - - - - - - - false - - - Background color - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 12 - 20 - - - - - - - - false - - - Text color - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Qt::Vertical + + + + + true + + + + + 0 + 0 + 678 + 378 + - - - 20 - 40 - - - - - - + + + + + + + Dock widget title bar + + + + + + + + + QComboBox::InsertAtBottom + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Icon size + + + + + + + + + Custom style + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + false + + + Background color + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 12 + 20 + + + + + + + + false + + + Text color + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 16 + + + 32 + + + 4 + + + 24 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Language (requires restart) + + + + + + + + + Octave logo only + + + true + + + + + + + Letter icons + + + + + + + Graphic icons + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Icon set for dock widgets + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + @@ -285,1015 +294,1101 @@ - - - 4 + + + true - - - - 6 - - - - - Show whitespace - - - - - - - true - - - Show line numbers - - - - - - - Show complete path in window title - - - - - - - false - - - Do not show whitespace used for indentation - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - true - - - Highlight current line - - - - - - - 12 - - - 0 - - - - - false + + + + 0 + 0 + 662 + 399 + + + + + + + + + 6 - - Color - - + + + + Show whitespace + + + + + + + true + + + Show line numbers + + + + + + + + 0 + 0 + + + + Show complete path in window title + + + + + + + false + + + Do not show whitespace used for indentation + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + true + + + Highlight current line + + + + + + + 12 + + + 0 + + + + + false + + + Color + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 80 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Max. tab width in pixel + + + + + + + 100 + + + 600 + + + 20 + + + 300 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 0 + + + + + - - + + Qt::Horizontal - - QSizePolicy::Fixed - - - - 80 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Max. tab width in pixel - - - - - 100 + + + + 0 - - 600 - - - 20 - - - 300 + + + + Indent width + + + + + + + Tab indents line + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 0 + + + + + + + + Auto indentation + + + + + + + 1 + + + 32 + + + 2 + + + + + + + Tab width + + + + + + + Show indentation guides + + + + + + + 1 + + + 32 + + + + + + + Backspace unindents line + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 0 + + + + + + + + + + Qt::Horizontal - - + + + + 0 + + + + + true + + + Code completion + + + false + + + + + + + 6 + + + + + false + + + # of characters typed before completion list displayed + + + + + + + false + + + + + + + + + + + + 1 + + + 6 + + + 2 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 0 + + + + + + + + false + + + Match keywords + + + true + + + + + + + false + + + Case sensitive + + + true + + + + + + + false + + + Replace word by suggested one + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Match words in document + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 0 + + + + + + + + Qt::Horizontal - - - 40 - 20 - + + + + + + 0 + + + 0 - + + + + + 0 + 0 + + + + Restore editor tabs from previous session on startup + + + + + + + + 0 + 0 + + + + Create nonexistent files without prompting + + + + + + + + + Qt::Horizontal + + + + + + + + + true + + + Use custom file editor + + + + + + + false + + + command line (%f=file, %l=line): + + + + + + + false + + + emacs + + + + - - + + - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - 0 - - - - - Indent width - - - - - - - Tab indents line - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed + Qt::Vertical - 10 - 0 - - - - - - - - Auto indentation - - - - - - - 1 - - - 32 - - - 2 - - - - - - - Tab width - - - - - - - Show indentation guides - - - - - - - 1 - - - 32 - - - - - - - Backspace unindents line - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 10 - 0 + 20 + 40 - + + + + + + + + + 0 + 0 + + + + Editor Styles + + + + - - - Qt::Horizontal + + + + 0 + 0 + + + + QFrame::NoFrame + + + <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> + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + true + + + 4 - - - 0 + + + + 0 + 0 + - - - - true - - - Code completion - - - false - - - - - - - 6 - + + + + + + + + + Terminal + + + + + + true + + + + + 0 + 0 + 678 + 378 + + + + + - - - false - - - # of characters typed before completion list displayed - - + + + + + + + Use foreground color + + + + + + + Cursor blinking + + + + + + + + + + + Cursor type: + + + + + + + + + + + + + + Font + + + + + + + false + + + QFontComboBox::MonospacedFonts + + + + + + + + + + + Font size + + + + + + + 2 + + + 96 + + + 10 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - false - - - - - - - - - - - - 1 - - - 6 - - - 2 + + + Qt::Horizontal - - - Qt::Horizontal - - + + - 40 - 20 + 0 + 81 - + + Terminal Colors + + - - - - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - + + + - 10 + 0 0 - - - - - - false - - - Match keywords - - - true - - - - - - - false - - - Case sensitive - - - true + + Qt::Horizontal - - - - false - + + - Replace word by suggested one + Set focus to terminal when running a command from within another widget - - + + Qt::Horizontal - - - 40 - 20 - - - - - - - - false - - - Match words in document - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + + - Qt::Horizontal - - - QSizePolicy::Fixed + Qt::Vertical - 10 - 0 + 20 + 40 - - - - - Qt::Horizontal - - - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Restore editor tabs from previous session on startup - - - - - - - - 0 - 0 - - - - Create nonexistent files without prompting - - - - - - - - - - - Qt::Horizontal - + - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - 0 - - - 0 - - - - - - - true - - - Use custom file editor - - - - - - - false - - - command line (%f=file, %l=line): - - - - - - - false - - - emacs - - - - - - - - - - Editor Styles - - - - - 0 - 0 - 651 - 401 - - - - - - - - 676 - 16777215 - - - - QFrame::NoFrame - - - <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> - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - 4 - - - - - - - - 676 - 351 - - - - - - - - - - Terminal - - - - - 10 - 10 - 631 - 371 - - - - - - - - - Font - - - - - - - false - - - QFontComboBox::MonospacedFonts - - - - - - - Font size - - - - - - - 2 - - - 96 - - - 10 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Cursor type: - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Cursor blinking - - - - - - - Use foreground color - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 81 - - - - Terminal Colors - - - - - - - - 0 - 0 - - - - Qt::Horizontal - - - - - - - Set focus to terminal when running a command from within another widget - - - - - - - Qt::Horizontal - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - File Browser - - - Show file size - - - - - - - Show file type + + + true - - - - - - Show date of last modification - - - - - - - Show hidden files - + + + + 0 + 0 + 678 + 378 + + + + + + + + + Show file size + + + + + + + Synchronize Octave working directory with file browser + + + + + + + Show hidden files + + + + + + + Show file type + + + + + + + Show date of last modification + + + + + + + Alternating row colors + + + + + + + + + Qt::Vertical + + + + 20 + 360 + + + + + + - - - - Synchronize Octave working directory with file browser - - - - - - - Alternating row colors - - - - - - - Qt::Vertical - - - - 20 - 360 - - - - Workspace - - - - 10 - 8 - 631 - 381 - - - - - - - true - - - - 0 - 0 - - - - - 0 - 81 - - - - Storage Class Colors + + + + + true + + + + + 0 + 0 + 678 + 378 + - - - - - - - 0 - 1 - - - - Qt::Horizontal - + + + + + + + true + + + + 0 + 0 + + + + + 0 + 81 + + + + Storage Class Colors + + + + + + + + 0 + 1 + + + + Qt::Horizontal + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - + + + @@ -1301,137 +1396,156 @@ - - - - - Allow Octave to connect to the Octave web site to display current news and information - - - - - - - - - false - - - Hostname: - - - - - - - false - + + + true + + + + + 0 + 0 + 678 + 378 + + + + + - - HttpProxy - + + + Allow Octave to connect to the Octave web site to display current news and information + + - - Socks5Proxy - + + + + + false + + + Hostname: + + + + + + + false + + + + HttpProxy + + + + + Socks5Proxy + + + + + + + + false + + + Username: + + + + + + + Use proxy server + + + + + + + false + + + Proxy type: + + + + + + + false + + + Port: + + + + + + + false + + + Password: + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + QLineEdit::Password + + + + - - - - - - false - - - Username: - - + - - - - Use proxy server - - - - - - - false - - - Proxy type: - - - - - - - false - - - Port: + + + + Qt::Vertical - - - - - - false - - - Password: - - - - - - - false + + + 20 + 40 + - - - - - - false - - - - - - - false - - - - - - - false - - - QLineEdit::Password - - + - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + +