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:
Chris Jones 2010-01-13 23:02:17 +00:00
parent f808a9edc9
commit 02c1a482df
2 changed files with 7 additions and 2 deletions

View File

@ -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)

View File

@ -142,6 +142,7 @@ class Terminal(gtk.VBox):
def set_profile(self, widget, profile):
"""Set our profile"""
if profile != self.config.get_profile():
self.config.set_profile(profile)
self.reconfigure()