[SCM] jack-mixer packaging branch, master, updated. upstream/8-14-g15c3a6f

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Wed Dec 16 22:47:48 UTC 2009


The following commit has been merged in the master branch:
commit f9404a4c1f1daa0951411e20698884b7bb2376cb
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Wed Dec 16 23:42:37 2009 +0100

    Manually repair merge differences between upstream and master.

diff --git a/NEWS b/NEWS
index c3fb536..30a16ff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,13 @@
 =========
+Version 8
+=========
+
+ * Fix private modules lookup
+ * Fix rotation of output channel colours
+ * New menu items to remove output channels
+ * New command line parameter to not connect to LASH
+
+=========
 Version 7
 =========
 
diff --git a/abspeak.py b/abspeak.py
index 1b65c95..af76bf2 100644
--- a/abspeak.py
+++ b/abspeak.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -22,7 +20,7 @@ import fpconst
 import pango
 import gobject
 
-class widget(gtk.EventBox):
+class AbspeakWidget(gtk.EventBox):
     def __init__(self):
         gtk.EventBox.__init__(self)
         self.label = gtk.Label()
@@ -58,5 +56,7 @@ class widget(gtk.EventBox):
 
             self.label.set_text(text)
 
-gobject.signal_new("reset", widget, gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [])
-gobject.signal_new("volume-adjust", widget, gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_FLOAT])
+gobject.signal_new("reset", AbspeakWidget,
+                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [])
+gobject.signal_new("volume-adjust", AbspeakWidget,
+                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_FLOAT])
diff --git a/aclocal.m4 b/aclocal.m4
index bddefdc..ea86b23 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1313,6 +1313,13 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([m4/jack.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/python.m4])
 dnl AM_GCONF_SOURCE_2
 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
 dnl  (i.e. pass to gconftool-2
@@ -1358,10 +1365,3 @@ AC_DEFUN([AM_GCONF_SOURCE_2],
   AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
 ])
 
-m4_include([m4/jack.m4])
-m4_include([m4/libtool.m4])
-m4_include([m4/ltoptions.m4])
-m4_include([m4/ltsugar.m4])
-m4_include([m4/ltversion.m4])
-m4_include([m4/lt~obsolete.m4])
-m4_include([m4/python.m4])
diff --git a/channel.py b/channel.py
index 4fb555b..d4d78cf 100644
--- a/channel.py
+++ b/channel.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -23,7 +21,7 @@ import glib
 import slider
 import meter
 import abspeak
-from serialization import serialized_object
+from serialization import SerializedObject
 
 try:
     import phat
@@ -31,8 +29,9 @@ except:
     phat = None
 
 
-class channel(gtk.VBox, serialized_object):
-    '''Widget with slider and meter used as base class for more specific channel widgets'''
+class Channel(gtk.VBox, SerializedObject):
+    '''Widget with slider and meter used as base class for more specific
+       channel widgets'''
     monitor_button = None
 
     def __init__(self, app, name, stereo):
@@ -44,7 +43,7 @@ class channel(gtk.VBox, serialized_object):
         self.stereo = stereo
         self.meter_scale = self.gui_factory.get_default_meter_scale()
         self.slider_scale = self.gui_factory.get_default_slider_scale()
-        self.slider_adjustment = slider.adjustment_dBFS(self.slider_scale, 0.0)
+        self.slider_adjustment = slider.AdjustmentdBFS(self.slider_scale, 0.0)
         self.balance_adjustment = gtk.Adjustment(0.0, -1.0, 1.0, 0.02)
         self.future_volume_midi_cc = None
         self.future_balance_midi_cc = None
@@ -73,9 +72,9 @@ class channel(gtk.VBox, serialized_object):
         self.create_slider_widget()
 
         if self.stereo:
-            self.meter = meter.stereo(self.meter_scale)
+            self.meter = meter.StereoMeterWidget(self.meter_scale)
         else:
-            self.meter = meter.mono(self.meter_scale)
+            self.meter = meter.MonoMeterWidget(self.meter_scale)
         self.on_vumeter_color_changed(self.gui_factory)
 
         self.meter.set_events(gtk.gdk.SCROLL_MASK)
@@ -86,7 +85,7 @@ class channel(gtk.VBox, serialized_object):
         self.gui_factory.connect('vumeter-color-scheme-changed', self.on_vumeter_color_changed)
         self.gui_factory.connect('use-custom-widgets-changed', self.on_custom_widgets_changed)
 
-        self.abspeak = abspeak.widget()
+        self.abspeak = abspeak.AbspeakWidget()
         self.abspeak.connect("reset", self.on_abspeak_reset)
         self.abspeak.connect("volume-adjust", self.on_abspeak_adjust)
 
@@ -136,7 +135,7 @@ class channel(gtk.VBox, serialized_object):
         #print "Default slider scale change detected."
         self.slider_scale = scale
         self.slider_adjustment.set_scale(scale)
-        self.channel.set_midi_scale(self.slider_scale.scale)
+        self.channel.midi_scale = self.slider_scale.scale
 
     def on_vumeter_color_changed(self, gui_factory, *args):
         color = gui_factory.get_vumeter_color()
@@ -180,6 +179,8 @@ class channel(gtk.VBox, serialized_object):
         self.update_volume(False)
 
     def read_meter(self):
+        if not self.channel:
+            return
         if self.stereo:
             meter_left, meter_right = self.channel.meter
             self.meter.set_values(meter_left, meter_right)
@@ -278,19 +279,21 @@ class channel(gtk.VBox, serialized_object):
             self.app.set_monitored_channel(self)
         self.monitor_button.set_active(True)
 
