gtk-stream 0.14__tar.gz → 0.14.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. {gtk_stream-0.14 → gtk_stream-0.14.1}/PKG-INFO +1 -1
  2. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/_version.py +2 -2
  3. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Dropdown.py +10 -10
  4. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/PKG-INFO +1 -1
  5. {gtk_stream-0.14 → gtk_stream-0.14.1}/README.md +0 -0
  6. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk-stream +0 -0
  7. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/__init__.py +0 -0
  8. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/application.py +0 -0
  9. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/command_line.py +0 -0
  10. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/common.py +0 -0
  11. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/__init__.py +0 -0
  12. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Box.py +0 -0
  13. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Button.py +0 -0
  14. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Document.py +0 -0
  15. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Entry.py +0 -0
  16. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/FlowBox.py +0 -0
  17. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Frame.py +0 -0
  18. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Grid.py +0 -0
  19. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Label.py +0 -0
  20. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Paned.py +0 -0
  21. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Picture.py +0 -0
  22. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/ProgressBar.py +0 -0
  23. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Scale.py +0 -0
  24. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/ScrolledWindow.py +0 -0
  25. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Separator.py +0 -0
  26. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Stack.py +0 -0
  27. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/Switch.py +0 -0
  28. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/documents/classes/__init__.py +0 -0
  29. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/parser.py +0 -0
  30. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream/properties.py +0 -0
  31. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/SOURCES.txt +0 -0
  32. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/dependency_links.txt +0 -0
  33. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/entry_points.txt +0 -0
  34. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/requires.txt +0 -0
  35. {gtk_stream-0.14 → gtk_stream-0.14.1}/gtk_stream.egg-info/top_level.txt +0 -0
  36. {gtk_stream-0.14 → gtk_stream-0.14.1}/pyproject.toml +0 -0
  37. {gtk_stream-0.14 → gtk_stream-0.14.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gtk-stream
3
- Version: 0.14
3
+ Version: 0.14.1
4
4
  Summary: A simple stream-oriented GUI protocol
5
5
  Author-email: Marc Coiffier <marc.coiffier@univ-grenoble-alpes.fr>
6
6
  Project-URL: Homepage, https://coiffier.net/projects/gtk-stream/
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.14'
16
- __version_tuple__ = version_tuple = (0, 14)
15
+ __version__ = version = '0.14.1'
16
+ __version_tuple__ = version_tuple = (0, 14, 1)
@@ -18,10 +18,11 @@ from ... import Gtk, Gio, GObject
18
18
  from .. import Document
19
19
 
20
20
  class Item(Document):
21
- def __init__(self, app, value, **kwargs):
21
+ def __init__(self, app, value, key = None, **kwargs):
22
22
  super().__init__(app, **kwargs)
23
23
  self.child = None
24
24
  self.value = value
25
+ self.key = key if key != None else value
25
26
  def add_child(self, child):
26
27
  self.child = child
27
28
  def render(self):
@@ -31,6 +32,7 @@ class _ItemObject(GObject.Object):
31
32
  super().__init__()
32
33
  self.doc = doc
33
34
  self.value = doc.value
35
+ self.key = doc.key
34
36
 
35
37
  @GObject.Property(type=str)
36
38
  def item_value(self):
@@ -41,29 +43,27 @@ class Dropdown(Document):
41
43
  def __init__(self, app, id, **kwargs):
42
44
  super().__init__(app, id=id, **kwargs)
43
45
  def render_raw(self):
44
- model = Gio.ListStore(item_type=_ItemObject)
45
- for item in self.children:
46
- model.append(_ItemObject(item))
46
+ self.model = Gio.ListStore(item_type=_ItemObject)
47
47
 
48
48
  factory = Gtk.SignalListItemFactory()
49
49
  def on_list_setup(_, list_item):
50
- list_item.item_value = None
50
+ list_item.item_key = None
51
51
  def on_list_bind(_, list_item):
52
52
  item = list_item.get_item()
53
- if list_item.item_value != item.value:
54
- list_item.item_value = item.value
53
+ if list_item.item_key != item.key:
54
+ list_item.item_key = item.key
55
55
  list_item.set_child(item.doc.render())
56
56
  factory.connect("setup", on_list_setup)
57
57
  factory.connect("bind", on_list_bind)
58
58
 
59
59
  ret = Gtk.DropDown(
60
- model=model,
60
+ model=self.model,
61
61
  expression=Gtk.PropertyExpression.new(_ItemObject, None, 'item_value'),
62
62
  factory=factory)
63
63
 
64
64
  self.connect_event(
65
65
  ret, 'notify::selected-item', 'selected',
66
- get_data = lambda w,_: w.get_selected_item().value)
66
+ get_data = lambda w,_: w.get_selected_item().key)
67
67
  return ret
68
68
  def insert_child(self, w, d):
69
- pass
69
+ self.model.append(_ItemObject(d))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gtk-stream
3
- Version: 0.14
3
+ Version: 0.14.1
4
4
  Summary: A simple stream-oriented GUI protocol
5
5
  Author-email: Marc Coiffier <marc.coiffier@univ-grenoble-alpes.fr>
6
6
  Project-URL: Homepage, https://coiffier.net/projects/gtk-stream/
File without changes
File without changes
File without changes
File without changes