diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-13 18:57:24 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-02-13 12:31:49 +0100 |
| commit | 6c1a611ffd684e47ce1e9cdd7a1ae1e5b0069698 (patch) | |
| tree | 8b655316d31b76e26fd59c5638fd25f3ea1268e4 /src/dialogs | |
| parent | 698abdb9da65136183959033729cd77053a6cf1d (diff) | |
| download | kristall-6c1a611ffd684e47ce1e9cdd7a1ae1e5b0069698.tar.gz | |
add pref for typographer quotes
Also includes a fix for single-quotes on words like "'till"
Diffstat (limited to 'src/dialogs')
| -rw-r--r-- | src/dialogs/settingsdialog.cpp | 16 | ||||
| -rw-r--r-- | src/dialogs/settingsdialog.hpp | 12 | ||||
| -rw-r--r-- | src/dialogs/settingsdialog.ui | 66 |
3 files changed, 72 insertions, 22 deletions
diff --git a/src/dialogs/settingsdialog.cpp b/src/dialogs/settingsdialog.cpp index d979bbe..16c74aa 100644 --- a/src/dialogs/settingsdialog.cpp +++ b/src/dialogs/settingsdialog.cpp @@ -249,6 +249,12 @@ void SettingsDialog::setOptions(const GenericSettings &options) this->ui->urlbarhl_none->setChecked(true); } + if(this->current_options.fancy_quotes) { + this->ui->fancyquotes_on->setChecked(true); + } else { + this->ui->fancyquotes_off->setChecked(true); + } + this->ui->max_redirects->setValue(this->current_options.max_redirections); this->ui->redirection_mode->setCurrentIndex(0); @@ -716,6 +722,16 @@ void SettingsDialog::on_urlbarhl_none_clicked() this->current_options.fancy_urlbar = false; } +void SettingsDialog::on_fancyquotes_on_clicked() +{ + this->current_options.fancy_quotes = true; +} + +void SettingsDialog::on_fancyquotes_off_clicked() +{ + this->current_options.fancy_quotes = false; +} + void SettingsDialog::on_redirection_mode_currentIndexChanged(int index) { this->current_options.redirection_policy = GenericSettings::RedirectionWarning(this->ui->redirection_mode->itemData(index).toInt()); diff --git a/src/dialogs/settingsdialog.hpp b/src/dialogs/settingsdialog.hpp index 6768ab4..ff558f6 100644 --- a/src/dialogs/settingsdialog.hpp +++ b/src/dialogs/settingsdialog.hpp @@ -112,29 +112,26 @@ private slots: void on_ui_density_currentIndexChanged(int index); void on_fancypants_on_clicked(); - void on_fancypants_off_clicked(); void on_texthl_on_clicked(); - void on_texthl_off_clicked(); void on_gophermap_icon_clicked(); - void on_gophermap_text_clicked(); void on_scheme_os_default_clicked(); - void on_scheme_error_clicked(); void on_show_hidden_files_clicked(); - void on_hide_hidden_files_clicked(); void on_urlbarhl_fancy_clicked(); - void on_urlbarhl_none_clicked(); + void on_fancyquotes_on_clicked(); + void on_fancyquotes_off_clicked(); + void on_redirection_mode_currentIndexChanged(int index); void on_max_redirects_valueChanged(int arg1); @@ -142,13 +139,10 @@ private slots: void on_network_timeout_valueChanged(int arg1); void on_enable_home_btn_clicked(bool arg1); - void on_enable_newtab_btn_clicked(bool arg1); void on_cache_limit_valueChanged(int limit); - void on_cache_threshold_valueChanged(int thres); - void on_cache_life_valueChanged(int life); private: diff --git a/src/dialogs/settingsdialog.ui b/src/dialogs/settingsdialog.ui index b36da92..2193656 100644 --- a/src/dialogs/settingsdialog.ui +++ b/src/dialogs/settingsdialog.ui @@ -314,37 +314,71 @@ </layout> </item> <item row="10" column="0"> + <widget class="QLabel" name="label_39"> + <property name="text"> + <string>Use typographer's quotes</string> + </property> + <property name="toolTip"> + <string>Replace single and double quotes with curly typographer quotes.</string> + </property> + </widget> + </item> + <item row="10" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <widget class="QRadioButton" name="fancyquotes_on"> + <property name="text"> + <string>On</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">quotesBtnGroup</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="fancyquotes_off"> + <property name="text"> + <string>Off</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">quotesBtnGroup</string> + </attribute> + </widget> + </item> + </layout> + </item> + <item row="11" column="0"> <widget class="QLabel" name="label_26"> <property name="text"> <string>Max. Number of Redirections</string> </property> </widget> </item> - <item row="10" column="1"> + <item row="11" column="1"> <widget class="QSpinBox" name="max_redirects"> <property name="value"> <number>5</number> </property> </widget> </item> - <item row="11" column="0"> + <item row="12" column="0"> <widget class="QLabel" name="label_27"> <property name="text"> <string>Redirection Handling</string> </property> </widget> </item> - <item row="11" column="1"> + <item row="12" column="1"> <widget class="QComboBox" name="redirection_mode"/> </item> - <item row="12" column="0"> + <item row="13" column="0"> <widget class="QLabel" name="label_28"> <property name="text"> <string>Network Timeout</string> </property> </widget> </item> - <item row="12" column="1"> + <item row="13" column="1"> <widget class="QSpinBox" name="network_timeout"> <property name="suffix"> <string> ms</string> @@ -357,14 +391,14 @@ </property> </widget> </item> - <item row="13" column="0"> + <item row="14" column="0"> <widget class="QLabel" name="label_29"> <property name="text"> <string>Additional toolbar buttons</string> </property> </widget> </item> - <item row="13" column="1"> + <item row="14" column="1"> <layout class="QHBoxLayout" name="horizontalLayout_99"> <item> <widget class="QCheckBox" name="enable_home_btn"> @@ -382,7 +416,7 @@ </item> </layout> </item> - <item row="14" column="0"> + <item row="15" column="0"> <widget class="QLabel" name="label_30"> <property name="text"> <string>Total cache size limit</string> @@ -392,7 +426,7 @@ </property> </widget> </item> - <item row="14" column="1"> + <item row="15" column="1"> <widget class="QSpinBox" name="cache_limit"> <property name="suffix"> <string> KiB</string> @@ -406,7 +440,7 @@ </widget> </item> - <item row="15" column="0"> + <item row="16" column="0"> <widget class="QLabel" name="label_31"> <property name="text"> <string>Cached item size threshold</string> @@ -416,7 +450,7 @@ </property> </widget> </item> - <item row="15" column="1"> + <item row="16" column="1"> <widget class="QSpinBox" name="cache_threshold"> <property name="suffix"> <string> KiB</string> @@ -430,7 +464,7 @@ </widget> </item> - <item row="16" column="0"> + <item row="17" column="0"> <widget class="QLabel" name="label_31"> <property name="text"> <string>Cached item life</string> @@ -440,7 +474,7 @@ </property> </widget> </item> - <item row="16" column="1"> + <item row="17" column="1"> <widget class="QSpinBox" name="cache_life"> <property name="suffix"> <string> minutes</string> @@ -1240,11 +1274,16 @@ <tabstop>hide_hidden_files</tabstop> <tabstop>urlbarhl_fancy</tabstop> <tabstop>urlbarhl_none</tabstop> + <tabstop>fancyquotes_on</tabstop> + <tabstop>fancyquotes_off</tabstop> <tabstop>max_redirects</tabstop> <tabstop>redirection_mode</tabstop> <tabstop>network_timeout</tabstop> <tabstop>enable_home_btn</tabstop> <tabstop>enable_newtab_btn</tabstop> + <tabstop>cache_limit</tabstop> + <tabstop>cache_threshold</tabstop> + <tabstop>cache_life</tabstop> <tabstop>bg_change_color</tabstop> <tabstop>style_preview</tabstop> <tabstop>std_change_font</tabstop> @@ -1322,5 +1361,6 @@ <buttongroup name="buttonGroup"/> <buttongroup name="hiddenFilesBtnGroup"/> <buttongroup name="urlbarBtnGroup"/> + <buttongroup name="quotesBtnGroup"/> </buttongroups> </ui> |
