summaryrefslogtreecommitdiff
path: root/GstDebugViewer
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2009-03-14 23:02:45 +0200
committerRené Stadler <mail@renestadler.de>2009-03-14 23:02:45 +0200
commit4f9631709d0e094cf83d76e70da25c399707d4de (patch)
tree8e0d9375f296765b991ca67ba6b070a7d9501fa0 /GstDebugViewer
parent749761d6dd72918f2d28107d075a9de6700f08fc (diff)
Cleanup whitespace
Diffstat (limited to 'GstDebugViewer')
-rw-r--r--GstDebugViewer/Common/GUI.py26
-rw-r--r--GstDebugViewer/Common/Main.py12
-rw-r--r--GstDebugViewer/Common/utils.py2
-rw-r--r--GstDebugViewer/Data.py2
-rw-r--r--GstDebugViewer/GUI.py20
-rw-r--r--GstDebugViewer/Plugins/FindBar.py4
-rw-r--r--GstDebugViewer/Plugins/Timeline.py12
7 files changed, 39 insertions, 39 deletions
diff --git a/GstDebugViewer/Common/GUI.py b/GstDebugViewer/Common/GUI.py
index 925f9d1..452c4c0 100644
--- a/GstDebugViewer/Common/GUI.py
+++ b/GstDebugViewer/Common/GUI.py
@@ -164,11 +164,11 @@ class MetaModel (gobject.GObjectMeta):
...
Example: A gtk.ListStore derived model can use
-
+
columns = ("COL_NAME", str, "COL_VALUE", str)
-
+
and use this in __init__:
-
+
gtk.ListStore.__init__ (self, *self.column_types)
Then insert data like this:
@@ -177,20 +177,20 @@ class MetaModel (gobject.GObjectMeta):
self.COL_NAME, "spam",
self.COL_VALUE, "ham")
"""
-
+
def __init__ (cls, name, bases, dict):
-
+
super (MetaModel, cls).__init__ (name, bases, dict)
-
+
spec = tuple (cls.columns)
-
+
column_names = spec[::2]
column_types = spec[1::2]
column_indices = range (len (column_names))
-
+
for col_index, col_name, in zip (column_indices, column_names):
setattr (cls, col_name, col_index)
-
+
cls.column_types = column_types
cls.column_ids = tuple (column_indices)
@@ -342,7 +342,7 @@ class StateItem (StateString):
return None
return self.parse_item (value)
-
+
def set (self, section, value):
if value is None:
@@ -359,7 +359,7 @@ class StateItem (StateString):
try:
return self.manager.find_item_class (name = name)
except KeyError:
- return None
+ return None
class StateItemList (StateItem):
@@ -471,7 +471,7 @@ class WindowState (object):
self.window = window
self.state = state
-
+
self.window.connect ("window-state-event",
self.handle_window_state_event)
@@ -501,7 +501,7 @@ class WindowState (object):
if not event.changed_mask & gtk.gdk.WINDOW_STATE_MAXIMIZED:
return
-
+
if event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED:
self.logger.debug ("maximized")
self.is_maximized = True
diff --git a/GstDebugViewer/Common/Main.py b/GstDebugViewer/Common/Main.py
index 63071ec..4fad0ee 100644
--- a/GstDebugViewer/Common/Main.py
+++ b/GstDebugViewer/Common/Main.py
@@ -107,7 +107,7 @@ class MainLoopWrapper (ExceptionHandler):
self.enter ()
finally:
ExceptHookManager.unregister_handler (self)
-
+
if self.exc_info != (None,) * 3:
# Re-raise unhandled exception that occured while running the loop.
exc_type, exc_value, exc_tb = self.exc_info
@@ -199,7 +199,7 @@ class ExceptHookManagerClass (object):
for handler in sorted (self.handlers,
key = attrgetter ("priority"),
reverse = True):
-
+
if handler._handling_exception:
continue
@@ -253,7 +253,7 @@ class PathsBase (object):
if cls.data_dir is None:
source_dir = os.path.dirname (os.path.dirname (os.path.abspath (__file__)))
cls.setup_uninstalled (source_dir)
-
+
def __new__ (cls):
raise RuntimeError ("do not create instances of this class -- "
@@ -319,7 +319,7 @@ class OptionParser (object):
if not description:
description = ""
-
+
if arg_name is None:
flags |= gobject.OPTION_FLAG_NO_ARG
elif arg_parser is not None:
@@ -360,7 +360,7 @@ class OptionParser (object):
group = gobject.OptionGroup (None, None, None, self.__handle_option)
context.set_main_group (group)
group.add_entries (self.__entries)
-
+
try:
result_argv = context.parse (argv)
except gobject.GError, exc:
@@ -377,7 +377,7 @@ class OptionParser (object):
def handle_parse_complete (self, remaining_args):
pass
-
+
class LogOptionParser (OptionParser):
"""Like OptionParser, but adds a --log-level option."""
diff --git a/GstDebugViewer/Common/utils.py b/GstDebugViewer/Common/utils.py
index 55dd54a..c7466e7 100644
--- a/GstDebugViewer/Common/utils.py
+++ b/GstDebugViewer/Common/utils.py
@@ -321,4 +321,4 @@ class DevhelpClient (object):
except OSError, exc:
self._check_os_error (exc)
raise
-
+
diff --git a/GstDebugViewer/Data.py b/GstDebugViewer/Data.py
index 81dae08..c3e6c98 100644
--- a/GstDebugViewer/Data.py
+++ b/GstDebugViewer/Data.py
@@ -145,7 +145,7 @@ def default_log_line_regex_ ():
return expressions
def default_log_line_regex ():
-
+
expressions = default_log_line_regex_ ()
return re.compile ("".join (expressions))
diff --git a/GstDebugViewer/GUI.py b/GstDebugViewer/GUI.py
index 3973c64..6468ff0 100644
--- a/GstDebugViewer/GUI.py
+++ b/GstDebugViewer/GUI.py
@@ -180,7 +180,7 @@ class LogModelBase (gtk.GenericTreeModel):
columns = ("COL_TIME", gobject.TYPE_UINT64,
"COL_PID", int,
"COL_THREAD", gobject.TYPE_UINT64,
- "COL_LEVEL", object,
+ "COL_LEVEL", object,
"COL_CATEGORY", str,
"COL_FILENAME", str,
"COL_LINE_NUMBER", int,
@@ -226,7 +226,7 @@ class LogModelBase (gtk.GenericTreeModel):
return flags
def on_get_n_columns (self):
-
+
return len (self.column_types)
def on_get_column_type (self, col_id):
@@ -369,7 +369,7 @@ class FilteredLogModelBase (LogModelBase):
self.super_model = super_model
self.access_offset = super_model.access_offset
self.ensure_cached = super_model.ensure_cached
- self.line_cache = super_model.line_cache
+ self.line_cache = super_model.line_cache
def line_index_to_super (self, line_index):
@@ -382,7 +382,7 @@ class FilteredLogModelBase (LogModelBase):
def line_index_to_top (self, line_index):
_log_indices = [line_index]
-
+
super_index = line_index
for model in self._iter_hierarchy ():
super_index = model.line_index_to_super (super_index)
@@ -1249,7 +1249,7 @@ class ColumnManager (Common.GUI.Manager):
col_class = self.find_item_class (name = column.name)
new_order.append (col_class)
new_order.extend (self.__iter_next_hidden (col_class))
-
+
names = (column.name for column in new_visible)
self.logger.debug ("visible columns reordered: %s",
", ".join (names))
@@ -1643,7 +1643,7 @@ class Window (object):
self.ui_factory = Common.GUI.UIFactory (ui_filename, self.actions)
self.ui_manager = ui = self.ui_factory.make ()
- menubar = ui.get_widget ("/ui/menubar")
+ menubar = ui.get_widget ("/ui/menubar")
self.widgets.vbox_main.pack_start (menubar, False, False, 0)
self.gtk_window = self.widgets.main_window
@@ -1762,7 +1762,7 @@ class Window (object):
model = self.log_view.props.model
if model is None:
return
-
+
try:
line_index = self.get_active_line_index ()
except ValueError:
@@ -1801,7 +1801,7 @@ class Window (object):
selected_index = self.default_index
start_index = self.default_start_index
-
+
if selected_index is not None:
try:
@@ -2088,7 +2088,7 @@ class Window (object):
try:
self.setup_model (LazyLogModel ())
-
+
self.dispatcher = Common.Data.GSourceDispatcher ()
self.log_file = Data.LogFile (filename, self.dispatcher)
except EnvironmentError, exc:
@@ -2186,7 +2186,7 @@ class AppStateSection (Common.GUI.StateSection):
maximized = Common.GUI.StateBool ("window-maximized")
column_order = Common.GUI.StateItemList ("column-order", ViewColumnManager)
- columns_visible = Common.GUI.StateItemList ("columns-visible", ViewColumnManager)
+ columns_visible = Common.GUI.StateItemList ("columns-visible", ViewColumnManager)
class AppState (Common.GUI.State):
diff --git a/GstDebugViewer/Plugins/FindBar.py b/GstDebugViewer/Plugins/FindBar.py
index 3c61e03..69ec945 100644
--- a/GstDebugViewer/Plugins/FindBar.py
+++ b/GstDebugViewer/Plugins/FindBar.py
@@ -38,7 +38,7 @@ class SearchOperation (object):
col_id = GUI.LogModelBase.COL_MESSAGE
len_search_text = len (search_text)
-
+
def match_func (model_row):
message = model_row[col_id]
@@ -247,7 +247,7 @@ class FindBarFeature (FeatureBase):
ui.insert_action_group (self.action_group, 0)
self.log_view = window.log_view
-
+
self.merge_id = ui.new_merge_id ()
for name, action_name in [("ViewFindBar", "show-find-bar",),
("ViewNextResult", "goto-next-search-result",),
diff --git a/GstDebugViewer/Plugins/Timeline.py b/GstDebugViewer/Plugins/Timeline.py
index 1ba7813..1d11614 100644
--- a/GstDebugViewer/Plugins/Timeline.py
+++ b/GstDebugViewer/Plugins/Timeline.py
@@ -587,7 +587,7 @@ class TimelineWidget (gtk.DrawingArea):
ctx.move_to (-size // 2, 0)
ctx.line_to ((size + 1) // 2, 0)
ctx.line_to (0, size / 1.41)
- ctx.close_path ()
+ ctx.close_path ()
for level in (Data.debug_level_warning, Data.debug_level_error,):
ctx.set_source_rgb (*(colors[level][1].float_tuple ()))
@@ -612,7 +612,7 @@ class TimelineWidget (gtk.DrawingArea):
ctx.line_to (i, h)
ctx.close_path ()
-
+
ctx.fill ()
def __have_position (self):
@@ -713,7 +713,7 @@ class AttachedWindow (object):
"hide-after-line", gtk.UI_MANAGER_MENUITEM, False)
ui.add_ui (self.merge_id, "/TimelineContextMenu", "TimelineShowHiddenLines",
"show-hidden-lines", gtk.UI_MANAGER_MENUITEM, False)
-
+
box = window.get_top_attach_point ()
self.timeline = TimelineWidget ()
@@ -771,7 +771,7 @@ class AttachedWindow (object):
self.timeline.clear ()
self.vtimeline.clear ()
return
-
+
self.timeline.update (model)
# Need to dispatch these idly with a low priority to avoid triggering a
@@ -805,7 +805,7 @@ class AttachedWindow (object):
model.COL_TIME)
ts2 = model.get_value (model.get_iter (end_path),
model.COL_TIME)
-
+
self.timeline.update_position (ts1, ts2)
def handle_show_action_toggled (self, action):
@@ -876,7 +876,7 @@ class AttachedWindow (object):
view.scroll_to_cell (path, use_align = True, row_align = .5)
sel = view.get_selection ()
sel.select_path (path)
-
+
return False
class TimelineFeature (FeatureBase):