... | ... |
@@ -56,6 +56,10 @@ Shortcuts: |
56 | 56 |
'-g', '--geometry', |
57 | 57 |
action='store', dest='geometry', |
58 | 58 |
help='default window size in form WxH') |
59 |
+ parser.add_argument( |
|
60 |
+ '--hide-toolbar', |
|
61 |
+ action='store_true', dest='hide_toolbar', |
|
62 |
+ help='Hides the toolbar on start.') |
|
59 | 63 |
|
60 | 64 |
options = parser.parse_args() |
61 | 65 |
inputfile = options.inputfile |
... | ... |
@@ -76,6 +80,9 @@ Shortcuts: |
76 | 80 |
else: |
77 | 81 |
win.open_file(inputfile) |
78 | 82 |
|
83 |
+ if options.hide_toolbar: |
|
84 |
+ win.uimanager.get_widget('/ToolBar').set_visible(False) |
|
85 |
+ |
|
79 | 86 |
if sys.platform != 'win32': |
80 | 87 |
# Reset KeyboardInterrupt SIGINT handler, so that glib loop can be stopped by it |
81 | 88 |
import signal |
... | ... |
@@ -336,6 +336,12 @@ class DotWidget(Gtk.DrawingArea): |
336 | 336 |
if event.keyval == Gdk.KEY_p: |
337 | 337 |
self.on_print() |
338 | 338 |
return True |
339 |
+ if event.keyval == Gdk.KEY_t: |
|
340 |
+ # toggle toolbar visibility |
|
341 |
+ win = widget.get_toplevel() |
|
342 |
+ toolbar = win.uimanager.get_widget("/ToolBar") |
|
343 |
+ toolbar.set_visible(not toolbar.get_visible()) |
|
344 |
+ return True |
|
339 | 345 |
return False |
340 | 346 |
|
341 | 347 |
print_settings = None |