Ensure signals are connected when a view is created
svn: r15629
This commit is contained in:
parent
3415a1918e
commit
7a9e22083d
@ -116,6 +116,7 @@ class ListView(NavigationView):
|
|||||||
else:
|
else:
|
||||||
self.markup_columns = []
|
self.markup_columns = []
|
||||||
dbstate.connect('database-changed', self.change_db)
|
dbstate.connect('database-changed', self.change_db)
|
||||||
|
self.connect_signals()
|
||||||
|
|
||||||
def type_list(self):
|
def type_list(self):
|
||||||
"""
|
"""
|
||||||
@ -617,13 +618,19 @@ class ListView(NavigationView):
|
|||||||
self.columns[i].set_sort_indicator(enable_sort_flag)
|
self.columns[i].set_sort_indicator(enable_sort_flag)
|
||||||
self.columns[self.sort_col].set_sort_order(self.sort_order)
|
self.columns[self.sort_col].set_sort_order(self.sort_order)
|
||||||
|
|
||||||
|
def connect_signals(self):
|
||||||
|
"""
|
||||||
|
Connect database signals defined in the signal map.
|
||||||
|
"""
|
||||||
|
for sig in self.signal_map:
|
||||||
|
self.callman.add_db_signal(sig, self.signal_map[sig])
|
||||||
|
|
||||||
def change_db(self, db):
|
def change_db(self, db):
|
||||||
"""
|
"""
|
||||||
Called when the database is changed.
|
Called when the database is changed.
|
||||||
"""
|
"""
|
||||||
self._change_db(db)
|
self._change_db(db)
|
||||||
for sig in self.signal_map:
|
self.connect_signals()
|
||||||
self.callman.add_db_signal(sig, self.signal_map[sig])
|
|
||||||
|
|
||||||
self.bookmarks.update_bookmarks(self.get_bookmarks())
|
self.bookmarks.update_bookmarks(self.get_bookmarks())
|
||||||
if self.active:
|
if self.active:
|
||||||
|
Loading…
Reference in New Issue
Block a user