Removed
Link Here
|
1 |
--- xdot.py.orig 2016-03-07 15:58:48 UTC |
2 |
+++ xdot.py |
3 |
@@ -30,13 +30,13 @@ import time |
4 |
import re |
5 |
import optparse |
6 |
|
7 |
-from gi.repository import GLib |
8 |
-from gi.repository import GObject |
9 |
-from gi.repository import Gtk |
10 |
-from gi.repository import Gdk |
11 |
-from gi.repository import GdkPixbuf |
12 |
-from gi.repository import Pango |
13 |
-from gi.repository import PangoCairo |
14 |
+import glib |
15 |
+import gobject |
16 |
+import gtk |
17 |
+import gtk.gdk |
18 |
+import gtk.keysyms |
19 |
+import pango |
20 |
+import pangocairo |
21 |
import cairo |
22 |
|
23 |
|
24 |
@@ -120,7 +120,7 @@ class TextShape(Shape): |
25 |
try: |
26 |
layout = self.layout |
27 |
except AttributeError: |
28 |
- layout = PangoCairo.create_layout(cr) |
29 |
+ layout = pangcairo.create_layout(cr) |
30 |
|
31 |
# set font options |
32 |
# see http://lists.freedesktop.org/archives/cairo/2007-February/009688.html |
33 |
@@ -130,21 +130,21 @@ class TextShape(Shape): |
34 |
fo.set_hint_style(cairo.HINT_STYLE_NONE) |
35 |
fo.set_hint_metrics(cairo.HINT_METRICS_OFF) |
36 |
try: |
37 |
- PangoCairo.context_set_font_options(context, fo) |
38 |
+ pangcairo.context_set_font_options(context, fo) |
39 |
except TypeError: |
40 |
# XXX: Some broken pangocairo bindings show the error |
41 |
# 'TypeError: font_options must be a cairo.FontOptions or None' |
42 |
pass |
43 |
except KeyError: |
44 |
- # cairo.FontOptions is not registered as a foreign struct in older PyGObject versions. |
45 |
+ # cairo.FontOptions is not registered as a foreign struct in older Pygobject versions. |
46 |
# https://git.gnome.org/browse/pygobject/commit/?id=b21f66d2a399b8c9a36a1758107b7bdff0ec8eaa |
47 |
pass |
48 |
|
49 |
# set font |
50 |
- font = Pango.FontDescription() |
51 |
+ font = pango.FontDescription() |
52 |
|
53 |
- # https://developer.gnome.org/pango/stable/PangoMarkupFormat.html |
54 |
- markup = GObject.markup_escape_text(self.t) |
55 |
+ # https://developer.gnome.org/pango/stable/pangoMarkupFormat.html |
56 |
+ markup = gobject.markup_escape_text(self.t) |
57 |
if self.pen.bold: |
58 |
markup = '<b>' + markup + '</b>' |
59 |
if self.pen.italic: |
60 |
@@ -158,12 +158,12 @@ class TextShape(Shape): |
61 |
if self.pen.subscript: |
62 |
markup = '<sub><small>' + markup + '</small></sub>' |
63 |
|
64 |
- success, attrs, text, accel_char = Pango.parse_markup(markup, -1, '\x00') |
65 |
+ success, attrs, text, accel_char = pango.parse_markup(markup, -1, '\x00') |
66 |
assert success |
67 |
layout.set_attributes(attrs) |
68 |
|
69 |
font.set_family(self.pen.fontname) |
70 |
- font.set_absolute_size(self.pen.fontsize*Pango.SCALE) |
71 |
+ font.set_absolute_size(self.pen.fontsize*pango.SCALE) |
72 |
layout.set_font_description(font) |
73 |
|
74 |
# set text |
75 |
@@ -172,13 +172,13 @@ class TextShape(Shape): |
76 |
# cache it |
77 |
self.layout = layout |
78 |
else: |
79 |
- PangoCairo.update_layout(cr, layout) |
80 |
+ pangcairo.update_layout(cr, layout) |
81 |
|
82 |
descent = 2 # XXX get descender from font metrics |
83 |
|
84 |
width, height = layout.get_size() |
85 |
- width = float(width)/Pango.SCALE |
86 |
- height = float(height)/Pango.SCALE |
87 |
+ width = float(width)/pango.SCALE |
88 |
+ height = float(height)/pango.SCALE |
89 |
|
90 |
# we know the width that dot thinks this text should have |
91 |
# we do not necessarily have a font with the same metrics |
92 |
@@ -207,7 +207,7 @@ class TextShape(Shape): |
93 |
cr.save() |
94 |
cr.scale(f, f) |
95 |
cr.set_source_rgba(*self.select_pen(highlight).color) |
96 |
- PangoCairo.show_layout(cr, layout) |
97 |
+ pangcairo.show_layout(cr, layout) |
98 |
cr.restore() |
99 |
|
100 |
if 0: # DEBUG |
101 |
@@ -239,13 +239,13 @@ class ImageShape(Shape): |
102 |
self.path = path |
103 |
|
104 |
def draw(self, cr, highlight=False): |
105 |
- pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.path) |
106 |
+ pixbuf = gtk.gdk.pixbuf_new_from_file(self.path) |
107 |
sx = float(self.w)/float(pixbuf.get_width()) |
108 |
sy = float(self.h)/float(pixbuf.get_height()) |
109 |
cr.save() |
110 |
cr.translate(self.x0, self.y0 - self.h) |
111 |
cr.scale(sx, sy) |
112 |
- Gdk.cairo_set_source_pixbuf(cr, pixbuf, 0, 0) |
113 |
+ gdk.cairo_set_source_pixbuf(cr, pixbuf, 0, 0) |
114 |
cr.paint() |
115 |
cr.restore() |
116 |
|
117 |
@@ -631,7 +631,7 @@ class XDotAttrParser: |
118 |
|
119 |
def lookup_color(self, c): |
120 |
try: |
121 |
- color = Gdk.color_parse(c) |
122 |
+ color = gdk.color_parse(c) |
123 |
except ValueError: |
124 |
pass |
125 |
else: |
126 |
@@ -1318,12 +1318,12 @@ class Animation(object): |
127 |
self.timeout_id = None |
128 |
|
129 |
def start(self): |
130 |
- self.timeout_id = GLib.timeout_add(int(self.step * 1000), self.tick) |
131 |
+ self.timeout_id = glib.timeout_add(int(self.step * 1000), self.tick) |
132 |
|
133 |
def stop(self): |
134 |
self.dot_widget.animation = NoAnimation(self.dot_widget) |
135 |
if self.timeout_id is not None: |
136 |
- GLib.source_remove(self.timeout_id) |
137 |
+ glib.source_remove(self.timeout_id) |
138 |
self.timeout_id = None |
139 |
|
140 |
def tick(self): |
141 |
@@ -1453,7 +1453,7 @@ class NullAction(DragAction): |
142 |
if item is None: |
143 |
item = dot_widget.get_jump(x, y) |
144 |
if item is not None: |
145 |
- dot_widget.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.HAND2)) |
146 |
+ dot_widget.get_window().set_cursor(gdk.Cursor(gdk.CursorType.HAND2)) |
147 |
dot_widget.set_highlight(item.highlight) |
148 |
else: |
149 |
dot_widget.get_window().set_cursor(None) |
150 |
@@ -1463,7 +1463,7 @@ class NullAction(DragAction): |
151 |
class PanAction(DragAction): |
152 |
|
153 |
def start(self): |
154 |
- self.dot_widget.get_window().set_cursor(Gdk.Cursor(Gdk.CursorType.FLEUR)) |
155 |
+ self.dot_widget.get_window().set_cursor(gdk.Cursor(gdk.CursorType.FLEUR)) |
156 |
|
157 |
def drag(self, deltax, deltay): |
158 |
self.dot_widget.x += deltax / self.dot_widget.zoom_ratio |
159 |
@@ -1518,18 +1518,18 @@ class ZoomAreaAction(DragAction): |
160 |
self.dot_widget.queue_draw() |
161 |
|
162 |
|
163 |
-class DotWidget(Gtk.DrawingArea): |
164 |
+class DotWidget(gtk.DrawingArea): |
165 |
"""GTK widget that draws dot graphs.""" |
166 |
|
167 |
- #TODO GTK3: Second argument has to be of type Gdk.EventButton instead of object. |
168 |
+ #TODO GTK3: Second argument has to be of type gdk.EventButton instead of object. |
169 |
__gsignals__ = { |
170 |
- 'clicked' : (GObject.SIGNAL_RUN_LAST, None, (str, object)) |
171 |
+ 'clicked' : (gobject.SIGNAL_RUN_LAST, None, (str, object)) |
172 |
} |
173 |
|
174 |
filter = 'dot' |
175 |
|
176 |
def __init__(self): |
177 |
- Gtk.DrawingArea.__init__(self) |
178 |
+ gtk.DrawingArea.__init__(self) |
179 |
|
180 |
self.graph = Graph() |
181 |
self.openfilename = None |
182 |
@@ -1537,13 +1537,13 @@ class DotWidget(Gtk.DrawingArea): |
183 |
self.set_can_focus(True) |
184 |
|
185 |
self.connect("draw", self.on_draw) |
186 |
- self.add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK) |
187 |
+ self.add_events(gdk.EventMask.BUTTON_PRESS_MASK | gdk.EventMask.BUTTON_RELEASE_MASK) |
188 |
self.connect("button-press-event", self.on_area_button_press) |
189 |
self.connect("button-release-event", self.on_area_button_release) |
190 |
- self.add_events(Gdk.EventMask.POINTER_MOTION_MASK | |
191 |
- Gdk.EventMask.POINTER_MOTION_HINT_MASK | |
192 |
- Gdk.EventMask.BUTTON_RELEASE_MASK | |
193 |
- Gdk.EventMask.SCROLL_MASK) |
194 |
+ self.add_events(gdk.EventMask.POINTER_MOTION_MASK | |
195 |
+ gdk.EventMask.POINTER_MOTION_HINT_MASK | |
196 |
+ gdk.EventMask.BUTTON_RELEASE_MASK | |
197 |
+ gdk.EventMask.SCROLL_MASK) |
198 |
self.connect("motion-notify-event", self.on_area_motion_notify) |
199 |
self.connect("scroll-event", self.on_area_scroll_event) |
200 |
self.connect("size-allocate", self.on_area_size_allocate) |
201 |
@@ -1551,7 +1551,7 @@ class DotWidget(Gtk.DrawingArea): |
202 |
self.connect('key-press-event', self.on_key_press_event) |
203 |
self.last_mtime = None |
204 |
|
205 |
- GLib.timeout_add(1000, self.update) |
206 |
+ glib.timeout_add(1000, self.update) |
207 |
|
208 |
self.x, self.y = 0.0, 0.0 |
209 |
self.zoom_ratio = 1.0 |
210 |
@@ -1729,59 +1729,59 @@ class DotWidget(Gtk.DrawingArea): |
211 |
POS_INCREMENT = 100 |
212 |
|
213 |
def on_key_press_event(self, widget, event): |
214 |
- if event.keyval == Gdk.KEY_Left: |
215 |
+ if event.keyval == gdk.KEY_Left: |
216 |
self.x -= self.POS_INCREMENT/self.zoom_ratio |
217 |
self.queue_draw() |
218 |
return True |
219 |
- if event.keyval == Gdk.KEY_Right: |
220 |
+ if event.keyval == gdk.KEY_Right: |
221 |
self.x += self.POS_INCREMENT/self.zoom_ratio |
222 |
self.queue_draw() |
223 |
return True |
224 |
- if event.keyval == Gdk.KEY_Up: |
225 |
+ if event.keyval == gdk.KEY_Up: |
226 |
self.y -= self.POS_INCREMENT/self.zoom_ratio |
227 |
self.queue_draw() |
228 |
return True |
229 |
- if event.keyval == Gdk.KEY_Down: |
230 |
+ if event.keyval == gdk.KEY_Down: |
231 |
self.y += self.POS_INCREMENT/self.zoom_ratio |
232 |
self.queue_draw() |
233 |
return True |
234 |
- if event.keyval in (Gdk.KEY_Page_Up, |
235 |
- Gdk.KEY_plus, |
236 |
- Gdk.KEY_equal, |
237 |
- Gdk.KEY_KP_Add): |
238 |
+ if event.keyval in (gdk.KEY_Page_Up, |
239 |
+ gdk.KEY_plus, |
240 |
+ gdk.KEY_equal, |
241 |
+ gdk.KEY_KP_Add): |
242 |
self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT) |
243 |
self.queue_draw() |
244 |
return True |
245 |
- if event.keyval in (Gdk.KEY_Page_Down, |
246 |
- Gdk.KEY_minus, |
247 |
- Gdk.KEY_KP_Subtract): |
248 |
+ if event.keyval in (gdk.KEY_Page_Down, |
249 |
+ gdk.KEY_minus, |
250 |
+ gdk.KEY_KP_Subtract): |
251 |
self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT) |
252 |
self.queue_draw() |
253 |
return True |
254 |
- if event.keyval == Gdk.KEY_Escape: |
255 |
+ if event.keyval == gdk.KEY_Escape: |
256 |
self.drag_action.abort() |
257 |
self.drag_action = NullAction(self) |
258 |
return True |
259 |
- if event.keyval == Gdk.KEY_r: |
260 |
+ if event.keyval == gdk.KEY_r: |
261 |
self.reload() |
262 |
return True |
263 |
- if event.keyval == Gdk.KEY_f: |
264 |
+ if event.keyval == gdk.KEY_f: |
265 |
win = widget.get_toplevel() |
266 |
find_toolitem = win.uimanager.get_widget('/ToolBar/Find') |
267 |
textentry = find_toolitem.get_children() |
268 |
win.set_focus(textentry[0]) |
269 |
return True |
270 |
- if event.keyval == Gdk.KEY_q: |
271 |
- Gtk.main_quit() |
272 |
+ if event.keyval == gdk.KEY_q: |
273 |
+ gtk.main_quit() |
274 |
return True |
275 |
- if event.keyval == Gdk.KEY_p: |
276 |
+ if event.keyval == gdk.KEY_p: |
277 |
self.on_print() |
278 |
return True |
279 |
return False |
280 |
|
281 |
print_settings = None |
282 |
def on_print(self, action=None): |
283 |
- print_op = Gtk.PrintOperation() |
284 |
+ print_op = gtk.PrintOperation() |
285 |
|
286 |
if self.print_settings != None: |
287 |
print_op.set_print_settings(self.print_settings) |
288 |
@@ -1789,8 +1789,8 @@ class DotWidget(Gtk.DrawingArea): |
289 |
print_op.connect("begin_print", self.begin_print) |
290 |
print_op.connect("draw_page", self.draw_page) |
291 |
|
292 |
- res = print_op.run(Gtk.PrintOperationAction.PRINT_DIALOG, self.get_toplevel()) |
293 |
- if res == Gtk.PrintOperationResult.APPLY: |
294 |
+ res = print_op.run(gtk.PrintOperationAction.PRINT_DIALOG, self.get_toplevel()) |
295 |
+ if res == gtk.PrintOperationResult.APPLY: |
296 |
self.print_settings = print_op.get_print_settings() |
297 |
|
298 |
def begin_print(self, operation, context): |
299 |
@@ -1810,10 +1810,10 @@ class DotWidget(Gtk.DrawingArea): |
300 |
def get_drag_action(self, event): |
301 |
state = event.state |
302 |
if event.button in (1, 2): # left or middle button |
303 |
- modifiers = Gtk.accelerator_get_default_mod_mask() |
304 |
- if state & modifiers == Gdk.ModifierType.CONTROL_MASK: |
305 |
+ modifiers = gtk.accelerator_get_default_mod_mask() |
306 |
+ if state & modifiers == gdk.ModifierType.CONTROL_MASK: |
307 |
return ZoomAction |
308 |
- elif state & modifiers == Gdk.ModifierType.SHIFT_MASK: |
309 |
+ elif state & modifiers == gdk.ModifierType.SHIFT_MASK: |
310 |
return ZoomAreaAction |
311 |
else: |
312 |
return PanAction |
313 |
@@ -1831,7 +1831,7 @@ class DotWidget(Gtk.DrawingArea): |
314 |
return False |
315 |
|
316 |
def is_click(self, event, click_fuzz=4, click_timeout=1.0): |
317 |
- assert event.type == Gdk.EventType.BUTTON_RELEASE |
318 |
+ assert event.type == gdk.EventType.BUTTON_RELEASE |
319 |
if self.presstime is None: |
320 |
# got a button release without seeing the press? |
321 |
return False |
322 |
@@ -1873,11 +1873,11 @@ class DotWidget(Gtk.DrawingArea): |
323 |
return False |
324 |
|
325 |
def on_area_scroll_event(self, area, event): |
326 |
- if event.direction == Gdk.ScrollDirection.UP: |
327 |
+ if event.direction == gdk.ScrollDirection.UP: |
328 |
self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT, |
329 |
pos=(event.x, event.y)) |
330 |
return True |
331 |
- if event.direction == Gdk.ScrollDirection.DOWN: |
332 |
+ if event.direction == gdk.ScrollDirection.DOWN: |
333 |
self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT, |
334 |
pos=(event.x, event.y)) |
335 |
return True |
336 |
@@ -1918,14 +1918,14 @@ class DotWidget(Gtk.DrawingArea): |
337 |
return self.graph.get_jump(x, y) |
338 |
|
339 |
|
340 |
-class FindMenuToolAction(Gtk.Action): |
341 |
+class FindMenuToolAction(gtk.Action): |
342 |
__gtype_name__ = "FindMenuToolAction" |
343 |
|
344 |
def do_create_tool_item(self): |
345 |
- return Gtk.ToolItem() |
346 |
+ return gtk.ToolItem() |
347 |
|
348 |
|
349 |
-class DotWindow(Gtk.Window): |
350 |
+class DotWindow(gtk.Window): |
351 |
|
352 |
ui = ''' |
353 |
<ui> |
354 |
@@ -1947,7 +1947,7 @@ class DotWindow(Gtk.Window): |
355 |
base_title = 'Dot Viewer' |
356 |
|
357 |
def __init__(self, widget=None): |
358 |
- Gtk.Window.__init__(self) |
359 |
+ gtk.Window.__init__(self) |
360 |
|
361 |
self.graph = Graph() |
362 |
|
363 |
@@ -1955,31 +1955,31 @@ class DotWindow(Gtk.Window): |
364 |
|
365 |
window.set_title(self.base_title) |
366 |
window.set_default_size(512, 512) |
367 |
- vbox = Gtk.VBox() |
368 |
+ vbox = gtk.VBox() |
369 |
window.add(vbox) |
370 |
|
371 |
self.dotwidget = widget or DotWidget() |
372 |
|
373 |
# Create a UIManager instance |
374 |
- uimanager = self.uimanager = Gtk.UIManager() |
375 |
+ uimanager = self.uimanager = gtk.UIManager() |
376 |
|
377 |
# Add the accelerator group to the toplevel window |
378 |
accelgroup = uimanager.get_accel_group() |
379 |
window.add_accel_group(accelgroup) |
380 |
|
381 |
# Create an ActionGroup |
382 |
- actiongroup = Gtk.ActionGroup('Actions') |
383 |
+ actiongroup = gtk.ActionGroup('Actions') |
384 |
self.actiongroup = actiongroup |
385 |
|
386 |
# Create actions |
387 |
actiongroup.add_actions(( |
388 |
- ('Open', Gtk.STOCK_OPEN, None, None, None, self.on_open), |
389 |
- ('Reload', Gtk.STOCK_REFRESH, None, None, None, self.on_reload), |
390 |
- ('Print', Gtk.STOCK_PRINT, None, None, "Prints the currently visible part of the graph", self.dotwidget.on_print), |
391 |
- ('ZoomIn', Gtk.STOCK_ZOOM_IN, None, None, None, self.dotwidget.on_zoom_in), |
392 |
- ('ZoomOut', Gtk.STOCK_ZOOM_OUT, None, None, None, self.dotwidget.on_zoom_out), |
393 |
- ('ZoomFit', Gtk.STOCK_ZOOM_FIT, None, None, None, self.dotwidget.on_zoom_fit), |
394 |
- ('Zoom100', Gtk.STOCK_ZOOM_100, None, None, None, self.dotwidget.on_zoom_100), |
395 |
+ ('Open', gtk.STOCK_OPEN, None, None, None, self.on_open), |
396 |
+ ('Reload', gtk.STOCK_REFRESH, None, None, None, self.on_reload), |
397 |
+ ('Print', gtk.STOCK_PRINT, None, None, "Prints the currently visible part of the graph", self.dotwidget.on_print), |
398 |
+ ('ZoomIn', gtk.STOCK_ZOOM_IN, None, None, None, self.dotwidget.on_zoom_in), |
399 |
+ ('ZoomOut', gtk.STOCK_ZOOM_OUT, None, None, None, self.dotwidget.on_zoom_out), |
400 |
+ ('ZoomFit', gtk.STOCK_ZOOM_FIT, None, None, None, self.dotwidget.on_zoom_fit), |
401 |
+ ('Zoom100', gtk.STOCK_ZOOM_100, None, None, None, self.dotwidget.on_zoom_100), |
402 |
)) |
403 |
|
404 |
find_action = FindMenuToolAction("Find", None, |
405 |
@@ -2004,8 +2004,8 @@ class DotWindow(Gtk.Window): |
406 |
|
407 |
# Add Find text search |
408 |
find_toolitem = uimanager.get_widget('/ToolBar/Find') |
409 |
- self.textentry = Gtk.Entry(max_length=20) |
410 |
- self.textentry.set_icon_from_stock(0, Gtk.STOCK_FIND) |
411 |
+ self.textentry = gtk.Entry(max_length=20) |
412 |
+ self.textentry.set_icon_from_stock(0, gtk.STOCK_FIND) |
413 |
find_toolitem.add(self.textentry) |
414 |
|
415 |
self.textentry.set_activates_default(True) |
416 |
@@ -2073,23 +2073,23 @@ class DotWindow(Gtk.Window): |
417 |
self.error_dialog(str(ex)) |
418 |
|
419 |
def on_open(self, action): |
420 |
- chooser = Gtk.FileChooserDialog(title="Open dot File", |
421 |
- action=Gtk.FileChooserAction.OPEN, |
422 |
- buttons=(Gtk.STOCK_CANCEL, |
423 |
- Gtk.ResponseType.CANCEL, |
424 |
- Gtk.STOCK_OPEN, |
425 |
- Gtk.ResponseType.OK)) |
426 |
- chooser.set_default_response(Gtk.ResponseType.OK) |
427 |
+ chooser = gtk.FileChooserDialog(title="Open dot File", |
428 |
+ action=gtk.FileChooserAction.OPEN, |
429 |
+ buttons=(gtk.STOCK_CANCEL, |
430 |
+ gtk.ResponseType.CANCEL, |
431 |
+ gtk.STOCK_OPEN, |
432 |
+ gtk.ResponseType.OK)) |
433 |
+ chooser.set_default_response(gtk.ResponseType.OK) |
434 |
chooser.set_current_folder(self.last_open_dir) |
435 |
- filter = Gtk.FileFilter() |
436 |
+ filter = gtk.FileFilter() |
437 |
filter.set_name("Graphviz dot files") |
438 |
filter.add_pattern("*.dot") |
439 |
chooser.add_filter(filter) |
440 |
- filter = Gtk.FileFilter() |
441 |
+ filter = gtk.FileFilter() |
442 |
filter.set_name("All files") |
443 |
filter.add_pattern("*") |
444 |
chooser.add_filter(filter) |
445 |
- if chooser.run() == Gtk.ResponseType.OK: |
446 |
+ if chooser.run() == gtk.ResponseType.OK: |
447 |
filename = chooser.get_filename() |
448 |
self.last_open_dir = chooser.get_current_folder() |
449 |
chooser.destroy() |
450 |
@@ -2101,9 +2101,9 @@ class DotWindow(Gtk.Window): |
451 |
self.dotwidget.reload() |
452 |
|
453 |
def error_dialog(self, message): |
454 |
- dlg = Gtk.MessageDialog(type=Gtk.MessageType.ERROR, |
455 |
+ dlg = gtk.MessageDialog(type=gtk.MessageType.ERROR, |
456 |
message_format=message, |
457 |
- buttons=Gtk.ButtonsType.OK) |
458 |
+ buttons=gtk.ButtonsType.OK) |
459 |
dlg.set_title(self.base_title) |
460 |
dlg.run() |
461 |
dlg.destroy() |
462 |
@@ -2150,14 +2150,14 @@ Shortcuts: |
463 |
parser.error('incorrect number of arguments') |
464 |
|
465 |
win = DotWindow() |
466 |
- win.connect('delete-event', Gtk.main_quit) |
467 |
+ win.connect('delete-event', gtk.main_quit) |
468 |
win.set_filter(options.filter) |
469 |
if len(args) >= 1: |
470 |
if args[0] == '-': |
471 |
win.set_dotcode(sys.stdin.read()) |
472 |
else: |
473 |
win.open_file(args[0]) |
474 |
- Gtk.main() |
475 |
+ gtk.main() |
476 |
|
477 |
|
478 |
# Apache-Style Software License for ColorBrewer software and ColorBrewer Color |