gtk-stream 0.13.5__tar.gz → 0.14__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {gtk_stream-0.13.5 → gtk_stream-0.14}/PKG-INFO +1 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/_version.py +2 -2
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/application.py +4 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/command_line.py +1 -4
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Box.py +5 -3
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Button.py +2 -2
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Document.py +6 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/FlowBox.py +3 -2
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Frame.py +3 -2
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Grid.py +1 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/ScrolledWindow.py +1 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Stack.py +1 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/PKG-INFO +1 -1
- {gtk_stream-0.13.5 → gtk_stream-0.14}/README.md +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk-stream +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/__init__.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/common.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/__init__.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Dropdown.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Entry.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Label.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Paned.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Picture.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/ProgressBar.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Scale.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Separator.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/Switch.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/documents/classes/__init__.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/parser.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream/properties.py +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/SOURCES.txt +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/dependency_links.txt +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/entry_points.txt +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/requires.txt +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/gtk_stream.egg-info/top_level.txt +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/pyproject.toml +0 -0
- {gtk_stream-0.13.5 → gtk_stream-0.14}/setup.cfg +0 -0
@@ -89,6 +89,9 @@ class GtkStreamApp(Gtk.Application):
|
|
89
89
|
if id is not None:
|
90
90
|
self.named_widgets[id] = w
|
91
91
|
|
92
|
+
def wait_for_init(self):
|
93
|
+
self.attrs_set.acquire()
|
94
|
+
|
92
95
|
def set_attrs(self, attrs):
|
93
96
|
for name, val in attrs.items():
|
94
97
|
set_parse_prop(self, self, name, val)
|
@@ -138,7 +141,7 @@ class GtkStreamApp(Gtk.Application):
|
|
138
141
|
@app_message('remove')
|
139
142
|
def remove_widget(self, id):
|
140
143
|
w = self.named_widgets[id]
|
141
|
-
w.
|
144
|
+
w.remove_self()
|
142
145
|
|
143
146
|
@app_message('insert', multiple_store)
|
144
147
|
def insert_widgets(self, documents, into):
|
@@ -93,8 +93,5 @@ function GTK.receive() {
|
|
93
93
|
parser_thread = threading.Thread(target = parser_main, daemon = True)
|
94
94
|
parser_thread.start()
|
95
95
|
|
96
|
-
|
97
|
-
# application attributes, and releases the semaphore so the
|
98
|
-
# application can start
|
99
|
-
app.attrs_set.acquire()
|
96
|
+
app.wait_for_init()
|
100
97
|
app.run()
|
@@ -29,10 +29,12 @@ class Box(Document):
|
|
29
29
|
def render_raw(self):
|
30
30
|
return Gtk.Box()
|
31
31
|
def insert_child(self, w, d):
|
32
|
+
child = d.render_in(w)
|
32
33
|
if isinstance(d, BoxPrepend):
|
33
34
|
if d.after != None:
|
34
|
-
w.insert_child_after(
|
35
|
+
w.insert_child_after(child, self.app.named_widgets[d.after])
|
35
36
|
else:
|
36
|
-
w.prepend(
|
37
|
+
w.prepend(child)
|
37
38
|
else:
|
38
|
-
w.append(
|
39
|
+
w.append(child)
|
40
|
+
|
@@ -26,7 +26,7 @@ class Button(Document):
|
|
26
26
|
self.connect_event(button, 'clicked', 'clicked')
|
27
27
|
return button
|
28
28
|
def insert_child(self, w, d):
|
29
|
-
w.set_child(d.
|
29
|
+
w.set_child(d.render_in(w))
|
30
30
|
|
31
31
|
class LinkButton(Button):
|
32
32
|
__g_class__ = Gtk.LinkButton
|
@@ -39,4 +39,4 @@ class LinkButton(Button):
|
|
39
39
|
retval = True)
|
40
40
|
return button
|
41
41
|
def insert_child(self, w, d):
|
42
|
-
w.set_child(d.
|
42
|
+
w.set_child(d.render_in(w))
|
@@ -42,6 +42,8 @@ class Document:
|
|
42
42
|
val = v(self.app)
|
43
43
|
self.app.logger.debug("Setting property '%s' to '%s' in widget %s", p, val, self.__class__)
|
44
44
|
w.set_property(p, val)
|
45
|
+
if self.id:
|
46
|
+
w.set_property("name", self.id)
|
45
47
|
w.insert_child = lambda d: self.insert_child(w, d)
|
46
48
|
def render(self):
|
47
49
|
w = self.render_raw()
|
@@ -49,6 +51,10 @@ class Document:
|
|
49
51
|
for child in self.children:
|
50
52
|
self.insert_child(w, child)
|
51
53
|
return w
|
54
|
+
def render_in(self, w):
|
55
|
+
ret = self.render()
|
56
|
+
ret.remove_self = lambda: w.remove(ret)
|
57
|
+
return ret
|
52
58
|
|
53
59
|
def insert_child(self, w, child):
|
54
60
|
raise Exception("Unimplemented method 'insert_child'")
|
@@ -28,7 +28,8 @@ class FlowBox(Document):
|
|
28
28
|
def render_raw(self):
|
29
29
|
return Gtk.FlowBox()
|
30
30
|
def insert_child(self, w, d):
|
31
|
+
child = d.render_in(w)
|
31
32
|
if isinstance(d, FlowBoxPrepend):
|
32
|
-
w.prepend(
|
33
|
+
w.prepend(child)
|
33
34
|
else:
|
34
|
-
w.append(
|
35
|
+
w.append(child)
|
@@ -28,7 +28,8 @@ class Frame(Document):
|
|
28
28
|
def render_raw(self):
|
29
29
|
return Gtk.Frame()
|
30
30
|
def insert_child(self, w, d):
|
31
|
+
child = d.render_in(w)
|
31
32
|
if isinstance(d, FrameLabel):
|
32
|
-
w.set_label_widget(
|
33
|
+
w.set_label_widget(child)
|
33
34
|
else:
|
34
|
-
w.set_child(
|
35
|
+
w.set_child(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
|