00001
00002
00003
00004
00005
00006
00007
00008 import gobject
00009 import extension
00010
00011 class SettingsExtension (extension.Extension):
00012 '''Preferences GUI element.'''
00013
00014 accept = True
00015
00016 def __init__(self):
00017 extension.Extension.__init__(self)
00018
00019 def get_widget(self):
00020 '''Return the gtk.Widget which is the root of the widget hierarchy that
00021 should be attached to the preferences window. The
00022 settings object is responsible for setting the "visible"
00023 property of the widget.'''
00024 return None
00025
00026 def apply(self):
00027 '''Save all values that have been changed by the user.'''
00028 pass
00029
00030 def revert(self):
00031 '''Restore the user interface to the saved state.'''
00032 pass
00033
00034 def modified(self):
00035 '''Emits the "modified" signal.'''
00036 self.emit('modified')
00037
00038 gobject.type_register(SettingsExtension)
00039 gobject.signal_new('modified', SettingsExtension, 0, gobject.TYPE_NONE, [])