gtk-stream 0.15.3__py3-none-any.whl → 0.15.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
gtk_stream/_version.py CHANGED
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '0.15.3'
16
- __version_tuple__ = version_tuple = (0, 15, 3)
20
+ __version__ = version = '0.15.5'
21
+ __version_tuple__ = version_tuple = (0, 15, 5)
gtk_stream/application.py CHANGED
@@ -135,16 +135,18 @@ class GtkStreamApp(Gtk.Application):
135
135
  dialog = Gtk.FileChooserDialog(title=title, transient_for=parent_window, action=fc_action)
136
136
  dialog.add_buttons(fc_label, Gtk.ResponseType.ACCEPT)
137
137
  dialog.props.modal = True
138
- def on_choose(_, b):
139
- try:
140
- file = dialog.get_file()
141
- print(f"{id}:selected:{file.get_path()}")
142
- sys.stdout.flush()
138
+ def on_response(_, response):
139
+ if response == Gtk.ResponseType.ACCEPT:
143
140
  dialog.close()
144
- except GLib.GError as e:
145
- print(f"{id}:none-selected")
146
- sys.stdout.flush()
147
- dialog.connect("response", on_choose)
141
+ else:
142
+ try:
143
+ file = dialog.get_file()
144
+ print(f"{id}:selected:{file.get_path()}")
145
+ sys.stdout.flush()
146
+ except GLib.GError as e:
147
+ print(f"{id}:none-selected")
148
+ sys.stdout.flush()
149
+ dialog.connect("response", on_response)
148
150
  dialog.present()
149
151
 
150
152
  @app_message('window', single_store)
@@ -52,7 +52,9 @@ class Dropdown(Document):
52
52
  item = list_item.get_item()
53
53
  if list_item.item_key != item.key:
54
54
  list_item.item_key = item.key
55
- list_item.set_child(item.doc.render())
55
+ widget = item.doc.render()
56
+ widget.remove_self = lambda: self.model.remove(self.model.find(item)[-1])
57
+ list_item.set_child(widget)
56
58
  factory.connect("setup", on_list_setup)
57
59
  factory.connect("bind", on_list_bind)
58
60
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gtk-stream
3
- Version: 0.15.3
3
+ Version: 0.15.5
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/
@@ -1,6 +1,6 @@
1
1
  gtk_stream/__init__.py,sha256=y6JLknVFexWrSo_Zl7-TXrPR6EQ5XVMeFO1bUzLN9Lg,98
2
- gtk_stream/_version.py,sha256=UWUhvfR3ZVFsJo7yBQI3spcIPiJYLuoY5H9r5vj2XQc,413
3
- gtk_stream/application.py,sha256=4mQcGs6j9bWRJg8ohXRl7_RaENeSftCdlMVMNMwa8Dg,7046
2
+ gtk_stream/_version.py,sha256=jQuZKhl-YcplxyXgfpbbOOVRFLWdzyF8mpyWtCtN7BI,513
3
+ gtk_stream/application.py,sha256=3y7BDi8jsM_L0L_J0jwW9F0PVyPHdR9bG84ONTj81Tk,7163
4
4
  gtk_stream/command_line.py,sha256=57slfbV-EUWVI8bsA50IzmCLqNjN9aZpz8J8Gtituro,3105
5
5
  gtk_stream/common.py,sha256=2USRh42DmmxtPO1y8gpeU0hMuHfhcqJBPuxtvd46YHg,2112
6
6
  gtk_stream/parser.py,sha256=lt1cHYwhrd0SwSQfbxtbK6NdwbnFmgeBDIeNY0eepwc,5709
@@ -9,7 +9,7 @@ gtk_stream/documents/__init__.py,sha256=cMWSmjD2_5oJ2EoSk3Jy9-LPeAGKDIidYNRJvqUz
9
9
  gtk_stream/documents/classes/Box.py,sha256=3GUaeG4kZks0NPUJT4JmwVCAJJ3aXtNvtG3b1xv2-iE,1411
10
10
  gtk_stream/documents/classes/Button.py,sha256=UbFi3FeJzpfBCAArtlnmmkcB24kpEyCmpCORnGuKJsc,1520
11
11
  gtk_stream/documents/classes/Document.py,sha256=MnKQs3L9yANSOPaYv3hRfocsRZjsK_Kl4epmIIqF97s,2548
12
- gtk_stream/documents/classes/Dropdown.py,sha256=yMK1f-Jko36nILPlpgH9-bAlaBRXORGFn4Tk5Z7RzTM,2482
12
+ gtk_stream/documents/classes/Dropdown.py,sha256=a-bssaExzYPaV0Iq3ascMhOVZe-kz46nrcZ0JX2duCE,2604
13
13
  gtk_stream/documents/classes/Entry.py,sha256=KcBwjSu4tI30bQxPlSFSLPxFEUbTaqAdoAzd0XSQciY,1112
14
14
  gtk_stream/documents/classes/FlowBox.py,sha256=R6HOf_k2Dgl43JDk_ErA-jK-YM8EsPnu3T46-fXoEic,1246
15
15
  gtk_stream/documents/classes/Frame.py,sha256=2clm6-Ww7aYWHlSEMmAU6zB1mvi0KJtXV9zWft1NSJ0,1243
@@ -24,8 +24,8 @@ gtk_stream/documents/classes/Separator.py,sha256=uw_EgAKs_6pNA8nrOLzruIlJfk4uaog
24
24
  gtk_stream/documents/classes/Stack.py,sha256=diZyuBLwuCjn_WE3wx5MBgHN_ty6WXSsyIFRVAbe8yI,1572
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.15.3.dist-info/METADATA,sha256=R6UubVUXQNs1SxPT57zp7qoDoWn4fEWw35LGIUFS4TU,807
28
- gtk_stream-0.15.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
29
- gtk_stream-0.15.3.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
30
- gtk_stream-0.15.3.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
31
- gtk_stream-0.15.3.dist-info/RECORD,,
27
+ gtk_stream-0.15.5.dist-info/METADATA,sha256=uZzwVHYVuha-MRFzV7lQiOoSDTpOHORL4MN0SYfEkAU,807
28
+ gtk_stream-0.15.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
29
+ gtk_stream-0.15.5.dist-info/entry_points.txt,sha256=PmhKTb4MMQM6dN2HJcoDSMI8L0lZIFIlFn-BgdfPDpo,60
30
+ gtk_stream-0.15.5.dist-info/top_level.txt,sha256=vE9zfHGe9Ke7FSe0wBK2WYJI-BpcQNu6xDC3Cu5O8rQ,11
31
+ gtk_stream-0.15.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5