diff --git a/app/ui/picons_manager.glade b/app/ui/picons_manager.glade index d60bdc2f..8c5026ac 100644 --- a/app/ui/picons_manager.glade +++ b/app/ui/picons_manager.glade @@ -28,9 +28,10 @@ Author: Dmitriy Yefremov --> + - + True @@ -509,7 +510,7 @@ Author: Dmitriy Yefremov True - True + False @@ -663,7 +664,7 @@ Author: Dmitriy Yefremov True - True + False @@ -812,24 +813,6 @@ Author: Dmitriy Yefremov False vertical 2 - - - False - False - Source: - center - 0 - - Picon.cz - LyngSat - - - - False - True - 0 - - True @@ -844,10 +827,10 @@ Author: Dmitriy Yefremov 5 5 5 + vertical True - 250 True False 2 @@ -858,10 +841,12 @@ Author: Dmitriy Yefremov True False 5 + 5 2 False + end Satellite @@ -874,6 +859,7 @@ Author: Dmitriy Yefremov True False + end Loading data... @@ -886,6 +872,7 @@ Author: Dmitriy Yefremov True False + end True @@ -894,10 +881,54 @@ Author: Dmitriy Yefremov 2 + + + True + False + 5 + + + True + False + Source: + + + False + True + 0 + + + + + True + False + False + center + 0 + + Picon.cz + LyngSat + + + + + False + True + 1 + + + + + False + True + 4 + + True False + end 5 @@ -915,6 +946,7 @@ Author: Dmitriy Yefremov True True True + 1 @@ -938,6 +970,7 @@ Author: Dmitriy Yefremov + 55 True True in @@ -1001,8 +1034,8 @@ Author: Dmitriy Yefremov - False - True + True + False @@ -1073,7 +1106,6 @@ Author: Dmitriy Yefremov - 150 True True 2 @@ -1084,7 +1116,9 @@ Author: Dmitriy Yefremov True providers_list_store 1 + 0 + @@ -1199,66 +1233,6 @@ Author: Dmitriy Yefremov 2 - - - True - False - 2 - 2 - 2 - True - - - True - True - network-transmit-receive-symbolic - - - 0 - 1 - - - - - True - True - - - 1 - 1 - - - - - True - False - Receiver IP: - 0.05000000074505806 - - - 0 - 0 - - - - - True - False - Receiver picons path: - 0.05000000074505806 - - - 1 - 0 - - - - - False - True - 3 - - True @@ -1289,7 +1263,7 @@ Author: Dmitriy Yefremov True - True + False diff --git a/app/ui/picons_manager.py b/app/ui/picons_manager.py index bcd83d64..ce8e7d4d 100644 --- a/app/ui/picons_manager.py +++ b/app/ui/picons_manager.py @@ -29,7 +29,6 @@ import os import re import shutil -import tempfile from enum import Enum from pathlib import Path from urllib.parse import urlparse, unquote @@ -57,7 +56,6 @@ class PiconsDialog: self._picon_ids = picon_ids self._sat_positions = sat_positions self._app = app - self._TMP_DIR = tempfile.gettempdir() + "/" self._BASE_URL = "www.lyngsat.com/packages/" self._PATTERN = re.compile(r"^https://www\.lyngsat\.com/[\w-]+\.html$") self._POS_PATTERN = re.compile(r"^\d+\.\d+[EW]?$") @@ -139,8 +137,6 @@ class PiconsDialog: self._src_filter_button = builder.get_object("src_filter_button") self._dst_filter_button = builder.get_object("dst_filter_button") self._picons_filter_entry = builder.get_object("picons_filter_entry") - self._ip_entry = builder.get_object("ip_entry") - self._picons_entry = builder.get_object("picons_entry") self._picons_dir_entry = builder.get_object("picons_dir_entry") self._message_label = builder.get_object("info_bar_message_label") self._info_toggle_button = builder.get_object("info_toggle_button") @@ -191,8 +187,6 @@ class PiconsDialog: # Settings self._settings = settings self._s_type = settings.setting_type - self._ip_entry.set_text(self._settings.host) - self._picons_entry.set_text(self._settings.picons_path) self._picons_dir_entry.set_text(self._settings.picons_local_path) window_size = self._settings.get("picons_downloader_window_size") @@ -519,7 +513,7 @@ class PiconsDialog: self.set_providers_header() self.get_satellites(view) - def on_satellite_filter_toggled(self, button): + def on_satellite_filter_toggled(self, button, state): self.init_satellites(self._satellites_view) def on_providers_view_query_tooltip(self, view, x, y, keyboard_mode, tooltip): @@ -601,10 +595,9 @@ class PiconsDialog: for sat in sorted(sats): pos = sat[1] name = "{} ({})".format(sat[0], pos) - if not self._terminate and model: - if is_filter and pos not in self._sat_positions: - continue - yield model.append((name, sat[3], pos)) + if is_filter and pos not in self._sat_positions: + continue + yield model.append((name, sat[3], pos)) finally: self._satellite_label.show() @@ -794,7 +787,6 @@ class PiconsDialog: self._terminate = True self._is_downloading = False self.save_window_size(window) - self.clean_data() self._app.update_picons() GLib.idle_add(self._dialog.destroy) @@ -803,12 +795,6 @@ class PiconsDialog: height = size.height - self._text_view.get_allocated_height() - self._info_bar.get_allocated_height() self._settings.add("picons_downloader_window_size", (size.width, height)) - @run_task - def clean_data(self): - path = self._TMP_DIR + "www.lyngsat.com" - if os.path.exists(path): - shutil.rmtree(path) - @run_task def run_func(self, func, update=False): try: