mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-07-01 03:27:45 +02:00
minor fixes
This commit is contained in:
@@ -289,8 +289,9 @@ class HttpAPI:
|
||||
|
||||
def __init__(self, settings):
|
||||
self._settings = settings
|
||||
self._base_url = None
|
||||
self._shutdown = False
|
||||
self._session_id = 0
|
||||
self._base_url = None
|
||||
self._data = None
|
||||
self.init()
|
||||
|
||||
@@ -298,6 +299,9 @@ class HttpAPI:
|
||||
self._executor = PoolExecutor(max_workers=self.__MAX_WORKERS)
|
||||
|
||||
def send(self, req_type, ref, callback=print):
|
||||
if self._shutdown:
|
||||
return
|
||||
|
||||
url = self._base_url + req_type.value
|
||||
|
||||
if req_type is HttpRequestType.ZAP or req_type is HttpRequestType.STREAM:
|
||||
@@ -320,8 +324,10 @@ class HttpAPI:
|
||||
if s_id != "0":
|
||||
self._data = urllib.parse.urlencode({"user": user, "password": password, "sessionid": s_id}).encode("utf-8")
|
||||
|
||||
@run_task
|
||||
def close(self):
|
||||
self._executor.shutdown(False)
|
||||
self._shutdown = True
|
||||
self._executor.shutdown()
|
||||
|
||||
|
||||
def get_response(req_type, url, data=None):
|
||||
|
||||
@@ -1677,9 +1677,9 @@ class Application(Gtk.Application):
|
||||
def on_player_duration_changed(self, duration):
|
||||
self._player_scale.set_value(0)
|
||||
self._player_scale.get_adjustment().set_upper(duration)
|
||||
GLib.idle_add(self._player_rewind_box.set_visible, duration > 0)
|
||||
GLib.idle_add(self._player_current_time_label.set_text, "0")
|
||||
GLib.idle_add(self._player_full_time_label.set_text, self.get_time_str(duration))
|
||||
GLib.idle_add(self._player_rewind_box.set_visible, duration > 0, priority=GLib.PRIORITY_LOW)
|
||||
GLib.idle_add(self._player_current_time_label.set_text, "0", priority=GLib.PRIORITY_LOW)
|
||||
GLib.idle_add(self._player_full_time_label.set_text, self.get_time_str(duration), priority=GLib.PRIORITY_LOW)
|
||||
|
||||
def on_player_time_changed(self, t):
|
||||
if not self._full_screen and self._player_rewind_box.get_visible():
|
||||
|
||||
@@ -1455,7 +1455,7 @@ Author: Dmitriy Yefremov
|
||||
<child>
|
||||
<object class="GtkScale" id="player_scale">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="adjustment">player_scale_adjustment</property>
|
||||
|
||||
@@ -69,7 +69,7 @@ class ServiceDetailsDialog:
|
||||
# Patterns
|
||||
self._DIGIT_PATTERN = re.compile("\\D")
|
||||
self._NON_EMPTY_PATTERN = re.compile("(?:^[\\s]*$|\\D)")
|
||||
self._CAID_PATTERN = re.compile("(?:^[\\s]*$)|(C:[0-9a-z]{4})(,C:[0-9a-z]{4})*")
|
||||
self._CAID_PATTERN = re.compile("(?:^[\\s]*$)|(C:[0-9a-fA-F]{1,4})(,C:[0-9a-fA-F]{1,4})*")
|
||||
# Buttons
|
||||
self._apply_button = builder.get_object("apply_button")
|
||||
self._create_button = builder.get_object("create_button")
|
||||
|
||||
Reference in New Issue
Block a user