Subversion Repositories basico

Rev

Rev 356 | Rev 360 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 356 Rev 358
Line 865... Line 865...
865
            # ~ stack_main.show_all()
865
            # ~ stack_main.show_all()
866
            vpaned.set_position(600)
866
            vpaned.set_position(600)
867
867
868
868
869
    def gui_attachment_add(self, *args):
869
    def gui_attachment_add(self, *args):
-
 
870
        visor = self.srvgui.get_widget('visor_attachments')
870
        # Get Annotation ID (AID) from widget, if any
871
        # Get Annotation ID (AID) from widget, if any
871
        widget_annotation = self.srvgui.get_widget('widget_annotation')
872
        widget_annotation = self.srvgui.get_widget('widget_annotation')
872
        aid = widget_annotation.get_aid_from_widget()
873
        aid = widget_annotation.get_aid_from_widget()
873
874
874
        # Get attachments fro filechooser dialog
875
        # Get attachments fro filechooser dialog
Line 878... Line 879...
878
        if attachments is not None:
879
        if attachments is not None:
879
            for attachment in attachments:
880
            for attachment in attachments:
880
                # only allow files (avoid directories)
881
                # only allow files (avoid directories)
881
                if os.path.isfile(attachment):
882
                if os.path.isfile(attachment):
882
                    self.srvatc.create(attachment, aid)
883
                    self.srvatc.create(attachment, aid)
-
 
884
            visor.populate_attachments()
883
        else:
885
        else:
884
            self.log.warning("No files selected to attach")
886
            self.log.warning("No files selected to attach")
885
887
886
    def gui_attachment_show_filechooser(self):
888
    def gui_attachment_show_filechooser(self):
887
        filenames = None
889
        filenames = None