From 5e29849d3eadbc2542f6d328b5082fad18abbe9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 17 Jul 2017 22:26:59 -0400 Subject: [PATCH 01/11] Added an option to set caret cursor blinking speed in ms --- spyder/app/mainwindow.py | 5 +++++ spyder/config/main.py | 2 ++ spyder/plugins/configdialog.py | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index e48799b134e..cc66d4d87aa 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2522,6 +2522,11 @@ def apply_settings(self): self.apply_panes_settings() self.apply_statusbar_settings() + + if CONF.get('main', 'use_custom_caret_blinking') is True: + qapp.setCursorFlashTime(CONF.get('main', 'custom_caret_blinking')) + else: + qapp.setCursorFlashTime(QApplication.cursorFlashTime()) def apply_panes_settings(self): """Update dockwidgets features settings""" diff --git a/spyder/config/main.py b/spyder/config/main.py index a666d94562e..d9df26edcb3 100755 --- a/spyder/config/main.py +++ b/spyder/config/main.py @@ -89,6 +89,8 @@ 'cpu_usage/timeout': 2000, 'use_custom_margin': True, 'custom_margin': 0, + 'use_custom_caret_blinking': False, + 'custom_caret_blinking': 1000, 'show_internal_console_if_traceback': True, 'check_updates_on_startup': True, 'toolbars_visible': True, diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index e427ca380c7..944db9e7d50 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -872,6 +872,16 @@ def setup_page(self): margins_layout = QHBoxLayout() margins_layout.addWidget(margin_box) margins_layout.addWidget(margin_spin) + + caret_box = newcb(_("Caret blinking:"), + 'use_custom_caret_blinking') + caret_spin = self.create_spinbox("", _("ms"), 'custom_caret_blinking', + 0, 0, 5000) + caret_box.toggled.connect(caret_spin.setEnabled) + caret_spin.setEnabled(self.get_option('use_custom_caret_blinking')) + caret_layout = QHBoxLayout() + caret_layout.addWidget(caret_box) + caret_layout.addWidget(caret_spin) # Layout interface comboboxes_layout = QHBoxLayout() @@ -891,6 +901,7 @@ def setup_page(self): interface_layout.addWidget(tear_off_box) interface_layout.addWidget(high_dpi_scaling_box) interface_layout.addLayout(margins_layout) + interface_layout.addLayout(caret_layout) interface_group.setLayout(interface_layout) # --- Status bar From 529c4a61fb27980984e6b35120bff72a5f878d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 17 Jul 2017 23:41:04 -0400 Subject: [PATCH 02/11] Aligned custom margins and caret blinking spinboxes and slabels Note: I had to connect box toggled signal to both spinbox and slabel setEnabled slot since custom merged spinbox layout becomes irrelevant as soon as the spinbox and slabel are added individually in the layout (for alignment purpose). --- spyder/plugins/configdialog.py | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index 944db9e7d50..8de3a9a7691 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -867,21 +867,30 @@ def setup_page(self): 'use_custom_margin') margin_spin = self.create_spinbox("", _("pixels"), 'custom_margin', 0, 0, 30) - margin_box.toggled.connect(margin_spin.setEnabled) - margin_spin.setEnabled(self.get_option('use_custom_margin')) - margins_layout = QHBoxLayout() - margins_layout.addWidget(margin_box) - margins_layout.addWidget(margin_spin) + margin_box.toggled.connect(margin_spin.spinbox.setEnabled) + margin_box.toggled.connect(margin_spin.slabel.setEnabled) + margin_spin.spinbox.setEnabled(self.get_option('use_custom_margin')) + margin_spin.slabel.setEnabled(self.get_option('use_custom_margin')) caret_box = newcb(_("Caret blinking:"), 'use_custom_caret_blinking') caret_spin = self.create_spinbox("", _("ms"), 'custom_caret_blinking', 0, 0, 5000) - caret_box.toggled.connect(caret_spin.setEnabled) - caret_spin.setEnabled(self.get_option('use_custom_caret_blinking')) - caret_layout = QHBoxLayout() - caret_layout.addWidget(caret_box) - caret_layout.addWidget(caret_spin) + caret_box.toggled.connect(caret_spin.spinbox.setEnabled) + caret_box.toggled.connect(caret_spin.slabel.setEnabled) + caret_spin.spinbox.setEnabled( + self.get_option('use_custom_caret_blinking')) + caret_spin.slabel.setEnabled( + self.get_option('use_custom_caret_blinking')) + + margins_caret_layout = QGridLayout() + margins_caret_layout.addWidget(margin_box, 0, 0) + margins_caret_layout.addWidget(margin_spin.spinbox, 0, 1) + margins_caret_layout.addWidget(margin_spin.slabel, 0, 2) + margins_caret_layout.addWidget(caret_box, 1, 0) + margins_caret_layout.addWidget(caret_spin.spinbox, 1, 1) + margins_caret_layout.addWidget(caret_spin.slabel, 1, 2) + margins_caret_layout.setColumnStretch(2, 100) # Layout interface comboboxes_layout = QHBoxLayout() @@ -900,8 +909,7 @@ def setup_page(self): interface_layout.addWidget(animated_box) interface_layout.addWidget(tear_off_box) interface_layout.addWidget(high_dpi_scaling_box) - interface_layout.addLayout(margins_layout) - interface_layout.addLayout(caret_layout) + interface_layout.addLayout(margins_caret_layout) interface_group.setLayout(interface_layout) # --- Status bar From 1e866481aa0dc94a1f03c40d4747a8221791e206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 17 Jul 2017 22:26:59 -0400 Subject: [PATCH 03/11] Added an option to set caret cursor blinking speed in ms --- spyder/app/mainwindow.py | 5 +++++ spyder/config/main.py | 2 ++ spyder/plugins/configdialog.py | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 6b264c3b57e..c4b7c5bd43f 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2539,6 +2539,11 @@ def apply_settings(self): self.apply_panes_settings() self.apply_statusbar_settings() + + if CONF.get('main', 'use_custom_caret_blinking') is True: + qapp.setCursorFlashTime(CONF.get('main', 'custom_caret_blinking')) + else: + qapp.setCursorFlashTime(QApplication.cursorFlashTime()) def apply_panes_settings(self): """Update dockwidgets features settings""" diff --git a/spyder/config/main.py b/spyder/config/main.py index b5ad1b8effa..4634e75a670 100755 --- a/spyder/config/main.py +++ b/spyder/config/main.py @@ -93,6 +93,8 @@ 'cpu_usage/timeout': 2000, 'use_custom_margin': True, 'custom_margin': 0, + 'use_custom_caret_blinking': False, + 'custom_caret_blinking': 1000, 'show_internal_console_if_traceback': False, 'check_updates_on_startup': True, 'toolbars_visible': True, diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index bee96024843..f9ca2ba4f6a 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -884,6 +884,16 @@ def setup_page(self): margins_layout = QHBoxLayout() margins_layout.addWidget(margin_box) margins_layout.addWidget(margin_spin) + + caret_box = newcb(_("Caret blinking:"), + 'use_custom_caret_blinking') + caret_spin = self.create_spinbox("", _("ms"), 'custom_caret_blinking', + 0, 0, 5000) + caret_box.toggled.connect(caret_spin.setEnabled) + caret_spin.setEnabled(self.get_option('use_custom_caret_blinking')) + caret_layout = QHBoxLayout() + caret_layout.addWidget(caret_box) + caret_layout.addWidget(caret_spin) # Layout interface comboboxes_layout = QHBoxLayout() @@ -902,6 +912,7 @@ def setup_page(self): interface_layout.addWidget(animated_box) interface_layout.addWidget(tear_off_box) interface_layout.addLayout(margins_layout) + interface_layout.addLayout(caret_layout) interface_group.setLayout(interface_layout) # --- Status bar From af827f2ea5a094676136eadfa1c08dd1a944eaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 17 Jul 2017 23:41:04 -0400 Subject: [PATCH 04/11] Aligned custom margins and caret blinking spinboxes and slabels Note: I had to connect box toggled signal to both spinbox and slabel setEnabled slot since custom merged spinbox layout becomes irrelevant as soon as the spinbox and slabel are added individually in the layout (for alignment purpose). --- spyder/plugins/configdialog.py | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index f9ca2ba4f6a..c95a53b412f 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -879,21 +879,30 @@ def setup_page(self): 'use_custom_margin') margin_spin = self.create_spinbox("", _("pixels"), 'custom_margin', 0, 0, 30) - margin_box.toggled.connect(margin_spin.setEnabled) - margin_spin.setEnabled(self.get_option('use_custom_margin')) - margins_layout = QHBoxLayout() - margins_layout.addWidget(margin_box) - margins_layout.addWidget(margin_spin) + margin_box.toggled.connect(margin_spin.spinbox.setEnabled) + margin_box.toggled.connect(margin_spin.slabel.setEnabled) + margin_spin.spinbox.setEnabled(self.get_option('use_custom_margin')) + margin_spin.slabel.setEnabled(self.get_option('use_custom_margin')) caret_box = newcb(_("Caret blinking:"), 'use_custom_caret_blinking') caret_spin = self.create_spinbox("", _("ms"), 'custom_caret_blinking', 0, 0, 5000) - caret_box.toggled.connect(caret_spin.setEnabled) - caret_spin.setEnabled(self.get_option('use_custom_caret_blinking')) - caret_layout = QHBoxLayout() - caret_layout.addWidget(caret_box) - caret_layout.addWidget(caret_spin) + caret_box.toggled.connect(caret_spin.spinbox.setEnabled) + caret_box.toggled.connect(caret_spin.slabel.setEnabled) + caret_spin.spinbox.setEnabled( + self.get_option('use_custom_caret_blinking')) + caret_spin.slabel.setEnabled( + self.get_option('use_custom_caret_blinking')) + + margins_caret_layout = QGridLayout() + margins_caret_layout.addWidget(margin_box, 0, 0) + margins_caret_layout.addWidget(margin_spin.spinbox, 0, 1) + margins_caret_layout.addWidget(margin_spin.slabel, 0, 2) + margins_caret_layout.addWidget(caret_box, 1, 0) + margins_caret_layout.addWidget(caret_spin.spinbox, 1, 1) + margins_caret_layout.addWidget(caret_spin.slabel, 1, 2) + margins_caret_layout.setColumnStretch(2, 100) # Layout interface comboboxes_layout = QHBoxLayout() @@ -910,9 +919,9 @@ def setup_page(self): interface_layout.addWidget(vertdock_box) interface_layout.addWidget(verttabs_box) interface_layout.addWidget(animated_box) - interface_layout.addWidget(tear_off_box) - interface_layout.addLayout(margins_layout) - interface_layout.addLayout(caret_layout) + interface_layout.addWidget(tear_off_box) + interface_layout.addLayout(margins_caret_layout) + interface_layout.addWidget(high_dpi_scaling_box) interface_group.setLayout(interface_layout) # --- Status bar From 4d61e09cf1c2d93522cf638928940c0b958d82cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Tue, 18 Jul 2017 00:59:55 -0400 Subject: [PATCH 05/11] Removed line added by mistake when resolving conflicts --- spyder/plugins/configdialog.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index c95a53b412f..864f36a89ed 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -921,7 +921,6 @@ def setup_page(self): interface_layout.addWidget(animated_box) interface_layout.addWidget(tear_off_box) interface_layout.addLayout(margins_caret_layout) - interface_layout.addWidget(high_dpi_scaling_box) interface_group.setLayout(interface_layout) # --- Status bar From 46f5a7014dc8100259570a0839ebe5866331ee47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 31 Jul 2017 12:16:13 -0400 Subject: [PATCH 06/11] Replaced all "caret" words by "cursor" --- spyder/app/mainwindow.py | 4 ++-- spyder/config/main.py | 4 ++-- spyder/plugins/configdialog.py | 36 +++++++++++++++++----------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index c4b7c5bd43f..38425283642 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2540,8 +2540,8 @@ def apply_settings(self): self.apply_panes_settings() self.apply_statusbar_settings() - if CONF.get('main', 'use_custom_caret_blinking') is True: - qapp.setCursorFlashTime(CONF.get('main', 'custom_caret_blinking')) + if CONF.get('main', 'use_custom_cursor_blinking') is True: + qapp.setCursorFlashTime(CONF.get('main', 'custom_cursor_blinking')) else: qapp.setCursorFlashTime(QApplication.cursorFlashTime()) diff --git a/spyder/config/main.py b/spyder/config/main.py index 4634e75a670..a463d6cc935 100755 --- a/spyder/config/main.py +++ b/spyder/config/main.py @@ -93,8 +93,8 @@ 'cpu_usage/timeout': 2000, 'use_custom_margin': True, 'custom_margin': 0, - 'use_custom_caret_blinking': False, - 'custom_caret_blinking': 1000, + 'use_custom_cursor_blinking': False, + 'custom_cursor_blinking': 1000, 'show_internal_console_if_traceback': False, 'check_updates_on_startup': True, 'toolbars_visible': True, diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index 75d209b4169..142dd5b342e 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -884,25 +884,25 @@ def setup_page(self): margin_spin.spinbox.setEnabled(self.get_option('use_custom_margin')) margin_spin.slabel.setEnabled(self.get_option('use_custom_margin')) - caret_box = newcb(_("Caret blinking:"), - 'use_custom_caret_blinking') - caret_spin = self.create_spinbox("", _("ms"), 'custom_caret_blinking', + cursor_box = newcb(_("Cursor blinking:"), + 'use_custom_cursor_blinking') + cursor_spin = self.create_spinbox("", _("ms"), 'custom_cursor_blinking', 0, 0, 5000) - caret_box.toggled.connect(caret_spin.spinbox.setEnabled) - caret_box.toggled.connect(caret_spin.slabel.setEnabled) - caret_spin.spinbox.setEnabled( - self.get_option('use_custom_caret_blinking')) - caret_spin.slabel.setEnabled( - self.get_option('use_custom_caret_blinking')) + cursor_box.toggled.connect(cursor_spin.spinbox.setEnabled) + cursor_box.toggled.connect(cursor_spin.slabel.setEnabled) + cursor_spin.spinbox.setEnabled( + self.get_option('use_custom_cursor_blinking')) + cursor_spin.slabel.setEnabled( + self.get_option('use_custom_cursor_blinking')) - margins_caret_layout = QGridLayout() - margins_caret_layout.addWidget(margin_box, 0, 0) - margins_caret_layout.addWidget(margin_spin.spinbox, 0, 1) - margins_caret_layout.addWidget(margin_spin.slabel, 0, 2) - margins_caret_layout.addWidget(caret_box, 1, 0) - margins_caret_layout.addWidget(caret_spin.spinbox, 1, 1) - margins_caret_layout.addWidget(caret_spin.slabel, 1, 2) - margins_caret_layout.setColumnStretch(2, 100) + margins_cursor_layout = QGridLayout() + margins_cursor_layout.addWidget(margin_box, 0, 0) + margins_cursor_layout.addWidget(margin_spin.spinbox, 0, 1) + margins_cursor_layout.addWidget(margin_spin.slabel, 0, 2) + margins_cursor_layout.addWidget(cursor_box, 1, 0) + margins_cursor_layout.addWidget(cursor_spin.spinbox, 1, 1) + margins_cursor_layout.addWidget(cursor_spin.slabel, 1, 2) + margins_cursor_layout.setColumnStretch(2, 100) # Layout interface comboboxes_layout = QHBoxLayout() @@ -920,7 +920,7 @@ def setup_page(self): interface_layout.addWidget(verttabs_box) interface_layout.addWidget(animated_box) interface_layout.addWidget(tear_off_box) - interface_layout.addLayout(margins_caret_layout) + interface_layout.addLayout(margins_cursor_layout) interface_group.setLayout(interface_layout) # --- Status bar From 145fed06b6e12126ec6c8183e11faba846d0aed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 31 Jul 2017 14:03:08 -0400 Subject: [PATCH 07/11] Cache cursor flash time value on startup QApplication cursorFlashTime is cached on startup so that the default value of the OS can be used if the user unchecked `Cursor blinking` option in preferences. This is needed since QApplication.cursorFlashTime() returns the value of the current QApplication instance, not the OS default value. --- spyder/app/mainwindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 38425283642..8d81789554f 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -222,6 +222,7 @@ def get_focus_python_shell(): class MainWindow(QMainWindow): """Spyder main window""" DOCKOPTIONS = QMainWindow.AllowTabbedDocks|QMainWindow.AllowNestedDocks + CURSORBLINK_OSDEFAULT = QApplication.cursorFlashTime() SPYDER_PATH = get_conf_path('path') BOOKMARKS = ( ('numpy', "http://docs.scipy.org/doc/", @@ -2543,7 +2544,7 @@ def apply_settings(self): if CONF.get('main', 'use_custom_cursor_blinking') is True: qapp.setCursorFlashTime(CONF.get('main', 'custom_cursor_blinking')) else: - qapp.setCursorFlashTime(QApplication.cursorFlashTime()) + qapp.setCursorFlashTime(self.CURSORBLINK_OSDEFAULT) def apply_panes_settings(self): """Update dockwidgets features settings""" From 0a8b97abbf19962d868d8540c1fda0d39649508a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Mon, 31 Jul 2017 14:03:51 -0400 Subject: [PATCH 08/11] removed not needed `is True` --- spyder/app/mainwindow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 8d81789554f..868939cc137 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -2540,8 +2540,8 @@ def apply_settings(self): self.apply_panes_settings() self.apply_statusbar_settings() - - if CONF.get('main', 'use_custom_cursor_blinking') is True: + + if CONF.get('main', 'use_custom_cursor_blinking'): qapp.setCursorFlashTime(CONF.get('main', 'custom_cursor_blinking')) else: qapp.setCursorFlashTime(self.CURSORBLINK_OSDEFAULT) From 08829f09ce74af560cee7d402e1906844495a262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Tue, 1 Aug 2017 12:49:53 -0400 Subject: [PATCH 09/11] Changed how default value is set for cursor blink speed spinbox --- spyder/config/main.py | 1 - spyder/plugins/configdialog.py | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spyder/config/main.py b/spyder/config/main.py index a463d6cc935..ce360ce6fe9 100755 --- a/spyder/config/main.py +++ b/spyder/config/main.py @@ -94,7 +94,6 @@ 'use_custom_margin': True, 'custom_margin': 0, 'use_custom_cursor_blinking': False, - 'custom_cursor_blinking': 1000, 'show_internal_console_if_traceback': False, 'check_updates_on_startup': True, 'toolbars_visible': True, diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index 142dd5b342e..07c44e7ce6f 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -23,7 +23,8 @@ QLineEdit, QListView, QListWidget, QListWidgetItem, QMessageBox, QPushButton, QRadioButton, QScrollArea, QSpinBox, QSplitter, QStackedWidget, - QStyleFactory, QTabWidget, QVBoxLayout, QWidget) + QStyleFactory, QTabWidget, QVBoxLayout, QWidget, + QApplication) # Local imports from spyder.config.base import (_, LANGUAGE_CODES, load_lang_conf, @@ -328,6 +329,7 @@ def load_from_conf(self): if lineedit.restart_required: self.restart_options[option] = lineedit.label_text for spinbox, (option, default) in list(self.spinboxes.items()): + print(option, default, self.get_option(option, default)) spinbox.setValue(self.get_option(option, default)) spinbox.valueChanged.connect(lambda _foo, opt=option: self.has_been_modified(opt)) @@ -887,7 +889,8 @@ def setup_page(self): cursor_box = newcb(_("Cursor blinking:"), 'use_custom_cursor_blinking') cursor_spin = self.create_spinbox("", _("ms"), 'custom_cursor_blinking', - 0, 0, 5000) + default = QApplication.cursorFlashTime(), + min_ = 0, max_ = 5000, step = 10) cursor_box.toggled.connect(cursor_spin.spinbox.setEnabled) cursor_box.toggled.connect(cursor_spin.slabel.setEnabled) cursor_spin.spinbox.setEnabled( From 4f112ab1824755e2d022b95ee157309476da1ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Tue, 1 Aug 2017 12:53:59 -0400 Subject: [PATCH 10/11] Removed a print statement that was not deleted before push... --- spyder/plugins/configdialog.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index 07c44e7ce6f..0c63119dbe5 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -329,7 +329,6 @@ def load_from_conf(self): if lineedit.restart_required: self.restart_options[option] = lineedit.label_text for spinbox, (option, default) in list(self.spinboxes.items()): - print(option, default, self.get_option(option, default)) spinbox.setValue(self.get_option(option, default)) spinbox.valueChanged.connect(lambda _foo, opt=option: self.has_been_modified(opt)) From 76e36916fe3eb8c8fb98b7007f4f9a264dfdc094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Gosselin?= Date: Tue, 1 Aug 2017 12:56:22 -0400 Subject: [PATCH 11/11] removed spaces around = for keyword args and changed step of spinbox --- spyder/plugins/configdialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder/plugins/configdialog.py b/spyder/plugins/configdialog.py index 0c63119dbe5..9dc520c579b 100644 --- a/spyder/plugins/configdialog.py +++ b/spyder/plugins/configdialog.py @@ -889,7 +889,7 @@ def setup_page(self): 'use_custom_cursor_blinking') cursor_spin = self.create_spinbox("", _("ms"), 'custom_cursor_blinking', default = QApplication.cursorFlashTime(), - min_ = 0, max_ = 5000, step = 10) + min_=0, max_=5000, step=100) cursor_box.toggled.connect(cursor_spin.spinbox.setEnabled) cursor_box.toggled.connect(cursor_spin.slabel.setEnabled) cursor_spin.spinbox.setEnabled(