pyvguicom 1.3.7__tar.gz → 1.4.0__tar.gz

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.
Files changed (41) hide show
  1. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/PKG-INFO +1 -1
  2. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/browsewin.py +27 -22
  3. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/custwidg.py +5 -4
  4. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/browsewin.html +82 -54
  5. pyvguicom-1.4.0/pyvguicom/docs/comline.html +1146 -0
  6. pyvguicom-1.4.0/pyvguicom/docs/custwidg.html +393 -0
  7. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgbutt.html +33 -3
  8. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgentry.html +14 -0
  9. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pggui.html +1300 -80
  10. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgsel.html +21 -7
  11. pyvguicom-1.4.0/pyvguicom/docs/pgtests.html +600 -0
  12. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgtextview.html +2 -0
  13. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgutils.html +10 -806
  14. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgwkit.html +175 -68
  15. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgbutt.py +15 -3
  16. pyvguicom-1.4.0/pyvguicom/pgdlgs.py +373 -0
  17. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgentry.py +4 -0
  18. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pggui.py +168 -445
  19. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgsel.py +11 -5
  20. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgtests.py +4 -3
  21. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgutils.py +121 -96
  22. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgwkit.py +71 -28
  23. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom.egg-info/PKG-INFO +1 -1
  24. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom.egg-info/SOURCES.txt +4 -2
  25. pyvguicom-1.3.7/pyvguicom/htmledit.py +0 -252
  26. pyvguicom-1.3.7/pyvguicom/plug.py +0 -33
  27. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/README.md +0 -0
  28. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/__init__.py +0 -0
  29. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/comline.py +0 -0
  30. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/__index__.py +0 -0
  31. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/htmledit.html +0 -0
  32. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgbox.html +0 -0
  33. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/pgsimp.html +0 -0
  34. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/docs/sutil.html +0 -0
  35. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgbox.py +0 -0
  36. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgsimp.py +0 -0
  37. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom/pgtextview.py +0 -0
  38. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom.egg-info/dependency_links.txt +0 -0
  39. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/pyvguicom.egg-info/top_level.txt +0 -0
  40. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/setup.cfg +0 -0
  41. {pyvguicom-1.3.7 → pyvguicom-1.4.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyvguicom
3
- Version: 1.3.7
3
+ Version: 1.4.0
4
4
  Summary: High power secure server GUI utility helpers.
5
5
  Home-page: https://github.com/pglen/pyguicom.git
6
6
  Author: Peter Glen
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- ''' This encapsulates the browser window wit the webkia an toolbars '''
3
+ ''' This encapsulates the browser window wit the webkit and toolbars '''
4
4
 
5
5
  import os, sys, getopt, signal, random, time, warnings
6
6
 
@@ -8,9 +8,9 @@ realinc = os.path.realpath(os.path.dirname(__file__) + os.sep + "../pycommon")
8
8
  if realinc not in sys.path:
9
9
  sys.path.append(realinc)
10
10
 
11
- from pgutils import *
12
- from pggui import *
13
- from pgsimp import *
11
+ from pgutils import *
12
+ from pggui import *
13
+ from pgsimp import *
14
14
 
15
15
  import gi
16
16
  gi.require_version("Gtk", "3.0")
@@ -21,8 +21,6 @@ from gi.repository import GLib
21
21
  from gi.repository import GObject
22
22
  from gi.repository import Pango
23
23
 
24
- from pedlib import pedconfig
25
-
26
24
  import pgwkit
27
25
  #print("pgwkit:", pgwkit)
28
26
 
@@ -62,18 +60,20 @@ class browserWin(Gtk.VBox):
62
60
  self.scroll_win.add(self.webview)
63
61
  self.webview.editor = self.webview
64
62
 
63
+ warnings.simplefilter("ignore")
65
64
  self.toolbar2 = self.webview.ui.get_widget("/toolbar_format")
65
+ warnings.simplefilter("default")
66
66
  self.pack_start(self.toolbar2, False, False, 0)
67
67
 
68
68
  self.pack_start(self.scroll_win, 1, 1, 2)
69
69
 
70
70
  hbox5 = Gtk.HBox()
71
- hbox5.pack_start(Gtk.Label(" "), 0, 0, 0)
72
- self.status = Gtk.Label(" Idle ");
71
+ hbox5.pack_start(Gtk.Label(label=" "), 0, 0, 0)
72
+ self.status = Gtk.Label(label=" Idle ");
73
73
  self.status.set_xalign(0)
74
74
 
75
75
  hbox5.pack_start(self.status, 1, 1, 0)
76
- hbox5.pack_start(Gtk.Label(" "), 0, 0, 0)
76
+ hbox5.pack_start(Gtk.Label(label=" "), 0, 0, 0)
77
77
  self.set_status(" Idle State ")
78
78
 
79
79
  self.pack_start(hbox5, 0, 0, 2)
@@ -85,8 +85,8 @@ class browserWin(Gtk.VBox):
85
85
  self.set_can_focus(True)
86
86
  #self.grab_focus()
87
87
 
88
- def load_html(self, strx):
89
- self.webview.load_html(strx)
88
+ def load_html(self, strx, acc):
89
+ self.webview.load_html(strx, acc)
90
90
 
91
91
  def cut(self):
92
92
  #print("cut")
@@ -102,7 +102,7 @@ class browserWin(Gtk.VBox):
102
102
  #self.webview.on_action("paste")
103
103
 
104
104
  def open(self):
105
- dialog = Gtk.FileChooserDialog("Open an HTML file", None,
105
+ dialog = Gtk.FileChooserDialog("Open an HTML filex", None,
106
106
  Gtk.FileChooserAction.OPEN,
107
107
  (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
108
108
  Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
@@ -117,7 +117,10 @@ class browserWin(Gtk.VBox):
117
117
  if os.path.exists(fn):
118
118
  self.fname = fn
119
119
  with open(fn) as fd:
120
- self.webview.load_html(fd.read(), "file:///")
120
+ ddd = os.getwd()
121
+ print(ddd)
122
+ self.webview.load_html(fd.read(), ddd)
123
+ #self.webview.load_html(fd.read(), "file:///")
121
124
 
122
125
  def save(self):
123
126
 
@@ -141,6 +144,9 @@ class browserWin(Gtk.VBox):
141
144
  def is_modified(self):
142
145
  return self.webview.modified
143
146
 
147
+ def set_modified(self, flag):
148
+ self.webview.modified = flag
149
+
144
150
  def _completion(self, html, user_data):
145
151
  self.ret = html
146
152
  self.done = True
@@ -232,30 +238,29 @@ class browserWin(Gtk.VBox):
232
238
  self.edit.single_line = True
233
239
 
234
240
  hbox3 = Gtk.HBox()
235
- uuu = Gtk.Label(" URL: ")
241
+ uuu = Gtk.Label(label=" URL: ")
236
242
  uuu.set_tooltip_text("Current / New URL; press Enter to go")
237
243
  hbox3.pack_start(uuu, 0, 0, 0)
238
244
 
239
245
  hbox3.pack_start(self.edit, True, True, 2)
240
246
 
241
- bbb = LabelButt(" _Go ", self.gourl, "Go to speified URL")
247
+ bbb = IconButt(Gtk.STOCK_SAVE, self.gourl, "Go to speified URL")
242
248
  #bbb = Gtk.Button.new_with_mnemonic(" _Go ") #, self.gourl, "Go to speified URL")
243
249
  #bbb.connect("clicked", self.gourl)
244
-
245
250
  #bbb = LabelButt(" _Go ", self.gourl, "Go to speified URL")
246
- ccc = LabelButt(" <-_Back ", self.backurl, "Go Back")
247
- ddd = LabelButt(" For_w-> ", self.forwurl, "Go Forw")
248
- eee = LabelButt(" B_ase ", self.baseurl, "Go to base URL")
251
+ ccc = IconButt(Gtk.STOCK_GO_BACK, self.backurl, "Go Back")
252
+ ddd = IconButt(Gtk.STOCK_GO_FORWARD, self.forwurl, "Go Forw")
253
+ eee = IconButt(Gtk.STOCK_HOME, self.baseurl, "Go to base URL")
249
254
 
250
- hbox3.pack_start(Gtk.Label(" "), 0, 0, 0)
255
+ hbox3.pack_start(Gtk.Label(label=" "), 0, 0, 0)
251
256
 
252
257
  hbox3.pack_start(bbb, 0, 0, 0)
253
258
  hbox3.pack_start(ccc, 0, 0, 0)
254
259
  hbox3.pack_start(ddd, 0, 0, 0)
255
260
  hbox3.pack_start(eee, 0, 0, 0)
256
261
 
257
- #hbox3.pack_start(Gtk.Label(" ^ "), 0, 0, 0)
258
- hbox3.pack_start(Gtk.Label(" "), 0, 0, 0)
262
+ #hbox3.pack_start(Gtk.Label(label=" ^ "), 0, 0, 0)
263
+ hbox3.pack_start(Gtk.Label(label=" "), 0, 0, 0)
259
264
 
260
265
  return hbox3
261
266
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- import os, sys, getopt, signal, select, string, time
4
- import struct, stat, base64, random, zlib
3
+ import os, sys, warnings
5
4
 
6
5
  import gi
7
6
  gi.require_version("Gtk", "3.0")
@@ -49,10 +48,12 @@ class SimpleWidget(Gtk.Widget):
49
48
  #print("con", context)
50
49
 
51
50
  # paint background
51
+ warnings.simplefilter("ignore")
52
52
  bg_color = self.get_style_context().get_background_color(Gtk.StateFlags.NORMAL)
53
- print(bg_color)
53
+ warnings.simplefilter("default")
54
+ #print(bg_color)
54
55
  bg_color = Gdk.RGBA(.9, .9, .9, )
55
- print(bg_color)
56
+ #print(bg_color)
56
57
 
57
58
  cr.set_source_rgba(*list(bg_color))
58
59
  cr.paint()
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
6
6
  <meta name="generator" content="pdoc 0.10.0" />
7
7
  <title>browsewin API documentation</title>
8
- <meta name="description" content="This encapsulates the browser window wit the webkia an toolbars" />
8
+ <meta name="description" content="This encapsulates the browser window wit the webkit and toolbars" />
9
9
  <link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
10
10
  <link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
11
11
  <link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
@@ -22,14 +22,14 @@
22
22
  <h1 class="title">Module <code>browsewin</code></h1>
23
23
  </header>
24
24
  <section id="section-intro">
25
- <p>This encapsulates the browser window wit the webkia an toolbars</p>
25
+ <p>This encapsulates the browser window wit the webkit and toolbars</p>
26
26
  <details class="source">
27
27
  <summary>
28
28
  <span>Expand source code</span>
29
29
  </summary>
30
30
  <pre><code class="python">#!/usr/bin/env python
31
31
 
32
- &#39;&#39;&#39; This encapsulates the browser window wit the webkia an toolbars &#39;&#39;&#39;
32
+ &#39;&#39;&#39; This encapsulates the browser window wit the webkit and toolbars &#39;&#39;&#39;
33
33
 
34
34
  import os, sys, getopt, signal, random, time, warnings
35
35
 
@@ -37,9 +37,9 @@ realinc = os.path.realpath(os.path.dirname(__file__) + os.sep + &#34;../pycommon
37
37
  if realinc not in sys.path:
38
38
  sys.path.append(realinc)
39
39
 
40
- from pgutils import *
41
- from pggui import *
42
- from pgsimp import *
40
+ from pgutils import *
41
+ from pggui import *
42
+ from pgsimp import *
43
43
 
44
44
  import gi
45
45
  gi.require_version(&#34;Gtk&#34;, &#34;3.0&#34;)
@@ -50,8 +50,6 @@ from gi.repository import GLib
50
50
  from gi.repository import GObject
51
51
  from gi.repository import Pango
52
52
 
53
- from pedlib import pedconfig
54
-
55
53
  import pgwkit
56
54
  #print(&#34;pgwkit:&#34;, pgwkit)
57
55
 
@@ -91,18 +89,20 @@ class browserWin(Gtk.VBox):
91
89
  self.scroll_win.add(self.webview)
92
90
  self.webview.editor = self.webview
93
91
 
92
+ warnings.simplefilter(&#34;ignore&#34;)
94
93
  self.toolbar2 = self.webview.ui.get_widget(&#34;/toolbar_format&#34;)
94
+ warnings.simplefilter(&#34;default&#34;)
95
95
  self.pack_start(self.toolbar2, False, False, 0)
96
96
 
97
97
  self.pack_start(self.scroll_win, 1, 1, 2)
98
98
 
99
99
  hbox5 = Gtk.HBox()
100
- hbox5.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
101
- self.status = Gtk.Label(&#34; Idle &#34;);
100
+ hbox5.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
101
+ self.status = Gtk.Label(label=&#34; Idle &#34;);
102
102
  self.status.set_xalign(0)
103
103
 
104
104
  hbox5.pack_start(self.status, 1, 1, 0)
105
- hbox5.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
105
+ hbox5.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
106
106
  self.set_status(&#34; Idle State &#34;)
107
107
 
108
108
  self.pack_start(hbox5, 0, 0, 2)
@@ -114,8 +114,8 @@ class browserWin(Gtk.VBox):
114
114
  self.set_can_focus(True)
115
115
  #self.grab_focus()
116
116
 
117
- def load_html(self, strx):
118
- self.webview.load_html(strx)
117
+ def load_html(self, strx, acc):
118
+ self.webview.load_html(strx, acc)
119
119
 
120
120
  def cut(self):
121
121
  #print(&#34;cut&#34;)
@@ -131,7 +131,7 @@ class browserWin(Gtk.VBox):
131
131
  #self.webview.on_action(&#34;paste&#34;)
132
132
 
133
133
  def open(self):
134
- dialog = Gtk.FileChooserDialog(&#34;Open an HTML file&#34;, None,
134
+ dialog = Gtk.FileChooserDialog(&#34;Open an HTML filex&#34;, None,
135
135
  Gtk.FileChooserAction.OPEN,
136
136
  (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
137
137
  Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
@@ -146,7 +146,10 @@ class browserWin(Gtk.VBox):
146
146
  if os.path.exists(fn):
147
147
  self.fname = fn
148
148
  with open(fn) as fd:
149
- self.webview.load_html(fd.read(), &#34;file:///&#34;)
149
+ ddd = os.getwd()
150
+ print(ddd)
151
+ self.webview.load_html(fd.read(), ddd)
152
+ #self.webview.load_html(fd.read(), &#34;file:///&#34;)
150
153
 
151
154
  def save(self):
152
155
 
@@ -170,6 +173,9 @@ class browserWin(Gtk.VBox):
170
173
  def is_modified(self):
171
174
  return self.webview.modified
172
175
 
176
+ def set_modified(self, flag):
177
+ self.webview.modified = flag
178
+
173
179
  def _completion(self, html, user_data):
174
180
  self.ret = html
175
181
  self.done = True
@@ -261,30 +267,29 @@ class browserWin(Gtk.VBox):
261
267
  self.edit.single_line = True
262
268
 
263
269
  hbox3 = Gtk.HBox()
264
- uuu = Gtk.Label(&#34; URL: &#34;)
270
+ uuu = Gtk.Label(label=&#34; URL: &#34;)
265
271
  uuu.set_tooltip_text(&#34;Current / New URL; press Enter to go&#34;)
266
272
  hbox3.pack_start(uuu, 0, 0, 0)
267
273
 
268
274
  hbox3.pack_start(self.edit, True, True, 2)
269
275
 
270
- bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
276
+ bbb = IconButt(Gtk.STOCK_SAVE, self.gourl, &#34;Go to speified URL&#34;)
271
277
  #bbb = Gtk.Button.new_with_mnemonic(&#34; _Go &#34;) #, self.gourl, &#34;Go to speified URL&#34;)
272
278
  #bbb.connect(&#34;clicked&#34;, self.gourl)
273
-
274
279
  #bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
275
- ccc = LabelButt(&#34; &lt;-_Back &#34;, self.backurl, &#34;Go Back&#34;)
276
- ddd = LabelButt(&#34; For_w-&gt; &#34;, self.forwurl, &#34;Go Forw&#34;)
277
- eee = LabelButt(&#34; B_ase &#34;, self.baseurl, &#34;Go to base URL&#34;)
280
+ ccc = IconButt(Gtk.STOCK_GO_BACK, self.backurl, &#34;Go Back&#34;)
281
+ ddd = IconButt(Gtk.STOCK_GO_FORWARD, self.forwurl, &#34;Go Forw&#34;)
282
+ eee = IconButt(Gtk.STOCK_HOME, self.baseurl, &#34;Go to base URL&#34;)
278
283
 
279
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
284
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
280
285
 
281
286
  hbox3.pack_start(bbb, 0, 0, 0)
282
287
  hbox3.pack_start(ccc, 0, 0, 0)
283
288
  hbox3.pack_start(ddd, 0, 0, 0)
284
289
  hbox3.pack_start(eee, 0, 0, 0)
285
290
 
286
- #hbox3.pack_start(Gtk.Label(&#34; ^ &#34;), 0, 0, 0)
287
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
291
+ #hbox3.pack_start(Gtk.Label(label=&#34; ^ &#34;), 0, 0, 0)
292
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
288
293
 
289
294
  return hbox3
290
295
 
@@ -347,18 +352,20 @@ sets through the use of explicit keyword arguments.</p></div>
347
352
  self.scroll_win.add(self.webview)
348
353
  self.webview.editor = self.webview
349
354
 
355
+ warnings.simplefilter(&#34;ignore&#34;)
350
356
  self.toolbar2 = self.webview.ui.get_widget(&#34;/toolbar_format&#34;)
357
+ warnings.simplefilter(&#34;default&#34;)
351
358
  self.pack_start(self.toolbar2, False, False, 0)
352
359
 
353
360
  self.pack_start(self.scroll_win, 1, 1, 2)
354
361
 
355
362
  hbox5 = Gtk.HBox()
356
- hbox5.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
357
- self.status = Gtk.Label(&#34; Idle &#34;);
363
+ hbox5.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
364
+ self.status = Gtk.Label(label=&#34; Idle &#34;);
358
365
  self.status.set_xalign(0)
359
366
 
360
367
  hbox5.pack_start(self.status, 1, 1, 0)
361
- hbox5.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
368
+ hbox5.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
362
369
  self.set_status(&#34; Idle State &#34;)
363
370
 
364
371
  self.pack_start(hbox5, 0, 0, 2)
@@ -370,8 +377,8 @@ sets through the use of explicit keyword arguments.</p></div>
370
377
  self.set_can_focus(True)
371
378
  #self.grab_focus()
372
379
 
373
- def load_html(self, strx):
374
- self.webview.load_html(strx)
380
+ def load_html(self, strx, acc):
381
+ self.webview.load_html(strx, acc)
375
382
 
376
383
  def cut(self):
377
384
  #print(&#34;cut&#34;)
@@ -387,7 +394,7 @@ sets through the use of explicit keyword arguments.</p></div>
387
394
  #self.webview.on_action(&#34;paste&#34;)
388
395
 
389
396
  def open(self):
390
- dialog = Gtk.FileChooserDialog(&#34;Open an HTML file&#34;, None,
397
+ dialog = Gtk.FileChooserDialog(&#34;Open an HTML filex&#34;, None,
391
398
  Gtk.FileChooserAction.OPEN,
392
399
  (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
393
400
  Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
@@ -402,7 +409,10 @@ sets through the use of explicit keyword arguments.</p></div>
402
409
  if os.path.exists(fn):
403
410
  self.fname = fn
404
411
  with open(fn) as fd:
405
- self.webview.load_html(fd.read(), &#34;file:///&#34;)
412
+ ddd = os.getwd()
413
+ print(ddd)
414
+ self.webview.load_html(fd.read(), ddd)
415
+ #self.webview.load_html(fd.read(), &#34;file:///&#34;)
406
416
 
407
417
  def save(self):
408
418
 
@@ -426,6 +436,9 @@ sets through the use of explicit keyword arguments.</p></div>
426
436
  def is_modified(self):
427
437
  return self.webview.modified
428
438
 
439
+ def set_modified(self, flag):
440
+ self.webview.modified = flag
441
+
429
442
  def _completion(self, html, user_data):
430
443
  self.ret = html
431
444
  self.done = True
@@ -517,30 +530,29 @@ sets through the use of explicit keyword arguments.</p></div>
517
530
  self.edit.single_line = True
518
531
 
519
532
  hbox3 = Gtk.HBox()
520
- uuu = Gtk.Label(&#34; URL: &#34;)
533
+ uuu = Gtk.Label(label=&#34; URL: &#34;)
521
534
  uuu.set_tooltip_text(&#34;Current / New URL; press Enter to go&#34;)
522
535
  hbox3.pack_start(uuu, 0, 0, 0)
523
536
 
524
537
  hbox3.pack_start(self.edit, True, True, 2)
525
538
 
526
- bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
539
+ bbb = IconButt(Gtk.STOCK_SAVE, self.gourl, &#34;Go to speified URL&#34;)
527
540
  #bbb = Gtk.Button.new_with_mnemonic(&#34; _Go &#34;) #, self.gourl, &#34;Go to speified URL&#34;)
528
541
  #bbb.connect(&#34;clicked&#34;, self.gourl)
529
-
530
542
  #bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
531
- ccc = LabelButt(&#34; &lt;-_Back &#34;, self.backurl, &#34;Go Back&#34;)
532
- ddd = LabelButt(&#34; For_w-&gt; &#34;, self.forwurl, &#34;Go Forw&#34;)
533
- eee = LabelButt(&#34; B_ase &#34;, self.baseurl, &#34;Go to base URL&#34;)
543
+ ccc = IconButt(Gtk.STOCK_GO_BACK, self.backurl, &#34;Go Back&#34;)
544
+ ddd = IconButt(Gtk.STOCK_GO_FORWARD, self.forwurl, &#34;Go Forw&#34;)
545
+ eee = IconButt(Gtk.STOCK_HOME, self.baseurl, &#34;Go to base URL&#34;)
534
546
 
535
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
547
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
536
548
 
537
549
  hbox3.pack_start(bbb, 0, 0, 0)
538
550
  hbox3.pack_start(ccc, 0, 0, 0)
539
551
  hbox3.pack_start(ddd, 0, 0, 0)
540
552
  hbox3.pack_start(eee, 0, 0, 0)
541
553
 
542
- #hbox3.pack_start(Gtk.Label(&#34; ^ &#34;), 0, 0, 0)
543
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
554
+ #hbox3.pack_start(Gtk.Label(label=&#34; ^ &#34;), 0, 0, 0)
555
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
544
556
 
545
557
  return hbox3</code></pre>
546
558
  </details>
@@ -712,7 +724,7 @@ sets through the use of explicit keyword arguments.</p></div>
712
724
  </details>
713
725
  </dd>
714
726
  <dt id="browsewin.browserWin.load_html"><code class="name flex">
715
- <span>def <span class="ident">load_html</span></span>(<span>self, strx)</span>
727
+ <span>def <span class="ident">load_html</span></span>(<span>self, strx, acc)</span>
716
728
  </code></dt>
717
729
  <dd>
718
730
  <div class="desc"></div>
@@ -720,8 +732,8 @@ sets through the use of explicit keyword arguments.</p></div>
720
732
  <summary>
721
733
  <span>Expand source code</span>
722
734
  </summary>
723
- <pre><code class="python">def load_html(self, strx):
724
- self.webview.load_html(strx)</code></pre>
735
+ <pre><code class="python">def load_html(self, strx, acc):
736
+ self.webview.load_html(strx, acc)</code></pre>
725
737
  </details>
726
738
  </dd>
727
739
  <dt id="browsewin.browserWin.open"><code class="name flex">
@@ -734,7 +746,7 @@ sets through the use of explicit keyword arguments.</p></div>
734
746
  <span>Expand source code</span>
735
747
  </summary>
736
748
  <pre><code class="python">def open(self):
737
- dialog = Gtk.FileChooserDialog(&#34;Open an HTML file&#34;, None,
749
+ dialog = Gtk.FileChooserDialog(&#34;Open an HTML filex&#34;, None,
738
750
  Gtk.FileChooserAction.OPEN,
739
751
  (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
740
752
  Gtk.STOCK_SAVE, Gtk.ResponseType.OK))
@@ -749,7 +761,10 @@ sets through the use of explicit keyword arguments.</p></div>
749
761
  if os.path.exists(fn):
750
762
  self.fname = fn
751
763
  with open(fn) as fd:
752
- self.webview.load_html(fd.read(), &#34;file:///&#34;)</code></pre>
764
+ ddd = os.getwd()
765
+ print(ddd)
766
+ self.webview.load_html(fd.read(), ddd)
767
+ #self.webview.load_html(fd.read(), &#34;file:///&#34;)</code></pre>
753
768
  </details>
754
769
  </dd>
755
770
  <dt id="browsewin.browserWin.paste"><code class="name flex">
@@ -824,6 +839,19 @@ sets through the use of explicit keyword arguments.</p></div>
824
839
  dialog.destroy()</code></pre>
825
840
  </details>
826
841
  </dd>
842
+ <dt id="browsewin.browserWin.set_modified"><code class="name flex">
843
+ <span>def <span class="ident">set_modified</span></span>(<span>self, flag)</span>
844
+ </code></dt>
845
+ <dd>
846
+ <div class="desc"></div>
847
+ <details class="source">
848
+ <summary>
849
+ <span>Expand source code</span>
850
+ </summary>
851
+ <pre><code class="python">def set_modified(self, flag):
852
+ self.webview.modified = flag</code></pre>
853
+ </details>
854
+ </dd>
827
855
  <dt id="browsewin.browserWin.set_status"><code class="name flex">
828
856
  <span>def <span class="ident">set_status</span></span>(<span>self, xtxt)</span>
829
857
  </code></dt>
@@ -880,30 +908,29 @@ sets through the use of explicit keyword arguments.</p></div>
880
908
  self.edit.single_line = True
881
909
 
882
910
  hbox3 = Gtk.HBox()
883
- uuu = Gtk.Label(&#34; URL: &#34;)
911
+ uuu = Gtk.Label(label=&#34; URL: &#34;)
884
912
  uuu.set_tooltip_text(&#34;Current / New URL; press Enter to go&#34;)
885
913
  hbox3.pack_start(uuu, 0, 0, 0)
886
914
 
887
915
  hbox3.pack_start(self.edit, True, True, 2)
888
916
 
889
- bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
917
+ bbb = IconButt(Gtk.STOCK_SAVE, self.gourl, &#34;Go to speified URL&#34;)
890
918
  #bbb = Gtk.Button.new_with_mnemonic(&#34; _Go &#34;) #, self.gourl, &#34;Go to speified URL&#34;)
891
919
  #bbb.connect(&#34;clicked&#34;, self.gourl)
892
-
893
920
  #bbb = LabelButt(&#34; _Go &#34;, self.gourl, &#34;Go to speified URL&#34;)
894
- ccc = LabelButt(&#34; &lt;-_Back &#34;, self.backurl, &#34;Go Back&#34;)
895
- ddd = LabelButt(&#34; For_w-&gt; &#34;, self.forwurl, &#34;Go Forw&#34;)
896
- eee = LabelButt(&#34; B_ase &#34;, self.baseurl, &#34;Go to base URL&#34;)
921
+ ccc = IconButt(Gtk.STOCK_GO_BACK, self.backurl, &#34;Go Back&#34;)
922
+ ddd = IconButt(Gtk.STOCK_GO_FORWARD, self.forwurl, &#34;Go Forw&#34;)
923
+ eee = IconButt(Gtk.STOCK_HOME, self.baseurl, &#34;Go to base URL&#34;)
897
924
 
898
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
925
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
899
926
 
900
927
  hbox3.pack_start(bbb, 0, 0, 0)
901
928
  hbox3.pack_start(ccc, 0, 0, 0)
902
929
  hbox3.pack_start(ddd, 0, 0, 0)
903
930
  hbox3.pack_start(eee, 0, 0, 0)
904
931
 
905
- #hbox3.pack_start(Gtk.Label(&#34; ^ &#34;), 0, 0, 0)
906
- hbox3.pack_start(Gtk.Label(&#34; &#34;), 0, 0, 0)
932
+ #hbox3.pack_start(Gtk.Label(label=&#34; ^ &#34;), 0, 0, 0)
933
+ hbox3.pack_start(Gtk.Label(label=&#34; &#34;), 0, 0, 0)
907
934
 
908
935
  return hbox3</code></pre>
909
936
  </details>
@@ -938,6 +965,7 @@ sets through the use of explicit keyword arguments.</p></div>
938
965
  <li><code><a title="browsewin.browserWin.paste" href="#browsewin.browserWin.paste">paste</a></code></li>
939
966
  <li><code><a title="browsewin.browserWin.save" href="#browsewin.browserWin.save">save</a></code></li>
940
967
  <li><code><a title="browsewin.browserWin.saveas" href="#browsewin.browserWin.saveas">saveas</a></code></li>
968
+ <li><code><a title="browsewin.browserWin.set_modified" href="#browsewin.browserWin.set_modified">set_modified</a></code></li>
941
969
  <li><code><a title="browsewin.browserWin.set_status" href="#browsewin.browserWin.set_status">set_status</a></code></li>
942
970
  <li><code><a title="browsewin.browserWin.stattime" href="#browsewin.browserWin.stattime">stattime</a></code></li>
943
971
  <li><code><a title="browsewin.browserWin.url_callb" href="#browsewin.browserWin.url_callb">url_callb</a></code></li>