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):
|
if self.base.profiles.has_key(profile):
|
||||||
self.base.profiles[newname] = self.base.profiles[profile]
|
self.base.profiles[newname] = self.base.profiles[profile]
|
||||||
del(self.base.profiles[profile])
|
del(self.base.profiles[profile])
|
||||||
|
if profile == self.profile:
|
||||||
|
self.profile = newname
|
||||||
|
|
||||||
def list_profiles(self):
|
def list_profiles(self):
|
||||||
"""List all configured profiles"""
|
"""List all configured profiles"""
|
||||||
|
@ -577,7 +577,7 @@ class PrefsEditor:
|
|||||||
|
|
||||||
newprofile = _('New Profile')
|
newprofile = _('New Profile')
|
||||||
if newprofile in values:
|
if newprofile in values:
|
||||||
i = 0
|
i = 1
|
||||||
while newprofile in values:
|
while newprofile in values:
|
||||||
i = i + 1
|
i = i + 1
|
||||||
newprofile = '%s %d' % (_('New Profile'), i)
|
newprofile = '%s %d' % (_('New Profile'), i)
|
||||||
@ -668,6 +668,8 @@ class PrefsEditor:
|
|||||||
def on_profile_selection_changed(self, selection):
|
def on_profile_selection_changed(self, selection):
|
||||||
"""A different profile was selected"""
|
"""A different profile was selected"""
|
||||||
if self.previous_selection is not None:
|
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)
|
self.store_profile_values(self.previous_selection)
|
||||||
|
|
||||||
(listmodel, rowiter) = selection.get_selected()
|
(listmodel, rowiter) = selection.get_selected()
|
||||||
@ -701,6 +703,9 @@ class PrefsEditor:
|
|||||||
iter = model.get_iter(path)
|
iter = model.get_iter(path)
|
||||||
model.set_value(iter, 0, newtext)
|
model.set_value(iter, 0, newtext)
|
||||||
|
|
||||||
|
if oldname == self.previous_selection:
|
||||||
|
self.previous_selection = newtext
|
||||||
|
|
||||||
def on_color_scheme_combobox_changed(self, widget):
|
def on_color_scheme_combobox_changed(self, widget):
|
||||||
"""Update the fore/background colour pickers"""
|
"""Update the fore/background colour pickers"""
|
||||||
value = None
|
value = None
|
||||||
|
Loading…
Reference in New Issue
Block a user