gtk-stream 0.12__py3-none-any.whl → 0.13.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- gtk_stream/_version.py +2 -2
- gtk_stream/documents/__init__.py +1 -1
- gtk_stream/documents/classes/Box.py +1 -1
- gtk_stream/documents/classes/Stack.py +19 -1
- gtk_stream/parser.py +3 -2
- gtk_stream/properties.py +13 -1
- {gtk_stream-0.12.dist-info → gtk_stream-0.13.1.dist-info}/METADATA +1 -1
- {gtk_stream-0.12.dist-info → gtk_stream-0.13.1.dist-info}/RECORD +11 -11
- {gtk_stream-0.12.dist-info → gtk_stream-0.13.1.dist-info}/WHEEL +0 -0
- {gtk_stream-0.12.dist-info → gtk_stream-0.13.1.dist-info}/entry_points.txt +0 -0
- {gtk_stream-0.12.dist-info → gtk_stream-0.13.1.dist-info}/top_level.txt +0 -0
gtk_stream/_version.py
CHANGED
gtk_stream/documents/__init__.py
CHANGED
@@ -17,4 +17,4 @@ from .classes.ScrolledWindow import ScrolledWindow
|
|
17
17
|
from .classes.Paned import Paned
|
18
18
|
from .classes.Frame import Frame, FrameLabel
|
19
19
|
from .classes.Grid import Grid, Cell
|
20
|
-
from .classes.Stack import Stack
|
20
|
+
from .classes.Stack import Stack, StackSidebar, StackPage
|
@@ -31,7 +31,7 @@ class Box(Document):
|
|
31
31
|
def insert_child(self, w, d):
|
32
32
|
if isinstance(d, BoxPrepend):
|
33
33
|
if d.after != None:
|
34
|
-
w.insert_child_after(d.render(), self.app.
|
34
|
+
w.insert_child_after(d.render(), self.app.named_widgets[d.after])
|
35
35
|
else:
|
36
36
|
w.prepend(d.render())
|
37
37
|
else:
|
@@ -17,6 +17,20 @@
|
|
17
17
|
from ... import Gtk
|
18
18
|
from .. import Document, PseudoDocument
|
19
19
|
|
20
|
+
class StackSidebar(Document):
|
21
|
+
__g_class__ = Gtk.StackSidebar
|
22
|
+
def __init__(self, app, **kwargs):
|
23
|
+
super().__init__(app, **kwargs)
|
24
|
+
def render_raw(self):
|
25
|
+
return Gtk.StackSidebar()
|
26
|
+
|
27
|
+
class StackPage(PseudoDocument):
|
28
|
+
def __init__(self, app, title):
|
29
|
+
super().__init__(app)
|
30
|
+
self.title = title
|
31
|
+
def set_page_props(self, page):
|
32
|
+
page.set_title(self.title)
|
33
|
+
|
20
34
|
class Stack(Document):
|
21
35
|
__g_class__ = Gtk.Stack
|
22
36
|
def __init__(self, app, **kwargs):
|
@@ -24,4 +38,8 @@ class Stack(Document):
|
|
24
38
|
def render_raw(self):
|
25
39
|
return Gtk.Stack()
|
26
40
|
def insert_child(self, w, d):
|
27
|
-
|
41
|
+
child = d.render()
|
42
|
+
w.add_child(child)
|
43
|
+
if isinstance(d, StackPage):
|
44
|
+
page = w.get_page(child)
|
45
|
+
d.set_page_props(page)
|
gtk_stream/parser.py
CHANGED
@@ -47,8 +47,9 @@ WIDGET_DOCUMENTS = {
|
|
47
47
|
'flow-box' : docs.FlowBox,
|
48
48
|
'flow-box-prepend': docs.FlowBoxPrepend,
|
49
49
|
'entry' : docs.Entry,
|
50
|
-
'scale' : docs.Scale
|
51
|
-
|
50
|
+
'scale' : docs.Scale,
|
51
|
+
'stack-side-bar' : docs.StackSidebar,
|
52
|
+
'stack-page' : docs.StackPage,
|
52
53
|
}
|
53
54
|
|
54
55
|
class GtkStreamXMLHandler(sax.ContentHandler):
|
gtk_stream/properties.py
CHANGED
@@ -63,7 +63,17 @@ def _parse_align_property(val):
|
|
63
63
|
return _const(Gtk.Align.CENTER)
|
64
64
|
case "end":
|
65
65
|
return _const(Gtk.Align.END)
|
66
|
-
|
66
|
+
def _parse_selection_mode_property(val):
|
67
|
+
match val:
|
68
|
+
case "none":
|
69
|
+
return _const(Gtk.SelectionMode.NONE)
|
70
|
+
case "single":
|
71
|
+
return _const(Gtk.SelectionMode.SINGLE)
|
72
|
+
case "browse":
|
73
|
+
return _const(Gtk.SelectionMode.BROWSE)
|
74
|
+
case "multiple":
|
75
|
+
return _const(Gtk.SelectionMode.MULTIPLE)
|
76
|
+
|
67
77
|
_PARSE_TYPE_PROPERTY = {
|
68
78
|
'GStrv' : _parse_css_classes_property,
|
69
79
|
'GtkOrientation' : _parse_orientation_property,
|
@@ -73,11 +83,13 @@ _PARSE_TYPE_PROPERTY = {
|
|
73
83
|
'gboolean' : _parse_boolean_property,
|
74
84
|
'GtkStringFilterMatchMode' : _parse_searchMode_property,
|
75
85
|
'GtkWidget' : _parse_widget_property,
|
86
|
+
'GtkStack' : _parse_widget_property,
|
76
87
|
'GtkWindow' : _parse_window_property,
|
77
88
|
'GtkAdjustment' : _parse_adjustment_property,
|
78
89
|
'gchararray' : _const,
|
79
90
|
'GFile' : _parse_gfile_property,
|
80
91
|
'GtkAlign' : _parse_align_property,
|
92
|
+
'GtkSelectionMode' : _parse_selection_mode_property,
|
81
93
|
}
|
82
94
|
|
83
95
|
def parse_property(prop_type, val):
|
@@ -1,12 +1,12 @@
|
|
1
1
|
gtk_stream/__init__.py,sha256=y6JLknVFexWrSo_Zl7-TXrPR6EQ5XVMeFO1bUzLN9Lg,98
|
2
|
-
gtk_stream/_version.py,sha256=
|
2
|
+
gtk_stream/_version.py,sha256=2tfL_x7--SF9Szc7f-1EYHtdawpHz4gvIzw8B6TKeRA,413
|
3
3
|
gtk_stream/application.py,sha256=SrWn_lHJNCyswOB9rPV3Mn5TcnDlAZXHZ5x6A6E5SdQ,5488
|
4
4
|
gtk_stream/command_line.py,sha256=g7Sed0ydnDGKyWHT09murwR-3vZyIKXRWgM4Oi0qDE4,3278
|
5
5
|
gtk_stream/common.py,sha256=xdscxYgBg_Ux6iyk26gB-AMSgoUIqlZUPgso5YS_gKE,2106
|
6
|
-
gtk_stream/parser.py,sha256=
|
7
|
-
gtk_stream/properties.py,sha256=
|
8
|
-
gtk_stream/documents/__init__.py,sha256=
|
9
|
-
gtk_stream/documents/classes/Box.py,sha256=
|
6
|
+
gtk_stream/parser.py,sha256=5D5VlAHJZghNKHbZJBMWMaBuTcThStQE_58PwC37Uos,5707
|
7
|
+
gtk_stream/properties.py,sha256=ajYxDfDuFODqTHwsKDqMBGitEYfZerFVtVoDIEIdjv4,4037
|
8
|
+
gtk_stream/documents/__init__.py,sha256=cMWSmjD2_5oJ2EoSk3Jy9-LPeAGKDIidYNRJvqUzdU8,856
|
9
|
+
gtk_stream/documents/classes/Box.py,sha256=TIxRLO0_SjRpE3soimHuNE0q4jDbU_BUCpcuspSPAzg,1382
|
10
10
|
gtk_stream/documents/classes/Button.py,sha256=21bVI7DUWmiusboxdsimTgcqKtLqzQydhS9ifIt4R64,1512
|
11
11
|
gtk_stream/documents/classes/Document.py,sha256=_SHqP0ebCDTag0dmi-LdlhopCImtgy0utVp5G3IqgHM,2357
|
12
12
|
gtk_stream/documents/classes/Dropdown.py,sha256=8fIUX1HCWIjUfKLPy9NYsW6OskhkontoNDTsCZ7qKxw,2446
|
@@ -21,11 +21,11 @@ gtk_stream/documents/classes/ProgressBar.py,sha256=NPJtP3qaKiZUEAYEHZk4FEoWSFn2K
|
|
21
21
|
gtk_stream/documents/classes/Scale.py,sha256=6rW6sBCdpPaqgDEGUPZi5UR8CT3bPmaZQqXXhnl-oaw,1124
|
22
22
|
gtk_stream/documents/classes/ScrolledWindow.py,sha256=WaTPgz6GBC-hjH83SQT2OGUdCapHAgO3xEmSMJZ8q70,1041
|
23
23
|
gtk_stream/documents/classes/Separator.py,sha256=uw_EgAKs_6pNA8nrOLzruIlJfk4uaogB0p_jeoY0PHM,960
|
24
|
-
gtk_stream/documents/classes/Stack.py,sha256=
|
24
|
+
gtk_stream/documents/classes/Stack.py,sha256=icg1TOlCD0IFPv_42uMa7jHbEAgEnuELrTEbnTKiPgU,1568
|
25
25
|
gtk_stream/documents/classes/Switch.py,sha256=jQVuxqS9Pmpp1ymB_dbJPxasJNpm4e35ry0JYPHdAsk,1275
|
26
26
|
gtk_stream/documents/classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
gtk_stream-0.
|
28
|
-
gtk_stream-0.
|
29
|
-
gtk_stream-0.
|
30
|
-
gtk_stream-0.
|
31
|
-
gtk_stream-0.
|
27
|
+
gtk_stream-0.13.1.dist-info/METADATA,sha256=y9onkN1HmYjtyX0feOfIojC6kqdgEj6Go55dfBjA1fU,807
|
28
|
+
gtk_stream-0.13.1.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
29
|
+
gtk_stream-0.13.1.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
|
30
|
+
gtk_stream-0.13.1.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
|
31
|
+
gtk_stream-0.13.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|