[SCM] jack-mixer packaging branch, master, updated. upstream/mixer-7-10-g533e3d1

rosea-guest at users.alioth.debian.org rosea-guest at users.alioth.debian.org
Wed Dec 16 21:48:02 UTC 2009


The following commit has been merged in the master branch:
commit 533e3d156e4567fdfa6fd97111d2a8012afe989e
Author: Rosea Grammostola <rosea.grammostola at gmail.com>
Date:   Wed Dec 16 22:17:45 2009 +0100

    Revert "Merge commit 'upstream/mixer-8'"
    
    This reverts commit 762ddd12448d7b287067cc721e088bd5ec2cd57f, reversing
    changes made to 02c5c9e100b3371845e41f48d0dbb2261491f310.

diff --git a/NEWS b/NEWS
index 30a16ff..c3fb536 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,4 @@
 =========
-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 af76bf2..1b65c95 100644
--- a/abspeak.py
+++ b/abspeak.py
@@ -1,7 +1,9 @@
+#!/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 +22,7 @@ import fpconst
 import pango
 import gobject
 
-class AbspeakWidget(gtk.EventBox):
+class widget(gtk.EventBox):
     def __init__(self):
         gtk.EventBox.__init__(self)
         self.label = gtk.Label()
@@ -56,7 +58,5 @@ class AbspeakWidget(gtk.EventBox):
 
             self.label.set_text(text)
 
-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])
+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])
diff --git a/aclocal.m4 b/aclocal.m4
index ea86b23..bddefdc 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1313,13 +1313,6 @@ 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
@@ -1365,3 +1358,10 @@ 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 d4d78cf..4fb555b 100644
--- a/channel.py
+++ b/channel.py
@@ -1,7 +1,9 @@
+#!/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,7 +23,7 @@ import glib
 import slider
 import meter
 import abspeak
-from serialization import SerializedObject
+from serialization import serialized_object
 
 try:
     import phat
@@ -29,9 +31,8 @@ except:
     phat = None
 
 
-class Channel(gtk.VBox, SerializedObject):
-    '''Widget with slider and meter used as base class for more specific
-       channel widgets'''
+class channel(gtk.VBox, serialized_object):
+    '''Widget with slider and meter used as base class for more specific channel widgets'''
     monitor_button = None
 
     def __init__(self, app, name, stereo):
@@ -43,7 +44,7 @@ class Channel(gtk.VBox, SerializedObject):
         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.AdjustmentdBFS(self.slider_scale, 0.0)
+        self.slider_adjustment = slider.adjustment_dBFS(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
@@ -72,9 +73,9 @@ class Channel(gtk.VBox, SerializedObject):
         self.create_slider_widget()
 
         if self.stereo:
-            self.meter = meter.StereoMeterWidget(self.meter_scale)
+            self.meter = meter.stereo(self.meter_scale)
         else:
-            self.meter = meter.MonoMeterWidget(self.meter_scale)
+            self.meter = meter.mono(self.meter_scale)
         self.on_vumeter_color_changed(self.gui_factory)
 
         self.meter.set_events(gtk.gdk.SCROLL_MASK)
@@ -85,7 +86,7 @@ class Channel(gtk.VBox, SerializedObject):
         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.AbspeakWidget()
+        self.abspeak = abspeak.widget()
         self.abspeak.connect("reset", self.on_abspeak_reset)
         self.abspeak.connect("volume-adjust", self.on_abspeak_adjust)
 
@@ -135,7 +136,7 @@ class Channel(gtk.VBox, SerializedObject):
         #print "Default slider scale change detected."
         self.slider_scale = scale
         self.slider_adjustment.set_scale(scale)
-        self.channel.midi_scale = self.slider_scale.scale
+        self.channel.set_midi_scale(self.slider_scale.scale)
 
     def on_vumeter_color_changed(self, gui_factory, *args):
         color = gui_factory.get_vumeter_color()
@@ -179,8 +180,6 @@ class Channel(gtk.VBox, SerializedObject):
         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)
@@ -279,21 +278,19 @@ class Channel(gtk.VBox, SerializedObject):
             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 InputChannel(Channel):
