diff options
author | Johan Dahlin <johan@gnome.org> | 2012-03-22 10:46:17 -0300 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2012-03-22 11:16:45 -0300 |
commit | 21aeb19107b718293116e51ecd6479d4d7198b8f (patch) | |
tree | de82eed77175526ce8bc12ad4f5886a0972525d1 /demos | |
parent | b04d209930ab01bae6563b0d714aec829739bdc6 (diff) | |
download | pygobject-21aeb19107b718293116e51ecd6479d4d7198b8f.tar.gz |
PEP8: Remove whitespace before (
https://bugzilla.gnome.org/show_bug.cgi?id=672627
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/demos/Entry/entry_buffer.py | 2 | ||||
-rw-r--r-- | demos/gtk-demo/demos/Entry/entry_completion.py | 2 | ||||
-rw-r--r-- | demos/gtk-demo/demos/Entry/search_entry.py | 12 | ||||
-rw-r--r-- | demos/gtk-demo/demos/Icon View/iconviewedit.py | 4 | ||||
-rw-r--r-- | demos/gtk-demo/demos/Tree View/liststore.py | 2 | ||||
-rw-r--r-- | demos/gtk-demo/demos/dialogs.py | 12 | ||||
-rw-r--r-- | demos/gtk-demo/demos/pickers.py | 8 | ||||
-rw-r--r-- | demos/gtk-demo/demos/pixbuf.py | 4 | ||||
-rw-r--r-- | demos/gtk-demo/demos/printing.py | 8 | ||||
-rw-r--r-- | demos/gtk-demo/demos/rotatedtext.py | 2 | ||||
-rwxr-xr-x | demos/gtk-demo/gtk-demo.py | 4 |
11 files changed, 30 insertions, 30 deletions
diff --git a/demos/gtk-demo/demos/Entry/entry_buffer.py b/demos/gtk-demo/demos/Entry/entry_buffer.py index 00b6602f..442dfa27 100644 --- a/demos/gtk-demo/demos/Entry/entry_buffer.py +++ b/demos/gtk-demo/demos/Entry/entry_buffer.py @@ -44,7 +44,7 @@ class EntryBufferApp: label = Gtk.Label() label.set_markup('Entries share a buffer. Typing in one is reflected in the other.') - vbox.pack_start (label, False, False, 0) + vbox.pack_start(label, False, False, 0) # create a buffer buffer = Gtk.EntryBuffer() diff --git a/demos/gtk-demo/demos/Entry/entry_completion.py b/demos/gtk-demo/demos/Entry/entry_completion.py index 6229a128..1f00d720 100644 --- a/demos/gtk-demo/demos/Entry/entry_completion.py +++ b/demos/gtk-demo/demos/Entry/entry_completion.py @@ -45,7 +45,7 @@ class EntryBufferApp: label = Gtk.Label() label.set_markup('Completion demo, try writing <b>total</b> or <b>gnome</b> for example.') - vbox.pack_start (label, False, False, 0) + vbox.pack_start(label, False, False, 0) #create our entry entry = Gtk.Entry() diff --git a/demos/gtk-demo/demos/Entry/search_entry.py b/demos/gtk-demo/demos/Entry/search_entry.py index 8d8165fe..c24ba490 100644 --- a/demos/gtk-demo/demos/Entry/search_entry.py +++ b/demos/gtk-demo/demos/Entry/search_entry.py @@ -114,7 +114,7 @@ class SearchboxApp: entry.progress_pulse() return True - def search_progress_done (self, entry): + def search_progress_done(self, entry): entry.set_progress_fraction(0.0) def finish_search(self, button, entry): @@ -151,7 +151,7 @@ class SearchboxApp: def clear_entry(self, entry): entry.set_text('') - def search_by_name (self, item, entry): + def search_by_name(self, item, entry): entry.set_icon_from_stock(Gtk.EntryIconPosition.PRIMARY, Gtk.STOCK_FIND) entry.set_icon_tooltip_text(Gtk.EntryIconPosition.PRIMARY, @@ -159,8 +159,8 @@ class SearchboxApp: 'Click here to change the search type') def search_by_description(self, item, entry): - entry.set_icon_from_stock (Gtk.EntryIconPosition.PRIMARY, - Gtk.STOCK_EDIT) + entry.set_icon_from_stock(Gtk.EntryIconPosition.PRIMARY, + Gtk.STOCK_EDIT) entry.set_icon_tooltip_text(Gtk.EntryIconPosition.PRIMARY, 'Search by description\n' + \ 'Click here to change the search type') @@ -212,7 +212,7 @@ class SearchboxApp: entry.set_icon_sensitive(Gtk.EntryIconPosition.SECONDARY, has_text) button.set_sensitive(has_text) - def activate_cb (self, entry, button): + def activate_cb(self, entry, button): if self.search_progress_id != 0: return self.start_search(button, entry) @@ -242,7 +242,7 @@ class SearchboxApp: item = Gtk.MenuItem.new_with_label('Search by') item.show() item.set_submenu(search_menu) - menu.append (item) + menu.append(item) def main(demoapp=None): diff --git a/demos/gtk-demo/demos/Icon View/iconviewedit.py b/demos/gtk-demo/demos/Icon View/iconviewedit.py index 73884c1b..50d88758 100644 --- a/demos/gtk-demo/demos/Icon View/iconviewedit.py +++ b/demos/gtk-demo/demos/Icon View/iconviewedit.py @@ -65,7 +65,7 @@ class IconviewEditApp: self.window.show_all() - def set_cell_color (self, cell_layout, cell, tree_model, iter_, icon_view): + def set_cell_color(self, cell_layout, cell, tree_model, iter_, icon_view): # FIXME return single element instead of tuple text = tree_model.get(iter_, self.COL_TEXT)[0] @@ -82,7 +82,7 @@ class IconviewEditApp: cell.props.pixbuf = pixbuf - def edited (self, cell, path_string, text, icon_view): + def edited(self, cell, path_string, text, icon_view): model = icon_view.get_model() path = Gtk.TreePath(path_string) diff --git a/demos/gtk-demo/demos/Tree View/liststore.py b/demos/gtk-demo/demos/Tree View/liststore.py index d8f5d95f..474289a4 100644 --- a/demos/gtk-demo/demos/Tree View/liststore.py +++ b/demos/gtk-demo/demos/Tree View/liststore.py @@ -91,7 +91,7 @@ class ListStoreApp: self.window.show_all() self.window.connect('delete-event', self.window_closed) - self.timeout = GObject.timeout_add (80, self.spinner_timeout) + self.timeout = GObject.timeout_add(80, self.spinner_timeout) def window_closed(self, window, event): if self.timeout != 0: diff --git a/demos/gtk-demo/demos/dialogs.py b/demos/gtk-demo/demos/dialogs.py index 2b4f9fe9..7256ad0a 100644 --- a/demos/gtk-demo/demos/dialogs.py +++ b/demos/gtk-demo/demos/dialogs.py @@ -71,11 +71,11 @@ class DialogsApp: hbox.pack_start(table, False, False, 0) label = Gtk.Label.new_with_mnemonic("_Entry 1") - table.attach_defaults (label, 0, 1, 0, 1) + table.attach_defaults(label, 0, 1, 0, 1) self.entry1 = Gtk.Entry() table.attach_defaults(self.entry1, 1, 2, 0, 1) - label.set_mnemonic_widget (self.entry1) + label.set_mnemonic_widget(self.entry1) label = Gtk.Label.new_with_mnemonic("E_ntry 2") @@ -95,7 +95,7 @@ class DialogsApp: (Gtk.STOCK_OK, Gtk.ResponseType.OK, "_Non-stock Button", Gtk.ResponseType.CANCEL)) - content_area = dialog.get_content_area () + content_area = dialog.get_content_area() hbox = Gtk.HBox(spacing=8) hbox.set_border_width(8) content_area.pack_start(hbox, False, False, 0) @@ -117,10 +117,10 @@ class DialogsApp: label.set_mnemonic_widget(local_entry1) label = Gtk.Label.new_with_mnemonic("E_ntry 2") - table.attach_defaults (label, 0, 1, 1, 2) + table.attach_defaults(label, 0, 1, 1, 2) local_entry2 = Gtk.Entry() - local_entry2.set_text (self.entry2.get_text()) + local_entry2.set_text(self.entry2.get_text()) table.attach_defaults(local_entry2, 1, 2, 1, 2) label.set_mnemonic_widget(local_entry2) @@ -140,7 +140,7 @@ class DialogsApp: Gtk.MessageType.INFO, Gtk.ButtonsType.OK, "This message box has been popped up the following\nnumber of times:") - dialog.format_secondary_text ('%d' % self.dialog_counter) + dialog.format_secondary_text('%d' % self.dialog_counter) dialog.run() self.dialog_counter += 1 diff --git a/demos/gtk-demo/demos/pickers.py b/demos/gtk-demo/demos/pickers.py index 1abd626a..e5b6a53a 100644 --- a/demos/gtk-demo/demos/pickers.py +++ b/demos/gtk-demo/demos/pickers.py @@ -43,27 +43,27 @@ class PickersApp: label.set_alignment(0.0, 0.5) picker = Gtk.ColorButton() table.attach_defaults(label, 0, 1, 0, 1) - table.attach_defaults (picker, 1, 2, 0, 1) + table.attach_defaults(picker, 1, 2, 0, 1) label = Gtk.Label('Font:') label.set_alignment(0.0, 0.5) picker = Gtk.FontButton() table.attach_defaults(label, 0, 1, 1, 2) - table.attach_defaults (picker, 1, 2, 1, 2) + table.attach_defaults(picker, 1, 2, 1, 2) label = Gtk.Label('File:') label.set_alignment(0.0, 0.5) picker = Gtk.FileChooserButton.new('Pick a File', Gtk.FileChooserAction.OPEN) table.attach_defaults(label, 0, 1, 2, 3) - table.attach_defaults (picker, 1, 2, 2, 3) + table.attach_defaults(picker, 1, 2, 2, 3) label = Gtk.Label('Folder:') label.set_alignment(0.0, 0.5) picker = Gtk.FileChooserButton.new('Pick a Folder', Gtk.FileChooserAction.SELECT_FOLDER) table.attach_defaults(label, 0, 1, 3, 4) - table.attach_defaults (picker, 1, 2, 3, 4) + table.attach_defaults(picker, 1, 2, 3, 4) self.window.show_all() diff --git a/demos/gtk-demo/demos/pixbuf.py b/demos/gtk-demo/demos/pixbuf.py index 30a8094e..14d2ba34 100644 --- a/demos/gtk-demo/demos/pixbuf.py +++ b/demos/gtk-demo/demos/pixbuf.py @@ -127,8 +127,8 @@ class PixbufApp: r = radius + (radius / 3.0) * math.sin(f * 2.0 * math.pi) - xpos = math.floor (xmid + r * math.cos(ang) - iw / 2.0 + 0.5) - ypos = math.floor (ymid + r * math.sin(ang) - ih / 2.0 + 0.5) + xpos = math.floor(xmid + r * math.cos(ang) - iw / 2.0 + 0.5) + ypos = math.floor(ymid + r * math.sin(ang) - ih / 2.0 + 0.5) if i & 1: k = math.sin(f * 2.0 * math.pi) diff --git a/demos/gtk-demo/demos/printing.py b/demos/gtk-demo/demos/printing.py index 1702a95b..5c27e066 100644 --- a/demos/gtk-demo/demos/printing.py +++ b/demos/gtk-demo/demos/printing.py @@ -131,8 +131,8 @@ class PrintingApp: layout.set_ellipsize(Pango.EllipsizeMode.START) (text_width, text_height) = layout.get_pixel_size() - cr.move_to ((width - text_width) / 2, - (self.HEADER_HEIGHT - text_height) / 2) + cr.move_to((width - text_width) / 2, + (self.HEADER_HEIGHT - text_height) / 2) PangoCairo.show_layout(cr, layout) page_str = "%d/%d" % (page_num + 1, print_data['num_pages']) @@ -150,7 +150,7 @@ class PrintingApp: desc.set_size(print_data['font_size'] * Pango.SCALE) layout.set_font_description(desc) - cr.move_to (0, self.HEADER_HEIGHT + self.HEADER_GAP) + cr.move_to(0, self.HEADER_HEIGHT + self.HEADER_GAP) lines_pp = int(print_data['lines_per_page']) num_lines = print_data['num_lines'] data_lines = print_data['lines'] @@ -163,7 +163,7 @@ class PrintingApp: layout.set_text(data_lines[line], -1) PangoCairo.show_layout(cr, layout) - cr.rel_move_to (0, font_size) + cr.rel_move_to(0, font_size) line += 1 def end_print(self, operation, print_ctx, print_data): diff --git a/demos/gtk-demo/demos/rotatedtext.py b/demos/gtk-demo/demos/rotatedtext.py index e2a406d4..76b15841 100644 --- a/demos/gtk-demo/demos/rotatedtext.py +++ b/demos/gtk-demo/demos/rotatedtext.py @@ -139,7 +139,7 @@ class RotatedTextApp: ''' return attrs - def rotated_text_draw (self, da, cairo_ctx): + def rotated_text_draw(self, da, cairo_ctx): # Create a cairo context and set up a transformation matrix so that the user # space coordinates for the centered square where we draw are [-RADIUS, RADIUS], # [-RADIUS, RADIUS]. diff --git a/demos/gtk-demo/gtk-demo.py b/demos/gtk-demo/gtk-demo.py index bd0e44ae..031b9647 100755 --- a/demos/gtk-demo/gtk-demo.py +++ b/demos/gtk-demo/gtk-demo.py @@ -136,7 +136,7 @@ class GtkDemoWindow(Gtk.Window): super(GtkDemoWindow, self).__init__(type=Gtk.WindowType.TOPLEVEL) self.set_title('PyGI GTK+ Code Demos') - self.set_default_size (600, 400) + self.set_default_size(600, 400) self.setup_default_icon() hbox = Gtk.HBox(homogeneous=False, spacing=0) @@ -198,7 +198,7 @@ class GtkDemoWindow(Gtk.Window): raise IOError('Cannot find demo data file "%s"' % base) def setup_default_icon(self): - filename = self.find_file ('gtk-logo-rgb.gif') + filename = self.find_file('gtk-logo-rgb.gif') pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename) transparent = pixbuf.add_alpha(True, 0xff, 0xff, 0xff) list = [] |