1 //////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (C) 2017-2021 The Octave Project Developers 4 // 5 // See the file COPYRIGHT.md in the top-level directory of this 6 // distribution or <https://octave.org/copyright/>. 7 // 8 // This file is part of Octave. 9 // 10 // Octave is free software: you can redistribute it and/or modify it 11 // under the terms of the GNU General Public License as published by 12 // the Free Software Foundation, either version 3 of the License, or 13 // (at your option) any later version. 14 // 15 // Octave is distributed in the hope that it will be useful, but 16 // WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 // You should have received a copy of the GNU General Public License 21 // along with Octave; see the file COPYING. If not, see 22 // <https://www.gnu.org/licenses/>. 23 // 24 //////////////////////////////////////////////////////////////////////// 25 26 #if ! defined (octave_gui_preferences_global_h) 27 #define octave_gui_preferences_global_h 1 28 29 #include "gui-preferences.h" 30 31 // Global preferences 32 33 // Get the default monospaced font 34 #if defined (Q_OS_WIN) 35 const QString global_font_family = "Courier"; 36 #elif defined (Q_OS_MAC) 37 const QString global_font_family = "Monaco"; 38 #else 39 const QString global_font_family = "Monospace"; 40 #endif 41 42 const gui_pref 43 global_mono_font ("monospace_font", global_font_family); 44 45 // Style 46 47 const gui_pref 48 global_style ("style", QVariant ("default")); 49 50 const QString 51 global_toolbar_style ("QToolBar {" 52 "spacing-top: 0px;" 53 "spacing-bottom: 0px;" 54 "margin-top: 0px;" 55 "margin-bottom: 0px;" 56 "padding-top: 0px;" 57 "padding-bottom: 0px;" 58 "border-top: 0px;" 59 "border-bottom: 0px;" 60 "}"); 61 62 const QString 63 global_menubar_style ("QMenuBar {" 64 "spacing-top: 0px;" 65 "spacing-bottom: 0px;" 66 "margin-top: 0px;" 67 "margin-bottom: 0px;" 68 "padding-top: 0px;" 69 "padding-bottom: 0px;" 70 "}"); 71 72 // Icon size (in preferences: values -1, 0, 1) 73 74 const QStyle::PixelMetric global_icon_sizes[3] = 75 { 76 QStyle::PM_SmallIconSize, 77 QStyle::PM_ToolBarIconSize, 78 QStyle::PM_LargeIconSize 79 }; 80 81 const gui_pref 82 global_icon_size ("toolbar_icon_size", QVariant (0)); 83 84 const gui_pref 85 global_icon_theme ("use_system_icon_theme", QVariant (true)); 86 87 // Other 88 89 const gui_pref 90 global_status_bar ("show_status_bar", QVariant (true)); 91 92 #if defined (Q_OS_MAC) 93 // prevent native file dialogs on MAC by setting the default "false" and 94 // setting the flag for ignoring the pref to "true" (3rd argument) 95 const gui_pref 96 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false), true); 97 #elif defined (Q_OS_WIN32) 98 const gui_pref 99 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false)); 100 #else 101 const gui_pref 102 global_use_native_dialogs ("use_native_file_dialogs", QVariant (true)); 103 #endif 104 105 const gui_pref 106 global_cursor_blinking ("cursor_blinking", QVariant (true)); 107 108 const gui_pref 109 global_language ("language", QVariant ("SYSTEM")); 110 111 const gui_pref 112 global_ov_startup_dir ("octave_startup_dir", QVariant (QString ())); 113 const gui_pref 114 global_restore_ov_dir ("restore_octave_dir", QVariant (false)); 115 116 const gui_pref 117 global_use_custom_editor ("useCustomFileEditor", QVariant (false)); 118 const gui_pref 119 global_custom_editor ("customFileEditor", QVariant ("emacs +%l %f")); 120 121 const gui_pref 122 global_prompt_to_exit ("prompt_to_exit", QVariant (false)); 123 124 // Proxy 125 126 const gui_pref 127 global_proxy_host ("proxyHostName", QVariant (QString ())); 128 const gui_pref 129 global_use_proxy ("useProxyServer", QVariant (false)); 130 const gui_pref 131 global_proxy_type ("proxyType", QVariant (QString ())); 132 const gui_pref 133 global_proxy_port ("proxyPort", QVariant (80)); 134 const gui_pref 135 global_proxy_user ("proxyUserName", QVariant (QString ())); 136 const gui_pref 137 global_proxy_pass ("proxyPassword", QVariant (QString ())); 138 139 #endif 140