gtk-stream 0.13.2__tar.gz → 0.13.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/PKG-INFO +1 -1
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/_version.py +2 -2
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/application.py +2 -2
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/common.py +6 -6
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Document.py +3 -3
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/parser.py +2 -2
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/PKG-INFO +1 -1
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/README.md +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk-stream +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/__init__.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/command_line.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/__init__.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Box.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Button.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Dropdown.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Entry.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/FlowBox.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Frame.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Grid.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Label.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Paned.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Picture.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/ProgressBar.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Scale.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/ScrolledWindow.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Separator.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Stack.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/Switch.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/documents/classes/__init__.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream/properties.py +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/SOURCES.txt +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/dependency_links.txt +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/entry_points.txt +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/requires.txt +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/gtk_stream.egg-info/top_level.txt +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/pyproject.toml +0 -0
- {gtk_stream-0.13.2 → gtk_stream-0.13.4}/setup.cfg +0 -0
@@ -19,7 +19,7 @@ import threading
|
|
19
19
|
import signal
|
20
20
|
|
21
21
|
from . import Gtk, GLib, Gdk
|
22
|
-
from .common import
|
22
|
+
from .common import print_event
|
23
23
|
from .properties import parse_property, get_prop_type, set_parse_prop
|
24
24
|
|
25
25
|
class _Object:
|
@@ -117,7 +117,7 @@ class GtkStreamApp(Gtk.Application):
|
|
117
117
|
set_parse_prop(self, win, attr_name, attr_val)
|
118
118
|
self.named_windows[id] = win
|
119
119
|
win.set_child(document.render())
|
120
|
-
win.connect('close-request',
|
120
|
+
win.connect('close-request', print_event(self.logger, 'close-request', id))
|
121
121
|
win.present()
|
122
122
|
|
123
123
|
@app_message('style', style_store)
|
@@ -24,7 +24,7 @@ def _data_str_by(get_data):
|
|
24
24
|
return ":"+get_data(*args)
|
25
25
|
return ret
|
26
26
|
|
27
|
-
def
|
27
|
+
def print_event(logger, event, id, retval = None, get_data = None):
|
28
28
|
data_str = _data_str_default if get_data == None else _data_str_by(get_data)
|
29
29
|
def ret(*args):
|
30
30
|
try:
|
@@ -45,14 +45,14 @@ class Logger:
|
|
45
45
|
def __init__(self, level = LogLevel.WARN, stderr = sys.stderr):
|
46
46
|
self.stderr = stderr
|
47
47
|
self.level = level
|
48
|
-
self.debug = self.
|
49
|
-
self.info = self.
|
50
|
-
self.warn = self.
|
51
|
-
self.error = self.
|
48
|
+
self.debug = self._init_logger(LogLevel.DEBUG)
|
49
|
+
self.info = self._init_logger(LogLevel.INFO)
|
50
|
+
self.warn = self._init_logger(LogLevel.WARN)
|
51
|
+
self.error = self._init_logger(LogLevel.ERROR)
|
52
52
|
def flush(self):
|
53
53
|
self.stderr.flush()
|
54
54
|
|
55
|
-
def
|
55
|
+
def _init_logger(self, level):
|
56
56
|
if self.level.value <= level.value:
|
57
57
|
def ret(fmt, *args):
|
58
58
|
print((f"[{level.name}]: {fmt}") % args, file=self.stderr)
|
@@ -15,7 +15,7 @@
|
|
15
15
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
16
16
|
|
17
17
|
from ...properties import parse_property, get_prop_type
|
18
|
-
from ...common import
|
18
|
+
from ...common import print_event
|
19
19
|
|
20
20
|
class Document:
|
21
21
|
__g_class__ = None
|
@@ -28,8 +28,8 @@ class Document:
|
|
28
28
|
}
|
29
29
|
self.children = []
|
30
30
|
|
31
|
-
def connect_event(self, w, event, name, **
|
32
|
-
w.connect(event,
|
31
|
+
def connect_event(self, w, event, name, **print_event_kwargs):
|
32
|
+
w.connect(event, print_event(self.app.logger, name, self.id, **print_event_kwargs))
|
33
33
|
def add_child(self, child):
|
34
34
|
self.children.append(child)
|
35
35
|
|
@@ -65,7 +65,7 @@ class GtkStreamXMLHandler(sax.ContentHandler):
|
|
65
65
|
# class. This allows defining new messages without
|
66
66
|
# touching the parser
|
67
67
|
self.messages = {
|
68
|
-
f.__tag_name__: self.
|
68
|
+
f.__tag_name__: self.start_message(functools.partial(f,self.app), f.__store__)
|
69
69
|
for f in self.app.__class__.__dict__.values()
|
70
70
|
if hasattr(f, '__tag_name__')
|
71
71
|
}
|
@@ -103,7 +103,7 @@ class GtkStreamXMLHandler(sax.ContentHandler):
|
|
103
103
|
case _:
|
104
104
|
raise Exception("Error: expected 'application' tag")
|
105
105
|
|
106
|
-
def
|
106
|
+
def start_message(self, f, child = None):
|
107
107
|
if child != None:
|
108
108
|
def ret(name,attrs):
|
109
109
|
getC, setC, setChars = child()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|