From 746d75dee7fb6291a900e0162345354e6eb41c13 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Thu, 15 Sep 2016 09:08:36 +0200 Subject: voctogui: pep8ify * Indent by 4 spaces * Use spaces around infix operators * Reformat some argument lists * One import per line * Start line comments with '# ' * Two newlines before free functions * One newline before methods --- voctogui/lib/toolbar/misc.py | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'voctogui/lib/toolbar/misc.py') diff --git a/voctogui/lib/toolbar/misc.py b/voctogui/lib/toolbar/misc.py index 9528b67..530bbad 100644 --- a/voctogui/lib/toolbar/misc.py +++ b/voctogui/lib/toolbar/misc.py @@ -6,30 +6,31 @@ import lib.connection as Connection class MiscToolbarController(object): - """ Manages Accelerators and Clicks Misc buttons """ + """Manages Accelerators and Clicks Misc buttons""" - def __init__(self, drawing_area, win, uibuilder): - self.log = logging.getLogger('MiscToolbarController') + def __init__(self, drawing_area, win, uibuilder): + self.log = logging.getLogger('MiscToolbarController') - # Accelerators - accelerators = Gtk.AccelGroup() - win.add_accel_group(accelerators) + # Accelerators + accelerators = Gtk.AccelGroup() + win.add_accel_group(accelerators) - closebtn = uibuilder.find_widget_recursive(drawing_area, 'close') - closebtn.set_visible( Config.getboolean('misc', 'close') ) - closebtn.connect('clicked', self.on_closebtn_clicked) + closebtn = uibuilder.find_widget_recursive(drawing_area, 'close') + closebtn.set_visible(Config.getboolean('misc', 'close')) + closebtn.connect('clicked', self.on_closebtn_clicked) - cutbtn = uibuilder.find_widget_recursive(drawing_area, 'cut') - cutbtn.set_visible( Config.getboolean('misc', 'cut') ) - cutbtn.connect('clicked', self.on_cutbtn_clicked) + cutbtn = uibuilder.find_widget_recursive(drawing_area, 'cut') + cutbtn.set_visible(Config.getboolean('misc', 'cut')) + cutbtn.connect('clicked', self.on_cutbtn_clicked) - key, mod = Gtk.accelerator_parse('t') - cutbtn.add_accelerator('clicked', accelerators, key, mod, Gtk.AccelFlags.VISIBLE) + key, mod = Gtk.accelerator_parse('t') + cutbtn.add_accelerator('clicked', accelerators, + key, mod, Gtk.AccelFlags.VISIBLE) - def on_closebtn_clicked(self, btn): - self.log.info('close-button clicked') - Gtk.main_quit() + def on_closebtn_clicked(self, btn): + self.log.info('close-button clicked') + Gtk.main_quit() - def on_cutbtn_clicked(self, btn): - self.log.info('cut-button clicked') - Connection.send('message', 'cut') + def on_cutbtn_clicked(self, btn): + self.log.info('cut-button clicked') + Connection.send('message', 'cut') -- cgit v1.2.3