-gobject.signal_new('midi-event-received', channel,
+gobject.signal_new('midi-event-received', Channel,
                 gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                 gobject.TYPE_NONE, ())
 
-class input_channel(channel):
+class InputChannel(Channel):
+    post_fader_output_channel = None
+
     def __init__(self, app, name, stereo):
-        channel.__init__(self, app, name, stereo)
+        Channel.__init__(self, app, name, stereo)
 
     def realize(self):
         self.channel = self.mixer.add_channel(self.channel_name, self.stereo)
         if self.channel == None:
             raise Exception,"Cannot create a channel"
-        channel.realize(self)
+        Channel.realize(self)
         if self.future_volume_midi_cc:
             self.channel.volume_midi_cc = self.future_volume_midi_cc
         if self.future_balance_midi_cc:
@@ -370,6 +373,10 @@ class input_channel(channel):
         self.vbox.pack_start(control_group, False)
         return control_group
 
+    def remove_control_group(self, channel):
+        ctlgroup = self.get_control_group(channel)
+        self.vbox.remove(ctlgroup)
+
     def update_control_group(self, channel):
         for control_group in self.vbox.get_children():
             if isinstance(control_group, ControlGroup):
@@ -384,9 +391,12 @@ class input_channel(channel):
         return None
 
     def unrealize(self):
-        channel.unrealize(self)
+        Channel.unrealize(self)
+        if self.post_fader_output_channel:
+            self.post_fader_output_channel.remove()
+            self.post_fader_output_channel = None
         self.channel.remove()
-        self.channel = False
+        self.channel = None
 
     channel_properties_dialog = None
     def on_channel_properties(self):
@@ -454,8 +464,9 @@ class input_channel(channel):
             return True
         return False
 
-    def serialization_name(self):
-        return input_channel_serialization_name()
+    @classmethod
+    def serialization_name(cls):
+        return 'input_channel'
 
     def serialize(self, object_backend):
         object_backend.add_property("name", self.channel_name)
@@ -463,7 +474,7 @@ class input_channel(channel):
             object_backend.add_property("type", "stereo")
         else:
             object_backend.add_property("type", "mono")
-        channel.serialize(self, object_backend)
+        Channel.serialize(self, object_backend)
 
     def unserialize_property(self, name, value):
         if name == "name":
@@ -476,10 +487,7 @@ class input_channel(channel):
             if value == "mono":
                 self.stereo = False
                 return True
-        return channel.unserialize_property(self, name, value)
-
-def input_channel_serialization_name():
-    return "input_channel"
+        return Channel.unserialize_property(self, name, value)
 
 
 available_colours = [
@@ -492,7 +500,7 @@ available_colours = [
     ('#e9b96e', '#c17d11', '#6f4902'),
 ]
 
-class output_channel(channel):
+class OutputChannel(Channel):
     colours = available_colours[:]
     _display_solo_buttons = False
 
@@ -500,7 +508,7 @@ class output_channel(channel):
     _init_solo_channels = None
 
     def __init__(self, app, name, stereo):
-        channel.__init__(self, app, name, stereo)
+        Channel.__init__(self, app, name, stereo)
 
     def get_display_solo_buttons(self):
         return self._display_solo_buttons
@@ -514,11 +522,11 @@ class output_channel(channel):
     display_solo_buttons = property(get_display_solo_buttons, set_display_solo_buttons)
 
     def realize(self):
-        channel.realize(self)
+        Channel.realize(self)
         self.channel = self.mixer.add_output_channel(self.channel_name, self.stereo)
         if self.channel == None:
             raise Exception,"Cannot create a channel"
-        channel.realize(self)
+        Channel.realize(self)
 
         self.channel.midi_scale = self.slider_scale.scale
         self.channel.midi_change_callback = self.midi_change_callback
@@ -536,7 +544,7 @@ class output_channel(channel):
         self.label_name_event_box.connect('button-press-event', self.on_label_mouse)
         self.label_name_event_box.add(self.label_name)
         if not self.colours:
-            self.colours = available_colours[:]
+            OutputChannel.colours = available_colours[:]
         for color in self.colours:
             self.color_tuple = [gtk.gdk.color_parse(color[x]) for x in range(3)]
             self.colours.remove(color)
@@ -593,11 +601,17 @@ class output_channel(channel):
                 self.on_channel_properties()
 
     def unrealize(self):
-        channel.unrealize(self)
-        self.channel = False
+        # remove control groups from input channels
+        for input_channel in self.app.channels:
+            input_channel.remove_control_group(self)
+        # then remove itself
+        Channel.unrealize(self)
+        self.channel.remove()
+        self.channel = None
 
-    def serialization_name(self):
-        return output_channel_serialization_name()
+    @classmethod
+    def serialization_name(cls):
+        return 'output_channel'
 
     def serialize(self, object_backend):
         object_backend.add_property("name", self.channel_name)
@@ -618,7 +632,7 @@ class output_channel(channel):
             object_backend.add_property('muted_channels', '|'.join([x.channel.name for x in muted_channels]))
         if solo_channels:
             object_backend.add_property('solo_channels', '|'.join([x.channel.name for x in solo_channels]))
-        channel.serialize(self, object_backend)
+        Channel.serialize(self, object_backend)
 
     def unserialize_property(self, name, value):
         if name == "name":
@@ -641,20 +655,17 @@ class output_channel(channel):
         if name == 'solo_channels':
             self._init_solo_channels = value.split('|')
             return True
-        return channel.unserialize_property(self, name, value)
+        return Channel.unserialize_property(self, name, value)
 
-def output_channel_serialization_name():
-    return "output_channel"
-
-class main_mix(channel):
+class MainMixChannel(Channel):
     _init_muted_channels = None
     _init_solo_channels = None
 
     def __init__(self, app):
-        channel.__init__(self, app, "MAIN", True)
+        Channel.__init__(self, app, "MAIN", True)
 
     def realize(self):
-        channel.realize(self)
+        Channel.realize(self)
         self.channel = self.mixer.main_mix_channel
         self.channel.midi_scale = self.slider_scale.scale
         self.channel.midi_change_callback = self.midi_change_callback
@@ -704,11 +715,12 @@ class main_mix(channel):
         self._init_solo_channels = None
 
     def unrealize(self):
-        channel.unrealize(self)
+        Channel.unrealize(self)
         self.channel = False
 
-    def serialization_name(self):
-        return main_mix_serialization_name()
+    @classmethod
+    def serialization_name(cls):
+        return 'main_mix_channel'
 
     def serialize(self, object_backend):
         muted_channels = []
@@ -722,7 +734,7 @@ class main_mix(channel):
             object_backend.add_property('muted_channels', '|'.join([x.channel.name for x in muted_channels]))
         if solo_channels:
             object_backend.add_property('solo_channels', '|'.join([x.channel.name for x in solo_channels]))
-        channel.serialize(self, object_backend)
+        Channel.serialize(self, object_backend)
 
     def unserialize_property(self, name, value):
         if name == 'muted_channels':
@@ -731,10 +743,7 @@ class main_mix(channel):
         if name == 'solo_channels':
             self._init_solo_channels = value.split('|')
             return True
-        return channel.unserialize_property(self, name, value)
-
-def main_mix_serialization_name():
-    return "main_mix_channel"
+        return Channel.unserialize_property(self, name, value)
 
 
 class ChannelPropertiesDialog(gtk.Dialog):
@@ -1000,3 +1009,4 @@ class ControlGroup(gtk.Alignment):
     def on_solo_toggled(self, button):
         self.output_channel.channel.set_solo(self.input_channel.channel, button.get_active())
         self.app.update_monitor(self)
+
diff --git a/configure b/configure
index 10fccb0..70aa995 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for jack_mixer 7.
+# Generated by GNU Autoconf 2.65 for jack_mixer 8.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -698,8 +698,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='jack_mixer'
 PACKAGE_TARNAME='jack_mixer'
-PACKAGE_VERSION='7'
-PACKAGE_STRING='jack_mixer 7'
+PACKAGE_VERSION='8'
+PACKAGE_STRING='jack_mixer 8'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1449,7 +1449,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures jack_mixer 7 to adapt to many kinds of systems.
+\`configure' configures jack_mixer 8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1519,7 +1519,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of jack_mixer 7:";;
+     short | recursive ) echo "Configuration of jack_mixer 8:";;
    esac
   cat <<\_ACEOF
 
@@ -1640,7 +1640,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-jack_mixer configure 7
+jack_mixer configure 8
 generated by GNU Autoconf 2.65
 
 Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1918,7 +1918,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by jack_mixer $as_me 7, which was
+It was created by jack_mixer $as_me 8, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   $ $0 $@
@@ -2727,7 +2727,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='jack_mixer'
- VERSION='7'
+ VERSION='8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -11853,7 +11853,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by jack_mixer $as_me 7, which was
+This file was extended by jack_mixer $as_me 8, which was
 generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11919,7 +11919,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-jack_mixer config.status 7
+jack_mixer config.status 8
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index a7277e3..49585bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 #
 
 AC_PREREQ(2.61)
-AC_INIT(jack_mixer, 7)
+AC_INIT(jack_mixer, 8)
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE
diff --git a/gui.py b/gui.py
index e4d6487..ee82920 100644
--- a/gui.py
+++ b/gui.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -31,7 +29,7 @@ def lookup_scale(scales, scale_id):
             return scale
     return None
 
-class factory(gobject.GObject):
+class Factory(gobject.GObject):
     def __init__(self, topwindow, meter_scales, slider_scales):
         gobject.GObject.__init__(self)
         self.topwindow = topwindow
@@ -157,14 +155,18 @@ class factory(gobject.GObject):
     def get_use_custom_widgets(self):
         return self.use_custom_widgets
 
-gobject.signal_new("default-meter-scale-changed", factory, gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
-gobject.signal_new("default-slider-scale-changed", factory, gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
-gobject.signal_new('vumeter-color-changed', factory,
+gobject.signal_new("default-meter-scale-changed", Factory,
+                gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
+                gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
+gobject.signal_new("default-slider-scale-changed", Factory,
+                gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
+                gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT])
+gobject.signal_new('vumeter-color-changed', Factory,
                 gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                 gobject.TYPE_NONE, [str])
-gobject.signal_new('vumeter-color-scheme-changed', factory,
+gobject.signal_new('vumeter-color-scheme-changed', Factory,
                 gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                 gobject.TYPE_NONE, [str])
-gobject.signal_new('use-custom-widgets-changed', factory,
+gobject.signal_new('use-custom-widgets-changed', Factory,
                 gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION,
                 gobject.TYPE_NONE, [bool])
diff --git a/jack_mixer.c b/jack_mixer.c
index c9bb4c1..49c0b24 100644
--- a/jack_mixer.c
+++ b/jack_mixer.c
@@ -83,8 +83,6 @@ struct channel
   void *midi_change_callback_data;
 
   jack_mixer_scale_t midi_scale;
-
-  jack_mixer_output_channel_t output;
 };
 
 struct output_channel {
@@ -393,7 +391,6 @@ remove_channel(
     assert(channel_ptr->mixer_ptr->midi_cc_map[channel_ptr->midi_cc_balance_index] == channel_ptr);
     channel_ptr->mixer_ptr->midi_cc_map[channel_ptr->midi_cc_balance_index] = NULL;
   }
-  remove_output_channel(channel_ptr->output);
 
   free(channel_ptr);
 }
@@ -1075,7 +1072,6 @@ add_channel(
   struct channel * channel_ptr;
   char * port_name;
   size_t channel_name_size;
-  char * output_channel_name;
 
   channel_ptr = malloc(sizeof(struct channel));
   if (channel_ptr == NULL)
@@ -1152,12 +1148,6 @@ add_channel(
 
   calc_channel_volumes(channel_ptr);
 
-  // for monitoring etc.
-  output_channel_name = malloc(channel_name_size + 5);
-  sprintf(output_channel_name, "%s Out", channel_name);
-  channel_ptr->output = add_output_channel(mixer, output_channel_name, stereo, true);
-  free(output_channel_name);
-
   channel_ptr->mixer_ptr->input_channels_list = g_slist_prepend(
                   channel_ptr->mixer_ptr->input_channels_list, channel_ptr);
 
diff --git a/jack_mixer.py b/jack_mixer.py
index 26e005d..2cf5964 100755
--- a/jack_mixer.py
+++ b/jack_mixer.py
@@ -26,35 +26,37 @@ import gobject
 import sys
 import os
 
-import jack_mixer_c
-import scale
-
 try:
     import lash
 except:
     lash = None
+    print >> sys.stderr, "Cannot load LASH python bindings, you want them unless you enjoy manual jack plumbing each time you use this app"
 
+# temporary change Python modules lookup path to look into installation
+# directory ($prefix/share/jack_mixer/)
 old_path = sys.path
-sys.path.insert(0, os.path.dirname(sys.argv[0]) + os.sep + ".." + os.sep + "share"+ os.sep + "jack_mixer")
+sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), '..', 'share', 'jack_mixer'))
+
+import jack_mixer_c
+import scale
 from channel import *
+
 import gui
 from preferences import PreferencesDialog
 
-sys.path = old_path
+from serialization_xml import XmlSerialization
+from serialization import SerializedObject, Serializator
 
-from serialization_xml import xml_serialization
-from serialization import serialized_object, serializator
-
-if lash is None:
-    print >> sys.stderr, "Cannot load LASH python bindings, you want them unless you enjoy manual jack plumbing each time you use this app"
+# restore Python modules lookup path
+sys.path = old_path
 
-class jack_mixer(serialized_object):
+class JackMixer(SerializedObject):
 
     # scales suitable as meter scales
-    meter_scales = [scale.iec_268(), scale.linear_70dB(), scale.iec_268_minimalistic()]
+    meter_scales = [scale.IEC268(), scale.Linear70dB(), scale.IEC268Minimalistic()]
 
     # scales suitable as volume slider scales
-    slider_scales = [scale.linear_30dB(), scale.linear_70dB()]
+    slider_scales = [scale.Linear30dB(), scale.Linear70dB()]
 
     # name of settngs file that is currently open
     current_filename = None
@@ -78,7 +80,7 @@ class jack_mixer(serialized_object):
         self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
         self.window.set_title(name)
 
-        self.gui_factory = gui.factory(self.window, self.meter_scales, self.slider_scales)
+        self.gui_factory = gui.Factory(self.window, self.meter_scales, self.slider_scales)
 
         self.vbox_top = gtk.VBox()
         self.window.add(self.vbox_top)
@@ -93,7 +95,7 @@ class jack_mixer(serialized_object):
         help_menu_item = gtk.MenuItem('_Help')
         self.menubar.append(help_menu_item)
 
-        self.window.set_default_size(120,300)
+        self.window.set_default_size(120, 300)
 
         mixer_menu = gtk.Menu()
         mixer_menu_item.set_submenu(mixer_menu)
@@ -106,17 +108,16 @@ class jack_mixer(serialized_object):
         mixer_menu.append(add_output_channel)
         add_output_channel.connect("activate", self.on_add_output_channel)
 
-        if lash_client is None and xml_serialization is not None:
-            mixer_menu.append(gtk.SeparatorMenuItem())
-            open = gtk.ImageMenuItem(gtk.STOCK_OPEN)
-            mixer_menu.append(open)
-            open.connect('activate', self.on_open_cb)
-            save = gtk.ImageMenuItem(gtk.STOCK_SAVE)
-            mixer_menu.append(save)
-            save.connect('activate', self.on_save_cb)
-            save_as = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS)
-            mixer_menu.append(save_as)
-            save_as.connect('activate', self.on_save_as_cb)
+        mixer_menu.append(gtk.SeparatorMenuItem())
+        open = gtk.ImageMenuItem(gtk.STOCK_OPEN)
+        mixer_menu.append(open)
+        open.connect('activate', self.on_open_cb)
+        save = gtk.ImageMenuItem(gtk.STOCK_SAVE)
+        mixer_menu.append(save)
+        save.connect('activate', self.on_save_cb)
+        save_as = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS)
+        mixer_menu.append(save_as)
+        save_as.connect('activate', self.on_save_as_cb)
 
         mixer_menu.append(gtk.SeparatorMenuItem())
 
@@ -127,10 +128,15 @@ class jack_mixer(serialized_object):
         edit_menu = gtk.Menu()
         edit_menu_item.set_submenu(edit_menu)
 
-        self.channel_remove_menu_item = gtk.ImageMenuItem(gtk.STOCK_REMOVE)
-        edit_menu.append(self.channel_remove_menu_item)
-        self.channel_remove_menu = gtk.Menu()
-        self.channel_remove_menu_item.set_submenu(self.channel_remove_menu)
+        self.channel_remove_input_menu_item = gtk.MenuItem('Remove Input Channel')
+        edit_menu.append(self.channel_remove_input_menu_item)
+        self.channel_remove_input_menu = gtk.Menu()
+        self.channel_remove_input_menu_item.set_submenu(self.channel_remove_input_menu)
+
+        self.channel_remove_output_menu_item = gtk.MenuItem('Remove Output Channel')
+        edit_menu.append(self.channel_remove_output_menu_item)
+        self.channel_remove_output_menu = gtk.Menu()
+        self.channel_remove_output_menu_item.set_submenu(self.channel_remove_output_menu)
 
         channel_remove_all_menu_item = gtk.ImageMenuItem(gtk.STOCK_CLEAR)
         edit_menu.append(channel_remove_all_menu_item)
@@ -166,7 +172,7 @@ class jack_mixer(serialized_object):
         self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
         self.scrolled_window.add_with_viewport(self.hbox_inputs)
 
-        self.main_mix = main_mix(self)
+        self.main_mix = MainMixChannel(self)
         self.hbox_outputs = gtk.HBox()
         self.hbox_outputs.set_spacing(0)
         self.hbox_outputs.set_border_width(0)
@@ -203,8 +209,13 @@ class jack_mixer(serialized_object):
                 f = file(filename, 'r')
                 self.load_from_xml(f)
             except:
-                # TODO: display error in a dialog box
-                print >> sys.stderr, 'Failed to read', filename
+                err = gtk.MessageDialog(self.window,
+                            gtk.DIALOG_MODAL,
+                            gtk.MESSAGE_ERROR,
+                            gtk.BUTTONS_OK,
+                            "Failed loading settings.")
+                err.run()
+                err.destroy()
             else:
                 self.current_filename = filename
             finally:
@@ -263,9 +274,9 @@ class jack_mixer(serialized_object):
             channel = self.add_output_channel(**result)
             self.window.show_all()
 
-    def on_remove_channel(self, widget, channel):
+    def on_remove_input_channel(self, widget, channel):
         print 'Removing channel "%s"' % channel.channel_name
-        self.channel_remove_menu.remove(widget)
+        self.channel_remove_input_menu.remove(widget)
         if self.monitored_channel is channel:
             channel.monitor_button.set_active(False)
         for i in range(len(self.channels)):
@@ -275,20 +286,41 @@ class jack_mixer(serialized_object):
                 self.hbox_inputs.remove(channel.parent)
                 break
         if len(self.channels) == 0:
-            self.channel_remove_menu_item.set_sensitive(False)
+            self.channel_remove_input_menu_item.set_sensitive(False)
+
+    def on_remove_output_channel(self, widget, channel):
+        print 'Removing channel "%s"' % channel.channel_name
+        self.channel_remove_output_menu.remove(widget)
+        if self.monitored_channel is channel:
+            channel.monitor_button.set_active(False)
+        for i in range(len(self.channels)):
+            if self.output_channels[i] is channel:
+                channel.unrealize()
+                del self.output_channels[i]
+                self.hbox_outputs.remove(channel.parent)
+                break
+        if len(self.output_channels) == 0:
+            self.channel_remove_output_menu_item.set_sensitive(False)
 
     def on_channels_clear(self, widget):
+        for channel in self.output_channels:
+            channel.unrealize()
+            self.hbox_outputs.remove(channel.parent)
         for channel in self.channels:
             channel.unrealize()
             self.hbox_inputs.remove(channel.parent)
         self.channels = []
-        self.channel_remove_menu = gtk.Menu()
-        self.channel_remove_menu_item.set_submenu(self.channel_remove_menu)
-        self.channel_remove_menu_item.set_sensitive(False)
+        self.output_channels = []
+        self.channel_remove_input_menu = gtk.Menu()
+        self.channel_remove_input_menu_item.set_submenu(self.channel_remove_input_menu)
+        self.channel_remove_input_menu_item.set_sensitive(False)
+        self.channel_remove_output_menu = gtk.Menu()
+        self.channel_remove_output_menu_item.set_submenu(self.channel_remove_output_menu)
+        self.channel_remove_output_menu_item.set_sensitive(False)
 
     def add_channel(self, name, stereo, volume_cc, balance_cc):
         try:
-            channel = input_channel(self, name, stereo)
+            channel = InputChannel(self, name, stereo)
             self.add_channel_precreated(channel)
         except Exception:
             err = gtk.MessageDialog(self.window,
@@ -305,6 +337,7 @@ class jack_mixer(serialized_object):
             channel.channel.balance_midi_cc = int(balance_cc)
         if not (volume_cc or balance_cc):
             channel.channel.autoset_midi_cc()
+
         return channel
 
     def add_channel_precreated(self, channel):
@@ -313,14 +346,20 @@ class jack_mixer(serialized_object):
         self.hbox_inputs.pack_start(frame, False)
         channel.realize()
         channel_remove_menu_item = gtk.MenuItem(channel.channel_name)
-        self.channel_remove_menu.append(channel_remove_menu_item)
-        channel_remove_menu_item.connect("activate", self.on_remove_channel, channel)
-        self.channel_remove_menu_item.set_sensitive(True)
+        self.channel_remove_input_menu.append(channel_remove_menu_item)
+        channel_remove_menu_item.connect("activate", self.on_remove_input_channel, channel)
+        self.channel_remove_input_menu_item.set_sensitive(True)
         self.channels.append(channel)
 
         for outputchannel in self.output_channels:
             channel.add_control_group(outputchannel)
 
+        # create post fader output channel matching the input channel
+        channel.post_fader_output_channel = self.mixer.add_output_channel(
+                        channel.channel.name + ' Out', channel.channel.is_stereo, True)
+        channel.post_fader_output_channel.volume = 0
+        channel.post_fader_output_channel.set_solo(channel.channel, True)
+
     def read_meters(self):
         for channel in self.channels:
             channel.read_meter()
@@ -331,11 +370,10 @@ class jack_mixer(serialized_object):
 
     def add_output_channel(self, name, stereo, volume_cc, balance_cc, display_solo_buttons):
         try:
-            channel = output_channel(self, name, stereo)
+            channel = OutputChannel(self, name, stereo)
             channel.display_solo_buttons = display_solo_buttons
             self.add_output_channel_precreated(channel)
         except Exception:
-            raise
             err = gtk.MessageDialog(self.window,
                             gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
                             gtk.MESSAGE_ERROR,
@@ -355,11 +393,10 @@ class jack_mixer(serialized_object):
         frame.add(channel)
         self.hbox_outputs.pack_start(frame, False)
         channel.realize()
-        # XXX: handle deletion of output channels
-        #channel_remove_menu_item = gtk.MenuItem(channel.channel_name)
-        #self.channel_remove_menu.append(channel_remove_menu_item)
-        #channel_remove_menu_item.connect("activate", self.on_remove_channel, channel, channel_remove_menu_item)
-        #self.channel_remove_menu_item.set_sensitive(True)
+        channel_remove_menu_item = gtk.MenuItem(channel.channel_name)
+        self.channel_remove_output_menu.append(channel_remove_menu_item)
+        channel_remove_menu_item.connect("activate", self.on_remove_output_channel, channel)
+        self.channel_remove_output_menu_item.set_sensitive(True)
         self.output_channels.append(channel)
 
     _monitored_channel = None
@@ -371,7 +408,7 @@ class jack_mixer(serialized_object):
             if channel.channel.name == self._monitored_channel.channel.name:
                 return
         self._monitored_channel = channel
-        if type(channel) is input_channel:
+        if type(channel) is InputChannel:
             # reset all solo/mute settings
             for in_channel in self.channels:
                 self.monitor_channel.set_solo(in_channel.channel, False)
@@ -388,14 +425,14 @@ class jack_mixer(serialized_object):
             return
         self.monitor_channel.volume = channel.channel.volume
         self.monitor_channel.balance = channel.channel.balance
-        if type(self.monitored_channel) is output_channel:
+        if type(self.monitored_channel) is OutputChannel:
             # sync solo/muted channels
             for input_channel in self.channels:
                 self.monitor_channel.set_solo(input_channel.channel,
                                 channel.channel.is_solo(input_channel.channel))
                 self.monitor_channel.set_muted(input_channel.channel,
                                 channel.channel.is_muted(input_channel.channel))
-        elif type(self.monitored_channel) is main_mix:
+        elif type(self.monitored_channel) is MainMixChannel:
             # sync solo/muted channels
             for input_channel in self.channels:
                 self.monitor_channel.set_solo(input_channel.channel,
@@ -459,7 +496,7 @@ Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA''')
                 print "jack_mixer: LASH ordered to restore data from directory %s" % directory
                 filename = directory + os.sep + "jack_mixer.xml"
                 f = file(filename, "r")
-                self.load_from_xml(f)
+                self.load_from_xml(f, silence_errors=True)
                 f.close()
                 lash.lash_send_event(self.lash_client, event)
             else:
@@ -472,24 +509,29 @@ Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA''')
 
     def save_to_xml(self, file):
         #print "Saving to XML..."
-        b = xml_serialization()
-        s = serializator()
+        b = XmlSerialization()
+        s = Serializator()
         s.serialize(self, b)
         b.save(file)
 
-    def load_from_xml(self, file):
+    def load_from_xml(self, file, silence_errors=False):
         #print "Loading from XML..."
         self.on_channels_clear(None)
         self.unserialized_channels = []
-        b = xml_serialization()
-        b.load(file)
-        s = serializator()
+        b = XmlSerialization()
+        try:
+            b.load(file)
+        except:
+            if silence_errors:
+                return
+            raise
+        s = Serializator()
         s.unserialize(self, b)
         for channel in self.unserialized_channels:
-            if isinstance(channel, input_channel):
+            if isinstance(channel, InputChannel):
                 self.add_channel_precreated(channel)
         for channel in self.unserialized_channels:
-            if isinstance(channel, output_channel):
+            if isinstance(channel, OutputChannel):
                 self.add_output_channel_precreated(channel)
         del self.unserialized_channels
         self.window.show_all()
@@ -505,16 +547,16 @@ Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA''')
             return True
 
     def unserialize_child(self, name):
-        if name == main_mix_serialization_name():
+        if name == MainMixChannel.serialization_name():
             return self.main_mix
 
-        if name == input_channel_serialization_name():
-            channel = input_channel(self, "", True)
+        if name == InputChannel.serialization_name():
+            channel = InputChannel(self, "", True)
             self.unserialized_channels.append(channel)
             return channel
 
-        if name == output_channel_serialization_name():
-            channel = output_channel(self, "", True)
+        if name == OutputChannel.serialization_name():
+            channel = OutputChannel(self, "", True)
             self.unserialized_channels.append(channel)
             return channel
 
@@ -546,14 +588,21 @@ def help():
     print "Usage: %s [mixer_name]" % sys.argv[0]
 
 def main():
-    if lash:                        # If LASH python bindings are available
+    # Connect to LASH if Python bindings are available, and the user did not
+    # pass --no-lash
+    if lash and not '--no-lash' in sys.argv:
         # sys.argv is modified by this call
         lash_client = lash.init(sys.argv, "jack_mixer", lash.LASH_Config_File)
     else:
         lash_client = None
 
     parser = OptionParser()
-    parser.add_option('-c', '--config', dest='config')
+    parser.add_option('-c', '--config', dest='config',
+                      help='use a non default configuration file')
+    # --no-lash here is not acted upon, it is specified for completeness when
+    # --help is passed.
+    parser.add_option('--no-lash', dest='nolash', action='store_true',
+                      help='do not connect to LASH')
     options, args = parser.parse_args()
 
     # Yeah , this sounds stupid, we connected earlier, but we dont want to show this if we got --help option
@@ -571,7 +620,7 @@ def main():
 
     gtk.gdk.threads_init()
     try:
-        mixer = jack_mixer(name, lash_client)
+        mixer = JackMixer(name, lash_client)
     except Exception, e:
         err = gtk.MessageDialog(None,
                             gtk.DIALOG_MODAL,
@@ -585,8 +634,17 @@ def main():
     if options.config:
         f = file(options.config)
         mixer.current_filename = options.config
-        mixer.load_from_xml(f)
-        mixer.window.set_default_size(60*(1+len(mixer.channels)+len(mixer.output_channels)),300)
+        try:
+            mixer.load_from_xml(f)
+        except:
+            err = gtk.MessageDialog(mixer.window,
+                            gtk.DIALOG_MODAL,
+                            gtk.MESSAGE_ERROR,
+                            gtk.BUTTONS_OK,
+                            "Failed loading settings.")
+            err.run()
+            err.destroy()
+        mixer.window.set_default_size(60*(1+len(mixer.channels)+len(mixer.output_channels)), 300)
         f.close()
 
     mixer.main()
diff --git a/jack_mixer_c.c b/jack_mixer_c.c
index a1b400e..049a2b2 100644
--- a/jack_mixer_c.c
+++ b/jack_mixer_c.c
@@ -211,6 +211,10 @@ Channel_get_volume(ChannelObject *self, void *closure)
 static int
 Channel_set_volume(ChannelObject *self, PyObject *value, void *closure)
 {
+	if (self->channel == NULL) {
+		PyErr_SetString(PyExc_RuntimeError, "unitialized channel");
+		return -1;
+	}
 	channel_volume_write(self->channel, PyFloat_AsDouble(value));
 	return 0;
 }
diff --git a/meter.py b/meter.py
index 49d0445..59e1f75 100644
--- a/meter.py
+++ b/meter.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -20,7 +18,7 @@
 import gtk
 import cairo
 
-class meter(gtk.DrawingArea):
+class MeterWidget(gtk.DrawingArea):
     def __init__(self, scale):
         gtk.DrawingArea.__init__(self)
 
@@ -114,9 +112,9 @@ class meter(gtk.DrawingArea):
         self.cache_surface = None
         self.invalidate_all()
 
-class mono(meter):
+class MonoMeterWidget(MeterWidget):
     def __init__(self, scale):
-        meter.__init__(self, scale)
+        MeterWidget.__init__(self, scale)
         self.value = 0.0
         self.raw_value = 0.0
 
@@ -137,9 +135,9 @@ class mono(meter):
         if (abs(old_value-self.value) * self.height) > 1:
             self.invalidate_all()
 
-class stereo(meter):
+class StereoMeterWidget(MeterWidget):
     def __init__(self, scale):
-        meter.__init__(self, scale)
+        MeterWidget.__init__(self, scale)
         self.left = 0.0
         self.right = 0.0
 
diff --git a/scale.py b/scale.py
index 467a054..f4139d6 100644
--- a/scale.py
+++ b/scale.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -20,14 +18,14 @@
 import math
 import jack_mixer_c
 
-class mark:
+class Mark:
     '''Encapsulates scale linear function edge and coefficients for scale = a * dB + b formula'''
     def __init__(self, db, scale):
         self.db = db
         self.scale = scale
         self.text = "%.0f" % math.fabs(db)
 
-class base:
+class Base:
     '''Scale abstraction, various scale implementation derive from this class'''
     def __init__(self, scale_id, description):
         self.marks = []
@@ -38,7 +36,7 @@ class base:
     def add_threshold(self, db, scale, is_mark):
         self.scale.add_threshold(db, scale)
         if is_mark:
-            self.marks.append(mark(db, scale))
+            self.marks.append(Mark(db, scale))
 
     def calculate_coefficients(self):
         self.scale.calculate_coefficients()
@@ -53,7 +51,7 @@ class base:
         return self.scale.scale_to_db(scale)
 
     def add_mark(self, db):
-        self.marks.append(mark(db, -1.0))
+        self.marks.append(Mark(db, -1.0))
 
     def get_marks(self):
         return self.marks
@@ -66,10 +64,11 @@ class base:
 # IEC 60268-18 Peak programme level meters - Digital audio peak level meter
 # Adapted from meterpridge, may be wrong, I'm not buying standards, event if they cost $45
 # If someone has the standart, please eighter share it with me or fix the code.
-class iec_268(base):
+class IEC268(Base):
     '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter'''
     def __init__(self):
-        base.__init__(self, "iec_268", "IEC 60268-18 Peak programme level meters - Digital audio peak level meter")
+        Base.__init__(self, "iec_268",
+                      "IEC 60268-18 Peak programme level meters - Digital audio peak level meter")
         self.add_threshold(-70.0, 0.0, False)
         self.add_threshold(-60.0, 0.05, True)
         self.add_threshold(-50.0, 0.075, True)
@@ -85,10 +84,12 @@ class iec_268(base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class iec_268_minimalistic(base):
-    '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter, fewer marks'''
+class IEC268Minimalistic(Base):
+    '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter,
+       fewer marks'''
     def __init__(self):
-        base.__init__(self, "iec_268_minimalistic", "IEC 60268-18 Peak programme level meters - Digital audio peak level meter, fewer marks")
+        Base.__init__(self, 'iec_268_minimalistic',
+                      'IEC 60268-18 Peak programme level meters - Digital audio peak level meter, fewer marks')
         self.add_threshold(-70.0, 0.0, False)
         self.add_threshold(-60.0, 0.05, True)
         self.add_threshold(-50.0, 0.075, False)
@@ -100,10 +101,10 @@ class iec_268_minimalistic(base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class linear_70dB(base):
+class Linear70dB(Base):
     '''Linear scale with range from -70 to 0 dBFS'''
     def __init__(self):
-        base.__init__(self, "linear_70dB", "Linear scale with range from -70 to 0 dBFS")
+        Base.__init__(self, "linear_70dB", "Linear scale with range from -70 to 0 dBFS")
         self.add_threshold(-70.0, 0.0, False)
         self.add_mark(-60.0)
         self.add_mark(-50.0)
@@ -119,10 +120,10 @@ class linear_70dB(base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class linear_30dB(base):
+class Linear30dB(Base):
     '''Linear scale with range from -30 to +30 dBFS'''
     def __init__(self):
-        base.__init__(self, "linear_30dB", "Linear scale with range from -30 to +30 dBFS")
+        Base.__init__(self, "linear_30dB", "Linear scale with range from -30 to +30 dBFS")
         self.add_threshold(-30.0, 0.0, False)
         self.add_threshold(+30.0, 1.0, True)
         self.calculate_coefficients()
diff --git a/serialization.py b/serialization.py
index 13970a0..77656f4 100644
--- a/serialization.py
+++ b/serialization.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -17,17 +15,21 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
-class serialization_backend:
+class SerializationBackend:
     '''Base class for serialization backends'''
     def get_root_serialization_object(self, name):
-        '''Returns serialization object where properties of root object will be serialized to'''
-        return None                     # this method should never be called for the base class
+        '''Returns serialization object where properties of root object
+           will be serialized to'''
+        # this method should never be called for the base class
+        raise NotImplementedError
 
     def get_child_serialization_object(self, name, backend_object):
-        return None                     # this method should never be called for the base class
+        # this method should never be called for the base class
+        raise NotImplementedError
 
-class serialization_object_backend:
-    '''Base class for serialization backend objects where real object properties will be serialized to or unserialized from.'''
+class SerializationObjectBackend:
+    '''Base class for serialization backend objects where real object
+       properties will be serialized to or unserialized from.'''
     def add_property(self, name, value):
         '''Serialize particular property'''
         pass
@@ -41,7 +43,7 @@ class serialization_object_backend:
     def serialization_name(self):
         return None
 
-class serialized_object:
+class SerializedObject:
     '''Base class for object supporting serialization'''
     def serialization_name(self):
         return None
@@ -60,7 +62,7 @@ class serialized_object:
     def unserialize_child(self, name):
         return None
 
-class serializator:
+class Serializator:
     def __init__(self):
         pass
 
@@ -98,4 +100,6 @@ class serializator:
         childs = object.serialization_get_childs()
         for child in childs:
             #print "serializing child " + repr(child)
-            self.serialize_one(backend, child, backend.get_child_serialization_object(child.serialization_name(), backend_object))
+            self.serialize_one(backend, child,
+                               backend.get_child_serialization_object(
+                                       child.serialization_name(), backend_object))
diff --git a/serialization_xml.py b/serialization_xml.py
index 4d7c4bd..3e6d0ee 100644
--- a/serialization_xml.py
+++ b/serialization_xml.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -21,20 +19,20 @@ from serialization import *
 import xml.dom
 import xml.dom.minidom
 
-class xml_serialization(serialization_backend):
+class XmlSerialization(SerializationBackend):
     def get_root_serialization_object(self, name):
         self.doc = xml.dom.getDOMImplementation().createDocument(xml.dom.EMPTY_NAMESPACE, name, None)
-        return xml_serialization_object(self.doc, self.doc.documentElement)
+        return XmlSerializationObject(self.doc, self.doc.documentElement)
 
     def get_root_unserialization_object(self, name):
         if name != self.doc.documentElement.nodeName:
             return None
-        return xml_serialization_object(self.doc, self.doc.documentElement)
+        return XmlSerializationObject(self.doc, self.doc.documentElement)
 
     def get_child_serialization_object(self, name, backend_object):
         child = self.doc.createElement(name)
         backend_object.element.appendChild(child)
-        return xml_serialization_object(self.doc, child)
+        return XmlSerializationObject(self.doc, child)
 
     def save(self, file):
         file.write(self.doc.toprettyxml())
@@ -42,7 +40,7 @@ class xml_serialization(serialization_backend):
     def load(self, file):
         self.doc = xml.dom.minidom.parse(file)
 
-class xml_serialization_object:
+class XmlSerializationObject:
     def __init__(self, doc, element):
         self.doc = doc
         self.element = element
@@ -64,7 +62,7 @@ class xml_serialization_object:
         childs = []
         for child in child_elements:
             if child.nodeType == child.ELEMENT_NODE:
-                childs.append(xml_serialization_object(self.doc, child))
+                childs.append(XmlSerializationObject(self.doc, child))
         return childs
 
     def get_properties(self):
diff --git a/slider.py b/slider.py
index 6d86cbe..d6f38b8 100644
--- a/slider.py
+++ b/slider.py
@@ -1,9 +1,7 @@
-#!/usr/bin/env python
-#
 # This file is part of jack_mixer
 #
 # Copyright (C) 2006 Nedko Arnaudov <nedko at arnaudov.name>
-#  
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; version 2 of the License
@@ -20,7 +18,7 @@
 import gtk
 import gobject
 
-class adjustment_dBFS(gtk.Adjustment):
+class AdjustmentdBFS(gtk.Adjustment):
     def __init__(self, scale, default_db):
         self.default_value = scale.db_to_scale(default_db)
         self.db = default_db
@@ -59,7 +57,8 @@ class adjustment_dBFS(gtk.Adjustment):
         self.set_value(self.scale.db_to_scale(self.db))
         self.disable_value_notify = False
 
-gobject.signal_new("volume-changed", adjustment_dBFS, gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [])
+gobject.signal_new("volume-changed", AdjustmentdBFS,
+                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [])
 
 
 class GtkSlider(gtk.VScale):

-- 
jack-mixer packaging



More information about the pkg-multimedia-commits mailing list