gnome-specimen r205 - in trunk-from-bzr: . specimen
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r205 - in trunk-from-bzr: . specimen
- Date: Tue, 17 Jun 2008 18:44:55 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:44:55 2008
New Revision: 205
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=205&view=rev
Log:
Fix a few more obvious pylint suggestions
Modified:
trunk-from-bzr/ (props changed)
trunk-from-bzr/specimen/main.py
trunk-from-bzr/specimen/specimenwindow.py
Modified: trunk-from-bzr/specimen/main.py
==============================================================================
--- trunk-from-bzr/specimen/main.py (original)
+++ trunk-from-bzr/specimen/main.py Tue Jun 17 18:44:55 2008
@@ -17,8 +17,8 @@
import sys
-def exit_with_error(msg, e):
- sys.stderr.write('Error: %s (%s)\n' % (msg, str(e)))
+def exit_with_error(msg, err):
+ sys.stderr.write('Error: %s (%s)\n' % (msg, str(err)))
sys.exit(1)
def main(args):
@@ -31,22 +31,22 @@
import pygtk; pygtk.require('2.0')
import gtk
except (ImportError, AssertionError), e:
- exit_with_error('Importing pygtk and gtk modules failed', e)
+ exit_with_error('Importing pygtk and gtk modules failed', err)
try:
import gtk.glade
except ImportError, e:
- exit_with_error('Importing gtk.glade module failed', e)
+ exit_with_error('Importing gtk.glade module failed', err)
try:
import gnome
except ImportError, e:
- exit_with_error('Importing gnome module failed', e)
+ exit_with_error('Importing gnome module failed', err)
try:
import gconf
except ImportError, e:
- exit_with_error('Importing gconf module failed', e)
+ exit_with_error('Importing gconf module failed', err)
import specimen.config as config
Modified: trunk-from-bzr/specimen/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimen/specimenwindow.py (original)
+++ trunk-from-bzr/specimen/specimenwindow.py Tue Jun 17 18:44:55 2008
@@ -236,7 +236,8 @@
name2 = model.get_value(iter2, 0)
# name2 can be None in some cases
- if name2 is None: return -1
+ if name2 is None:
+ return -1
# Always ignore case when sorting
name1 = name1.lower()
@@ -301,14 +302,16 @@
# set row visibility; temporarily unlink model for speed
model = self.fonts_treeview.get_model()
self.fonts_treeview.set_model(None)
- for row in self.fonts_treestore: row[3] = filter in row[0].lower()
+ for row in self.fonts_treestore:
+ row[3] = filter in row[0].lower()
self.fonts_treeview.set_model(model)
def remove_find_filter(self):
# set all rows to visible; temporarily unlink model for speed
model = self.fonts_treeview.get_model()
self.fonts_treeview.set_model(None)
- for row in self.fonts_treestore: row[3] = True
+ for row in self.fonts_treestore:
+ row[3] = True
self.fonts_treeview.set_model(model)
def on_find_entry_changed(self, entry, data=None):
@@ -566,7 +569,7 @@
def on_fonts_treeview_row_activated(self, treeview, path, viewcolumn, *user_data):
self.add_preview_from_path(path)
- def on_fonts_treeview_row_collapsed(self, treeview, iter, path, *user_data):
+ def on_fonts_treeview_row_collapsed(self, treeview, treeiter, path, *user_data):
model, selected_rows = self.fonts_treeview_selection.get_selected_rows()
if not selected_rows:
# The treeview selection pointed to a child row that has now become
@@ -768,8 +771,10 @@
def on_remove_button_clicked(self, widget, data=None):
'Callback for the Remove button'
self.delete_selected()
- if self.num_previews(): self.previews_treeview.grab_focus()
- else: self.fonts_treeview.grab_focus()
+ if self.num_previews():
+ self.previews_treeview.grab_focus()
+ else:
+ self.fonts_treeview.grab_focus()
def on_clear_button_clicked(self, widget, data=None):
'Callback for the Clear button'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]