Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(32)  |  Call(32)  |  Derive(0)  |  Import(0)

src/g/r/gramps-3.4.2/src/plugins/gramplet/QuickViewGramplet.py   Gramps(Download)
                                              active_handle,
                                              container=self.gui.textview)
            self.set_has_data(docman.document.has_data)
        else:
            self.clear_text()
            self.set_has_data(False)

src/g/r/gramps-3.4.2/src/plugins/gramplet/EditExifMetadata.py   Gramps(Download)
        active_handle = self.get_active("Media")
        if not active_handle:
            self.set_has_data(False)
            return
 
        # get image from database
        self.orig_image = db.get_object_from_handle(active_handle)
        if not self.orig_image:
            self.set_has_data(False)
        self.image_path =Utils.media_path_full(db, self.orig_image.get_path() )
        if not os.path.isfile(self.image_path):
            self.set_has_data(False)
            return
 
 
        # update set_has_data functionality
        self.set_has_data(has_data)
 
        if has_data:
                metadata.readMetadata()
            except (IOError, OSError):
                self.set_has_data(False)
                metadata = False
 

src/g/r/gramps-3.4.2/src/plugins/gramplet/RepositoryDetails.py   Gramps(Download)
    def update_has_data(self): 
        active_handle = self.get_active('Person')
        active_person = self.dbstate.db.get_person_from_handle(active_handle)
        self.set_has_data(active_person is not None)
 
        if repo:
            self.display_repo(repo)
            self.set_has_data(True)
        else:
            self.display_empty()
            self.set_has_data(False)

src/g/r/gramps-3.4.2/src/plugins/gramplet/PlaceDetails.py   Gramps(Download)
    def update_has_data(self): 
        active_handle = self.get_active('Person')
        active_person = self.dbstate.db.get_person_from_handle(active_handle)
        self.set_has_data(active_person is not None)
 
        if place:
            self.display_place(place)
            self.set_has_data(True)
        else:
            self.display_empty()
            self.set_has_data(False)

src/g/r/gramps-3.4.2/src/plugins/gramplet/PersonDetails.py   Gramps(Download)
    def update_has_data(self): 
        active_handle = self.get_active('Person')
        active_person = self.dbstate.db.get_person_from_handle(active_handle)
        self.set_has_data(active_person is not None)
 
        if active_person:
            self.display_person(active_person)
            self.set_has_data(True)
        else:
            self.display_empty()
            self.set_has_data(False)

src/g/r/gramps-3.4.2/src/plugins/gramplet/MetadataViewer.py   Gramps(Download)
            full_path = Utils.media_path_full(self.dbstate.db, media.get_path())
            has_data = self.view.display_exif_tags(full_path)
            self.set_has_data(has_data)
        else:
            self.set_has_data(False)
 
    def update_has_data(self):
        active_handle = self.get_active('Media')
        active = self.dbstate.db.get_object_from_handle(active_handle)
        self.set_has_data(self.get_has_data(active))

src/g/r/gramps-3.4.2/src/plugins/gramplet/MediaPreview.py   Gramps(Download)
    def update_has_data(self): 
        active_handle = self.get_active('Media')
        active_media = self.dbstate.db.get_object_from_handle(active_handle)
        self.set_has_data(active_media is not None)
 
        if media:
            self.load_image(media)
            self.set_has_data(True)
        else:
            self.photo.set_image(None)
            self.set_has_data(False)

src/g/r/gramps-3.4.2/src/plugins/gramplet/PersonResidence.py   Gramps(Download)
    def update_has_data(self):
        active_handle = self.get_active('Person')
        active = self.dbstate.db.get_person_from_handle(active_handle)
        self.set_has_data(self.get_has_data(active))
 
            self.display_person(active_person)
        else:
            self.set_has_data(False)
 
    def display_person(self, active_person):
                    self.add_residence(event)
                    count += 1
        self.set_has_data(count > 0)
 
    def add_residence(self, event):

src/g/r/gramps-3.4.2/src/plugins/gramplet/Attributes.py   Gramps(Download)
        for attr in obj.get_attribute_list():
            self.model.add((attr.get_type(), attr.get_value()))
        self.set_has_data(self.model.count > 0)
 
    def display_report(self, treeview):

src/g/r/gramps-3.4.2/src/plugins/gramplet/Notes.py   Gramps(Download)
        self.page.set_text('')
        if len(self.note_list) > 0:
            self.set_has_data(True)
            if len(self.note_list) > 1:
                self.right.set_sensitive(True)
            self.current = 0
            self.display_note()
        else:
            self.set_has_data(False)

  1 | 2  Next