Beispiel #1
0
 def __init__(self, component_manager ):
     UiComponent.__init__(self, component_manager)
     self.formats = {}
     for _format in self.component_manager.get_all("file_format"):
         self.formats[_format.description] = _format.filename_filter
     # create widgets 
     self.page, self.switcher, self.format_label, self.format_button, \
         self.tags_box, self.tags_button, self.tags_name_label, \
         self.file_chooser_button, self.file_name_label, \
         self.menu_button, self.convert_button, self.format_prev_button, \
         self.format_next_button, new_tag_button, self.new_tag_entry = \
         create_importcard_ui(self.main_widget().switcher, \
         self.component_manager.get_current("file_format").description)
     self.tags_mode = False
     self.selected_tags = [u"<default>"]
     self.fname = None
     # connect signals
     self.format_prev_button.connect('clicked', self.change_format_cb)
     self.format_next_button.connect('clicked', self.change_format_cb)
     self.menu_button.connect('clicked', self.back_to_main_menu_cb)
     self.file_chooser_button.connect('clicked', self.choose_file_cb)
     self.tags_button.connect('clicked', self.show_tags_dialog_cb)
     self.convert_button.connect('clicked', self.convert_cb)
     new_tag_button.connect('clicked', self.add_new_tag_cb)
     # update widgets content
     self.update_widgets( \
         self.component_manager.get_current("file_format").description)
Beispiel #2
0
    def __init__(self, component_manager ):

        UiComponent.__init__(self, component_manager)

        self.formats = [desc.description for desc in \
                        self.component_manager.get_all("file_format")]
 
        self.page, self.format_label, self.tags_box, menu_button, \
            ok_button, self.file_name_label, \
            self.format_prev_button, self.format_next_button, \
            = create_importcard_ui( self.main_widget().window, \
            self.main_widget().switcher, \
            self.component_manager.get_current("file_format").description)
        self.tags_dict = {}

        # connect signals
        self.format_prev_button.connect('clicked', self.change_format_cb)
        self.format_next_button.connect('clicked', self.change_format_cb)
        menu_button.connect('clicked', self.back_to_main_menu_cb)
        ok_button.connect('clicked', self.ok_button_cb)