UI improvements
svn: r5775
This commit is contained in:
@@ -19,6 +19,11 @@ class PersonFrame(ObjectFrameBase):
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING)),
|
||||
|
||||
'add-object': (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
())
|
||||
|
||||
}
|
||||
|
||||
__person_id_field = 1
|
||||
@@ -43,12 +48,15 @@ class PersonFrame(ObjectFrameBase):
|
||||
self.emit('selection-changed',"No Selection","")
|
||||
|
||||
|
||||
self._tree_frame.get_selection().connect('changed',handle_selection)
|
||||
|
||||
|
||||
self._tree_frame.get_selection().connect('changed',handle_selection)
|
||||
self._tree_frame.get_selection().connect('changed',self.set_preview,self.__class__.__person_id_field)
|
||||
self._tree_frame.get_tree().connect('row-activated',self._on_row_activated)
|
||||
|
||||
|
||||
def _on_row_activated(self,widget,path,col):
|
||||
(model, iter) = widget.get_selection().get_selected()
|
||||
if iter and model.get_value(iter,self.__class__.__person_id_field):
|
||||
self.emit('add-object')
|
||||
|
||||
if gtk.pygtk_version < (2,8,0):
|
||||
gobject.type_register(PersonFrame)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user