Added post_init() and updated db_changed().
svn: r18653
This commit is contained in:
parent
1c7c08f819
commit
c4c1b737bb
@ -238,16 +238,14 @@ _BUTTONTIPS = {
|
||||
#
|
||||
# ------------------------------------------------------------------------
|
||||
class EditExifMetadata(Gramplet):
|
||||
"""
|
||||
Special symbols...
|
||||
|
||||
degrees symbol = [Ctrl] [Shift] u \00b0
|
||||
minutes symbol = \2032
|
||||
seconds symbol = \2033
|
||||
"""
|
||||
def init(self):
|
||||
"""
|
||||
create variables, and build display
|
||||
|
||||
Special symbols...
|
||||
degrees symbol = [Ctrl] [Shift] u \00b0
|
||||
minutes symbol = \2032
|
||||
seconds symbol = \2033
|
||||
"""
|
||||
self.exif_widgets = {}
|
||||
self.dates = {}
|
||||
@ -260,6 +258,23 @@ class EditExifMetadata(Gramplet):
|
||||
self.dbstate.db.connect('media-update', self.update)
|
||||
self.connect_signal('Media', self.update)
|
||||
|
||||
def post_init(self):
|
||||
"""
|
||||
disconnects the active signal upon closing
|
||||
"""
|
||||
self.disconnect("active-changed")
|
||||
|
||||
def db_changed(self):
|
||||
"""
|
||||
connects the media signals to self.update; which updates the display...
|
||||
"""
|
||||
self.dbstate.db.connect('media-add', self.update)
|
||||
self.dbstate.db.connect('media-edit', self.update)
|
||||
self.dbstate.db.connect('media-delete', self.update)
|
||||
self.dbstate.db.connect('media-rebuild', self.update)
|
||||
|
||||
self.connect_signal('Media', self.update)
|
||||
|
||||
def __build_gui(self):
|
||||
"""
|
||||
will display all exif metadata and all buttons.
|
||||
@ -365,11 +380,6 @@ class EditExifMetadata(Gramplet):
|
||||
main_vbox.show_all()
|
||||
return main_vbox
|
||||
|
||||
def db_changed(self):
|
||||
self.dbstate.db.connect('media-update', self.update)
|
||||
self.connect_signal('Media', self.update)
|
||||
self.update()
|
||||
|
||||
def active_changed(self, handle):
|
||||
self.update()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user