Пример #1
0
Файл: ui.py Проект: KsenZ/mcm
 def event_export(self, widget):
     dlg = mcm.gui.widgets.FileSelectDialog(True)
     dlg.run()
     
     if dlg.response == gtk.RESPONSE_OK and dlg.mime == 'html':
         _html = Html(constants.version, self.connections)
         _html.export(dlg.get_filename())
         mcm.gui.widgets.show_info_dialog(constants.export_finished, constants.saved_file % dlg.get_filename())
     elif dlg.response == gtk.RESPONSE_OK and dlg.mime == 'csv':
         _csv = mcm.common.utils.export_csv(self.connections, dlg.get_filename())
         mcm.gui.widgets.show_info_dialog(constants.export_finished, constants.saved_file % dlg.get_filename())
     elif dlg.response == gtk.RESPONSE_OK and dlg.mime == 'mcm':
         export_dialog = mcm.gui.dialogs.crypto.MCMCryptoDialog(dlg.get_filename(), None)
         export_dialog.run()
         if export_dialog.response == gtk.RESPONSE_OK:
             mcm.gui.widgets.show_info_dialog(constants.export_finished, constants.saved_file % dlg.get_filename())
Пример #2
0
    def event_export(self, widget):
        dlg = mcm.gui.widgets.FileSelectDialog(True)
        dlg.run()

        if dlg.response == gtk.RESPONSE_OK and dlg.mime == 'html':
            _html = Html(constants.version, self.connections)
            _html.export(dlg.get_filename())
            mcm.gui.widgets.show_info_dialog(
                constants.export_finished,
                constants.saved_file % dlg.get_filename())
        elif dlg.response == gtk.RESPONSE_OK and dlg.mime == 'csv':
            _csv = mcm.common.utils.export_csv(self.connections,
                                               dlg.get_filename())
            mcm.gui.widgets.show_info_dialog(
                constants.export_finished,
                constants.saved_file % dlg.get_filename())
        elif dlg.response == gtk.RESPONSE_OK and dlg.mime == 'mcm':
            export_dialog = mcm.gui.dialogs.crypto.MCMCryptoDialog(
                dlg.get_filename(), None)
            export_dialog.run()
            if export_dialog.response == gtk.RESPONSE_OK:
                mcm.gui.widgets.show_info_dialog(
                    constants.export_finished,
                    constants.saved_file % dlg.get_filename())
Пример #3
0
Файл: term.py Проект: KsenZ/mcm
 def export_html(self):
     from mcm.common.export import Html
     _html = Html(constants.version, self.connections)
     _html.export()
 def export_html(self, path):
     from mcm.common.export import Html
     html = Html(path, constants.version, self.dao.read_xml()) 
     html.export()
Пример #5
0
 def export_html(self):
     from mcm.common.export import Html
     _html = Html(constants.version, self.connections)
     _html.export()
 def export_html(self, path):
     from mcm.common.export import Html
     html = Html(path, get_mcm_version(), self.dao.read_xml()) 
     html.export()