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"""
|
||||
return(self.base.set_item(key, value, self.profile))
|
||||
|
||||
def get_profile(self):
|
||||
"""Get our profile"""
|
||||
return(self.profile)
|
||||
|
||||
def set_profile(self, profile):
|
||||
"""Set our profile (which usually means change it)"""
|
||||
dbg('Config::set_profile: Changing profile to %s' % profile)
|
||||
|
|
|
@ -142,8 +142,9 @@ class Terminal(gtk.VBox):
|
|||
|
||||
def set_profile(self, widget, profile):
|
||||
"""Set our profile"""
|
||||
self.config.set_profile(profile)
|
||||
self.reconfigure()
|
||||
if profile != self.config.get_profile():
|
||||
self.config.set_profile(profile)
|
||||
self.reconfigure()
|
||||
|
||||
def get_profile(self):
|
||||
"""Return our profile name"""
|
||||
|
|
Loading…
Reference in New Issue