Exemple #1
0
 def create_ui(self):
     self.pane = gtk.HPaned()
     self.widget.add(self.pane)
     self.listing = PersonList()
     self.detail = PersonForm()
     self.pane.pack1(self.listing.widget)
     self.pane.pack2(self.detail.widget)
Exemple #2
0
 def create_ui(self):
     self.pane = gtk.HPaned()
     self.widget.add(self.pane)
     self.listing = PersonList()
     self.detail = PersonForm()
     self.pane.pack1(self.listing.widget)
     self.pane.pack2(self.detail.widget)
Exemple #3
0
class PersonEditor(SlaveView):

    def create_ui(self):
        self.pane = gtk.HPaned()
        self.widget.add(self.pane)
        self.listing = PersonList()
        self.detail = PersonForm()
        self.pane.pack1(self.listing.widget)
        self.pane.pack2(self.detail.widget)

    def on_listing__item_activated(self, listing, item):
        self.detail.model = item

    def on_listing__item_changed(self, listing, item, attr, value):
        if item is self.detail.model:
            # cause an ui update
            self.detail.model = item

    def on_detail__model_updated(self, detail, attribute, value):
        self.listing.objects.update(detail.model)

    def append_item(self, item):
        self.listing.append_item(item)
Exemple #4
0
class PersonEditor(SlaveView):

    def create_ui(self):
        self.pane = gtk.HPaned()
        self.widget.add(self.pane)
        self.listing = PersonList()
        self.detail = PersonForm()
        self.pane.pack1(self.listing.widget)
        self.pane.pack2(self.detail.widget)

    def on_listing__item_activated(self, listing, item):
        self.detail.model = item

    def on_listing__item_changed(self, listing, item, attr, value):
        if item is self.detail.model:
            # cause an ui update
            self.detail.model = item

    def on_detail__model_updated(self, detail, attribute, value):
        self.listing.objects.update(detail.model)

    def append_item(self, item):
        self.listing.append_item(item)