-    post_fader_output_channel = None
-
+class input_channel(channel):
     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:
@@ -373,10 +370,6 @@ class InputChannel(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):
@@ -391,12 +384,9 @@ class InputChannel(Channel):
         return None
 
     def unrealize(self):
-        Channel.unrealize(self)
-        if self.post_fader_output_channel:
-            self.post_fader_output_channel.remove()
-            self.post_fader_output_channel = None
+        channel.unrealize(self)
         self.channel.remove()
-        self.channel = None
+        self.channel = False
 
     channel_properties_dialog = None
     def on_channel_properties(self):
@@ -464,9 +454,8 @@ class InputChannel(Channel):
             return True
         return False
 
-    @classmethod
-    def serialization_name(cls):
-        return 'input_channel'
+    def serialization_name(self):
+        return input_channel_serialization_name()
 
     def serialize(self, object_backend):
         object_backend.add_property("name", self.channel_name)
@@ -474,7 +463,7 @@ class InputChannel(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":
@@ -487,7 +476,10 @@ class InputChannel(Channel):
             if value == "mono":
                 self.stereo = False
                 return True
-        return Channel.unserialize_property(self, name, value)
+        return channel.unserialize_property(self, name, value)
+
+def input_channel_serialization_name():
+    return "input_channel"
 
 
 available_colours = [
@@ -500,7 +492,7 @@ available_colours = [
     ('#e9b96e', '#c17d11', '#6f4902'),
 ]
 
-class OutputChannel(Channel):
+class output_channel(channel):
     colours = available_colours[:]
     _display_solo_buttons = False
 
@@ -508,7 +500,7 @@ class OutputChannel(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
@@ -522,11 +514,11 @@ class OutputChannel(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
@@ -544,7 +536,7 @@ class OutputChannel(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:
-            OutputChannel.colours = available_colours[:]
+            self.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)
@@ -601,17 +593,11 @@ class OutputChannel(Channel):
                 self.on_channel_properties()
 
     def unrealize(self):
-        # 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
+        channel.unrealize(self)
+        self.channel = False
 
-    @classmethod
-    def serialization_name(cls):
-        return 'output_channel'
+    def serialization_name(self):
+        return output_channel_serialization_name()
 
     def serialize(self, object_backend):
         object_backend.add_property("name", self.channel_name)
@@ -632,7 +618,7 @@ class OutputChannel(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":
@@ -655,17 +641,20 @@ class OutputChannel(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)
 
-class MainMixChannel(Channel):
+def output_channel_serialization_name():
+    return "output_channel"
+
+class main_mix(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
@@ -715,12 +704,11 @@ class MainMixChannel(Channel):
         self._init_solo_channels = None
 
     def unrealize(self):
-        Channel.unrealize(self)
+        channel.unrealize(self)
         self.channel = False
 
-    @classmethod
-    def serialization_name(cls):
-        return 'main_mix_channel'
+    def serialization_name(self):
+        return main_mix_serialization_name()
 
     def serialize(self, object_backend):
         muted_channels = []
@@ -734,7 +722,7 @@ class MainMixChannel(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':
@@ -743,7 +731,10 @@ class MainMixChannel(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 main_mix_serialization_name():
+    return "main_mix_channel"
 
 
 class ChannelPropertiesDialog(gtk.Dialog):
@@ -1009,4 +1000,3 @@ 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 70aa995..10fccb0 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 8.
+# Generated by GNU Autoconf 2.65 for jack_mixer 7.
 #
 #
 # 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='8'
-PACKAGE_STRING='jack_mixer 8'
+PACKAGE_VERSION='7'
+PACKAGE_STRING='jack_mixer 7'
 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 8 to adapt to many kinds of systems.
+\`configure' configures jack_mixer 7 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 8:";;
+     short | recursive ) echo "Configuration of jack_mixer 7:";;
    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 8
+jack_mixer configure 7
 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 8, which was
+It was created by jack_mixer $as_me 7, 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='8'
+ VERSION='7'
 
 
 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 8, which was
+This file was extended by jack_mixer $as_me 7, 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 8
+jack_mixer config.status 7
 configured by $0, generated by GNU Autoconf 2.65,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 49585bd..a7277e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 #
 
 AC_PREREQ(2.61)
-AC_INIT(jack_mixer, 8)
+AC_INIT(jack_mixer, 7)
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE
diff --git a/gui.py b/gui.py
index ee82920..e4d6487 100644
--- a/gui.py
+++ b/gui.py
@@ -1,7 +1,9 @@
+#!/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
@@ -29,7 +31,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
@@ -155,18 +157,14 @@ 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 49c0b24..c9bb4c1 100644
--- a/jack_mixer.c
+++ b/jack_mixer.c
@@ -83,6 +83,8 @@ struct channel
   void *midi_change_callback_data;
 
   jack_mixer_scale_t midi_scale;
+
+  jack_mixer_output_channel_t output;
 };
 
 struct output_channel {
@@ -391,6 +393,7 @@ 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);
 }
@@ -1072,6 +1075,7 @@ 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)
@@ -1148,6 +1152,12 @@ 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 2cf5964..26e005d 100755
--- a/jack_mixer.py
+++ b/jack_mixer.py
@@ -26,37 +26,35 @@ 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.join(os.path.dirname(sys.argv[0]), '..', 'share', 'jack_mixer'))
-
-import jack_mixer_c
-import scale
+sys.path.insert(0, os.path.dirname(sys.argv[0]) + os.sep + ".." + os.sep + "share"+ os.sep + "jack_mixer")
 from channel import *
-
 import gui
 from preferences import PreferencesDialog
 
-from serialization_xml import XmlSerialization
-from serialization import SerializedObject, Serializator
-
-# restore Python modules lookup path
 sys.path = old_path
 
-class JackMixer(SerializedObject):
+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"
+
+class jack_mixer(serialized_object):
 
     # scales suitable as meter scales
-    meter_scales = [scale.IEC268(), scale.Linear70dB(), scale.IEC268Minimalistic()]
+    meter_scales = [scale.iec_268(), scale.linear_70dB(), scale.iec_268_minimalistic()]
 
     # scales suitable as volume slider scales
-    slider_scales = [scale.Linear30dB(), scale.Linear70dB()]
+    slider_scales = [scale.linear_30dB(), scale.linear_70dB()]
 
     # name of settngs file that is currently open
     current_filename = None
@@ -80,7 +78,7 @@ class JackMixer(SerializedObject):
         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)
@@ -95,7 +93,7 @@ class JackMixer(SerializedObject):
         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)
@@ -108,16 +106,17 @@ class JackMixer(SerializedObject):
         mixer_menu.append(add_output_channel)
         add_output_channel.connect("activate", self.on_add_output_channel)
 
-        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)
+        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())
 
@@ -128,15 +127,10 @@ class JackMixer(SerializedObject):
         edit_menu = gtk.Menu()
         edit_menu_item.set_submenu(edit_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)
+        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)
 
         channel_remove_all_menu_item = gtk.ImageMenuItem(gtk.STOCK_CLEAR)
         edit_menu.append(channel_remove_all_menu_item)
@@ -172,7 +166,7 @@ class JackMixer(SerializedObject):
         self.scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
         self.scrolled_window.add_with_viewport(self.hbox_inputs)
 
-        self.main_mix = MainMixChannel(self)
+        self.main_mix = main_mix(self)
         self.hbox_outputs = gtk.HBox()
         self.hbox_outputs.set_spacing(0)
         self.hbox_outputs.set_border_width(0)
@@ -209,13 +203,8 @@ class JackMixer(SerializedObject):
                 f = file(filename, 'r')
                 self.load_from_xml(f)
             except:
-                err = gtk.MessageDialog(self.window,
-                            gtk.DIALOG_MODAL,
-                            gtk.MESSAGE_ERROR,
-                            gtk.BUTTONS_OK,
-                            "Failed loading settings.")
-                err.run()
-                err.destroy()
+                # TODO: display error in a dialog box
+                print >> sys.stderr, 'Failed to read', filename
             else:
                 self.current_filename = filename
             finally:
@@ -274,9 +263,9 @@ class JackMixer(SerializedObject):
             channel = self.add_output_channel(**result)
             self.window.show_all()
 
-    def on_remove_input_channel(self, widget, channel):
+    def on_remove_channel(self, widget, channel):
         print 'Removing channel "%s"' % channel.channel_name
-        self.channel_remove_input_menu.remove(widget)
+        self.channel_remove_menu.remove(widget)
         if self.monitored_channel is channel:
             channel.monitor_button.set_active(False)
         for i in range(len(self.channels)):
@@ -286,41 +275,20 @@ class JackMixer(SerializedObject):
                 self.hbox_inputs.remove(channel.parent)
                 break
         if len(self.channels) == 0:
-            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)
+            self.channel_remove_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.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)
+        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)
 
     def add_channel(self, name, stereo, volume_cc, balance_cc):
         try:
-            channel = InputChannel(self, name, stereo)
+            channel = input_channel(self, name, stereo)
             self.add_channel_precreated(channel)
         except Exception:
             err = gtk.MessageDialog(self.window,
@@ -337,7 +305,6 @@ class JackMixer(SerializedObject):
             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):
@@ -346,20 +313,14 @@ class JackMixer(SerializedObject):
         self.hbox_inputs.pack_start(frame, False)
         channel.realize()
         channel_remove_menu_item = gtk.MenuItem(channel.channel_name)
-        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.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.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()
@@ -370,10 +331,11 @@ class JackMixer(SerializedObject):
 
     def add_output_channel(self, name, stereo, volume_cc, balance_cc, display_solo_buttons):
         try:
-            channel = OutputChannel(self, name, stereo)
+            channel = output_channel(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,
@@ -393,10 +355,11 @@ class JackMixer(SerializedObject):
         frame.add(channel)
         self.hbox_outputs.pack_start(frame, False)
         channel.realize()
-        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)
+        # 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)
         self.output_channels.append(channel)
 
     _monitored_channel = None
@@ -408,7 +371,7 @@ class JackMixer(SerializedObject):
             if channel.channel.name == self._monitored_channel.channel.name:
                 return
         self._monitored_channel = channel
-        if type(channel) is InputChannel:
+        if type(channel) is input_channel:
             # reset all solo/mute settings
             for in_channel in self.channels:
                 self.monitor_channel.set_solo(in_channel.channel, False)
@@ -425,14 +388,14 @@ class JackMixer(SerializedObject):
             return
         self.monitor_channel.volume = channel.channel.volume
         self.monitor_channel.balance = channel.channel.balance
-        if type(self.monitored_channel) is OutputChannel:
+        if type(self.monitored_channel) is output_channel:
             # 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 MainMixChannel:
+        elif type(self.monitored_channel) is main_mix:
             # sync solo/muted channels
             for input_channel in self.channels:
                 self.monitor_channel.set_solo(input_channel.channel,
@@ -496,7 +459,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, silence_errors=True)
+                self.load_from_xml(f)
                 f.close()
                 lash.lash_send_event(self.lash_client, event)
             else:
@@ -509,29 +472,24 @@ Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA''')
 
     def save_to_xml(self, file):
         #print "Saving to XML..."
-        b = XmlSerialization()
-        s = Serializator()
+        b = xml_serialization()
+        s = serializator()
         s.serialize(self, b)
         b.save(file)
 
-    def load_from_xml(self, file, silence_errors=False):
+    def load_from_xml(self, file):
         #print "Loading from XML..."
         self.on_channels_clear(None)
         self.unserialized_channels = []
-        b = XmlSerialization()
-        try:
-            b.load(file)
-        except:
-            if silence_errors:
-                return
-            raise
-        s = Serializator()
+        b = xml_serialization()
+        b.load(file)
+        s = serializator()
         s.unserialize(self, b)
         for channel in self.unserialized_channels:
-            if isinstance(channel, InputChannel):
+            if isinstance(channel, input_channel):
                 self.add_channel_precreated(channel)
         for channel in self.unserialized_channels:
-            if isinstance(channel, OutputChannel):
+            if isinstance(channel, output_channel):
                 self.add_output_channel_precreated(channel)
         del self.unserialized_channels
         self.window.show_all()
@@ -547,16 +505,16 @@ Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA''')
             return True
 
     def unserialize_child(self, name):
-        if name == MainMixChannel.serialization_name():
+        if name == main_mix_serialization_name():
             return self.main_mix
 
-        if name == InputChannel.serialization_name():
-            channel = InputChannel(self, "", True)
+        if name == input_channel_serialization_name():
+            channel = input_channel(self, "", True)
             self.unserialized_channels.append(channel)
             return channel
 
-        if name == OutputChannel.serialization_name():
-            channel = OutputChannel(self, "", True)
+        if name == output_channel_serialization_name():
+            channel = output_channel(self, "", True)
             self.unserialized_channels.append(channel)
             return channel
 
@@ -588,21 +546,14 @@ def help():
     print "Usage: %s [mixer_name]" % sys.argv[0]
 
 def main():
-    # 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:
+    if lash:                        # If LASH python bindings are available
         # 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',
-                      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')
+    parser.add_option('-c', '--config', dest='config')
     options, args = parser.parse_args()
 
     # Yeah , this sounds stupid, we connected earlier, but we dont want to show this if we got --help option
@@ -620,7 +571,7 @@ def main():
 
     gtk.gdk.threads_init()
     try:
-        mixer = JackMixer(name, lash_client)
+        mixer = jack_mixer(name, lash_client)
     except Exception, e:
         err = gtk.MessageDialog(None,
                             gtk.DIALOG_MODAL,
@@ -634,17 +585,8 @@ def main():
     if options.config:
         f = file(options.config)
         mixer.current_filename = options.config
-        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)
+        mixer.load_from_xml(f)
+        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 049a2b2..a1b400e 100644
--- a/jack_mixer_c.c
+++ b/jack_mixer_c.c
@@ -211,10 +211,6 @@ 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 59e1f75..49d0445 100644
--- a/meter.py
+++ b/meter.py
@@ -1,7 +1,9 @@
+#!/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
@@ -18,7 +20,7 @@
 import gtk
 import cairo
 
-class MeterWidget(gtk.DrawingArea):
+class meter(gtk.DrawingArea):
     def __init__(self, scale):
         gtk.DrawingArea.__init__(self)
 
@@ -112,9 +114,9 @@ class MeterWidget(gtk.DrawingArea):
         self.cache_surface = None
         self.invalidate_all()
 
-class MonoMeterWidget(MeterWidget):
+class mono(meter):
     def __init__(self, scale):
-        MeterWidget.__init__(self, scale)
+        meter.__init__(self, scale)
         self.value = 0.0
         self.raw_value = 0.0
 
@@ -135,9 +137,9 @@ class MonoMeterWidget(MeterWidget):
         if (abs(old_value-self.value) * self.height) > 1:
             self.invalidate_all()
 
-class StereoMeterWidget(MeterWidget):
+class stereo(meter):
     def __init__(self, scale):
-        MeterWidget.__init__(self, scale)
+        meter.__init__(self, scale)
         self.left = 0.0
         self.right = 0.0
 
diff --git a/scale.py b/scale.py
index f4139d6..467a054 100644
--- a/scale.py
+++ b/scale.py
@@ -1,7 +1,9 @@
+#!/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
@@ -18,14 +20,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 = []
@@ -36,7 +38,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()
@@ -51,7 +53,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
@@ -64,11 +66,10 @@ 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 IEC268(Base):
+class iec_268(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)
@@ -84,12 +85,10 @@ class IEC268(Base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class IEC268Minimalistic(Base):
-    '''IEC 60268-18 Peak programme level meters - Digital audio peak level meter,
-       fewer marks'''
+class iec_268_minimalistic(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)
@@ -101,10 +100,10 @@ class IEC268Minimalistic(Base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class Linear70dB(Base):
+class linear_70dB(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)
@@ -120,10 +119,10 @@ class Linear70dB(Base):
         self.calculate_coefficients()
         self.scale_marks()
 
-class Linear30dB(Base):
+class linear_30dB(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 77656f4..13970a0 100644
--- a/serialization.py
+++ b/serialization.py
@@ -1,7 +1,9 @@
+#!/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
@@ -15,21 +17,17 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
-class SerializationBackend:
+class serialization_backend:
     '''Base class for serialization backends'''
     def get_root_serialization_object(self, name):
-        '''Returns serialization object where properties of root object
-           will be serialized to'''
-        # this method should never be called for the base class
-        raise NotImplementedError
+        '''Returns serialization object where properties of root object will be serialized to'''
+        return None                     # this method should never be called for the base class
 
     def get_child_serialization_object(self, name, backend_object):
-        # this method should never be called for the base class
-        raise NotImplementedError
+        return None                     # this method should never be called for the base class
 
-class SerializationObjectBackend:
-    '''Base class for serialization backend objects where real object
-       properties will be serialized to or unserialized from.'''
+class serialization_object_backend:
+    '''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
@@ -43,7 +41,7 @@ class SerializationObjectBackend:
     def serialization_name(self):
         return None
 
-class SerializedObject:
+class serialized_object:
     '''Base class for object supporting serialization'''
     def serialization_name(self):
         return None
@@ -62,7 +60,7 @@ class SerializedObject:
     def unserialize_child(self, name):
         return None
 
-class Serializator:
+class serializator:
     def __init__(self):
         pass
 
@@ -100,6 +98,4 @@ 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 3e6d0ee..4d7c4bd 100644
--- a/serialization_xml.py
+++ b/serialization_xml.py
@@ -1,7 +1,9 @@
+#!/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
@@ -19,20 +21,20 @@ from serialization import *
 import xml.dom
 import xml.dom.minidom
 
-class XmlSerialization(SerializationBackend):
+class xml_serialization(serialization_backend):
     def get_root_serialization_object(self, name):
         self.doc = xml.dom.getDOMImplementation().createDocument(xml.dom.EMPTY_NAMESPACE, name, None)
-        return XmlSerializationObject(self.doc, self.doc.documentElement)
+        return xml_serialization_object(self.doc, self.doc.documentElement)
 
     def get_root_unserialization_object(self, name):
         if name != self.doc.documentElement.nodeName:
             return None
-        return XmlSerializationObject(self.doc, self.doc.documentElement)
+        return xml_serialization_object(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 XmlSerializationObject(self.doc, child)
+        return xml_serialization_object(self.doc, child)
 
     def save(self, file):
         file.write(self.doc.toprettyxml())
@@ -40,7 +42,7 @@ class XmlSerialization(SerializationBackend):
     def load(self, file):
         self.doc = xml.dom.minidom.parse(file)
 
-class XmlSerializationObject:
+class xml_serialization_object:
     def __init__(self, doc, element):
         self.doc = doc
         self.element = element
@@ -62,7 +64,7 @@ class XmlSerializationObject:
         childs = []
         for child in child_elements:
             if child.nodeType == child.ELEMENT_NODE:
-                childs.append(XmlSerializationObject(self.doc, child))
+                childs.append(xml_serialization_object(self.doc, child))
         return childs
 
     def get_properties(self):
diff --git a/slider.py b/slider.py
index d6f38b8..6d86cbe 100644
--- a/slider.py
+++ b/slider.py
@@ -1,7 +1,9 @@
+#!/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
@@ -18,7 +20,7 @@
 import gtk
 import gobject
 
-class AdjustmentdBFS(gtk.Adjustment):
+class adjustment_dBFS(gtk.Adjustment):
     def __init__(self, scale, default_db):
         self.default_value = scale.db_to_scale(default_db)
         self.db = default_db
@@ -57,8 +59,7 @@ class AdjustmentdBFS(gtk.Adjustment):
         self.set_value(self.scale.db_to_scale(self.db))
         self.disable_value_notify = False
 
-gobject.signal_new("volume-changed", AdjustmentdBFS,
-                   gobject.SIGNAL_RUN_FIRST | gobject.SIGNAL_ACTION, gobject.TYPE_NONE, [])
+gobject.signal_new("volume-changed", adjustment_dBFS, 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