renaming the current profile wasn't updating Config.profile with the new value. Now it is.
This commit is contained in:
parent
371aebc067
commit
da7f1a6ea1
@ -227,6 +227,8 @@ class Config(object):
|
||||
if self.base.profiles.has_key(profile):
|
||||
self.base.profiles[newname] = self.base.profiles[profile]
|
||||
del(self.base.profiles[profile])
|
||||
if profile == self.profile:
|
||||
self.profile = newname
|
||||
|
||||
def list_profiles(self):
|
||||
"""List all configured profiles"""
|
||||
|
@ -577,7 +577,7 @@ class PrefsEditor:
|
||||
|
||||
newprofile = _('New Profile')
|
||||
if newprofile in values:
|
||||
i = 0
|
||||
i = 1
|
||||
while newprofile in values:
|
||||
i = i + 1
|
||||
newprofile = '%s %d' % (_('New Profile'), i)
|
||||
@ -668,6 +668,8 @@ class PrefsEditor:
|
||||
def on_profile_selection_changed(self, selection):
|
||||
"""A different profile was selected"""
|
||||
if self.previous_selection is not None:
|
||||
dbg('PrefsEditor::on_profile_selection_changed: Storing: %s' %
|
||||
self.previous_selection)
|
||||
self.store_profile_values(self.previous_selection)
|
||||
|
||||
(listmodel, rowiter) = selection.get_selected()
|
||||
@ -701,6 +703,9 @@ class PrefsEditor:
|
||||
iter = model.get_iter(path)
|
||||
model.set_value(iter, 0, newtext)
|
||||
|
||||
if oldname == self.previous_selection:
|
||||
self.previous_selection = newtext
|
||||
|
||||
def on_color_scheme_combobox_changed(self, widget):
|
||||
"""Update the fore/background colour pickers"""
|
||||
value = None
|
||||
|
Loading…
Reference in New Issue
Block a user