Пример #1
0
 def restore_prev(self):
     global _prev_id_or_url
     global _prev_content_switchbutton
     global _prev_limit
     global _prev_download_folder
     global _prev_lang
     global _prev_likes
     global _prev_pages_limit
     if _prev_pages_limit:
         self.limit_text_entry.set(
             texts.values_translate(key='LIMIT_CHOICES',
                                    value=_prev_pages_limit,
                                    src_lang=_prev_lang,
                                    dest_lang=texts.LANG))
     if _prev_id_or_url:
         clear_widget(self.id_or_url_input)
         self.id_or_url_input.insert(0, str(_prev_id_or_url))
     if _prev_content_switchbutton:
         self.content_switchbutton.set(
             texts.values_translate(key='ARTIST_CONTENT_SWITCH_VALUES',
                                    value=_prev_content_switchbutton,
                                    src_lang=_prev_lang,
                                    dest_lang=texts.LANG))
     if _prev_limit:
         clear_widget(self.limit_entry)
         self.limit_entry.insert(0, str(_prev_limit))
     if _prev_download_folder:
         clear_widget(self.download_folder_entry)
         self.download_folder_entry.insert(0, str(_prev_download_folder))
     if _prev_likes:
         clear_widget(self.likes_entry)
         self.likes_entry.insert(0, str(_prev_likes))
Пример #2
0
 def restore_prev(self):
     global _prev_date_entry
     global _prev_limit_entry
     global _prev_type_dropdown
     global _prev_content_dropdown
     global _prev_download_folder_entry
     global _prev_pages_limit
     if _prev_date_entry:
         clear_widget(self.date_entry)
         self.date_entry.insert(0, _prev_date_entry)
     if _prev_limit_entry:
         clear_widget(self.limit_entry)
         self.limit_entry.insert(0, _prev_limit_entry)
     if _prev_type_dropdown:
         self.type_dropdown.set(
             texts.values_translate(key='RANK_TYPES',
                                    value=_prev_type_dropdown,
                                    src_lang=_prev_lang,
                                    dest_lang=texts.LANG))
     if _prev_content_dropdown:
         self.content_dropdown.set(
             texts.values_translate(key='RANK_CONTENT_TYPES',
                                    value=_prev_content_dropdown,
                                    src_lang=_prev_lang,
                                    dest_lang=texts.LANG))
     if _prev_pages_limit:
         self.limit_text_entry.set(
             texts.values_translate(key='LIMIT_CHOICES',
                                    value=_prev_pages_limit,
                                    src_lang=_prev_lang,
                                    dest_lang=texts.LANG))
     if _prev_download_folder_entry:
         clear_widget(self.download_folder_entry)
         self.download_folder_entry.insert(0, _prev_download_folder_entry)
Пример #3
0
    def restore_prev(self):
        global _prev_keyword_text
        global _prev_limit_text
        global _prev_match_text
        global _prev_sort_text
        global _prev_popularity_text
        global _prev_download_folder_text
        global _prev_pages_limit
        if _prev_keyword_text:
            clear_widget(self.keyword_entry)
            self.keyword_entry.insert(0, _prev_keyword_text)
        if _prev_limit_text:
            clear_widget(self.limit_entry)
            self.limit_entry.insert(0, _prev_limit_text)
        if _prev_match_text:
            clear_widget(self.match_dropdown)
            self.match_dropdown.set(
                texts.values_translate(key='SEARCH_MATCH_CHOICES',
                                       value=_prev_match_text,
                                       src_lang=_prev_lang,
                                       dest_lang=texts.LANG))
        if _prev_sort_text:
            clear_widget(self.sort_dropdown)
            self.sort_dropdown.set(
                texts.values_translate(key='SEARCH_SORT_CHOICES',
                                       value=_prev_sort_text,
                                       src_lang=_prev_lang,
                                       dest_lang=texts.LANG))
        if _prev_popularity_text:
            clear_widget(self.popularity_dropdown)
            self.popularity_dropdown.set(
                texts.values_translate(key='SEARCH_POPULARITY_CHOICES',
                                       value=_prev_popularity_text,
                                       src_lang=_prev_lang,
                                       dest_lang=texts.LANG))
        if _prev_download_folder_text:
            clear_widget(self.download_folder_entry)
            self.download_folder_entry.insert(0, _prev_download_folder_text)

        if _prev_pages_limit:
            self.limit_text_entry.set(
                texts.values_translate(key='LIMIT_CHOICES',
                                       value=_prev_pages_limit,
                                       src_lang=_prev_lang,
                                       dest_lang=texts.LANG))
Пример #4
0
 def restore_prev(self):
     global _prev_id_or_url
     if _prev_id_or_url:
         clear_widget(self.id_or_url_input)
         self.id_or_url_input.insert(0.0, str(_prev_id_or_url))