Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions spyder/plugins/appearance/confpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def setup_page(self):
syntax_group = QGroupBox(_("Syntax highlighting theme"))

# Syntax Widgets
edit_button = QPushButton(_("Edit selected scheme"))
create_button = QPushButton(_("Create new scheme"))
self.delete_button = QPushButton(_("Delete scheme"))
edit_button = QPushButton(_("Edit selected theme"))
create_button = QPushButton(_("Create new theme"))
self.delete_button = QPushButton(_("Delete theme"))
self.reset_button = QPushButton(_("Reset to defaults"))

self.stacked_widget = QStackedWidget(self)
Expand Down Expand Up @@ -560,10 +560,12 @@ def delete_scheme(self):
"""Deletes the currently selected custom color scheme."""
scheme_name = self.current_scheme

answer = QMessageBox.warning(self, _("Warning"),
_("Are you sure you want to delete "
"this scheme?"),
QMessageBox.Yes | QMessageBox.No)
answer = QMessageBox.warning(
self,
_("Warning"),
_("Are you sure you want to delete this theme?"),
QMessageBox.Yes | QMessageBox.No,
)
if answer == QMessageBox.Yes:
# Put the combobox in Spyder by default, when deleting a scheme
names = self.get_option('names')
Expand Down
8 changes: 4 additions & 4 deletions spyder/plugins/appearance/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ def add_color_scheme_stack(self, scheme_name, custom=False):

parent = self.parent
self.line_edit = parent.create_lineedit(
_("Scheme name:"), '{0}/name'.format(scheme_name)
_("Theme name:"), '{0}/name'.format(scheme_name)
)

self.widgets[scheme_name] = {}

# Widget setup
self.line_edit.label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
self.setWindowTitle(_('Color scheme editor'))
self.setWindowTitle(_('Syntax highlighting theme editor'))

# Layout
name_layout = QHBoxLayout()
Expand Down Expand Up @@ -243,7 +243,7 @@ def restore_original_scheme(self, scheme_name):
self.line_edit.textbox.setText(
str(parent.get_option('{0}/name'.format(scheme_name)))
)

for key, value in self.original_scheme.items():
if isinstance(value, tuple):
color = QColor()
Expand All @@ -255,7 +255,7 @@ def restore_original_scheme(self, scheme_name):
color = QColor()
color.setNamedColor(value)
self.widgets[scheme_name][key][0].update_text(color)

def reject(self):
"""Executes when Cancel is pressed: Restores the edited scheme."""
self.restore_original_scheme(self.last_used_scheme)
Expand Down
Loading