gtk-stream 0.11.1__tar.gz → 0.11.2__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.11.1 → gtk_stream-0.11.2}/PKG-INFO +1 -1
  2. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/_version.py +2 -2
  3. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/command_line.py +28 -11
  4. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Picture.py +5 -6
  5. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/properties.py +4 -1
  6. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/PKG-INFO +1 -1
  7. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/README.md +0 -0
  8. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk-stream +0 -0
  9. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/__init__.py +0 -0
  10. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/application.py +0 -0
  11. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/common.py +0 -0
  12. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/__init__.py +0 -0
  13. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Box.py +0 -0
  14. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Button.py +0 -0
  15. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Document.py +0 -0
  16. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Dropdown.py +0 -0
  17. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Entry.py +0 -0
  18. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/FlowBox.py +0 -0
  19. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Frame.py +0 -0
  20. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Grid.py +0 -0
  21. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Label.py +0 -0
  22. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Paned.py +0 -0
  23. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/ProgressBar.py +0 -0
  24. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Scale.py +0 -0
  25. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/ScrolledWindow.py +0 -0
  26. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Separator.py +0 -0
  27. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Stack.py +0 -0
  28. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/Switch.py +0 -0
  29. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/documents/classes/__init__.py +0 -0
  30. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream/parser.py +0 -0
  31. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/SOURCES.txt +0 -0
  32. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/dependency_links.txt +0 -0
  33. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/entry_points.txt +0 -0
  34. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/requires.txt +0 -0
  35. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/gtk_stream.egg-info/top_level.txt +0 -0
  36. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/pyproject.toml +0 -0
  37. {gtk_stream-0.11.1 → gtk_stream-0.11.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gtk-stream
3
- Version: 0.11.1
3
+ Version: 0.11.2
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.11.1'
16
- __version_tuple__ = version_tuple = (0, 11, 1)
15
+ __version__ = version = '0.11.2'
16
+ __version_tuple__ = version_tuple = (0, 11, 2)
@@ -18,10 +18,11 @@ import io
18
18
  import xml.sax as sax
19
19
  import sys
20
20
  import os
21
+ import argparse
21
22
 
22
23
  from .parser import GtkStreamXMLHandler
23
24
  from .common import Logger, LogLevel
24
- from . import GLib
25
+ from . import GLib, Gtk, Gdk
25
26
 
26
27
  logLevel = LogLevel.__dict__.get(os.environ.get('GTK_STREAM_LOGLEVEL', 'WARN'), LogLevel.WARN)
27
28
 
@@ -34,13 +35,29 @@ class GtkStreamErrorHandler(sax.handler.ErrorHandler):
34
35
  raise exc
35
36
 
36
37
  def main():
37
- handler = GtkStreamXMLHandler(logger)
38
- errHandler = GtkStreamErrorHandler()
39
- parser = sax.make_parser()
40
- parser.setContentHandler(handler)
41
- parser.setErrorHandler(errHandler)
42
- try:
43
- parser.parse(io.FileIO(0, 'r', closefd=False))
44
- except Exception as e:
45
- logger.error("Done with exception : %s", e)
46
- handler.quit_application()
38
+ parser = argparse.ArgumentParser(
39
+ prog='gtk-stream',
40
+ description='A stream-based GUI tool',
41
+ add_help=False
42
+ )
43
+ parser.add_argument('--list-icons', action='store_true')
44
+ parser.add_argument('-h', '--help', action='store_true')
45
+ args = parser.parse_args()
46
+
47
+ if args.help:
48
+ parser.print_help()
49
+ elif args.list_icons:
50
+ theme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default())
51
+ for name in theme.get_icon_names():
52
+ print(name)
53
+ else:
54
+ handler = GtkStreamXMLHandler(logger)
55
+ errHandler = GtkStreamErrorHandler()
56
+ parser = sax.make_parser()
57
+ parser.setContentHandler(handler)
58
+ parser.setErrorHandler(errHandler)
59
+ try:
60
+ parser.parse(io.FileIO(0, 'r', closefd=False))
61
+ except Exception as e:
62
+ logger.error("Done with exception : %s", e)
63
+ handler.quit_application()
@@ -20,16 +20,15 @@ from .. import Document
20
20
 
21
21
  class Picture(Document):
22
22
  __g_class__ = Gtk.Picture
23
- def __init__(self, app, src, **kwargs):
23
+ def __init__(self, app, **kwargs):
24
24
  super().__init__(app, **kwargs)
25
- self.src = src
26
25
  def render_raw(self):
27
- return Gtk.Picture.new_for_filename(self.src)
26
+ return Gtk.Picture()
28
27
 
29
28
  class Icon(Document):
30
29
  __g_class__ = Gtk.Image
31
- def __init__(self, app, src, **kwargs):
30
+ def __init__(self, app, **kwargs):
32
31
  super().__init__(app, **kwargs)
33
- self.src = src
34
32
  def render_raw(self):
35
- return Gtk.Image.new_from_file(self.src)
33
+ return Gtk.Image()
34
+
@@ -16,7 +16,7 @@
16
16
 
17
17
  import sys
18
18
 
19
- from . import Gtk
19
+ from . import Gtk, Gio
20
20
 
21
21
  def _const(x):
22
22
  return lambda _: x
@@ -53,6 +53,8 @@ def _parse_widget_property(val):
53
53
  return lambda app: app.namedWidgets[val]
54
54
  def _parse_window_property(val):
55
55
  return lambda app: app.namedWindows[val]
56
+ def _parse_gfile_property(val):
57
+ return _const(Gio.File.new_for_path(val))
56
58
 
57
59
  _PARSE_TYPE_PROPERTY = {
58
60
  'GStrv' : _parse_css_classes_property,
@@ -66,6 +68,7 @@ _PARSE_TYPE_PROPERTY = {
66
68
  'GtkWindow' : _parse_window_property,
67
69
  'GtkAdjustment' : _parse_adjustment_property,
68
70
  'gchararray' : _const,
71
+ 'GFile' : _parse_gfile_property,
69
72
  }
70
73
 
71
74
  def parse_property(prop_type, val):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gtk-stream
3
- Version: 0.11.1
3
+ Version: 0.11.2
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