Add a get_profile() to Config and use it in Terminal::set_profile() to make sure we don't set a profile that already is
This commit is contained in:
parent
f808a9edc9
commit
02c1a482df
|
@ -204,6 +204,10 @@ class Config(object):
|
||||||
"""Set a particular configuration item"""
|
"""Set a particular configuration item"""
|
||||||
return(self.base.set_item(key, value, self.profile))
|
return(self.base.set_item(key, value, self.profile))
|
||||||
|
|
||||||
|
def get_profile(self):
|
||||||
|
"""Get our profile"""
|
||||||
|
return(self.profile)
|
||||||
|
|
||||||
def set_profile(self, profile):
|
def set_profile(self, profile):
|
||||||
"""Set our profile (which usually means change it)"""
|
"""Set our profile (which usually means change it)"""
|
||||||
dbg('Config::set_profile: Changing profile to %s' % profile)
|
dbg('Config::set_profile: Changing profile to %s' % profile)
|
||||||
|
|
|
@ -142,6 +142,7 @@ class Terminal(gtk.VBox):
|
||||||
|
|
||||||
def set_profile(self, widget, profile):
|
def set_profile(self, widget, profile):
|
||||||
"""Set our profile"""
|
"""Set our profile"""
|
||||||
|
if profile != self.config.get_profile():
|
||||||
self.config.set_profile(profile)
|
self.config.set_profile(profile)
|
||||||
self.reconfigure()
|
self.reconfigure()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue