[gnome-dvb-daemon] Remove trailing whitespace



commit b7a6701ca673e6e8d3f9fffa17563572f5214f39
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date:   Sun Mar 25 12:39:52 2012 +0200

    Remove trailing whitespace

 client/gnomedvb/Callback.py                        |    4 +-
 client/gnomedvb/DBusWrapper.py                     |  184 +++++++++---------
 client/gnomedvb/DVBModel.py                        |   19 +-
 client/gnomedvb/Device.py                          |    8 +-
 .../channellisteditor/ChannelListEditorDialog.py   |   84 ++++----
 .../ui/controlcenter/ControlCenterWindow.py        |  180 +++++++++---------
 client/gnomedvb/ui/preferences/DeviceGroupsView.py |   16 +-
 client/gnomedvb/ui/preferences/Dialogs.py          |   65 +++----
 client/gnomedvb/ui/preferences/Preferences.py      |   96 +++++-----
 client/gnomedvb/ui/recordings/DetailsDialog.py     |    6 +-
 client/gnomedvb/ui/recordings/RecordingsDialog.py  |   33 ++--
 client/gnomedvb/ui/timers/CalendarDialog.py        |    8 +-
 client/gnomedvb/ui/timers/EditTimersDialog.py      |   58 +++---
 client/gnomedvb/ui/timers/TimerDialog.py           |   36 ++--
 client/gnomedvb/ui/widgets/CellRendererDatetime.py |    5 +-
 client/gnomedvb/ui/widgets/ChannelGroupsView.py    |    2 +-
 client/gnomedvb/ui/widgets/ChannelsStore.py        |   38 ++--
 client/gnomedvb/ui/widgets/ChannelsView.py         |    5 +-
 client/gnomedvb/ui/widgets/DateTime.py             |   16 +-
 client/gnomedvb/ui/widgets/DetailsDialog.py        |   30 ++--
 client/gnomedvb/ui/widgets/Frame.py                |   11 +-
 client/gnomedvb/ui/widgets/RecordingsStore.py      |   19 +-
 client/gnomedvb/ui/widgets/RecordingsView.py       |   11 +-
 client/gnomedvb/ui/widgets/RunningNextStore.py     |   17 +-
 client/gnomedvb/ui/widgets/RunningNextView.py      |   25 ++--
 client/gnomedvb/ui/widgets/SchedulePaned.py        |   28 ++--
 client/gnomedvb/ui/widgets/ScheduleStore.py        |   48 +++---
 client/gnomedvb/ui/widgets/ScheduleView.py         |   16 +-
 client/gnomedvb/ui/wizard/SetupWizard.py           |   34 ++--
 client/gnomedvb/ui/wizard/pages/AdaptersPage.py    |   51 +++---
 client/gnomedvb/ui/wizard/pages/BasePage.py        |    4 +-
 client/gnomedvb/ui/wizard/pages/ChannelScanPage.py |   58 +++---
 .../ui/wizard/pages/InitialTuningDataPage.py       |   99 +++++-----
 client/gnomedvb/ui/wizard/pages/IntroPage.py       |   13 +-
 .../ui/wizard/pages/SaveChannelListPage.py         |   12 +-
 client/gnomedvb/ui/wizard/pages/SetupDevicePage.py |   30 ++--
 client/gnomedvb/ui/wizard/pages/SummaryPage.py     |    8 +-
 client/totem-plugin/dvb-daemon.py                  |  106 +++++-----
 src/Cable/CableChannel.vala                        |   10 +-
 src/Cable/CableScanner.vala                        |   46 +++---
 src/ChangeType.vala                                |    2 +-
 src/Channel.vala                                   |   20 +-
 src/ChannelList.vala                               |   56 +++---
 src/Constants.vala                                 |    2 +-
 src/Device.vala                                    |   48 +++---
 src/EPGScanner.vala                                |   62 +++---
 src/Event.vala                                     |   58 +++---
 src/EventStorage.vala                              |    6 +-
 src/MpegTsEnums.vala                               |   18 +-
 src/Recorder.vala                                  |  128 +++++++-------
 src/Recording.vala                                 |    8 +-
 src/RecordingsStore.vala                           |   42 ++--
 src/Satellite/SatelliteChannel.vala                |    8 +-
 src/Satellite/SatelliteScanner.vala                |   64 +++---
 src/ScannedItem.vala                               |   16 +-
 src/Scanner.vala                                   |  200 ++++++++++----------
 src/Schedule.vala                                  |   66 ++++----
 src/Settings.vala                                  |   66 ++++----
 src/Terrestrial/TerrestrialChannel.vala            |    8 +-
 src/Terrestrial/TerrestrialScanner.vala            |   64 +++---
 src/Timer.vala                                     |   66 ++++----
 src/Utils.vala                                     |   64 +++---
 src/database/ConfigStore.vala                      |    4 +-
 src/database/EPGStore.vala                         |    4 +-
 src/database/TimersStore.vala                      |    2 +-
 src/database/sqlite/SqliteDatabase.vala            |    6 +-
 src/database/sqlite/SqliteEPGStore.vala            |  100 +++++-----
 src/database/sqlite/SqliteUtils.vala               |   12 +-
 src/dbus/IDBusChannelList.vala                     |   20 +-
 src/dbus/IDBusDeviceGroup.vala                     |   26 ++--
 src/dbus/IDBusManager.vala                         |   12 +-
 src/dbus/IDBusRecorder.vala                        |   34 ++--
 src/dbus/IDBusRecordingsStore.vala                 |   24 ++--
 src/dbus/IDBusScanner.vala                         |    2 +-
 src/dbus/IDBusSchedule.vala                        |   32 ++--
 src/io/ChannelListReader.vala                      |   56 +++---
 src/io/ChannelListWriter.vala                      |   74 ++++----
 src/io/RecordingReader.vala                        |   28 ++--
 src/io/RecordingWriter.vala                        |   18 +-
 src/rtsp/MediaMapping.vala                         |    6 +-
 src/rtsp/Server.vala                               |   16 +-
 src/rygel/Interfaces2.vala                         |   22 +-
 src/rygel/Services2.vala                           |   66 ++++----
 83 files changed, 1581 insertions(+), 1594 deletions(-)
---
diff --git a/client/gnomedvb/Callback.py b/client/gnomedvb/Callback.py
index dc4d737..6736321 100644
--- a/client/gnomedvb/Callback.py
+++ b/client/gnomedvb/Callback.py
@@ -20,12 +20,12 @@ class Callback:
 
     def __init__(self):
         self.callbacks = []
-        
+
     def add_callback(self, callback_function, *args):
         if not callable(callback_function):
             raise TypeError("first argument must be callable")
         self.callbacks.append((callback_function, args))
-        
+
     def callback(self, result):
         for cb, args in self.callbacks:
             cb(result, *args)
diff --git a/client/gnomedvb/DBusWrapper.py b/client/gnomedvb/DBusWrapper.py
index 540947f..5b40780 100644
--- a/client/gnomedvb/DBusWrapper.py
+++ b/client/gnomedvb/DBusWrapper.py
@@ -57,7 +57,7 @@ def get_adapter_info(adapter, frontend):
 
 def get_dvb_devices():
     manager = DVBManagerClient()
-    devices = manager.get_devices()   
+    devices = manager.get_devices()
 
     deviceslist = []
     for dev in devices:
@@ -68,43 +68,43 @@ def get_dvb_devices():
             info["adapter"] = adapter
             info["frontend"] = int(match.group(2))
             deviceslist.append(info)
-            
+
     return deviceslist
 
 def _get_proxy(object_path, iface_name):
     return Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SESSION,
-        Gio.DBusProxyFlags.NONE, None, 
+        Gio.DBusProxyFlags.NONE, None,
         SERVICE,
         object_path,
         iface_name, None)
-    
+
 class DVBManagerClient(GObject.GObject):
-    
+
     __gsignals__ = {
         "group-added":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]),
         "group-removed":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]),
     }
-    
+
     def __init__(self):
         GObject.GObject.__init__(self)
 
         self.manager = _get_proxy(MANAGER_PATH, MANAGER_IFACE)
         self.manager.connect("g-signal", self.on_g_signal)
-        
+
     def get_scanner_for_device(self, adapter, frontend):
         objpath, scanner_iface, success = self.manager.GetScannerForDevice ('(uu)', adapter, frontend)
         if success:
             return DVBScannerClient(objpath, scanner_iface)
         else:
             return None
-        
+
     def get_device_group(self, group_id):
         path, success = self.manager.GetDeviceGroup('(u)', group_id)
         if success:
             return DVBDeviceGroupClient(path)
         else:
             return None
-        
+
     def get_registered_device_groups(self, **kwargs):
         if "result_handler" in kwargs:
             result_handler = kwargs["result_handler"]
@@ -113,28 +113,28 @@ class DVBManagerClient(GObject.GObject):
 
         def groups_handler(proxy, paths, user_data):
             result_handler([DVBDeviceGroupClient(path) for path in paths])
-        
+
         if result_handler != None:
             self.manager.GetRegisteredDeviceGroups(result_handler=groups_handler,
                 error_handler=kwargs["error_handler"])
         else:
             return [DVBDeviceGroupClient(path) for path in self.manager.GetRegisteredDeviceGroups()]
-       
+
     def add_device_to_new_group (self, adapter, frontend, channels_file, recordings_dir, name, **kwargs):
         return self.manager.AddDeviceToNewGroup('(uusss)', adapter, frontend, channels_file, recordings_dir, name, **kwargs)
-       
+
     def get_name_of_registered_device(self, adapter, frontend, **kwargs):
         return self.manager.GetNameOfRegisteredDevice('(uu)', adapter, frontend, **kwargs)
-        
+
     def get_device_group_size(self, **kwargs):
         return self.manager.GetDeviceGroupSize(**kwargs)
-        
+
     def get_channel_groups(self, **kwargs):
         return self.manager.GetChannelGroups(**kwargs)
-        
+
     def add_channel_group(self, name, **kwargs):
         return self.manager.AddChannelGroup('(s)', name, **kwargs)
-        
+
     def remove_channel_group(self, group_id, **kwargs):
         return self.manager.RemoveChannelGroup('(i)', group_id, **kwargs)
 
@@ -157,56 +157,56 @@ class DVBDeviceGroupClient(GObject.GObject):
         "device-added":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]),
         "device-removed":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int, int]),
     }
-    
+
     def __init__(self, objpath):
         GObject.GObject.__init__(self)
-        
+
         elements = objpath.split("/")
-        
+
         self._id = int(elements[5])
 
         self.devgroup = _get_proxy(objpath, DEVICE_GROUP_IFACE)
         self.devgroup.connect("g-signal", self.on_g_signal)
-        
+
     def get_id(self):
         return self._id
-         
+
     def get_recorder(self):
         path = self.devgroup.GetRecorder()
         return DVBRecorderClient(path)
-        
+
     def add_device (self, adapter, frontend, **kwargs):
         return self.devgroup.AddDevice('(uu)', adapter, frontend, **kwargs)
-        
+
     def remove_device(self, adapter, frontend, **kwargs):
         return self.devgroup.RemoveDevice('(uu)', adapter, frontend, **kwargs)
-    
+
     def get_channel_list(self):
         path = self.devgroup.GetChannelList()
         return DVBChannelListClient(path)
-    
+
     def get_members(self, **kwargs):
         return self.devgroup.GetMembers(**kwargs)
-        
+
     def get_name(self, **kwargs):
         return self.devgroup.GetName(**kwargs)
-    
+
     def set_name(self, name, **kwargs):
         return self.devgroup.SetName('(s)', name, **kwargs)
-        
+
     def get_type(self, **kwargs):
         return self.devgroup.GetType(**kwargs)
-        
+
     def get_schedule(self, channel_sid):
         path, success = self.devgroup.GetSchedule('(u)', channel_sid)
         if success:
             return DVBScheduleClient(path)
         else:
             return None
-        
+
     def get_recordings_directory (self, **kwargs):
         return self.devgroup.GetRecordingsDirectory(**kwargs)
-        
+
     def set_recordings_directory (self, location, **kwargs):
         return self.devgroup.SetRecordingsDirectory('(s)', location, **kwargs)
 
@@ -232,22 +232,22 @@ class DVBScannerClient(GObject.GObject):
 
         self.scanner = _get_proxy(objpath, scanner_iface)
         self.scanner.connect("g-signal", self.on_g_signal)
-        
+
     def add_scanning_data(self, data, **kwargs):
         return self.scanner.AddScanningData ('(a{sv})', data, **kwargs)
-        
+
     def add_scanning_data_from_file(self, path, **kwargs):
         return self.scanner.AddScanningDataFromFile('(s)', path, **kwargs)
-        
+
     def run(self, **kwargs):
         self.scanner.Run(**kwargs)
-        
+
     def destroy(self, **kwargs):
         self.scanner.Destroy(**kwargs)
-        
+
     def write_channels_to_file(self, channel_sids, channelfile, **kwargs):
         self.scanner.WriteChannelsToFile('(aus)', channel_sids, channelfile, **kwargs)
-        
+
     def write_all_channels_to_file(self, channelfile, **kwargs):
         self.scanner.WriteAllChannelsToFile('(s)', channelfile, **kwargs)
 
@@ -275,34 +275,34 @@ class DVBRecordingsStoreClient(GObject.GObject):
 
         self.recstore = _get_proxy(RECSTORE_PATH, RECSTORE_IFACE)
         self.recstore.connect("g-signal", self.on_g_signal)
-        
+
     def get_recordings(self, **kwargs):
         return self.recstore.GetRecordings(**kwargs)
-        
+
     def get_location(self, rid, **kwargs):
         return self.recstore.GetLocation('(u)', rid, **kwargs)
-        
+
     def get_name(self, rid, **kwargs):
         return self.recstore.GetName('(u)', rid, **kwargs)
-        
+
     def get_description(self, rid, **kwargs):
         return self.recstore.GetDescription('(u)', rid, **kwargs)
-        
+
     def get_length(self, rid, **kwargs):
         return self.recstore.GetLength('(u)', rid, **kwargs)
-        
+
     def get_start_time(self, rid, **kwargs):
         return self.recstore.GetStartTime('(u)', rid, **kwargs)
-        
+
     def get_start_timestamp(self, rid, **kwargs):
         return self.recstore.GetStartTimestamp('(u)', rid, **kwargs)
-        
+
     def delete(self, rid, **kwargs):
         return self.recstore.Delete('(u)', rid, **kwargs)
-        
+
     def get_channel_name(self, rid, **kwargs):
         return self.recstore.GetChannelName('(u)', rid, **kwargs)
-        
+
     def get_all_informations(self, rid, **kwargs):
         return self.recstore.GetAllInformations('(u)', rid, **kwargs)
 
@@ -325,40 +325,40 @@ class DVBRecorderClient(GObject.GObject):
         self.recorder = _get_proxy(object_path, RECORDER_IFACE)
         self.recorder.connect("g-signal", self.on_g_signal)
         self.object_path = object_path
-        
+
     def get_path(self):
         return self.object_path
-        
+
     def add_timer (self, channel, year, month, day, hour, minute, duration, **kwargs):
         return self.recorder.AddTimer('(uiiiiiu)', channel, year, month, day, hour, minute, duration, **kwargs)
-        
+
     def add_timer_with_margin (self, channel, year, month, day, hour, minute, duration, **kwargs):
         return self.recorder.AddTimerWithMargin('(uiiiiiu)', channel, year, month, day, hour, minute, duration, **kwargs)
-        
+
     def add_timer_for_epg_event(self, event_id, channel_sid, **kwargs):
         return self.recorder.AddTimerForEPGEvent('(uu)', event_id, channel_sid, **kwargs)
-        
+
     def delete_timer(self, tid, **kwargs):
         return self.recorder.DeleteTimer('(u)', tid, **kwargs)
-        
+
     def get_timers(self, **kwargs):
         return self.recorder.GetTimers(**kwargs)
-        
+
     def get_start_time(self, tid, **kwargs):
         return self.recorder.GetStartTime('(u)', tid, **kwargs)
 
     def set_start_time(self, tid, year, month, day, hour, minute, **kwargs):
         return self.recorder.SetStartTime ('(uiiiii)', tid, year, month, day, hour, minute)
-        
+
     def get_end_time(self, tid, **kwargs):
         return self.recorder.GetEndTime('(u)', tid, **kwargs)
-        
+
     def get_duration(self, tid, **kwargs):
         return self.recorder.GetDuration('(u)', tid, **kwargs)
 
     def set_duration(self, tid, duration, **kwargs):
         return self.recorder.SetDuration('(uu)', tid, duration, **kwargs)
-        
+
     def get_channel_name(self, tid, **kwargs):
         return self.recorder.GetChannelName('(u)', tid, **kwargs)
 
@@ -367,16 +367,16 @@ class DVBRecorderClient(GObject.GObject):
 
     def get_all_informations(self, tid, **kwargs):
         return self.recorder.GetAllInformations('(u)', tid, **kwargs)
-        
+
     def get_active_timers(self, **kwargs):
         return self.recorder.GetActiveTimers(**kwargs)
-        
+
     def is_timer_active(self, tid, **kwargs):
         return self.recorder.IsTimerActive('(u)', tid, **kwargs)
-        
+
     def has_timer(self, year, month, day, hour, minute, duration, **kwargs):
         return self.recorder.HasTimer('(uuuuuu)', year, month, day, hour, minute, duration, **kwargs)
-        
+
     def has_timer_for_event(self, event_id, channel_sid, **kwargs):
         return self.recorder.HasTimerForEvent('(uu)', event_id, channel_sid, **kwargs)
 
@@ -388,104 +388,104 @@ class DVBRecorderClient(GObject.GObject):
             self.emit("recording-started", params[0])
         elif signal_name == "RecordingFinished":
             self.emit("recording-finished", params[0])
-           
+
 class DVBChannelListClient:
 
     def __init__(self, object_path):
         self.channels = _get_proxy(object_path, CHANNEL_LIST_IFACE)
         self.object_path = object_path
-        
+
     def get_path(self):
         return self.object_path
-        
+
     def get_channels(self, **kwargs):
         return self.channels.GetChannels(**kwargs)
-        
+
     def get_radio_channels(self, **kwargs):
         return self.channels.GetRadioChannels(**kwargs)
-        
+
     def get_tv_channels(self, **kwargs):
         return self.channels.GetTVChannels(**kwargs)
-        
+
     def get_channel_name(self, cid, **kwargs):
         return self.channels.GetChannelName('(u)', cid, **kwargs)
-        
+
     def get_channel_network(self, cid, **kwargs):
         return self.channels.GetChannelNetwork('(u)', cid, **kwargs)
-        
+
     def is_radio_channel(self, cid, **kwargs):
         return self.channels.IsRadioChannel('(u)', cid, **kwargs)
-        
+
     def get_channel_url(self, cid, **kwargs):
         return self.channels.GetChannelURL('(u)', cid, **kwargs)
-        
+
     def get_channel_infos(self, **kwargs):
         return self.channels.GetChannelInfos(**kwargs)
-        
+
     def get_channels_of_group(self, group_id, **kwargs):
         return self.channels.GetChannelsOfGroup('(i)', group_id, **kwargs)
-        
+
     def add_channel_to_group(self, cid, group_id, **kwargs):
         return self.channels.AddChannelToGroup('(ui)', cid, group_id, **kwargs)
-        
+
     def remove_channel_from_group(self, cid, group_id, **kwargs):
         return self.channels.RemoveChannelFromGroup('(ui)', cid, group_id, **kwargs)
-        
+
 class DVBScheduleClient(GObject.GObject):
 
     def __init__(self, object_path):
         GObject.GObject.__init__(self)
-        
+
         # "/org/gnome/DVB/DeviceGroup/%u/Schedule/%u";
         elements = object_path.split("/")
-        
+
         self._group = int(elements[5])
         self._sid = int(elements[7])
 
         self.schedule = _get_proxy(object_path, SCHEDULE_IFACE)
-        
+
     def get_group_id(self):
         return self._group
-        
+
     def get_channel_sid(self):
         return self._sid
-        
+
     def get_all_events(self, **kwargs):
         return self.schedule.GetAllEvents(**kwargs)
-        
+
     def get_all_event_infos(self, **kwargs):
         return self.schedule.GetAllEventInfos(**kwargs)
-        
+
     def get_informations(self, eid, **kwargs):
         return self.schedule.GetInformations('(u)', eid, **kwargs)
-        
+
     def now_playing(self, **kwargs):
         return self.schedule.NowPlaying(**kwargs)
-        
+
     def next(self, eid, **kwargs):
         return self.schedule.Next('(u)', eid, **kwargs)
-        
+
     def get_name(self, eid, **kwargs):
         return self.schedule.GetName('(u)', eid, **kwargs)
-        
+
     def get_short_description(self, eid, **kwargs):
         return self.schedule.GetShortDescription('(u)', eid, **kwargs)
-        
+
     def get_extended_description(self, eid, **kwargs):
         return self.schedule.GetExtendedDescription('(u)', eid, **kwargs)
-        
+
     def get_duration(self, eid, **kwargs):
         return self.schedule.GetDuration('(u)', eid, **kwargs)
-        
+
     def get_local_start_time(self, eid, **kwargs):
         return self.schedule.GetLocalStartTime('(u)', eid, **kwargs)
-        
+
     def get_local_start_timestamp(self, eid, **kwargs):
         return self.schedule.GetLocalStartTimestamp('(u)', eid, **kwargs)
-        
+
     def is_running(self, eid, **kwargs):
         return self.schedule.IsRunning('(u)', eid, **kwargs)
-        
+
     def is_scrambled(self, eid, **kwargs):
         return self.schedule.IsScrambled('(u)', eid, **kwargs)
 
diff --git a/client/gnomedvb/DVBModel.py b/client/gnomedvb/DVBModel.py
index a03a1e5..7db18fe 100644
--- a/client/gnomedvb/DVBModel.py
+++ b/client/gnomedvb/DVBModel.py
@@ -24,19 +24,19 @@ class DVBModel (gnomedvb.DVBManagerClient):
 
     def __init__(self):
         gnomedvb.DVBManagerClient.__init__(self)
-        
+
     def get_device_group(self, group_id):
         path, success = self.manager.GetDeviceGroup('(u)', group_id)
         if success:
             return DeviceGroup(path)
         else:
             return None
-        
+
     def get_registered_device_groups(self, result_handler,
             error_handler=gnomedvb.global_error_handler):
         def groups_handler(proxy, paths, user_data):
             result_handler([DeviceGroup(path) for path in paths])
-            
+
         if result_handler:
             self.manager.GetRegisteredDeviceGroups(result_handler=groups_handler,
                 error_handler=error_handler)
@@ -54,7 +54,7 @@ class DVBModel (gnomedvb.DVBManagerClient):
                 "Unknown")
             devs.append(dev)
         result_handler(devs)
-        
+
     def get_unregistered_devices(self, result_handler,
             error_handler=gnomedvb.global_error_handler):
         """
@@ -71,14 +71,14 @@ class DVBModel (gnomedvb.DVBManagerClient):
                         dev.type = info["type"]
                         unregistered.add(dev)
             result_handler(unregistered)
-        
+
         def registered_handler(devgroups):
             for group in devgroups:
                 for dev in group["devices"]:
                     registered.add(dev)
             self.get_all_devices(result_handler=devices_handler,
                 error_handler=error_handler)
-        
+
         registered = set()
         self.get_registered_device_groups(result_handler=registered_handler,
             error_handler=error_handler)
@@ -87,12 +87,12 @@ class DeviceGroup(gnomedvb.DVBDeviceGroupClient):
 
     def __init__(self, objpath):
         gnomedvb.DVBDeviceGroupClient.__init__(self, objpath)
-        
+
         self._adapter_pattern = re.compile("adapter(\d+?)/frontend(\d+?)")
         self._name = self.get_name()
         self._type = self.get_type()
         self._members = self.get_members()
-        
+
     def __getitem__(self, key):
         if key == "id":
             return self._id
@@ -104,7 +104,7 @@ class DeviceGroup(gnomedvb.DVBDeviceGroupClient):
             return self._type
         else:
             raise KeyError("Unknown key "+str(key))
-    
+
     def get_members(self):
         devices = []
         manager = gnomedvb.DVBManagerClient()
@@ -122,4 +122,3 @@ class DeviceGroup(gnomedvb.DVBDeviceGroupClient):
     def remove_device(self, device, **kwargs):
         return gnomedvb.DVBDeviceGroupClient.remove_device(self, device.adapter,
             device.frontend, **kwargs)
-     
diff --git a/client/gnomedvb/Device.py b/client/gnomedvb/Device.py
index 3926459..dfa2e21 100644
--- a/client/gnomedvb/Device.py
+++ b/client/gnomedvb/Device.py
@@ -27,17 +27,17 @@ class Device:
         self.adapter = adapter
         self.frontend = frontend
         self.type = devtype
-        
+
     def __hash__(self):
         return 2 * PRIME + PRIME * self.adapter + self.frontend
-        
+
     def __eq__(self, other):
         if not isinstance(other, Device):
             return False
-        
+
         return (self.adapter == other.adapter \
             and self.frontend == other.frontend)
-            
+
     def __repr__(self):
         return "/dev/dvb/adapter%d/frontend%d" % (self.adapter, self.frontend)
 
diff --git a/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py b/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
index 8e7b0d6..68a49e4 100644
--- a/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
+++ b/client/gnomedvb/ui/channellisteditor/ChannelListEditorDialog.py
@@ -41,7 +41,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
 
         self.set_default_size(600, 500)
         self.set_border_width(5)
-        
+
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
 
@@ -62,47 +62,47 @@ class ChannelListEditorDialog(Gtk.Dialog):
             self.on_group_changed)
         self.channel_groups_view.get_renderer().connect("edited",
             self.on_channel_group_edited)
-        
+
         scrolledgroups = Gtk.ScrolledWindow()
         scrolledgroups.add(self.channel_groups_view)
         scrolledgroups.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
         scrolledgroups.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         groups_box.pack_start(scrolledgroups, True, True, 0)
-        
+
         groups_buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         groups_buttonbox.set_spacing(6)
         groups_buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
         groups_box.pack_end(groups_buttonbox, False, False, 0)
-        
+
         new_group_button = Gtk.Button(stock=Gtk.STOCK_ADD)
         new_group_button.connect("clicked", self.on_new_group_clicked)
         groups_buttonbox.pack_start(new_group_button, True, True, 0)
-        
+
         self.del_group_button = Gtk.Button(stock=Gtk.STOCK_REMOVE)
         self.del_group_button.connect("clicked", self.on_delete_group_clicked)
         groups_buttonbox.pack_start(self.del_group_button, True, True, 0)
-   
+
         # device groups
         self.devgroupslist = Gtk.ListStore(str, int, GObject.GObject)
-        
+
         self.devgroupscombo = Gtk.ComboBox.new_with_model_and_entry(self.devgroupslist)
         self.devgroupscombo.connect("changed", self.on_devgroupscombo_changed)
         cell_adapter = Gtk.CellRendererText()
         self.devgroupscombo.pack_start(cell_adapter, True)
         self.devgroupscombo.set_entry_text_column(0)
-        
+
         groups_label = Gtk.Label()
         groups_label.set_markup_with_mnemonic(_("_Group:"))
         groups_label.set_mnemonic_widget(self.devgroupscombo)
-        
+
         groups_box = Gtk.Box(spacing=6)
         groups_box.pack_start(groups_label, False, True, 0)
         groups_box.pack_start(self.devgroupscombo, True, True, 0)
-        
+
         self.devgroups_frame = BaseFrame("<b>%s</b>" % _("Device groups"),
             groups_box, False, False)
         self.vbox_main.pack_start(self.devgroups_frame, False, True, 0)
-     
+
         # channels
         channels_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.vbox_main.pack_start(channels_box, True, True, 0)
@@ -123,7 +123,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
 
         left_frame = Frame("<b>%s</b>" % _("All channels"), self.channels_view)
         cbox.pack_start(left_frame, True, True, 0)
-        
+
         # selected channels
         self.selected_channels_store = Gtk.ListStore(str, long) # Name, sid
         self.selected_channels_view = Gtk.TreeView.new_with_model(self.selected_channels_store)
@@ -141,19 +141,19 @@ class ChannelListEditorDialog(Gtk.Dialog):
         col_name.add_attribute(cell_name, "markup", 0)
         self.selected_channels_view.append_column(col_name)
         self.selected_channels_view.show()
-        
+
         self.scrolled_selected_channels = Gtk.ScrolledWindow()
         self.scrolled_selected_channels.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         self.scrolled_selected_channels.set_policy(Gtk.PolicyType.AUTOMATIC,
             Gtk.PolicyType.AUTOMATIC)
         self.scrolled_selected_channels.add(self.selected_channels_view)
-        
+
         self.select_group_helpbox = HelpBox()
         self.select_group_helpbox.set_markup(_("Choose a channel group"))
         self.right_frame = BaseFrame("<b>%s</b>" % _("Channels of group"),
             self.select_group_helpbox)
         cbox.pack_start(self.right_frame, True, True, 0)
-        
+
         buttonbox = Gtk.ButtonBox()
         buttonbox.set_spacing(6)
         buttonbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
@@ -164,24 +164,24 @@ class ChannelListEditorDialog(Gtk.Dialog):
         self.remove_channel_button.connect("clicked", self.on_remove_channel_clicked)
         buttonbox.pack_start(self.remove_channel_button, True, True, 0)
         channels_box.pack_start(buttonbox, False, False, 0)
-        
+
         self.del_group_button.set_sensitive(False)
         self.add_channel_button.set_sensitive(False)
         self.remove_channel_button.set_sensitive(False)
-        
+
         self.fill_device_groups()
         self.fill_channel_groups()
-        
+
         self.show_all()
-        
+
     def fill_channel_groups(self):
         def add_groups(proxy, groups, user_data):
             for gid, name in groups:
                 self.channel_groups.append([gid, name, False]) # not editable
-        
+
         self.model.get_channel_groups(result_handler=add_groups,
             error_handler=gnomedvb.global_error_handler)
-            
+
     def fill_device_groups(self):
         def append_groups(groups):
             for group in groups:
@@ -192,14 +192,14 @@ class ChannelListEditorDialog(Gtk.Dialog):
             else:
                 self.devgroups_frame.show()
             self.devgroupscombo.set_active(0)
-                
+
         self.model.get_registered_device_groups(result_handler=append_groups,
             error_handler=gnomedvb.global_error_handler)
-            
+
     def refill_channel_groups(self):
         self.channel_groups.clear()
         self.fill_channel_groups()
-        
+
     def fill_group_members(self):
         def add_channels(proxy, data, user_data):
             channels, success = data
@@ -208,7 +208,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
                     name, success = self.channel_list.get_channel_name(channel_id)
                     if success:
                         self.selected_channels_store.append([name, channel_id])
-    
+
         self.selected_channels_store.clear()
         data = self.get_selected_channel_group()
         if data:
@@ -216,24 +216,24 @@ class ChannelListEditorDialog(Gtk.Dialog):
             self.channel_list.get_channels_of_group(group_id,
                 result_handler=add_channels,
                 error_handler=gnomedvb.global_error_handler)
-            
+
     def get_selected_channels_all(self):
         sel = self.channels_view.get_selection()
         model, paths = sel.get_selected_rows()
         return [model[path][ChannelsStore.COL_SID] for path in paths]
-            
+
     def get_selected_channels_selected_group(self):
         sel = self.selected_channels_view.get_selection()
         model, paths = sel.get_selected_rows()
         return [model[path][1] for path in paths]
-            
+
     def get_selected_channel_group(self):
         model, aiter = self.channel_groups_view.get_selection().get_selected()
         if aiter == None:
             return None
         else:
             return self.channel_groups[aiter][0], self.channel_groups[aiter][1]
-            
+
     def on_new_group_clicked(self, button):
         aiter = self.channel_groups.append()
         self.channel_groups.set_value(aiter, self.channel_groups.COL_EDITABLE,
@@ -243,7 +243,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
         self.channel_groups_view.set_cursor(path,
             self.channel_groups_view.get_column(0), True)
         self.channel_groups_view.scroll_to_cell(path)
-        
+
     def on_add_channel_group_finished(self, proxy, data, user_data):
         group_id, success = data
         if success:
@@ -256,7 +256,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
                 "<big><span weight=\"bold\">%s</span></big>" % _("An error occured while adding the group"))
             error_dialog.run()
             error_dialog.destroy()
-            
+
     def on_delete_group_clicked(self, button):
         dialog = Gtk.MessageDialog(parent=self,
             flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
@@ -271,7 +271,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
                 result_handler=self.on_remove_channel_group_finished,
                 error_handler=gnomedvb.global_error_handler)
         dialog.destroy()
-        
+
     def on_remove_channel_group_finished(self, proxy, success, user_data):
         if success:
             self.refill_channel_groups()
@@ -283,7 +283,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
                 "<big><span weight=\"bold\">%s</span></big>" % _("An error occured while removing the group"))
             error_dialog.run()
             error_dialog.destroy()
-            
+
     def on_add_channel_clicked(self, button):
         channel_ids = self.get_selected_channels_all()
         group_data = self.get_selected_channel_group()
@@ -291,7 +291,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
             for channel_id in channel_ids:
                 self.channel_list.add_channel_to_group(channel_id, group_data[0])
             self.fill_group_members()
-        
+
     def on_remove_channel_clicked(self, button):
         channel_ids = self.get_selected_channels_selected_group()
         group_data = self.get_selected_channel_group()
@@ -299,17 +299,17 @@ class ChannelListEditorDialog(Gtk.Dialog):
             for channel_id in channel_ids:
                 self.channel_list.remove_channel_from_group(channel_id, group_data[0])
             self.fill_group_members()
-        
+
     def on_channel_store_selected(self, treeselection):
         model, paths = treeselection.get_selected_rows()
         val = (len(paths) > 0 and self.get_selected_channel_group() != None)
         self.add_channel_button.set_sensitive(val)
-        
+
     def on_selected_channels_changed(self, treeselection):
         model, paths = treeselection.get_selected_rows()
         val = (len(paths) > 0)
         self.remove_channel_button.set_sensitive(val)
-        
+
     def on_group_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
         val = aiter != None
@@ -320,7 +320,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
         else:
             self.right_frame.set_aligned_child(self.select_group_helpbox)
             self.selected_channels_store.clear()
-            
+
     def on_channel_group_edited(self, renderer, path, new_text):
         aiter = self.channel_groups.get_iter(path)
         if len(new_text) == 0:
@@ -329,7 +329,7 @@ class ChannelListEditorDialog(Gtk.Dialog):
             self.model.add_channel_group(new_text,
                 result_handler=self.on_add_channel_group_finished,
                 error_handler=gnomedvb.global_error_handler)
-                
+
     def get_selected_group(self):
         if self.devgroup != None:
             return self.devgroup
@@ -338,17 +338,17 @@ class ChannelListEditorDialog(Gtk.Dialog):
             return None
         else:
             return self.devgroupslist[aiter][2]
-    
+
     def on_devgroupscombo_changed(self, combo):
         group = self.get_selected_group()
         if group != None:
             self.channel_list = group.get_channel_list()
             self.channels_store = ChannelsStore(group)
             self.channels_view.set_model(self.channels_store)
-            
+
     def on_channels_view_activated(self, treeview, aiter, path):
         self.on_add_channel_clicked(None)
-        
+
     def on_selected_channels_view_activated(self, treeview, aiter, path):
         self.on_remove_channel_clicked(None)
 
diff --git a/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py b/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
index eb21a0c..6e6a957 100644
--- a/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
+++ b/client/gnomedvb/ui/controlcenter/ControlCenterWindow.py
@@ -33,83 +33,83 @@ from gnomedvb.ui.timers.EditTimersDialog import EditTimersDialog
 from gnomedvb.ui.timers.MessageDialogs import TimerFailureDialog
 from gnomedvb.ui.preferences.Preferences import Preferences
 from gnomedvb.ui.recordings.RecordingsDialog import RecordingsDialog
-   
+
 class ControlCenterWindow(Gtk.Window):
 
     def __init__(self, model):
         GObject.GObject.__init__(self)
-        
+
         self.runningnextstore = None
         self.scrolledrunningnext = None
         self.runningnextview = None
         self.__single_group = None
-        
+
         self.channellists = {}
         self.manager = model
         self.manager.connect('group-added', self._on_manager_group_added)
         self.manager.connect('group-removed', self._on_manager_group_removed)
-        
+
         self.connect('delete-event', Gtk.main_quit)
         self.connect('destroy-event', Gtk.main_quit)
         self.set_title(_("DVB Control Center"))
         self.set_default_size(800, 500)
-        
+
         self.vbox_outer = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
         self.vbox_outer.show()
         self.add(self.vbox_outer)
-        
+
         self.toolbar = None
         self.vbox_left  = None
         self.__create_menu()
         self.__create_toolbar()
-        
+
         self.hbox = Gtk.Box(spacing=6)
         self.vbox_outer.pack_start(self.hbox, True, True, 0)
-        
+
         self.hpaned = Gtk.Paned()
         self.hpaned.set_border_width(3)
         self.hpaned.set_position(175)
         self.hbox.pack_start(self.hpaned, True, True, 0)
-        
+
         self.vbox_left = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.hpaned.pack1(self.vbox_left)
 
         self.devgroupslist = Gtk.ListStore(str, int, GObject.GObject)
         self.devgroupslist.connect("row-inserted", self._on_devgroupslist_inserted)
-        
+
         self.devgroupscombo = Gtk.ComboBox.new_with_model_and_entry(self.devgroupslist)
-        
+
         cell_adapter = Gtk.CellRendererText()
         self.devgroupscombo.pack_start(cell_adapter, True)
         self.devgroupscombo.set_entry_text_column(0)
         self.devgroupscombo.connect("changed", self._on_devgroupscombo_changed)
         self.vbox_left.pack_start(self.devgroupscombo, False, True, 0)
-        
+
         self.channelsstore = None
-        
+
         self.channelsview = ChannelsView()
         self.channelsview.set_headers_visible(False)
         self.channelsview.get_selection().connect("changed", self._on_channel_selected)
-        
+
         scrolledchannels = Gtk.ScrolledWindow()
         scrolledchannels.add(self.channelsview)
         scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         scrolledchannels.set_shadow_type(Gtk.ShadowType.IN)
         self.vbox_left.pack_start(scrolledchannels, True, True, 0)
-        
+
         self.schedulestore = None
-                
+
         self.help_eventbox = HelpBox()
         self.choose_group_text = _("Choose a device group and channel on the left to view the program guide")
         self.create_group_text = _("No devices are configured. Please go to preferences to configure them.")
         self.no_events_text = _("There is currently no schedule available for this channel")
         self.hpaned.pack2(self.help_eventbox)
-        
+
         self.schedulepaned = SchedulePaned()
         self.schedulepaned.show()
         self.scheduleview = self.schedulepaned.get_treeview()
         self.scheduleview.connect("button-press-event", self._on_event_selected)
-        
+
         self.get_device_groups()
         if len(self.devgroupslist) == 0:
             self.help_eventbox.set_markup(self.create_group_text)
@@ -117,7 +117,7 @@ class ControlCenterWindow(Gtk.Window):
             self._select_first_group()
 
         Gtk.Window.set_default_icon_name("gnome-dvb-daemon")
-      
+
     def __create_menu(self):
         ui = '''
         <menubar name="MenuBar">
@@ -147,11 +147,11 @@ class ControlCenterWindow(Gtk.Window):
         </menubar>'''
 
         uimanager = Gtk.UIManager()
-        
+
         # Add the accelerator group to the toplevel window
         accelgroup = uimanager.get_accel_group()
         self.add_accel_group(accelgroup)
-        
+
         # Create actions
         actiongroup = Gtk.ActionGroup('Root')
         actiongroup.add_actions([
@@ -162,7 +162,7 @@ class ControlCenterWindow(Gtk.Window):
         ])
         # Add the actiongroup to the uimanager
         uimanager.insert_action_group(actiongroup, 0)
-        
+
         actiongroup = Gtk.ActionGroup('Timers')
         actiongroup.add_actions([
             ('EditTimers', None, _('_Manage'), '<Control>T',
@@ -172,7 +172,7 @@ class ControlCenterWindow(Gtk.Window):
             ('Quit', Gtk.STOCK_QUIT, _('_Quit'), None,
              _('Quit the Program'), Gtk.main_quit)])
         uimanager.insert_action_group(actiongroup, 1)
-        
+
         actiongroup = Gtk.ActionGroup('Edit')
         actiongroup.add_actions([
             ('EditChannelLists', None, _('_Channel Lists'), None,
@@ -181,7 +181,7 @@ class ControlCenterWindow(Gtk.Window):
              _('Display preferences'), self._on_button_prefs_clicked),
         ])
         uimanager.insert_action_group(actiongroup, 2)
-        
+
         actiongroup = Gtk.ActionGroup('View')
         actiongroup.add_actions([
             ('WhatsOnNow', None, _("_What's on now"), None,
@@ -204,7 +204,7 @@ class ControlCenterWindow(Gtk.Window):
         action = actiongroup.get_action('Channels')
         action.set_active(True)
         uimanager.insert_action_group(actiongroup, 3)
-        
+
         actiongroup = Gtk.ActionGroup('Help')
         actiongroup.add_actions([
             ('About', Gtk.STOCK_ABOUT, _('_About'), None,
@@ -218,44 +218,44 @@ class ControlCenterWindow(Gtk.Window):
 
         timers_image = Gtk.Image.new_from_icon_name("appointment-soon", Gtk.IconSize.MENU)
         timers_image.show()
-        
+
         self.timersitem = uimanager.get_widget('/MenuBar/Timers/EditTimers')
         self.timersitem.set_image(timers_image)
         self.timersitem.set_sensitive(False)
-        
+
         recordings_image = Gtk.Image.new_from_icon_name("video", Gtk.IconSize.MENU)
         recordings_image.show()
-        
+
         recordings = uimanager.get_widget('/MenuBar/Timers/Recordings')
         recordings.set_image(recordings_image)
-        
+
         whatson_image = Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.MENU)
         whatson_image.show()
-        
+
         self.whatons_item = uimanager.get_widget('/MenuBar/View/WhatsOnNow')
         self.whatons_item.set_image(whatson_image)
         self.whatons_item.set_sensitive(False)
-        
+
         self.refresh_menuitem = uimanager.get_widget('/MenuBar/View/Refresh')
         self.refresh_menuitem.set_sensitive(False)
-        
+
         self.prev_day_menuitem = uimanager.get_widget('/MenuBar/View/PrevDay')
         prev_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_BACK, Gtk.IconSize.MENU)
         prev_image.show()
         self.prev_day_menuitem.set_image(prev_image)
         self.prev_day_menuitem.set_sensitive(False)
-        
+
         self.next_day_menuitem = uimanager.get_widget('/MenuBar/View/NextDay')
         next_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_FORWARD, Gtk.IconSize.MENU)
         next_image.show()
         self.next_day_menuitem.set_image(next_image)
         self.next_day_menuitem.set_sensitive(False)
-        
+
         # Create a MenuBar
         menubar = uimanager.get_widget('/MenuBar')
         menubar.show()
         self.vbox_outer.pack_start(menubar, False, True, 0)
-        
+
     def __create_toolbar(self):
         self.toolbar = Gtk.Toolbar()
         self.toolbar.show()
@@ -263,7 +263,7 @@ class ControlCenterWindow(Gtk.Window):
 
         timers_image = Gtk.Image.new_from_icon_name("appointment-soon", Gtk.IconSize.MENU)
         timers_image.show()
-        
+
         self.button_display_timers = Gtk.ToolButton(icon_widget=timers_image, label=_("Recording schedule"))
         self.button_display_timers.set_is_important(True)
         self.button_display_timers.set_sensitive(False)
@@ -271,36 +271,36 @@ class ControlCenterWindow(Gtk.Window):
         self.button_display_timers.set_tooltip_markup(_("Manage recording schedule"))
         self.button_display_timers.show()
         self.toolbar.insert(self.button_display_timers, 0)
-        
+
         recordings_image = Gtk.Image.new_from_icon_name("video", Gtk.IconSize.MENU)
         recordings_image.show()
-        
+
         button_recordings = Gtk.ToolButton(icon_widget=recordings_image, label=_("Recordings"))
         button_recordings.set_is_important(True)
         button_recordings.connect("clicked", self._on_button_recordings_clicked)
         button_recordings.show()
         self.toolbar.insert(button_recordings, 1)
-        
+
         whatson_image = Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.LARGE_TOOLBAR)
         whatson_image.show()
-        
+
         self.button_whatson = Gtk.ToolButton(icon_widget=whatson_image, label=_("What's on now"))
         self.button_whatson.set_is_important(True)
         self.button_whatson.set_sensitive(False)
         self.button_whatson.connect("clicked", self._on_whats_on_now_clicked)
         self.button_whatson.show()
         self.toolbar.insert(self.button_whatson, 2)
-         
+
         sep = Gtk.SeparatorToolItem()
         sep.show()
         self.toolbar.insert(sep, 3)
-        
+
         self.refresh_button = Gtk.ToolButton.new_from_stock(Gtk.STOCK_REFRESH)
         self.refresh_button.connect("clicked", self._on_refresh_clicked)
-        self.refresh_button.set_tooltip_markup(_("Refresh program guide"))        
+        self.refresh_button.set_tooltip_markup(_("Refresh program guide"))
         self.refresh_button.show()
         self.toolbar.insert(self.refresh_button, 4)
-        
+
         prev_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_BACK, Gtk.IconSize.LARGE_TOOLBAR)
         prev_image.show()
         self.button_prev_day = Gtk.ToolButton(icon_widget=prev_image, label=_("Previous Day"))
@@ -309,7 +309,7 @@ class ControlCenterWindow(Gtk.Window):
         self.button_prev_day.set_sensitive(False)
         self.button_prev_day.show()
         self.toolbar.insert(self.button_prev_day, 5)
-        
+
         next_image = Gtk.Image.new_from_stock(Gtk.STOCK_GO_FORWARD, Gtk.IconSize.LARGE_TOOLBAR)
         next_image.show()
         self.button_next_day = Gtk.ToolButton(icon_widget=next_image, label=_("Next Day"))
@@ -318,14 +318,14 @@ class ControlCenterWindow(Gtk.Window):
         self.button_next_day.set_sensitive(False)
         self.button_next_day.show()
         self.toolbar.insert(self.button_next_day, 6)
-        
+
     def get_device_groups(self):
         def append_groups(groups):
             for group in groups:
                 self._append_group(group)
             self.check_single_group_mode()
         self.manager.get_registered_device_groups(result_handler=append_groups)
-        
+
     def check_single_group_mode(self):
         val = len(self.devgroupslist) == 1
         if val:
@@ -335,29 +335,29 @@ class ControlCenterWindow(Gtk.Window):
         else:
             self.__single_group = None
             self.devgroupscombo.show()
-    
+
     def _select_first_group(self):
         self.devgroupscombo.set_active(0)
         self.channelsview.grab_focus()
-           
+
     def _append_group(self, group):
         self.devgroupslist.append([group["name"], group["id"], group])
         self.channellists[group["id"]] = group.get_channel_list()
-        
+
     def _remove_group(self, group_id):
         aiter = None
         for row in self.devgroupslist:
             if row[1] == group_id:
                 aiter = row.iter
-                
+
         if aiter != None:
             if self._get_selected_group()["id"] == group_id:
                 # Select no group
                 self.devgroupscombo.set_active(-1)
-                
+
             self.devgroupslist.remove(aiter)
             del self.channellists[group_id]
-            
+
     def _reset_ui(self):
         self.channelsstore = None
         self.channelsview.set_model(None)
@@ -367,7 +367,7 @@ class ControlCenterWindow(Gtk.Window):
             text = self.choose_group_text
         self._display_help_message(text)
         self._set_timers_sensitive(False)
-        
+
     def _reset_schedule_view(self):
         self.schedulestore = None
         self.scheduleview.set_model(None)
@@ -378,12 +378,12 @@ class ControlCenterWindow(Gtk.Window):
         if group != None:
             self._append_group(group)
             self.check_single_group_mode()
-        
+
     def _on_manager_group_removed(self, manager, group_id):
         self._remove_group(group_id)
         self.check_single_group_mode()
         self._select_first_group()
-            
+
     def _get_selected_group(self):
         if self.__single_group != None:
             return self.__single_group
@@ -392,7 +392,7 @@ class ControlCenterWindow(Gtk.Window):
             return None
         else:
             return self.devgroupslist[aiter][2]
-        
+
     def _get_selected_channel_sid(self):
         model, aiter = self.channelsview.get_selection().get_selected()
         if aiter != None:
@@ -400,25 +400,25 @@ class ControlCenterWindow(Gtk.Window):
             return sid
         else:
             return None
-    
+
     def _on_devgroupscombo_changed(self, combo):
         group = self._get_selected_group()
         if group != None:
             self._set_timers_sensitive(True)
             self._set_whatson_sensitive(True)
-            
+
             self.channelsstore = ChannelsStore(group)
             self.channelsview.set_model(self.channelsstore)
-            
+
             self._reset_schedule_view()
         else:
             self._reset_ui()
-            
+
     def _on_devgroupslist_inserted(self, model, path, aiter):
         if len(model) == 1:
             # Delay the call otherwise we get DBus errors
             GObject.timeout_add(100, self._select_first_group)
-    
+
     def _on_channel_selected(self, treeselection):
         model, aiter = treeselection.get_selected()
         child = self.hpaned.get_child2()
@@ -428,7 +428,7 @@ class ControlCenterWindow(Gtk.Window):
             self.schedulestore = ScheduleStore(group, sid)
             self.schedulestore.connect("loading-finished",
                 self._on_schedule_loading_finished)
-                
+
             self.scheduleview.set_model(self.schedulestore)
             # Display schedule if it isn't already displayed
             if child != self.schedulepaned:
@@ -441,11 +441,11 @@ class ControlCenterWindow(Gtk.Window):
             # Display running/next if it isn't already displayed
             if child != self.scrolledrunningnext:
                 self._display_running_next()
-    
+
     def _on_schedule_loading_finished(self, schedulestore):
         if len(self.schedulestore) == 0:
             self._display_help_message(self.no_events_text)
-            
+
     def _display_help_message(self, text):
         child = self.hpaned.get_child2()
         self.hpaned.remove(child)
@@ -453,44 +453,44 @@ class ControlCenterWindow(Gtk.Window):
         self._set_previous_day_sensitive(False)
         self._set_next_day_sensitive(False)
         self._set_refresh_sensitive(False)
-        
+
         self.help_eventbox.set_markup(text)
-     
+
     def _display_running_next(self):
         group = self._get_selected_group()
-        
+
         self.runningnextstore = RunningNextStore(group)
-        
+
         self.scrolledrunningnext = Gtk.ScrolledWindow()
         self.scrolledrunningnext.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         self.scrolledrunningnext.set_shadow_type(Gtk.ShadowType.IN)
         self.scrolledrunningnext.show()
-        
+
         self.runningnextview = RunningNextView(self.runningnextstore)
         self.runningnextview.show()
         self.scrolledrunningnext.add(self.runningnextview)
-    
+
         child = self.hpaned.get_child2()
         self.hpaned.remove(child)
         self.hpaned.pack2(self.scrolledrunningnext)
         self._set_previous_day_sensitive(False)
         self._set_next_day_sensitive(False)
         self._set_refresh_sensitive(False)
-                
+
     def _set_next_day_sensitive(self, val):
         self.button_next_day.set_sensitive(val)
         self.next_day_menuitem.set_sensitive(val)
-        
+
     def _set_previous_day_sensitive(self, val):
         self.button_prev_day.set_sensitive(val)
         self.prev_day_menuitem.set_sensitive(val)
-             
+
     def _set_timers_sensitive(self, val):
         self.button_display_timers.set_sensitive(val)
         self.timersitem.set_sensitive(val)
-        
+
     def _set_refresh_sensitive(self, val):
-        self.refresh_button.set_sensitive(val) 
+        self.refresh_button.set_sensitive(val)
         self.refresh_menuitem.set_sensitive(val)
 
     def _set_whatson_sensitive(self, val):
@@ -515,32 +515,32 @@ class ControlCenterWindow(Gtk.Window):
                     recorder = group.get_recorder()
                     rec_id, success = recorder.add_timer_for_epg_event(event_id, channel_sid)
                 dialog.destroy()
-                
+
                 if not success:
                     dialog = TimerFailureDialog(self)
                     dialog.run()
                     dialog.destroy()
-        
+
     def _on_button_display_timers_clicked(self, button, user_data=None):
         group = self._get_selected_group()
         if group != None:
             edit = EditTimersDialog(group, self)
             edit.run()
             edit.destroy()
-            
+
     def _on_whats_on_now_clicked(self, button, user_data=None):
         self._reset_schedule_view()
-            
+
     def _on_refresh_clicked(self, button, user_data=None):
         self.schedulestore.reload_all()
-   
+
     def _on_button_prev_day_clicked(self, button, user_data=None):
         if self.schedulestore != None:
             model, aiter = self.scheduleview.get_selection().get_selected()
             if aiter == None:
                 path, col, x, y = self.scheduleview.get_path_at_pos(1, 1)
                 aiter = model.get_iter(path)
-                
+
             day_iter = self.schedulestore.get_previous_day_iter(aiter)
             if day_iter == None:
                 self._set_previous_day_sensitive(False)
@@ -549,14 +549,14 @@ class ControlCenterWindow(Gtk.Window):
                 day_path = model.get_path(day_iter)
                 self.scheduleview.scroll_to_cell(day_path, use_align=True)
                 self.scheduleview.set_cursor(day_path, None, False)
-            
+
     def _on_button_next_day_clicked(self, button, user_data=None):
         if self.schedulestore != None:
             model, aiter = self.scheduleview.get_selection().get_selected()
             if aiter == None:
                 path, col, x, y = self.scheduleview.get_path_at_pos(1, 1)
                 aiter = model.get_iter(path)
-            
+
             day_iter = self.schedulestore.get_next_day_iter(aiter)
             if day_iter == None:
                 self._set_next_day_sensitive(False)
@@ -565,23 +565,23 @@ class ControlCenterWindow(Gtk.Window):
                 day_path = model.get_path(day_iter)
                 self.scheduleview.scroll_to_cell(day_path, use_align=True)
                 self.scheduleview.set_cursor(day_path, None, False)
-    
+
     def _on_button_prefs_clicked(self, button, user_data=None):
         prefs = Preferences(self.manager, self)
         prefs.show()
-        
+
     def _on_button_recordings_clicked(self, button, user_data=None):
         dialog = RecordingsDialog(self)
         dialog.run()
         dialog.destroy()
-        
+
     def _on_view_channels_clicked(self, action, user_data=None):
         if self.vbox_left:
             if action.get_active():
                 self.vbox_left.show()
             else:
                 self.vbox_left.hide()
-        
+
     def _on_view_toolbar_clicked(self, action, user_data=None):
         if self.toolbar:
             if action.get_active():
@@ -594,14 +594,14 @@ class ControlCenterWindow(Gtk.Window):
         about.set_transient_for(self)
         #translators: These appear in the About dialog, usual format applies.
         about.set_translator_credits( _("translator-credits") )
-        
+
         for prop, val in gnomedvb.INFOS.items():
             about.set_property(prop, val)
 
         about.set_screen(self.get_screen())
         about.run()
         about.destroy()
-        
+
     def _on_edit_channellists_clicked(self, action, user_data=None):
         dialog = ChannelListEditorDialog(self.manager, parent=self)
         dialog.run()
diff --git a/client/gnomedvb/ui/preferences/DeviceGroupsView.py b/client/gnomedvb/ui/preferences/DeviceGroupsView.py
index cb434a5..3fa4d95 100644
--- a/client/gnomedvb/ui/preferences/DeviceGroupsView.py
+++ b/client/gnomedvb/ui/preferences/DeviceGroupsView.py
@@ -26,7 +26,7 @@ __all__ = ["UnassignedDevicesStore", "DeviceGroupsStore", "DeviceGroupsView"]
 class UnassignedDevicesStore (Gtk.ListStore):
 
     (COL_DEVICE,) = range(1)
-    
+
     def __init__(self):
         Gtk.ListStore.__init__(self, GObject.TYPE_PYOBJECT)
 
@@ -37,15 +37,15 @@ class DeviceGroupsStore (Gtk.TreeStore):
 
     def __init__(self):
         Gtk.TreeStore.__init__(self, GObject.GObject, GObject.TYPE_PYOBJECT)
-        
+
     def get_groups(self):
         groups = []
         for row in self:
             if not isinstance(row, Device):
                 groups.append((row[self.COL_GROUP], row.iter))
         return groups
- 
-    
+
+
 class DeviceGroupsView (Gtk.TreeView):
 
     def __init__(self, model):
@@ -53,15 +53,15 @@ class DeviceGroupsView (Gtk.TreeView):
         self.set_model(model)
         self.set_headers_visible(False)
         #self.set_reorderable(True)
-        
+
         cell_description = Gtk.CellRendererText ()
         column_description = Gtk.TreeViewColumn (_("Devices"), cell_description)
         column_description.set_cell_data_func(cell_description, self.get_description_data, None)
         self.append_column(column_description)
-        
+
     def get_description_data(self, column, cell, model, aiter, user_data=None):
         device = model[aiter][model.COL_DEVICE]
-        
+
         if isinstance(device, Device):
             # translators: first is device's name, second its type
             text = _("<b>%s (%s)</b>\n") % (device.name, device.type)
@@ -73,7 +73,7 @@ class DeviceGroupsView (Gtk.TreeView):
                 text = _("Group %d") % group["id"]
             else:
                 text = device[0]
-            
+
         cell.set_property("markup", text)
 
 
diff --git a/client/gnomedvb/ui/preferences/Dialogs.py b/client/gnomedvb/ui/preferences/Dialogs.py
index 22aa258..781d7bd 100644
--- a/client/gnomedvb/ui/preferences/Dialogs.py
+++ b/client/gnomedvb/ui/preferences/Dialogs.py
@@ -33,26 +33,26 @@ class AddToGroupDialog (Gtk.Dialog):
         self.set_destroy_with_parent(True)
         self.__selected_group = None
         self.set_border_width(5)
-        
+
         self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(5)
         self.vbox_main.show()
         self.get_content_area().pack_start(self.vbox_main, True, True, 0)
-        
+
         groupbox = Gtk.Box(spacing=18)
         groupbox.show()
-        
+
         group_frame = BaseFrame("<b>%s</b>" % _("Add Device to Group"), groupbox)
         group_frame.show()
         self.vbox_main.pack_start(group_frame, True, True, 0)
-                
+
         group_label = TextFieldLabel()
         group_label.show()
         group_label.set_markup_with_mnemonic(_("_Group:"))
         groupbox.pack_start(group_label, False, False, 0)
-        
+
         self.groups = Gtk.ListStore(str, GObject.TYPE_PYOBJECT)
-        
+
         combo = Gtk.ComboBox.new_with_model(self.groups)
         combo.connect("changed", self.on_combo_changed)
         cell = Gtk.CellRendererText()
@@ -61,7 +61,7 @@ class AddToGroupDialog (Gtk.Dialog):
         combo.show()
         group_label.set_mnemonic_widget(combo)
         groupbox.pack_start(combo, True, True, 0)
-                     
+
         def append_groups(groups):
             for group in groups:
                 if group.get_type() == device_type:
@@ -70,17 +70,17 @@ class AddToGroupDialog (Gtk.Dialog):
                         name = "Group %d" % group["id"]
                     self.groups.append([name, group])
         model.get_registered_device_groups(result_handler=append_groups)
-            
+
     def on_combo_changed(self, combo):
         aiter = combo.get_active_iter()
-        
+
         if aiter == None:
             self.__selected_group = None
         else:
             self.__selected_group = self.groups[aiter][1]
-      
+
     def get_selected_group(self):
-        return self.__selected_group   
+        return self.__selected_group
 
 
 class NewGroupDialog (Gtk.Dialog):
@@ -95,36 +95,36 @@ class NewGroupDialog (Gtk.Dialog):
         self.set_destroy_with_parent(True)
         self.set_default_size(400, 150)
         self.set_border_width(5)
-        
+
         self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(5)
         self.vbox_main.show()
         self.get_content_area().pack_start(self.vbox_main, True, True, 0)
-        
+
         self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
         self.table.set_column_spacing(18)
         self.table.set_row_spacing(6)
         self.table.show()
-        
+
         general_frame = BaseFrame("<b>%s</b>" % _("General"), self.table)
         general_frame.show()
         self.vbox_main.pack_start(general_frame, True, True, 0)
-        
+
         name = TextFieldLabel()
         name.set_markup_with_mnemonic(_("_Name:"))
         name.show()
-        
+
         self.name_entry = Gtk.Entry(hexpand=True)
         self.name_entry.show()
         name.set_mnemonic_widget(self.name_entry)
-        
+
         self.table.add(name)
         self.table.attach_next_to(self.name_entry, name, Gtk.PositionType.RIGHT, 1, 1)
-        
+
         self.channels = TextFieldLabel()
         self.channels.set_markup_with_mnemonic(_("Channels _file:"))
         self.channels.show()
-        
+
         self.channelsbox = Gtk.Box(spacing=6, hexpand=True)
         self.channelsbox.show()
 
@@ -133,42 +133,42 @@ class NewGroupDialog (Gtk.Dialog):
         self.channels_entry.show()
         self.channelsbox.pack_start(self.channels_entry, True, True, 0)
         self.channels.set_mnemonic_widget(self.channels_entry)
-        
+
         channels_open = Gtk.Button(stock=Gtk.STOCK_OPEN)
         channels_open.connect("clicked", self._on_channels_open_clicked)
         channels_open.show()
         self.channelsbox.pack_start(channels_open, False, False, 0)
-        
+
         self.table.add(self.channels)
         self.table.attach_next_to(self.channelsbox, self.channels, Gtk.PositionType.RIGHT, 1, 1)
-        
+
         recbox = Gtk.Box(spacing=18)
         recbox.show()
-        
+
         recordings_frame = BaseFrame("<b>%s</b>" % _("Recordings"), recbox)
         recordings_frame.show()
         self.vbox_main.pack_start(recordings_frame, True, True, 0)
-        
+
         recordings = TextFieldLabel()
         recordings.set_markup_with_mnemonic(_("_Directory:"))
         recordings.show()
         recbox.pack_start(recordings, False, True, 0)
-        
+
         recentrybox = Gtk.Box(spacing=6)
         recentrybox.show()
         recbox.pack_start(recentrybox, True, True, 0)
-        
+
         self.recordings_entry = Gtk.Entry()
         self.recordings_entry.set_editable(False)
         self.recordings_entry.show()
         recentrybox.pack_start(self.recordings_entry, True, True, 0)
         recordings.set_mnemonic_widget(self.recordings_entry)
-        
+
         recordings_open = Gtk.Button(stock=Gtk.STOCK_OPEN)
         recordings_open.connect("clicked", self._on_recordings_open_clicked)
         recordings_open.show()
         recentrybox.pack_start(recordings_open, False, False, 0)
-        
+
     def show_channels_section(self, val):
         if val:
             self.channels.show()
@@ -176,7 +176,7 @@ class NewGroupDialog (Gtk.Dialog):
         else:
             self.channels.hide()
             self.channelsbox.hide()
-        
+
     def _on_channels_open_clicked(self, button):
         dialog = Gtk.FileChooserDialog (title = _("Select File"),
             parent=self, action=Gtk.FileChooserAction.OPEN,
@@ -185,7 +185,7 @@ class NewGroupDialog (Gtk.Dialog):
         if dialog.run() == Gtk.ResponseType.ACCEPT:
             self.channels_entry.set_text(dialog.get_filename())
         dialog.destroy()
-    
+
     def _on_recordings_open_clicked(self, button):
         dialog = Gtk.FileChooserDialog (title = _("Select Directory"),
             parent=self, action=Gtk.FileChooserAction.SELECT_FOLDER,
@@ -194,15 +194,14 @@ class NewGroupDialog (Gtk.Dialog):
         if dialog.run() == Gtk.ResponseType.ACCEPT:
             self.recordings_entry.set_text(dialog.get_filename())
         dialog.destroy()
-        
+
 class EditGroupDialog(NewGroupDialog):
 
     def __init__(self, name, recdir, parent=None):
         NewGroupDialog.__init__(self, parent)
-        
+
         self.set_title (_("Edit group"))
         self.show_channels_section(False)
 
         self.name_entry.set_text(name)
         self.recordings_entry.set_text(recdir)
- 
diff --git a/client/gnomedvb/ui/preferences/Preferences.py b/client/gnomedvb/ui/preferences/Preferences.py
index b97fb48..24c579e 100644
--- a/client/gnomedvb/ui/preferences/Preferences.py
+++ b/client/gnomedvb/ui/preferences/Preferences.py
@@ -44,72 +44,72 @@ class Preferences(Gtk.Window):
         self.set_destroy_with_parent(True)
         self.set_default_size(600, 450)
         self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
-        
+
         self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
         self.add(self.vbox)
         self.vbox.show()
-        
+
         self.__create_toolbar()
 
         self.vbox_main = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.vbox_main.set_border_width(12)
         self.vbox_main.show()
         self.vbox.pack_start(self.vbox_main, True, True, 0)
-        
+
         self.action_area = Gtk.ButtonBox()
         self.action_area.set_layout(Gtk.ButtonBoxStyle.END)
         self.vbox_main.pack_end(self.action_area, False, True, 0)
         self.action_area.show()
-        
+
         self._model = model
         self._model.connect("group-added", self._on_manager_group_added)
         self._model.connect("group-removed", self._on_manager_group_removed)
-        
+
         close_button = Gtk.Button(stock=Gtk.STOCK_CLOSE)
         close_button.connect("clicked", lambda w: self.destroy())
         close_button.set_can_default(True)
         close_button.show()
         self.action_area.pack_end(close_button, False, True, 0)
         close_button.grab_default()
-        
+
         self.__create_registered_groups()
         self.__create_unassigned_devices()
-        
+
         self._fill()
-        
+
         self.devicegroupsview.grab_focus()
-        
+
     def __create_toolbar(self):
         toolbar = Gtk.Toolbar()
         toolbar.show()
         self.vbox.pack_start(toolbar, False, True, 0)
-        
+
         self.button_prefs = Gtk.ToolButton.new_from_stock(Gtk.STOCK_EDIT)
         self.button_prefs.connect("clicked", self._on_button_prefs_clicked)
         self.button_prefs.set_sensitive(False)
         self.button_prefs.set_tooltip_markup(_("Edit selected group"))
         self.button_prefs.show()
         toolbar.insert(self.button_prefs, self.BUTTON_EDIT)
-        
+
         self.button_remove = Gtk.ToolButton.new_from_stock(Gtk.STOCK_REMOVE)
         self.button_remove.connect("clicked", self._on_button_remove_clicked)
         self.button_remove.set_sensitive(False)
         self.button_remove.set_tooltip_markup(_("Remove selected device"))
         self.button_remove.show()
         toolbar.insert(self.button_remove, self.BUTTON_REMOVE)
-        
+
         sep = Gtk.SeparatorToolItem()
         sep.show()
         toolbar.insert(sep, self.SEP1)
-        
+
         prefs_image = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES, Gtk.IconSize.SMALL_TOOLBAR)
         button_setup = Gtk.MenuToolButton(icon_widget=prefs_image, label=_("Setup"))
         button_setup.connect("clicked", self._on_button_setup_clicked)
         button_setup.set_tooltip_markup(_("Setup devices"))
         button_setup.show()
         toolbar.insert(button_setup, self.BUTTON_PREFERENCES)
-        
-        setup_menu = Gtk.Menu()        
+
+        setup_menu = Gtk.Menu()
         new_image = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU)
         new_image.show()
         self.button_new = Gtk.ImageMenuItem.new_with_label(_("Create new group"))
@@ -119,7 +119,7 @@ class Preferences(Gtk.Window):
         self.button_new.set_tooltip_markup(_("Create new group for selected device"))
         self.button_new.show()
         setup_menu.append(self.button_new)
-        
+
         add_image = Gtk.Image.new_from_stock(Gtk.STOCK_ADD, Gtk.IconSize.MENU)
         add_image.show()
         self.button_add = Gtk.ImageMenuItem.new_with_label(_("Add to group"))
@@ -129,54 +129,54 @@ class Preferences(Gtk.Window):
         self.button_add.set_tooltip_markup(_("Add selected device to existing group"))
         self.button_add.show()
         setup_menu.append(self.button_add)
-        
+
         button_setup.set_menu(setup_menu)
-        
+
     def __create_registered_groups(self):
         self.groups_box = Gtk.Box(spacing=6)
         self.groups_box.show()
         self.vbox_main.pack_start(self.groups_box, True, True, 0)
-    
+
         self.devicegroups = DeviceGroupsStore()
         self.devicegroupsview = DeviceGroupsView(self.devicegroups)
         self.devicegroupsview.get_selection().connect("changed", self._on_groups_selection_changed)
         self.devicegroupsview.show()
-        
+
         groups_frame = Frame("<b>%s</b>" % _("Configured devices"), self.devicegroupsview)
         groups_frame.show()
         self.groups_box.pack_start(groups_frame, True, True, 0)
-    
+
     def __create_unassigned_devices(self):
         self.unassigned_devices = UnassignedDevicesStore()
         self.unassigned_view = DeviceGroupsView(self.unassigned_devices)
         self.unassigned_view.get_selection().connect("changed",
             self._on_unassigned_selection_changed)
         self.unassigned_view.show()
-        
+
         unassigned_frame = Frame("<b>%s</b>" % _("Unconfigured devices"), self.unassigned_view)
         unassigned_frame.show()
         self.vbox_main.pack_start(unassigned_frame, True, True, 0)
-        
+
     def _fill(self):
         def append_unassigned(devices):
             for device in devices:
                 self.unassigned_devices.append([device])
-                
+
         def append_registered(groups):
             for group in groups:
                 self._append_group(group)
-                
+
         self._model.get_unregistered_devices(result_handler=append_unassigned)
         self._model.get_registered_device_groups(result_handler=append_registered)
 
     def _append_group(self, group, remove_unassigned=False):
         group.connect("device-added", self._on_group_device_added)
         group.connect("device-removed", self._on_group_device_removed)
-        
+
         group_iter = self.devicegroups.append(None)
         self.devicegroups[group_iter][self.devicegroups.COL_GROUP] = group
         self.devicegroups[group_iter][self.devicegroups.COL_DEVICE] = (group["name"],)
-        
+
         for device in group["devices"]:
             dev_iter = self.devicegroups.append(group_iter)
             self.devicegroups[dev_iter][self.devicegroups.COL_GROUP] = group
@@ -186,14 +186,14 @@ class Preferences(Gtk.Window):
 
     def _on_groups_selection_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
-        
+
         if aiter != None:
             if isinstance(self.devicegroups[aiter][self.devicegroups.COL_DEVICE],
                     Device):
                 self.button_remove.set_sensitive(True)
             else:
                 self.button_remove.set_sensitive(False)
-            
+
             self.button_prefs.set_sensitive(True)
         else:
             self.button_remove.set_sensitive(False)
@@ -201,7 +201,7 @@ class Preferences(Gtk.Window):
 
     def _on_unassigned_selection_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
-        
+
         val = (aiter != None)
         self.button_new.set_sensitive(val)
         self.button_add.set_sensitive(val)
@@ -221,16 +221,16 @@ class Preferences(Gtk.Window):
                     "<big><span weight=\"bold\">%s</big></span>" % _("Device could not be removed from group"))
                 error_dialog.run()
                 error_dialog.destroy()
-    
+
         model, aiter = self.devicegroupsview.get_selection().get_selected()
-        
+
         if aiter != None:
             group = model[aiter][model.COL_GROUP]
             device = model[aiter][model.COL_DEVICE]
-        
+
             dialog = Gtk.MessageDialog(parent=self,
                 flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
-                type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO)            
+                type=Gtk.MessageType.QUESTION, buttons=Gtk.ButtonsType.YES_NO)
             dialog.set_markup(
                 _("Are you sure you want to remove device <b>%s</b> from <b>%s</b>") % (device.name,
                 device.group_name))
@@ -241,7 +241,7 @@ class Preferences(Gtk.Window):
                     group.remove_device(device,
                         result_handler=remove_device_callback,
                         error_handler=global_error_handler)
-                        
+
     def _on_button_setup_clicked(self, button):
         subprocess.Popen(["gnome-dvb-setup"])
         # XXX XID
@@ -261,9 +261,9 @@ class Preferences(Gtk.Window):
                 )
                 error_dialog.run()
                 error_dialog.destroy()
-    
+
         model, aiter = self.unassigned_view.get_selection().get_selected()
-        
+
         if aiter != None:
             device = model[aiter][model.COL_DEVICE]
             dialog = NewGroupDialog(self)
@@ -275,9 +275,9 @@ class Preferences(Gtk.Window):
                         device.frontend, channels, recdir, name,
                         result_handler=add_device_to_new_group_callback,
                         error_handler=global_error_handler)
-                    
+
             dialog.destroy()
-            
+
     def _on_button_add_clicked(self, button):
         def add_device_callback(proxy, success, user_data):
             if not success:
@@ -292,7 +292,7 @@ class Preferences(Gtk.Window):
                 )
                 error_dialog.run()
                 error_dialog.destroy()
-    
+
         model, aiter = self.unassigned_view.get_selection().get_selected()
 
         if aiter != None:
@@ -303,17 +303,17 @@ class Preferences(Gtk.Window):
                 group.add_device(device.adapter, device.frontend,
                     result_handler=add_device_callback,
                     error_handler=global_error_handler)
-                
+
             dialog.destroy()
 
     def _on_button_prefs_clicked(self, button):
         model, aiter = self.devicegroupsview.get_selection().get_selected()
-        
+
         if aiter != None:
             group = model[aiter][model.COL_GROUP]
             group_name = group.get_name()
             recdir = group.get_recordings_directory()
-            
+
             dialog = EditGroupDialog(group_name, recdir, self)
             if dialog.run() == Gtk.ResponseType.ACCEPT:
                 name = dialog.name_entry.get_text()
@@ -326,8 +326,8 @@ class Preferences(Gtk.Window):
         group = manager.get_device_group(group_id)
         if group != None:
             self._append_group(group, remove_unassigned=True)
-    
-    def _on_manager_group_removed(self, manager, group_id):        
+
+    def _on_manager_group_removed(self, manager, group_id):
         aiter = self.devicegroups.get_iter_first()
         # Iterate over groups
         while aiter != None:
@@ -336,7 +336,7 @@ class Preferences(Gtk.Window):
                 self.devicegroups.remove(aiter)
                 return
             aiter = self.devicegroups.iter_next(aiter)
-        
+
     def _on_group_device_added(self, group, adapter, frontend):
         self._remove_unassigned_device(adapter, frontend)
         # Iterate over groups
@@ -351,7 +351,7 @@ class Preferences(Gtk.Window):
                 self.devicegroups[dev_iter][self.devicegroups.COL_GROUP] = group
                 self.devicegroups[dev_iter][self.devicegroups.COL_DEVICE] = device
                 break
-                    
+
     def _on_group_device_removed(self, group, adapter, frontend):
         # Iterate over groups
         for list_group, aiter in self.devicegroups.get_groups():
@@ -364,7 +364,7 @@ class Preferences(Gtk.Window):
                         self.devicegroups.remove(child_iter)
                         return
                     child_iter = self.devicegroups.iter_next(child_iter)
-                    
+
     def _remove_unassigned_device(self, adapter, frontend):
         # Remove device from unassigned
         for row in self.unassigned_devices:
diff --git a/client/gnomedvb/ui/recordings/DetailsDialog.py b/client/gnomedvb/ui/recordings/DetailsDialog.py
index 7c5f122..fc24451 100644
--- a/client/gnomedvb/ui/recordings/DetailsDialog.py
+++ b/client/gnomedvb/ui/recordings/DetailsDialog.py
@@ -24,12 +24,12 @@ class DetailsDialog(gnomedvb.ui.widgets.DetailsDialog.DetailsDialog):
 
     def __init__(self, rec_id, parent=None):
         gnomedvb.ui.widgets.DetailsDialog.DetailsDialog.__init__(self, parent=parent)
-        
+
         self.rec_button.hide()
         self.get_action_area().set_layout(Gtk.ButtonBoxStyle.END)
 
         self._fill(rec_id)
-        
+
     def _fill(self, rec_id):
         def get_all_informations_callback(proxy, data, user_data):
             infos, success = data
@@ -39,7 +39,7 @@ class DetailsDialog(gnomedvb.ui.widgets.DetailsDialog.DetailsDialog):
                 self.set_duration(infos[3])
                 self.set_date(infos[4])
                 self.set_channel(infos[5])
-    
+
         recstore = gnomedvb.DVBRecordingsStoreClient()
         recstore.get_all_informations(rec_id,
             result_handler=get_all_informations_callback,
diff --git a/client/gnomedvb/ui/recordings/RecordingsDialog.py b/client/gnomedvb/ui/recordings/RecordingsDialog.py
index 4ad2d46..3b2fc49 100644
--- a/client/gnomedvb/ui/recordings/RecordingsDialog.py
+++ b/client/gnomedvb/ui/recordings/RecordingsDialog.py
@@ -35,15 +35,15 @@ class RecordingsDialog(Gtk.Dialog):
         self.set_destroy_with_parent(True)
         self.set_default_size(600, 400)
         self.set_border_width(5)
-        
+
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
-            
+
         hbox_main = Gtk.Box(spacing=12)
         hbox_main.set_border_width(5)
         hbox_main.show()
         self.get_content_area().pack_start(hbox_main, True, True, 0)
-            
+
         self._model = RecordingsStore()
         self._model.set_sort_func(RecordingsStore.COL_START,
             self._datetime_sort_func)
@@ -51,44 +51,44 @@ class RecordingsDialog(Gtk.Dialog):
         self._view.connect("button-press-event", self._on_recording_selected)
         self._view.set_property("rules-hint", True)
         self._view.show()
-        
+
         treeselection = self._view.get_selection()
         treeselection.connect("changed", self._on_selection_changed)
-        
+
         scrolledwindow = Gtk.ScrolledWindow()
         scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         scrolledwindow.set_shadow_type(Gtk.ShadowType.IN)
         scrolledwindow.add(self._view)
         scrolledwindow.show()
         hbox_main.pack_start(scrolledwindow, True, True, 0)
-        
+
         buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         buttonbox.set_spacing(6)
         buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
         buttonbox.show()
         hbox_main.pack_start(buttonbox, False, True, 0)
-        
+
         self.details_button = Gtk.Button(stock=Gtk.STOCK_INFO)
         self.details_button.connect("clicked", self._on_details_clicked)
         self.details_button.set_sensitive(False)
         self.details_button.show()
         buttonbox.pack_start(self.details_button, True, True, 0)
-        
+
         self.delete_button = Gtk.Button(stock=Gtk.STOCK_DELETE)
         self.delete_button.connect("clicked", self._on_delete_clicked)
         self.delete_button.set_sensitive(False)
         self.delete_button.show()
         buttonbox.pack_start(self.delete_button, True, True, 0)
-        
+
     def _on_selection_changed(self, treeselection):
         model, rows = treeselection.get_selected_rows()
-        
+
         self.delete_button.set_sensitive(len(rows) > 0)
         self.details_button.set_sensitive(len(rows) == 1)
-        
+
     def _on_delete_clicked(self, button):
         model, aiter = self._view.get_selection().get_selected()
-        
+
         if aiter != None:
             dialog = Gtk.MessageDialog(parent=self,
                     flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.DESTROY_WITH_PARENT,
@@ -101,19 +101,19 @@ class RecordingsDialog(Gtk.Dialog):
                 client.delete(model[aiter][RecordingsStore.COL_ID],
                     result_handler=self._delete_callback,
                     error_handler=global_error_handler)
-                        
+
     def _on_details_clicked(self, button):
         model, aiter = self._view.get_selection().get_selected()
-        
+
         if aiter != None:
             dialog = DetailsDialog(model[aiter][RecordingsStore.COL_ID], self)
             dialog.run ()
             dialog.destroy ()
-            
+
     def _on_recording_selected(self, treeview, event):
         if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS"):
             self._on_details_clicked(treeview)
-                    
+
     def _delete_callback(self, proxy, success, user_data):
         if not success:
             global_error_handler("Could not delete recording")
@@ -123,4 +123,3 @@ class RecordingsDialog(Gtk.Dialog):
         d2 = treemodel[iter2][RecordingsStore.COL_START]
         return cmp(d1, d2)
 
-        
diff --git a/client/gnomedvb/ui/timers/CalendarDialog.py b/client/gnomedvb/ui/timers/CalendarDialog.py
index ebda333..061091d 100644
--- a/client/gnomedvb/ui/timers/CalendarDialog.py
+++ b/client/gnomedvb/ui/timers/CalendarDialog.py
@@ -18,7 +18,7 @@
 
 from gi.repository import Gtk
 from gnomedvb import _
-        
+
 class CalendarDialog(Gtk.Dialog):
 
     def __init__(self, parent):
@@ -26,16 +26,16 @@ class CalendarDialog(Gtk.Dialog):
 
         self.set_modal(True)
         self.set_destroy_with_parent(True)
-        
+
         self.set_position(Gtk.WindowPosition.MOUSE)
         self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT)
         ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)
         ok_button.grab_default()
-        
+
         self.calendar = Gtk.Calendar()
         self.calendar.show()
         self.get_content_area().add(self.calendar)
-        
+
     def get_date(self):
         return self.calendar.get_date()
 
diff --git a/client/gnomedvb/ui/timers/EditTimersDialog.py b/client/gnomedvb/ui/timers/EditTimersDialog.py
index f25892f..f073c4d 100644
--- a/client/gnomedvb/ui/timers/EditTimersDialog.py
+++ b/client/gnomedvb/ui/timers/EditTimersDialog.py
@@ -34,7 +34,7 @@ class EditTimersDialog(Gtk.Dialog):
     COL_START,
     COL_DURATION,
     COL_ACTIVE,) = range(6)
-    
+
     def __init__(self, device_group, parent=None):
         """
         @param device_group: ID of device group
@@ -51,22 +51,22 @@ class EditTimersDialog(Gtk.Dialog):
         self.set_destroy_with_parent(True)
         self.device_group = device_group
         self.set_recorder(device_group)
-        
+
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
-        
+
         self.set_default_size(550, 400)
         self.set_border_width(5)
-        
+
         self.main_box = Gtk.Box(spacing=12)
         self.main_box.set_border_width(5)
         self.main_box.show()
         self.get_content_area().pack_start(self.main_box, True, True, 0)
-        
+
         self.timerslist = Gtk.ListStore(long, str, str, GObject.TYPE_PYOBJECT, long, bool)
         self.timerslist.set_sort_func(self.COL_START,
             self._datetime_sort_func)
-        
+
         self.timersview = Gtk.TreeView.new_with_model(self.timerslist)
         self.timersview.get_selection().connect("changed",
             self._on_timers_selection_changed)
@@ -86,29 +86,29 @@ class EditTimersDialog(Gtk.Dialog):
         cell_title = Gtk.CellRendererText()
         col_title.pack_start(cell_title, True)
         col_title.add_attribute(cell_title, "text", self.COL_TITLE)
-        
+
         self.timersview.append_column(col_title)
-        
+
         cell_starttime = CellRendererDatetime()
         col_starttime = Gtk.TreeViewColumn(_("Start time"))
         col_starttime.pack_start(cell_starttime, True)
         col_starttime.add_attribute(cell_starttime, "datetime", self.COL_START)
-        
+
         self.timersview.append_column(col_starttime)
-        
+
         cell_duration = Gtk.CellRendererText()
         col_duration = Gtk.TreeViewColumn(_("Duration"))
         col_duration.pack_start(cell_duration, False)
         col_duration.set_cell_data_func(cell_duration, self._get_duration_data, None)
-        
+
         self.timersview.append_column(col_duration)
-        
+
         self.scrolledwindow = Gtk.ScrolledWindow()
         self.scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         self.scrolledwindow.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         self.scrolledwindow.add(self.timersview)
         self.main_box.pack_start(self.scrolledwindow, True, True, 0)
-        
+
         self.buttonbox = Gtk.ButtonBox(orientation=Gtk.Orientation.VERTICAL)
         self.buttonbox.set_spacing(6)
         self.buttonbox.set_layout(Gtk.ButtonBoxStyle.START)
@@ -125,25 +125,25 @@ class EditTimersDialog(Gtk.Dialog):
         self.button_edit.connect("clicked", self._on_button_edit_clicked)
         self.button_edit.set_sensitive(False)
         self.buttonbox.pack_start(self.button_edit, True, True, 0)
-        
+
         self.main_box.pack_start(self.buttonbox, False, False, 0)
-        
+
         self.get_timers()
-        
+
         self.show_all()
-        
+
     def set_recorder(self, dev_group):
         self.recorder = dev_group.get_recorder()
         self.recorder.connect("changed", self._on_recorder_changed)
         self.recorder.connect("recording-started", self._set_recording_state, True)
         self.recorder.connect("recording-finished", self._set_recording_state, False)
-            
+
     def get_timers(self):
         def add_timer(proxy, timers, user_data):
             for timer_id in timers:
                 self._add_timer(timer_id)
         self.recorder.get_timers(result_handler=add_timer, error_handler=global_error_handler)
-            
+
     def _add_timer(self, timer_id):
         start_list, success = self.recorder.get_start_time(timer_id)
         if success:
@@ -167,7 +167,7 @@ class EditTimersDialog(Gtk.Dialog):
                     "<big><span weight=\"bold\">%s</span></big>" % _("Timer could not be deleted"))
                 error_dialog.run()
                 error_dialog.destroy()
-    
+
         model, aiter = self.timersview.get_selection().get_selected()
         if aiter != None:
             timer_id = model[aiter][self.COL_ID]
@@ -190,7 +190,7 @@ class EditTimersDialog(Gtk.Dialog):
                 self.recorder.delete_timer(timer_id,
                     result_handler=delete_timer_callback,
                     error_handler=global_error_handler)
-        
+
     def _on_button_add_clicked(self, button):
         def add_timer_callback(proxy, data, user_data):
             rec_id, success = data
@@ -198,19 +198,19 @@ class EditTimersDialog(Gtk.Dialog):
                 err_dialog = TimerFailureDialog(self)
                 err_dialog.run()
                 err_dialog.destroy()
-    
+
         dialog = TimerDialog(self, self.device_group)
         response_id = dialog.run()
         if response_id == Gtk.ResponseType.ACCEPT:
             duration = dialog.get_duration()
             start = dialog.get_start_time()
             channel = dialog.get_channel()
-            
+
             self.recorder.add_timer (channel, start[0],
                 start[1], start[2], start[3], start[4], duration,
                 result_handler=add_timer_callback,
                 error_handler=global_error_handler)
-            
+
         dialog.destroy()
 
     def _on_button_edit_clicked(self, button):
@@ -219,7 +219,7 @@ class EditTimersDialog(Gtk.Dialog):
             start = model[aiter][self.COL_START]
             duration = model[aiter][self.COL_DURATION]
             channel = model[aiter][self.COL_CHANNEL]
-            
+
             dialog = TimerDialog(self, self.device_group, channel=channel,
                 starttime=start, duration=duration)
             dialog.set_time_and_date_editable(
@@ -233,7 +233,7 @@ class EditTimersDialog(Gtk.Dialog):
                     new_start[1], new_start[2], new_start[3], new_start[4])
                 self.recorder.set_duration(timer_id, new_duration)
             dialog.destroy()
-   
+
     def _on_recorder_changed(self, recorder, timer_id, typeid):
         if recorder == self.recorder:
             if (typeid == 0):
@@ -246,7 +246,7 @@ class EditTimersDialog(Gtk.Dialog):
                 # Timer changed
                 self._remove_timer(timer_id)
                 self._add_timer(timer_id)
-            
+
     def _on_timers_selection_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
         if aiter == None:
@@ -260,11 +260,11 @@ class EditTimersDialog(Gtk.Dialog):
         for row in self.timerslist:
             if row[self.COL_ID] == timer_id:
                 self.timerslist[row.iter][self.COL_ACTIVE] = bool(state)
-                
+
     def _get_recording_icon_for_cell(self, column, cell, model, aiter, user_data):
         if model[aiter][self.COL_ACTIVE]:
             cell.set_property("stock-id", Gtk.STOCK_MEDIA_RECORD)
-            
+
     def _get_duration_data(self, column, cell, model, aiter, user_data):
         # We have minutes but need seconds
         duration = model[aiter][self.COL_DURATION] * 60
diff --git a/client/gnomedvb/ui/timers/TimerDialog.py b/client/gnomedvb/ui/timers/TimerDialog.py
index 71efdeb..b80641c 100644
--- a/client/gnomedvb/ui/timers/TimerDialog.py
+++ b/client/gnomedvb/ui/timers/TimerDialog.py
@@ -42,21 +42,21 @@ class TimerDialog(Gtk.Dialog):
         self.device_group = device_group
         self.date_valid = False
         self.allowed_delta = datetime.timedelta(hours=1)
-        
+
         self.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.REJECT)
         self.ok_button = self.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT)
 
         self.set_border_width(5)
-        
+
         table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
         table.set_column_spacing(18)
         table.set_row_spacing(6)
         table.set_border_width(5)
         self.get_content_area().pack_start(table, True, True, 0)
-                         
+
         label_channel = TextFieldLabel()
         table.add(label_channel)
-        
+
         if channel == None:
             self.channel_selected = False
             self.set_title(_("Add Timer"))
@@ -64,13 +64,13 @@ class TimerDialog(Gtk.Dialog):
 
             label_channel.set_markup_with_mnemonic(_("_Channel:"))
             self.channels = ChannelsStore(device_group)
-        
+
             scrolledchannels = Gtk.ScrolledWindow(expand=True)
             scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
             scrolledchannels.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
             table.attach_next_to(scrolledchannels, label_channel,
                 Gtk.PositionType.BOTTOM, 2, 1)
-            
+
             self.channelsview = ChannelsView(self.channels)
             self.channelsview.set_headers_visible(False)
             self.channelsview.get_selection().connect("changed",
@@ -89,30 +89,30 @@ class TimerDialog(Gtk.Dialog):
             channel_label = TextFieldLabel(channel)
             table.attach_next_to(channel_label, label_channel,
                 Gtk.PositionType.RIGHT, 1, 1)
-        
+
         label_start = TextFieldLabel()
         label_start.set_markup_with_mnemonic(_("_Start time:"))
         table.add(label_start)
-        
+
         hbox = Gtk.Box(spacing=6, hexpand=True)
         table.attach_next_to(hbox, label_start, Gtk.PositionType.RIGHT, 1, 1)
 
         if starttime == None:
             starttime = datetime.datetime.now()
-        
+
         self.datetime_box = DateTimeBox(starttime)
         self.datetime_box.connect("changed", self._on_datetime_changed)
         hbox.pack_start(self.datetime_box, True, True, 0)
         label_start.set_mnemonic_widget(self.datetime_box)
-        
+
         label_duration = TextFieldLabel()
         label_duration.set_markup_with_mnemonic(_("_Duration:"))
         table.add(label_duration)
-        
+
         duration_hbox = Gtk.Box(spacing=6, hexpand=True)
         table.attach_next_to(duration_hbox, label_duration,
             Gtk.PositionType.RIGHT, 1, 1)
-        
+
         self.duration = Gtk.SpinButton()
         self.duration.set_range(1, 65535)
         self.duration.set_increments(1, 10)
@@ -120,13 +120,13 @@ class TimerDialog(Gtk.Dialog):
         self.duration.set_value(60)
         duration_hbox.pack_start(self.duration, False, True, 0)
         label_duration.set_mnemonic_widget(self.duration)
-        
+
         minutes_label = TextFieldLabel(_("minutes"))
         duration_hbox.pack_start(minutes_label, True, True, 0)
-        
+
         self.set_start_time(starttime)
         self.set_duration(duration)
-        
+
         table.show_all()
 
     def get_duration(self):
@@ -134,14 +134,14 @@ class TimerDialog(Gtk.Dialog):
 
     def set_duration(self, minutes):
         self.duration.set_value(minutes)
-        
+
     def get_start_time(self):
         return self.datetime_box.get_date_and_time()
 
     def set_start_time(self, time):
         self.datetime_box.set_date_and_time(time.year, time.month, time.day,
             time.hour, time.minute)
-        
+
     def get_channel(self):
         if self.channelsview == None:
             return None
@@ -153,7 +153,7 @@ class TimerDialog(Gtk.Dialog):
 
     def set_time_and_date_editable(self, val):
         self.datetime_box.set_editable(val)
-        
+
     def _on_channel_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
         self.channel_selected = (aiter != None)
diff --git a/client/gnomedvb/ui/widgets/CellRendererDatetime.py b/client/gnomedvb/ui/widgets/CellRendererDatetime.py
index d0ee400..d415b13 100644
--- a/client/gnomedvb/ui/widgets/CellRendererDatetime.py
+++ b/client/gnomedvb/ui/widgets/CellRendererDatetime.py
@@ -17,7 +17,7 @@
 # along with GNOME DVB Daemon.  If not, see <http://www.gnu.org/licenses/>.
 
 from gi.repository import GObject
-from gi.repository import Gtk 
+from gi.repository import Gtk
 
 class CellRendererDatetime(Gtk.CellRendererText):
 
@@ -36,7 +36,7 @@ class CellRendererDatetime(Gtk.CellRendererText):
         self._datetime = None
         self._format = "%c"
         self.set_property("text", "")
-        
+
     def do_get_property(self, prop):
         if prop.name == 'datetime':
             return self._datetime
@@ -61,4 +61,3 @@ class CellRendererDatetime(Gtk.CellRendererText):
         else:
             timestr = self._datetime.strftime(self._format)
             self.set_property("text", timestr)
-        
diff --git a/client/gnomedvb/ui/widgets/ChannelGroupsView.py b/client/gnomedvb/ui/widgets/ChannelGroupsView.py
index 0e597d9..2926002 100644
--- a/client/gnomedvb/ui/widgets/ChannelGroupsView.py
+++ b/client/gnomedvb/ui/widgets/ChannelGroupsView.py
@@ -34,7 +34,7 @@ class ChannelGroupsView(Gtk.TreeView):
         col_name.add_attribute(self.cell_name, "markup", ChannelGroupsStore.COL_NAME)
         col_name.add_attribute(self.cell_name, "editable", ChannelGroupsStore.COL_EDITABLE)
         self.append_column(col_name)
-        
+
     def get_renderer(self):
         return self.cell_name
 
diff --git a/client/gnomedvb/ui/widgets/ChannelsStore.py b/client/gnomedvb/ui/widgets/ChannelsStore.py
index a213784..56a869b 100644
--- a/client/gnomedvb/ui/widgets/ChannelsStore.py
+++ b/client/gnomedvb/ui/widgets/ChannelsStore.py
@@ -28,7 +28,7 @@ class ChannelsStore(Gtk.ListStore):
 
     (COL_NAME,
      COL_SID,) = range(2)
-    
+
     __gsignals__ = {
         "loading-finished":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []),
     }
@@ -38,22 +38,22 @@ class ChannelsStore(Gtk.ListStore):
         @param device_group: ID of device group the
         list of channels should be retrieved
         """
-    
+
         Gtk.ListStore.__init__(self, str, long)
-        
+
         self.set_sort_column_id(self.COL_NAME,
             Gtk.SortType.ASCENDING)
-            
+
         self._add_channels(device_group)
-        
+
     def _add_channels(self, device_group):
         channellist = device_group.get_channel_list()
-        
+
         def append_channel(proxy, channels, user_data):
             for channel_id, name, is_radio in channels:
                 self.append([name, channel_id])
             self.emit("loading-finished")
-        
+
         channellist.get_channel_infos(result_handler=append_channel,
             error_handler=global_error_handler)
 
@@ -64,16 +64,16 @@ class ChannelsTreeStore(Gtk.TreeStore):
      COL_NAME,
      COL_SID,
      COL_GROUP,) = range(4)
-    
+
     __gsignals__ = {
         "loading-finished":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [int]),
     }
-    
+
     def __init__(self, use_channel_groups=False):
         Gtk.TreeStore.__init__(self, int, str, long, GObject.GObject)
-        
+
         self.set_sort_order(Gtk.SortType.ASCENDING)
-        
+
         self._use_channel_groups = use_channel_groups
         self._manager = gnomedvb.DVBManagerClient ()
         self._manager.connect('group-added', self._on_manager_group_added)
@@ -87,14 +87,14 @@ class ChannelsTreeStore(Gtk.TreeStore):
 
         self._manager.get_registered_device_groups(result_handler=append_groups,
             error_handler=global_error_handler)
-    
+
     def _append_group(self, dev_group):
         group_id = dev_group.get_id()
         group_name = dev_group.get_name()
 
         group_iter = self.append(None, [group_id, group_name, 0L, dev_group])
         channellist = dev_group.get_channel_list()
-        
+
         d = Callback()
         if self._use_channel_groups:
             d.add_callback(self._append_channel_groups, channellist, group_id,
@@ -118,7 +118,7 @@ class ChannelsTreeStore(Gtk.TreeStore):
         channellist.get_channel_infos(
             result_handler=lambda p,x,u: d_all.callback(x),
             error_handler=global_error_handler)
-     
+
     def _append_channels(self, channels, group_id, dev_group, tv_group_iter, radio_group_iter):
         for channel_id, name, is_radio in channels:
             if is_radio:
@@ -143,7 +143,7 @@ class ChannelsTreeStore(Gtk.TreeStore):
                         escape(name),
                         channel_id,
                         dev_group])
-        
+
         for chan_group_id, name in channel_groups:
             chan_group_iter = self.append(group_iter, [group_id, escape(name),
                 0, dev_group])
@@ -152,20 +152,20 @@ class ChannelsTreeStore(Gtk.TreeStore):
             channellist.get_channels_of_group(chan_group_id,
                 result_handler=lambda p,data,u: d.callback(data[1]),
                 error_handler=global_error_handler)
-                
+
         self.emit("loading-finished", group_id)
-       
+
     def _on_manager_group_added(self, manager, group_id):
         group = manager.get_device_group(group_id)
         if group != None:
             self._append_group(group)
-        
+
     def _on_manager_group_removed(self, manager, group_id):
         for row in self:
             if row[self.COL_GROUP_ID] == group_id:
                 self.remove(row.iter)
                 break
-                
+
     def set_sort_order(self, order):
         self.set_sort_column_id(self.COL_NAME, order)
 
diff --git a/client/gnomedvb/ui/widgets/ChannelsView.py b/client/gnomedvb/ui/widgets/ChannelsView.py
index c8a417a..3d8f5ec 100644
--- a/client/gnomedvb/ui/widgets/ChannelsView.py
+++ b/client/gnomedvb/ui/widgets/ChannelsView.py
@@ -31,16 +31,15 @@ class ChannelsView(Gtk.TreeView):
         GObject.GObject.__init__(self)
         if model != None:
             self.set_model(model)
-        
+
         col_name = Gtk.TreeViewColumn(_("Channel"))
         cell_name = Gtk.CellRendererText()
         col_name.pack_start(cell_name, True)
         col_name.add_attribute(cell_name, "markup", name_col)
         self.append_column(col_name)
-        
+
     def set_model(self, model=None):
         if model != None and not (isinstance(model, ChannelsStore) \
                 or isinstance(model, ChannelsTreeStore)):
             raise TypeError("model must be a ChannelsStore or ChannelsTreeStore instance")
         Gtk.TreeView.set_model(self, model)
-        
diff --git a/client/gnomedvb/ui/widgets/DateTime.py b/client/gnomedvb/ui/widgets/DateTime.py
index ebead22..f98dd26 100644
--- a/client/gnomedvb/ui/widgets/DateTime.py
+++ b/client/gnomedvb/ui/widgets/DateTime.py
@@ -34,15 +34,15 @@ class CalendarPopup(Gtk.Window):
         self.set_border_width(5)
         self.vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
         self.add(self.vbox)
-        
+
         self.connect("key-press-event", self._on_key_press_event)
         self.connect("button-press-event", self._on_button_press_event)
-        
+
         self.cal = Gtk.Calendar()
         self.cal.connect("day-selected", self._emit_changed)
         self.cal.connect("day-selected-double-click", lambda w: self.popdown())
         self.vbox.pack_start(self.cal, True, True, 0)
-        
+
         self.time_box = Gtk.Box(spacing=12)
         self.vbox.pack_start(self.time_box, False, True, 0)
 
@@ -61,7 +61,7 @@ class CalendarPopup(Gtk.Window):
         self.hour.set_width_chars(2)
         spinners_box.pack_start(self.hour, True, True, 0)
         time_label.set_mnemonic_widget(self.hour)
-        
+
         self.minute = Gtk.SpinButton()
         self.minute.connect("changed", self._emit_changed)
         self.minute.set_range(0, 59)
@@ -77,7 +77,7 @@ class CalendarPopup(Gtk.Window):
 
     def get_calendar(self):
         return self.cal
-  
+
     def popup(self, widget):
         if (self.get_mapped()):
             return
@@ -112,7 +112,7 @@ class CalendarPopup(Gtk.Window):
         self.hour.set_value(hour)
         self.minute.set_value(minute)
 
-    def get_date_and_time(self):        
+    def get_date_and_time(self):
         year, mon, day = self.cal.get_date()
         hour = self.hour.get_value_as_int()
         minute = self.minute.get_value_as_int()
@@ -175,10 +175,10 @@ class DateTimeBox(Gtk.Bin):
         if dt == None:
             dt = datetime.datetime.now()
 
-        self.popup_win = CalendarPopup(dt)        
+        self.popup_win = CalendarPopup(dt)
         self.popup_win.connect("changed", self._on_datetime_changed)
         self.popup_win.connect("closed", lambda w: self.button.set_active(False))
-        
+
         self.hbox.pack_start(self.entry, True, True, 0)
         self.hbox.pack_start(self.button, False, True, 0)
 
diff --git a/client/gnomedvb/ui/widgets/DetailsDialog.py b/client/gnomedvb/ui/widgets/DetailsDialog.py
index 2c4951d..15e14a4 100644
--- a/client/gnomedvb/ui/widgets/DetailsDialog.py
+++ b/client/gnomedvb/ui/widgets/DetailsDialog.py
@@ -26,7 +26,7 @@ class DetailsDialog(Gtk.Dialog):
 
     def __init__(self, parent=None):
         Gtk.Dialog.__init__(self, parent=parent)
-    
+
         self.set_destroy_with_parent(True)
         self.set_default_size(440, 350)
         self.set_border_width(5)
@@ -36,44 +36,44 @@ class DetailsDialog(Gtk.Dialog):
         self.rec_button = Gtk.Button(stock=Gtk.STOCK_MEDIA_RECORD)
         self.rec_button.show()
         self.get_action_area().pack_start(self.rec_button, True, True, 0)
-        
+
         close_button = self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
         close_button.grab_default()
-        
+
         self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
         self.table.set_column_spacing(18)
         self.table.set_row_spacing(6)
         self.table.set_border_width(5)
         self.get_content_area().pack_start(self.table, True, True, 0)
-        
+
         self._title = TextFieldLabel(hexpand=True)
         self._channel = TextFieldLabel(hexpand=True)
         self._date = TextFieldLabel(hexpand=True)
         self._duration = TextFieldLabel(hexpand=True)
-        
+
         title_label = TextFieldLabel("<i>%s</i>" % _("Title:"))
         self.table.add(title_label)
         self.table.attach_next_to(self._title, title_label,
             Gtk.PositionType.RIGHT, 1, 1)
-        
+
         channel_label = TextFieldLabel("<i>%s</i>" % _("Channel:"))
         self.table.add(channel_label)
         self.table.attach_next_to(self._channel, channel_label,
             Gtk.PositionType.RIGHT, 1, 1)
-        
+
         date_label = TextFieldLabel("<i>%s</i>" % _("Date:"))
         self.table.add(date_label)
         self.table.attach_next_to(self._date, date_label,
             Gtk.PositionType.RIGHT, 1, 1)
-        
+
         duration_label = TextFieldLabel("<i>%s</i>" % _("Duration:"))
         self.table.add(duration_label)
         self.table.attach_next_to(self._duration, duration_label,
             Gtk.PositionType.RIGHT, 1, 1)
-        
+
         description_label = TextFieldLabel("<i>%s</i>" % _("Description:"))
         self.table.add(description_label)
-            
+
         self.textview = Gtk.TextView()
         self.textview.set_editable(False)
         self.textview.set_wrap_mode(Gtk.WrapMode.WORD)
@@ -87,23 +87,23 @@ class DetailsDialog(Gtk.Dialog):
         scrolledwin.show()
         self.table.attach_next_to(scrolledwin, description_label,
             Gtk.PositionType.BOTTOM, 2, 1)
-        
+
         self.table.show_all()
-        
+
     def set_description(self, text):
         self.textview.get_buffer().set_text(text)
-        
+
     def set_title(self, title):
         Gtk.Dialog.set_title(self, title)
         self._title.set_text(title)
 
     def set_channel(self, channel):
         self._channel.set_text(channel)
-        
+
     def set_duration(self, duration):
         duration_str = gnomedvb.seconds_to_time_duration_string(duration)
         self._duration.set_text(duration_str)
-        
+
     def set_date(self, timestamp):
         date = datetime.datetime.fromtimestamp(timestamp)
         self._date.set_text(date.strftime("%c"))
diff --git a/client/gnomedvb/ui/widgets/Frame.py b/client/gnomedvb/ui/widgets/Frame.py
index 32d9ad6..c801d9d 100644
--- a/client/gnomedvb/ui/widgets/Frame.py
+++ b/client/gnomedvb/ui/widgets/Frame.py
@@ -26,18 +26,18 @@ class BaseFrame(Gtk.Box):
     def __init__(self, markup, child, expand=True, fill=True, padding=0):
         GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL,
             spacing=6)
-    
+
         label = Gtk.Label()
         label.set_halign(Gtk.Align.START)
         label.set_markup(markup)
         label.show()
         self.pack_start(label, False, False, 0)
-        
+
         self.child_widget = child
         self.child_widget.set_margin_left(12)
         self.child_widget.show()
         self.pack_start(self.child_widget, expand, fill, padding)
-        
+
     def set_aligned_child(self, child, expand=True, fill=True, padding=0):
         self.remove(self.child_widget)
         self.child_widget = child
@@ -49,7 +49,7 @@ class TextFieldLabel(Gtk.Label):
 
     def __init__(self, markup=None, **kwargs):
         GObject.GObject.__init__(self, **kwargs)
-        
+
         if markup:
             self.set_markup(markup)
         self.set_halign(Gtk.Align.START)
@@ -62,6 +62,5 @@ class Frame (BaseFrame):
         scrolled.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         scrolled.add(treeview)
-        
+
         BaseFrame.__init__(self, markup, scrolled)
-        
diff --git a/client/gnomedvb/ui/widgets/RecordingsStore.py b/client/gnomedvb/ui/widgets/RecordingsStore.py
index 36d9d17..eb77076 100644
--- a/client/gnomedvb/ui/widgets/RecordingsStore.py
+++ b/client/gnomedvb/ui/widgets/RecordingsStore.py
@@ -23,7 +23,7 @@ from gnomedvb import DVBRecordingsStoreClient, global_error_handler
 from cgi import escape
 
 class RecordingsStore(Gtk.ListStore):
-    
+
     (COL_START,
     COL_CHANNEL,
     COL_NAME,
@@ -33,32 +33,32 @@ class RecordingsStore(Gtk.ListStore):
 
     def __init__(self):
         Gtk.ListStore.__init__(self, GObject.TYPE_PYOBJECT, str, str, long, str, long)
-        
+
         self._recstore = DVBRecordingsStoreClient()
         self._recstore.connect("changed", self._on_changed)
-        
+
         self._fill()
-        
+
     def get_recordings_store_client(self):
         return self._recstore
-        
+
     def _append_recording(self, rec_id):
         info, success = self._recstore.get_all_informations (rec_id)
-        
+
         if success:
             channame = info[5]
             name = escape(info[1])
             start = datetime.datetime.fromtimestamp(info[4])
             duration = info[3]
             location = info[6]
-    
+
             self.append([start, channame, name, duration, location, rec_id])
-        
+
     def _fill(self):
         def append_rec(proxy, rids, user_data):
             for rid in rids:
                 self._append_recording(rid)
-    
+
         self._recstore.get_recordings(result_handler=append_rec, error_handler=global_error_handler)
 
     def _on_changed(self, recstore, rec_id, change_type):
@@ -74,4 +74,3 @@ class RecordingsStore(Gtk.ListStore):
         elif change_type == 2:
             # Updated
             pass
-        
diff --git a/client/gnomedvb/ui/widgets/RecordingsView.py b/client/gnomedvb/ui/widgets/RecordingsView.py
index 0b2d854..85e4c9e 100644
--- a/client/gnomedvb/ui/widgets/RecordingsView.py
+++ b/client/gnomedvb/ui/widgets/RecordingsView.py
@@ -29,11 +29,11 @@ class RecordingsView(Gtk.TreeView):
     def __init__(self, model=None):
         GObject.GObject.__init__(self)
         if model != None:
-            self.set_model(model)      
+            self.set_model(model)
 
         self._append_text_column(_("Title"), RecordingsStore.COL_NAME)
         self._append_text_column(_("Channel"), RecordingsStore.COL_CHANNEL)
-        
+
         col_length, cell_length = self._append_text_column(_("Length"),
             RecordingsStore.COL_DURATION)
         col_length.set_cell_data_func(cell_length, self._get_length_data, None)
@@ -42,16 +42,15 @@ class RecordingsView(Gtk.TreeView):
         col = Gtk.TreeViewColumn(_("Start"), cell,
             datetime=RecordingsStore.COL_START)
         self.append_column(col)
-            
+
     def _append_text_column(self, title, col_index):
         cell = Gtk.CellRendererText()
         col = Gtk.TreeViewColumn(title, cell, markup=col_index)
         self.append_column(col)
-        
+
         return (col, cell)
-        
+
     def _get_length_data(self, column, cell, model, aiter, user_data=None):
         duration = model[aiter][RecordingsStore.COL_DURATION]
         duration_str = seconds_to_time_duration_string(duration)
         cell.set_property("text", duration_str)
-                
diff --git a/client/gnomedvb/ui/widgets/RunningNextStore.py b/client/gnomedvb/ui/widgets/RunningNextStore.py
index 6209c13..610bdb3 100644
--- a/client/gnomedvb/ui/widgets/RunningNextStore.py
+++ b/client/gnomedvb/ui/widgets/RunningNextStore.py
@@ -33,30 +33,30 @@ class RunningNextStore(Gtk.ListStore):
 
     def __init__(self, group):
         Gtk.ListStore.__init__(self, str, long, str, long, str, long, long, long)
-        
+
         self.set_sort_column_id(self.COL_CHANNEL,
             Gtk.SortType.ASCENDING)
-          
+
         self._group = group
         self._fill()
-        
+
     def get_device_group(self):
         return self._group
-        
+
     def _fill(self):
         channellist = self._group.get_channel_list()
-    
+
         def add_channels(proxy, channels, user_data):
             for sid, name, is_radio in channels:
                 aiter = self.append()
                 self.set_value(aiter, self.COL_CHANNEL, name)
                 self.set_value(aiter, self.COL_SID, sid)
-                
+
                 sched = self._group.get_schedule(sid)
                 now = sched.now_playing()
                 if now != 0:
                     next_id, name, duration, short_desc = sched.get_informations(now)[0][1:]
-                    
+
                     self.set_value(aiter, self.COL_RUNNING_START, sched.get_local_start_timestamp(now)[0])
                     self.set_value(aiter, self.COL_RUNNING, escape(name))
                     self.set_value(aiter, self.COL_RUNNING_EVENT, now)
@@ -65,7 +65,6 @@ class RunningNextStore(Gtk.ListStore):
                         self.set_value(aiter, self.COL_NEXT_START, sched.get_local_start_timestamp(next_id)[0])
                         self.set_value(aiter, self.COL_NEXT, escape(name))
                         self.set_value(aiter, self.COL_NEXT_EVENT, next_id)
-        
+
         channellist.get_channel_infos(result_handler=add_channels,
             error_handler=global_error_handler)
-        
diff --git a/client/gnomedvb/ui/widgets/RunningNextView.py b/client/gnomedvb/ui/widgets/RunningNextView.py
index 6d6c526..3c3aa31 100644
--- a/client/gnomedvb/ui/widgets/RunningNextView.py
+++ b/client/gnomedvb/ui/widgets/RunningNextView.py
@@ -25,20 +25,20 @@ from gnomedvb import global_error_handler
 from gnomedvb.ui.widgets.RunningNextStore import RunningNextStore
 from gnomedvb.ui.widgets.DetailsDialog import DetailsDialog
 from gnomedvb.ui.timers.MessageDialogs import TimerFailureDialog, TimerSuccessDialog
-       
+
 class RunningNextView(Gtk.TreeView):
 
     def __init__(self, model):
         GObject.GObject.__init__(self)
         self.set_model(model)
-        
+
         cell_channel = Gtk.CellRendererText()
         col_channel = Gtk.TreeViewColumn(_("Channel"), cell_channel)
         col_channel.add_attribute(cell_channel, "markup",
             RunningNextStore.COL_CHANNEL)
         self.append_column(col_channel)
         col_channel.index = RunningNextStore.COL_CHANNEL
-        
+
         cell_now_start = Gtk.CellRendererText()
         cell_now = Gtk.CellRendererText()
         col_now = Gtk.TreeViewColumn(_("Now"))
@@ -50,7 +50,7 @@ class RunningNextView(Gtk.TreeView):
         col_now.set_property("resizable", True)
         self.append_column(col_now)
         col_now.index = RunningNextStore.COL_RUNNING
-        
+
         cell_next_start = Gtk.CellRendererText()
         cell_next = Gtk.CellRendererText()
         col_next = Gtk.TreeViewColumn(_("Next"))
@@ -62,9 +62,9 @@ class RunningNextView(Gtk.TreeView):
         col_next.add_attribute(cell_next, "markup", RunningNextStore.COL_NEXT)
         self.append_column(col_next)
         col_next.index = RunningNextStore.COL_NEXT
-        
+
         self.connect("button-press-event", self._on_button_press_event)
-    
+
     def _format_time(self, column, cell, model, aiter, col_id):
         timestamp = model[aiter][col_id]
         if timestamp == 0:
@@ -72,24 +72,24 @@ class RunningNextView(Gtk.TreeView):
         else:
             dt = datetime.datetime.fromtimestamp(timestamp)
             time_str = dt.strftime("%X")
-        
+
         cell.set_property("text", time_str)
-        
+
     def _on_button_press_event(self, treeview, event):
-            
+
         def show_details(proxy, result, user_data):
             data, success = result
             if not success:
                 return
             event_id, next_id, name, duration, desc = data
-            
+
             ext_desc, success = schedule.get_extended_description(event_id)
             if success:
                 if len(desc) == 0:
                     desc = ext_desc
                 else:
                     desc += "\n%s" % ext_desc
-            
+
             dialog = DetailsDialog(self.get_toplevel())
             dialog.set_description(desc)
             dialog.set_title(name)
@@ -116,7 +116,7 @@ class RunningNextView(Gtk.TreeView):
                         event_id = model[aiter][RunningNextStore.COL_NEXT_EVENT]
                     else:
                         return
-                    
+
                     devgroup = model.get_device_group()
                     sid = model[aiter][RunningNextStore.COL_SID]
                     schedule = devgroup.get_schedule(sid)
@@ -139,4 +139,3 @@ class RunningNextView(Gtk.TreeView):
         recorder.add_timer_for_epg_event(event_id, channel_sid,
             result_handler=on_reply,
             error_handler=global_error_handler)
-        
diff --git a/client/gnomedvb/ui/widgets/SchedulePaned.py b/client/gnomedvb/ui/widgets/SchedulePaned.py
index a24fe4a..3df4fff 100644
--- a/client/gnomedvb/ui/widgets/SchedulePaned.py
+++ b/client/gnomedvb/ui/widgets/SchedulePaned.py
@@ -25,58 +25,58 @@ class SchedulePaned (Gtk.Paned):
 
     def __init__(self):
         GObject.GObject.__init__(self, orientation=Gtk.Orientation.VERTICAL)
-        
+
         self.scheduleview = ScheduleView()
         self.scheduleview.show()
-        
+
         self.scheduleview.get_selection().connect("changed", self._on_selection_changed)
-        
+
         self.scrolledschedule = Gtk.ScrolledWindow()
         self.scrolledschedule.add(self.scheduleview)
         self.scrolledschedule.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         self.scrolledschedule.set_shadow_type(Gtk.ShadowType.IN)
         self.scrolledschedule.show()
-        
+
         self.pack1(self.scrolledschedule, True)
-        
+
         self.textview = Gtk.TextView()
         self.textview.set_wrap_mode(Gtk.WrapMode.WORD)
         self.textview.set_editable(False)
         self.textview.show()
-        
+
         self.scrolledtextview = Gtk.ScrolledWindow()
         self.scrolledtextview.add(self.textview)
         self.scrolledtextview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
         self.scrolledtextview.set_shadow_type(Gtk.ShadowType.IN)
         self.scrolledtextview.show()
-        
+
         self.pack2(self.scrolledtextview, False)
-        
+
         self.scrolledtextview.set_size_request(-1, 100)
-        
+
     def get_treeview(self):
         return self.scheduleview
-    
+
     def get_textview(self):
         return self.textview
-        
+
     def _on_selection_changed(self, selection):
         model, aiter = selection.get_selected()
-        
+
         if aiter != None:
             event_id = model[aiter][ScheduleStore.COL_EVENT_ID]
             if event_id != ScheduleStore.NEW_DAY:
                 description = model[aiter][ScheduleStore.COL_SHORT_DESC]
                 if description != None and len(description) > 0:
                     description += "\n\n"
-                
+
                 # Check if row is the selected row
                 ext_desc = model[aiter][ScheduleStore.COL_EXTENDED_DESC]
                 if ext_desc == None:
                     ext_desc = model.get_extended_description(aiter)
                     model[aiter][ScheduleStore.COL_EXTENDED_DESC] = ext_desc
                 description += ext_desc
-                
+
                 textbuffer = self.textview.get_buffer()
                 textbuffer.set_text(description)
                 self.scrolledtextview.show()
diff --git a/client/gnomedvb/ui/widgets/ScheduleStore.py b/client/gnomedvb/ui/widgets/ScheduleStore.py
index 5f792a8..9f64aa1 100644
--- a/client/gnomedvb/ui/widgets/ScheduleStore.py
+++ b/client/gnomedvb/ui/widgets/ScheduleStore.py
@@ -32,9 +32,9 @@ class ScheduleStore(Gtk.ListStore):
      COL_EXTENDED_DESC,
      COL_RECORDED,
      COL_EVENT_ID,) = range(8)
-     
+
     NEW_DAY = -1L
-    
+
     __gsignals__ = {
         "loading-finished":  (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []),
     }
@@ -45,18 +45,18 @@ class ScheduleStore(Gtk.ListStore):
         if self._client != None:
             self._recorder = dev_group.get_recorder()
             self._fill_all()
-        
+
     def reload_all(self):
         self.clear()
         self._fill_all()
-        
+
     def _fill_from_now(self):
         current = self._client.now_playing()
-        
+
         while current != 0:
             self._append_event(current)
             current = self._client.next(current)
-            
+
     def _fill_all(self):
         def append_event(proxy, events, user_data):
             prev_date = (0,0,0,)
@@ -72,39 +72,39 @@ class ScheduleStore(Gtk.ListStore):
                     self.set_value(date_iter, self.COL_EVENT_ID, self.NEW_DAY)
                 prev_date = new_date
             self.emit("loading-finished")
-        
+
         self._client.get_all_event_infos(result_handler=append_event, error_handler=global_error_handler)
-        
+
     def get_date(self, aiter):
         dt = self[aiter][self.COL_DATETIME]
         return (dt.year, dt.month, dt.day,)
-            
+
     def get_time(self, aiter):
         dt = self[aiter][self.COL_DATETIME]
         return (dt.hour, dt.minute,)
-        
+
     def _append_event(self, event):
         event_id, next_id, name, duration, short_desc = event
         name = escape(name)
         short_desc = escape(short_desc)
-        
+
         start_arr = self._client.get_local_start_time(event_id)[0]
-        
+
         rec = self._recorder.has_timer_for_event(event_id,
             self._client.get_channel_sid())
-        
+
         # %X -> display locale's time representation
-        return self.append([datetime.datetime(*start_arr), "%X",            
+        return self.append([datetime.datetime(*start_arr), "%X",
             duration, name, short_desc, None,
             rec, event_id])
-            
+
     def get_extended_description(self, aiter):
         if aiter != None:
-            event_id = self[aiter][self.COL_EVENT_ID] 
+            event_id = self[aiter][self.COL_EVENT_ID]
             ext_desc = self._client.get_extended_description(event_id)[0]
             self[aiter][self.COL_EXTENDED_DESC] = ext_desc
         return ext_desc
-        
+
     def get_next_day_iter(self, aiter):
         """
         Get the iter pointing to the row that represents
@@ -115,19 +115,19 @@ class ScheduleStore(Gtk.ListStore):
         """
         if aiter == None:
             aiter = self.get_iter_first ()
-        
+
         # If the selected row marks a new day
         # we still want the following day
         aiter = self.iter_next (aiter)
-            
+
         while (aiter != None):
             row = self[aiter]
             if row[self.COL_EVENT_ID] == self.NEW_DAY:
                 return row.iter
             aiter = self.iter_next (aiter)
-                
+
         return None
-        
+
     def get_previous_day_iter(self, aiter):
         """
         Get the iter pointing to the row that represents
@@ -137,14 +137,14 @@ class ScheduleStore(Gtk.ListStore):
         """
         if aiter == None:
             return None
-        
+
         path0 = self.get_path(aiter)
 
         # If the selected row marks a new day
         # we still want the previous day
         # therefore we have to come across 2 new days
         day_seen = 0
-        
+
         root = Gtk.TreePath("0")
         while path0 != root:
             aiter = self.get_iter(path0)
@@ -154,6 +154,6 @@ class ScheduleStore(Gtk.ListStore):
                 if day_seen == 2:
                     return row.iter
             path0.prev()
-        
+
         return None
 
diff --git a/client/gnomedvb/ui/widgets/ScheduleView.py b/client/gnomedvb/ui/widgets/ScheduleView.py
index a937907..2eb0752 100644
--- a/client/gnomedvb/ui/widgets/ScheduleView.py
+++ b/client/gnomedvb/ui/widgets/ScheduleView.py
@@ -30,7 +30,7 @@ class ScheduleView(Gtk.TreeView):
         GObject.GObject.__init__(self)
         if model != None:
             self.set_model(model)
-        
+
         self.prev_selection = None
         self.set_property("headers-visible", False)
         self.date_color = None
@@ -49,7 +49,7 @@ class ScheduleView(Gtk.TreeView):
         col_time.add_attribute(cell_time, "format", ScheduleStore.COL_FORMAT)
 
         self.append_column(col_time)
-        
+
         cell_description = Gtk.CellRendererText()
         cell_description.set_property("wrap-width", 500)
         cell_description.set_property("wrap-mode", Pango.WrapMode.WORD)
@@ -75,7 +75,7 @@ class ScheduleView(Gtk.TreeView):
         if data and data.lower().startswith(key.lower()):
             return False
         return True
-    
+
     def _get_description_data(self, column, cell, model, aiter, user_data=None):
         self._set_colors()
         event_id = model[aiter][ScheduleStore.COL_EVENT_ID]
@@ -88,18 +88,18 @@ class ScheduleView(Gtk.TreeView):
         else:
             cell.set_property("xalign", 0)
             cell.set_property ("cell-background-rgba", self.entry_color)
-            
+
             duration = seconds_to_time_duration_string(model[aiter][ScheduleStore.COL_DURATION])
             title = model[aiter][ScheduleStore.COL_TITLE]
-            
+
             short_desc = model[aiter][ScheduleStore.COL_SHORT_DESC]
             if len(short_desc) > 0:
                 short_desc += "\n"
-            
+
             description = "<b>%s</b>\n%s<small><i>%s: %s</i></small>" % (title, short_desc, _("Duration"), duration)
-        
+
         cell.set_property("markup", description)
-        
+
     def _get_time_data(self, column, cell, model, aiter, user_data=None):
         event_id = model[aiter][ScheduleStore.COL_EVENT_ID]
 
diff --git a/client/gnomedvb/ui/wizard/SetupWizard.py b/client/gnomedvb/ui/wizard/SetupWizard.py
index 0ad0a08..71f1078 100644
--- a/client/gnomedvb/ui/wizard/SetupWizard.py
+++ b/client/gnomedvb/ui/wizard/SetupWizard.py
@@ -50,7 +50,7 @@ class CloseDialog(Gtk.Dialog):
         self._progressbar_timer = GObject.timeout_add(100, self._progressbar_pulse)
         self.progressbar.show()
         vbox.pack_start(self.progressbar, False, True, 0)
-            
+
     def _progressbar_pulse(self, user_data=None):
         self.progressbar.pulse()
         return True
@@ -72,7 +72,7 @@ class SetupWizard(Gtk.Assistant):
         self.__model = DVBModel()
         self.__expert_mode = False
         self.__create_group = False
-        
+
         self.connect ('delete-event', self.confirm_quit)
         self.connect ('cancel', self.confirm_quit)
         self.connect ('close', self.confirm_quit)
@@ -80,12 +80,12 @@ class SetupWizard(Gtk.Assistant):
         self.set_forward_page_func(self.page_func, None)
         self.set_default_size(500, 400)
         self.set_title(_("Setup digital TV"))
-        
+
         self.intro_page = IntroPage()
         self.append_page(self.intro_page)
         self.set_page_complete(self.intro_page, True)
-        
-        self.adapters_page = AdaptersPage(self.__model)        
+
+        self.adapters_page = AdaptersPage(self.__model)
         self.adapters_page.connect("finished", self.on_adapter_page_finished)
         self.adapters_page.connect("next-page", self.on_next_page)
         self.append_page(self.adapters_page)
@@ -93,19 +93,19 @@ class SetupWizard(Gtk.Assistant):
         self.tuning_data_page = InitialTuningDataPage()
         self.tuning_data_page.connect("finished", self.on_page_finished)
         self.append_page(self.tuning_data_page)
-        
+
         self.scan_page = ChannelScanPage(self.__model)
         self.scan_page.connect("finished", self.on_page_finished)
         self.append_page(self.scan_page)
-        
+
         save_channels_page = SaveChannelListPage()
         save_channels_page.connect("finished", self.on_page_finished)
         self.append_page(save_channels_page)
-        
+
         self.setup_page = SetupDevicePage(self.__model)
         self.setup_page.connect("finished", self.on_setup_device_page_finished)
         self.append_page(self.setup_page)
-        
+
         self.summary_page = SummaryPage()
         self.summary_page.configure_button.connect("clicked",
             lambda button: self.set_current_page(self.INTRO_PAGE))
@@ -137,7 +137,7 @@ class SetupWizard(Gtk.Assistant):
     def append_page(self, page):
         Gtk.Assistant.append_page(self, page)
         self.set_page_type(page, page.get_page_type())
-        
+
     def on_prepare(self, assistant, page):
         if isinstance(page, IntroPage):
             # Reset to None so we can automatically search for adapter again
@@ -173,19 +173,19 @@ class SetupWizard(Gtk.Assistant):
             self.__adapter_info = None
 
         self.set_page_title(page, page.get_page_title())
-        
+
     def on_page_finished(self, page, state):
         self.set_page_complete(page, state)
-            
+
     def on_adapter_page_finished(self, page, state):
         if state:
             self.__adapter_info = page.get_adapter_info()
         self.on_page_finished(page, state)
-        
+
     def on_setup_device_page_finished(self, page, state):
         if state:
             self.set_current_page(self.SUMMARY_PAGE)
-        
+
     def page_func(self, current_page, user_data=None):
         if current_page == self.ADAPTERS_PAGE and not self.__expert_mode:
             # Check if the selected adapter is not registered
@@ -203,7 +203,7 @@ class SetupWizard(Gtk.Assistant):
             return self.SUMMARY_PAGE
 
         return current_page + 1
-            
+
     def confirm_quit(self, *args):
         scanner = self.scan_page.get_scanner()
         if self.__ask_on_exit:
@@ -212,7 +212,7 @@ class SetupWizard(Gtk.Assistant):
                 type=Gtk.MessageType.QUESTION,
                 buttons=Gtk.ButtonsType.YES_NO,
                 message_format=_("Are you sure you want to abort?\nAll process will be lost."))
-            
+
             response = dialog.run()
             if response == Gtk.ResponseType.YES:
                 dialog.destroy()
@@ -232,7 +232,7 @@ class SetupWizard(Gtk.Assistant):
             close_dialog.show()
         else:
             Gtk.main_quit()
-            
+
     def on_next_page(self, adapters_page):
         if not self.__expert_mode and self.__adapter_info == None:
             # There's only one device no need to select one
diff --git a/client/gnomedvb/ui/wizard/pages/AdaptersPage.py b/client/gnomedvb/ui/wizard/pages/AdaptersPage.py
index b1da94a..fa48057 100644
--- a/client/gnomedvb/ui/wizard/pages/AdaptersPage.py
+++ b/client/gnomedvb/ui/wizard/pages/AdaptersPage.py
@@ -25,7 +25,7 @@ from gnomedvb.ui.wizard.pages.BasePage import BasePage
 from gnomedvb.ui.widgets.Frame import BaseFrame
 
 class AdaptersPage(BasePage):
-    
+
     __gsignals__ = {
         "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]),
         "next-page": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, []),
@@ -33,7 +33,7 @@ class AdaptersPage(BasePage):
 
     def __init__(self, model):
         BasePage.__init__(self)
-        
+
         self.__adapter_info = None
         self.__use_configured = True
         self.__model = model
@@ -41,20 +41,20 @@ class AdaptersPage(BasePage):
         self._progressbar_timer = None
         self.devicesview = None
         self.frame = None
-        
+
         # Name, Type Name, Type, adapter, frontend, registered
         self.deviceslist = Gtk.ListStore(str, str, str, int, int, bool)
-        
+
     def show_no_devices(self):
         if self.frame:
             self.frame.hide()
-    
+
         text = "<big><span weight=\"bold\">%s</span></big>" % _('No devices have been found.')
         text += "\n\n"
         text += _('Either no DVB cards are installed or all cards are busy. In the latter case make sure you close all programs such as video players that access your DVB card.')
         self._label.set_markup (text)
         self._label.show()
-    
+
     def show_devices(self):
         self._label.hide()
 
@@ -62,35 +62,35 @@ class AdaptersPage(BasePage):
             self.devicesview = Gtk.TreeView.new_with_model(self.deviceslist)
             self.devicesview.get_selection().connect("changed",
                 self.on_device_selection_changed)
-        
+
             cell_name = Gtk.CellRendererText()
             col_name = Gtk.TreeViewColumn(_("Name"))
             col_name.pack_start(cell_name, True)
             col_name.set_cell_data_func(cell_name, self.name_data_func, None)
             self.devicesview.append_column(col_name)
-        
+
             cell_type = Gtk.CellRendererText()
             col_type = Gtk.TreeViewColumn(_("Type"))
             col_type.pack_start(cell_type, True)
             col_type.add_attribute(cell_type, "text", 1)
             self.devicesview.append_column(col_type)
-        
+
             scrolledview = Gtk.ScrolledWindow()
             scrolledview.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
             scrolledview.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
             scrolledview.add(self.devicesview)
             scrolledview.show_all()
-        
+
             text = "<b>%s</b>" % _("Select the device you want to configure.")
             self.frame = BaseFrame(text, scrolledview)
             self.frame.show()
             self.pack_start(self.frame, True, True, 0)
 
         self.devicesview.grab_focus()
-        
+
         if len(self.deviceslist) == 1:
             self.emit("next-page")
-        
+
     def show_all_configured(self):
         if self.frame:
             self.frame.hide()
@@ -100,11 +100,11 @@ class AdaptersPage(BasePage):
         text += _('Go to the control center if you want to alter the settings of already configured devices.')
         self._label.set_markup (text)
         self._label.show()
-        
+
     def show_error(self, error):
         if self.frame:
             self.frame.hide()
-            
+
         text = "<big><span weight=\"bold\">%s</span></big>" % _('An error occured while retrieving devices.')
         text += "\n\n"
         text += _("Make sure other applications don't access DVB devices and you have permissions to access them.")
@@ -114,7 +114,7 @@ class AdaptersPage(BasePage):
         self._label.set_selectable(True)
         self._label.set_markup (text)
         self._label.show()
-        
+
     def show_progressbar(self):
         self._label.hide()
         self._progressbar = Gtk.ProgressBar()
@@ -123,7 +123,7 @@ class AdaptersPage(BasePage):
         self._progressbar.show()
         self.pack_start(self._progressbar, False, True, 0)
         self._progressbar_timer = GObject.timeout_add(100, self.progressbar_pulse, None)
-        
+
     def destroy_progressbar(self):
         GObject.source_remove(self._progressbar_timer)
         self._progressbar_timer = None
@@ -135,17 +135,17 @@ class AdaptersPage(BasePage):
 
     def get_page_title(self):
         return _("Device selection")
-        
+
     def display_configured(self, val):
         self.__use_configured = val
-    
+
     def get_selected_device(self):
         model, aiter = self.devicesview.get_selection().get_selected()
         if aiter != None:
             return None
         else:
             return model[aiter]
-        
+
     def get_adapter_info(self):
         if self.__adapter_info == None and len(self.deviceslist) == 1:
             aiter = self.deviceslist.get_iter_first()
@@ -166,9 +166,9 @@ class AdaptersPage(BasePage):
                 for dev in group["devices"]:
                     dev.type_name = DVB_TYPE_TO_DESC[dev.type]
                     dev.registered = True
-                    registered.add(dev)       
+                    registered.add(dev)
             self.__model.get_all_devices(result_handler=devices_handler)
-        
+
         def devices_handler(devices):
             error = None
             for dev in devices:
@@ -200,7 +200,7 @@ class AdaptersPage(BasePage):
                     dev.type, dev.adapter, dev.frontend, dev.registered])
 
             self.destroy_progressbar()
-            
+
             if error != None:
                 self.show_error(error)
             elif len(devs) == 0:
@@ -210,14 +210,14 @@ class AdaptersPage(BasePage):
                     self.show_all_configured()
             else:
                 self.show_devices()
-    
+
         registered = set()
         unregistered = set()
         self.__adapter_info = None
         self.show_progressbar()
-        
+
         self.__model.get_registered_device_groups(result_handler=registered_handler)
-    
+
     def on_device_selection_changed(self, treeselection):
         model, aiter = treeselection.get_selected()
         if aiter != None:
@@ -239,4 +239,3 @@ class AdaptersPage(BasePage):
         text += "<small>%s</small>" % (_("Adapter: %d, Frontend: %d") % (adapter, frontend))
 
         cell.set_property("markup", text)
-        
diff --git a/client/gnomedvb/ui/wizard/pages/BasePage.py b/client/gnomedvb/ui/wizard/pages/BasePage.py
index b78d01e..4f056e4 100644
--- a/client/gnomedvb/ui/wizard/pages/BasePage.py
+++ b/client/gnomedvb/ui/wizard/pages/BasePage.py
@@ -31,10 +31,10 @@ class BasePage(Gtk.Box):
         self._label.set_line_wrap(True)
 
         self.pack_start(self._label, False, False, 0)
-        
+
     def get_page_title(self):
         raise NotImplementedError
-        
+
     def get_page_type(self):
         return Gtk.AssistantPageType.CONTENT
 
diff --git a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
index 8abee1f..1f34c2f 100644
--- a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
+++ b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
@@ -29,13 +29,13 @@ class ChannelScanPage(BasePage):
     __gsignals__ = {
         "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]),
     }
-    
+
     (COL_LOGO,
      COL_NAME,
      COL_ACTIVE,
      COL_SID,
      COL_SCRAMBLED) = range(5)
-     
+
     MENU = '''<ui>
     <popup name="channels-popup">
         <menuitem name="channels-select-all" action="channels-select-all" />
@@ -44,14 +44,14 @@ class ChannelScanPage(BasePage):
 
     def __init__(self, model):
         BasePage.__init__(self)
-        
+
         self._model = model
         self._scanner = None
         self._max_freqs = 0
         self._scanned_freqs = 0
         self._last_qsize = 0
         self._progressbar_timer = 0
-        
+
         self.set_spacing(12)
         self._theme = Gtk.IconTheme.get_default()
 
@@ -60,7 +60,7 @@ class ChannelScanPage(BasePage):
             _("You can select the channels you want to have in your list of channels.")
         )
         self._label.set_markup (text)
-        
+
         actiongroup = Gtk.ActionGroup('channels')
         actiongroup.add_actions([
             ('channels-select-all', None, _('Select all'), None, None,
@@ -68,11 +68,11 @@ class ChannelScanPage(BasePage):
             ('channels-deselect-all', None, _('Deselect all'), None, None,
                 lambda x: self.__set_all_checked(False)),
         ])
-        
+
         uimanager = Gtk.UIManager()
         uimanager.add_ui_from_string(self.MENU)
         uimanager.insert_action_group(actiongroup)
-        
+
         self.popup_menu = uimanager.get_widget("/channels-popup")
 
         topbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
@@ -81,7 +81,7 @@ class ChannelScanPage(BasePage):
         label = TextFieldLabel()
         label.set_markup_with_mnemonic(_("_Channels:"))
         topbox.pack_start(label, False, True, 0)
-        
+
         # Logo, Name, active, SID, scrambled
         self.tvchannels = Gtk.ListStore(GdkPixbuf.Pixbuf, str, bool, int, bool)
         self.tvchannelsview = Gtk.TreeView.new_with_model(self.tvchannels)
@@ -90,18 +90,18 @@ class ChannelScanPage(BasePage):
         self.tvchannelsview.set_reorderable(True)
         self.tvchannelsview.set_headers_visible(False)
         label.set_mnemonic_widget(self.tvchannelsview)
-        
+
         col_name = Gtk.TreeViewColumn(_("Channel"))
-        
+
         cell_active = Gtk.CellRendererToggle()
         cell_active.connect("toggled", self.__on_active_toggled)
         col_name.pack_start(cell_active, False)
         col_name.add_attribute(cell_active, "active", self.COL_ACTIVE)
-        
+
         cell_icon = Gtk.CellRendererPixbuf()
         col_name.pack_start(cell_icon, False)
         col_name.add_attribute(cell_icon, "pixbuf", self.COL_LOGO)
-        
+
         cell_name = Gtk.CellRendererText()
         col_name.pack_start(cell_name, True)
         col_name.add_attribute(cell_name, "markup", self.COL_NAME)
@@ -111,14 +111,14 @@ class ChannelScanPage(BasePage):
         scrolledtvview.add(self.tvchannelsview)
         scrolledtvview.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         scrolledtvview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
-        
+
         topbox.pack_start(scrolledtvview, True, True, 0)
 
         self.scrambledbutton = Gtk.CheckButton.new_with_mnemonic(_("Select _scrambled channels"))
         self.scrambledbutton.set_active(True)
         self.scrambledbutton.connect("toggled", self.__on_select_encrypted_toggled)
         topbox.pack_start(self.scrambledbutton, False, True, 0)
-        
+
         self.create_signal_box()
 
         self.progressbar = Gtk.ProgressBar()
@@ -153,27 +153,27 @@ class ChannelScanPage(BasePage):
         self.signal_strength_bar = Gtk.ProgressBar()
         self.signal_strength_bar.set_size_request(-1, 10)
         frame.add(self.signal_strength_bar)
-        
+
     def get_scanner(self):
         return self._scanner
-        
+
     def get_page_title(self):
         return _("Scanning for channels")
-   
+
     def get_selected_channel_sids(self):
         return [row[self.COL_SID] for row in self.tvchannels if row[self.COL_ACTIVE]]
-        
+
     def start_scanning(self, adapter, frontend, tuning_data):
         def data_loaded(proxy, success, user_data):
             if success:
                 self._scanner.run()
             else:
                 self._scanner.destroy()
-        
+
         self._scanner = self._model.get_scanner_for_device(adapter, frontend)
         if self._scanner == None:
             return
-        
+
         self._scanner.connect ("frequency-scanned", self.__on_freq_scanned)
         self._scanner.connect ("channel-added", self.__on_channel_added)
         self._scanner.connect ("finished", self.__on_finished)
@@ -192,11 +192,11 @@ class ChannelScanPage(BasePage):
             self._scanner.run()
         else:
             self._scanner.destroy()
-            
+
     def _progressbar_pulse(self, user_data=None):
         self.progressbar.pulse()
         return True
-        
+
     def __on_channel_added(self, scanner, freq, sid, name, network, channeltype, scrambled):
         try:
             if scrambled:
@@ -211,20 +211,20 @@ class ChannelScanPage(BasePage):
                         Gtk.IconLookupFlags.USE_BUILTIN)
         except GObject.GError:
             icon = None
-        
+
         name = name.replace("&", "&amp;")
         if scrambled and not self.scrambledbutton.get_active():
             active = False
         else:
             active = True
         self.tvchannels.append([icon, name, active, sid, scrambled])
-        
+
     def __on_finished(self, scanner):
         self.progressbar.hide()
         self.progress_table.hide()
-        
+
         self.emit("finished", True)
-        
+
     def __on_freq_scanned(self, scanner, freq, qsize):
         if qsize >= self._last_qsize:
             self._max_freqs += qsize - self._last_qsize + 1
@@ -239,18 +239,18 @@ class ChannelScanPage(BasePage):
         self._last_qsize = qsize
         self.signal_strength_bar.set_fraction(0.0)
         self.signal_quality_bar.set_fraction(0.0)
-        
+
     def __on_active_toggled(self, renderer, path):
         aiter = self.tvchannels.get_iter(path)
         self.tvchannels[aiter][self.COL_ACTIVE] = \
             not self.tvchannels[aiter][self.COL_ACTIVE]
-        
+
     def __on_select_encrypted_toggled(self, checkbutton):
         val = checkbutton.get_active()
         for row in self.tvchannels:
             if row[self.COL_SCRAMBLED]:
                 row[self.COL_ACTIVE] = val
-                
+
     def __on_treeview_button_press_event(self, treeview, event):
         if event.button == 3:
             x = int(event.x)
diff --git a/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py b/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py
index 44ee584..33e86c1 100644
--- a/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py
+++ b/client/gnomedvb/ui/wizard/pages/InitialTuningDataPage.py
@@ -31,7 +31,7 @@ DVB_APPS_DIRS = ("/usr/share/dvb",
                  "/usr/share/dvb-apps",
                  "/usr/share/dvb-apps/scan",
                  "/usr/share/doc/dvb-utils/examples/scan")
-                 
+
 COUNTRIES = {
     "ad": "Andorra",
     "at": "Austria",
@@ -124,7 +124,7 @@ COUNTRIES_DVB_C = (
 )
 
 class InitialTuningDataPage(BasePage):
-    
+
     __gsignals__ = {
             "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]),
     }
@@ -132,15 +132,15 @@ class InitialTuningDataPage(BasePage):
 
     def __init__(self):
         BasePage.__init__(self)
-        
+
         self.__adapter_info = None
         self.__page_title = None
         self.__tuning_data = self.NOT_LISTED
         self.__data_dir = None
-        
+
     def get_page_title(self):
         return self.__page_title
-        
+
     def set_adapter_info(self, info):
         self.__adapter_info = info
         # skip label
@@ -151,7 +151,7 @@ class InitialTuningDataPage(BasePage):
             self.__page_title = _("Missing requirements")
             self.setup_dvb_apps_missing()
             return
-            
+
         if info["type"] == "DVB-T":
             self.setup_dvb_t()
             self.__page_title = _("Country and antenna selection")
@@ -164,12 +164,12 @@ class InitialTuningDataPage(BasePage):
         else:
             self.__page_title = _("Unsupported adapter")
             self.setup_unknown(info["type"])
-            
+
     def get_tuning_data(self):
         if self.__tuning_data == self.NOT_LISTED:
             self.add_brute_force_scan()
         return self.__tuning_data
-        
+
     def _create_table(self):
         self.table = Gtk.Grid(orientation=Gtk.Orientation.VERTICAL)
         self.table.set_row_spacing(6)
@@ -184,7 +184,7 @@ class InitialTuningDataPage(BasePage):
                 val = True
                 break
         return val
-    
+
     def setup_unknown(self, devtype):
         # translators: first %s is the DVB type, e.g. DVB-S
         text = _("Sorry, but '%s' cards aren't supported.") % devtype
@@ -194,20 +194,20 @@ class InitialTuningDataPage(BasePage):
         text = "<big><b>%s</b></big>\n%s" % (_("Could not find initial tuning data."),
             _("Please make sure that the dvb-apps package is installed."))
         self._label.set_markup(text)
-        
+
     def setup_dvb_t(self):
         text = "%s %s %s" %(_('Please choose a country and the antenna that is closest to your location.'),
             _("If you don't know which antenna to choose select \"Don't know\" from the list of providers."),
             _("However, searching for channels will take considerably longer this way."))
         self._label.set_markup(text)
-    
+
         self.providers_view = None
-        
+
         countries = {self.NOT_LISTED: _("Not listed")}
         t = gettext.translation("iso_3166", fallback=True)
         for lang in COUNTRIES_DVB_T:
             countries[lang] = t.ugettext(COUNTRIES[lang])
-        
+
         self._create_table()
 
         country = Gtk.Label(halign=Gtk.Align.START)
@@ -215,14 +215,14 @@ class InitialTuningDataPage(BasePage):
         country.show()
         self.table.add(country)
 
-        # name, code    
+        # name, code
         self.countries = Gtk.ListStore(str, str)
         self.countries.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         self.countries.set_sort_func(0, self.combobox_sort_func)
-        
+
         for code, name in countries.items():
             self.countries.append([name, code])
-    
+
         self.country_combo = Gtk.ComboBox.new_with_model_and_entry(self.countries)
         self.country_combo.set_hexpand(True)
         self.country_combo.connect('changed', self.on_country_changed)
@@ -235,47 +235,47 @@ class InitialTuningDataPage(BasePage):
             Gtk.PositionType.RIGHT, 1, 1)
         self.country_combo.set_active(0)
         country.set_mnemonic_widget(self.country_combo)
-        
+
         providers = Gtk.Label()
         providers.set_markup_with_mnemonic(_("_Antenna:"))
         providers.show()
         self.table.add(providers)
-        
+
         self.providers = Gtk.ListStore(str, str)
         self.providers.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         self.providers.set_sort_func(0, self.combobox_sort_func, None)
-        
+
         self.providers_view, scrolledview = self._create_providers_treeview(
             self.providers, _("Antenna"))
         self.providers_view.get_selection().connect('changed',
             self.on_providers_changed)
         providers.set_mnemonic_widget(self.providers_view)
-        
+
         scrolledview.set_property("expand", True)
         self.table.attach_next_to(scrolledview, providers,
             Gtk.PositionType.BOTTOM, 2, 1)
-        
+
         self.providers_view.set_sensitive(False)
-   
+
     def setup_dvb_s(self):
-        
+
         satellite = Gtk.Label()
         satellite.set_markup_with_mnemonic(_("_Satellite:"))
         satellite.show()
         self.pack_start(satellite, False, False, 0)
-        
+
         self.satellites = Gtk.ListStore(str, str)
         self.satellites.set_sort_column_id(0, Gtk.SortType.ASCENDING)
-        
+
         self.satellite_view, scrolledview = self._create_providers_treeview(
             self.satellites, _("Satellite"))
         self.satellite_view.get_selection().connect("changed",
             self.on_satellite_changed)
         satellite.set_mnemonic_widget(self.satellite_view)
         self.pack_start(scrolledview, True, True, 0)
-        
+
         self.read_satellites()
-        
+
     def setup_dvb_c(self):
         countries = {}
         t = gettext.translation("iso_3166", fallback=True)
@@ -292,10 +292,10 @@ class InitialTuningDataPage(BasePage):
         self.countries = Gtk.ListStore(str, str)
         self.countries.set_sort_column_id(0, Gtk.SortType.ASCENDING)
         self.countries.set_sort_func(0, self.combobox_sort_func, None)
-        
+
         for code, name in countries.items():
             self.countries.append([name, code])
-    
+
         self.country_combo = Gtk.ComboBox.new_with_model_and_entry(self.countries)
         self.country_combo.set_hexpand(True)
         self.country_combo.connect('changed', self.on_country_changed)
@@ -307,26 +307,26 @@ class InitialTuningDataPage(BasePage):
         self.table.attach_next_to(self.country_combo, country,
             Gtk.PositionType.RIGHT, 1, 1)
         country.set_mnemonic_widget(self.country_combo)
-        
+
         providers = Gtk.Label()
         providers.set_markup_with_mnemonic(_("_Providers:"))
         providers.show()
         self.table.add(providers)
-        
+
         self.providers = Gtk.ListStore(str, str)
         self.providers.set_sort_column_id(0, Gtk.SortType.ASCENDING)
-        
+
         self.providers_view, scrolledview = self._create_providers_treeview(
             self.providers, _("Provider"))
         self.providers_view.get_selection().connect('changed',
             self.on_providers_changed)
         providers.set_mnemonic_widget(self.providers_view)
-        
+
         scrolledview.set_property("expand", True)
         self.table.attach_next_to(scrolledview, providers,
             Gtk.PositionType.BOTTOM, 2, 1)
         self.providers_view.set_sensitive(False)
-         
+
     def _create_providers_treeview(self, providers, col_name):
         providers_view = Gtk.TreeView.new_with_model(providers)
         providers_view.set_headers_visible(False)
@@ -336,21 +336,21 @@ class InitialTuningDataPage(BasePage):
         col.add_attribute(cell, "markup", 0)
         providers_view.append_column(col)
         providers_view.show()
-        
+
         scrolledview= Gtk.ScrolledWindow()
         scrolledview.add(providers_view)
         scrolledview.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
         scrolledview.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         scrolledview.show()
-        
+
         return providers_view, scrolledview
-        
+
     def on_country_changed(self, combo):
         aiter = combo.get_active_iter()
-        
+
         if aiter != None:
             selected_country = self.countries[aiter][1]
-    
+
             if selected_country == self.NOT_LISTED:
                 if self.providers_view:
                     self.providers_view.set_sensitive(False)
@@ -361,7 +361,7 @@ class InitialTuningDataPage(BasePage):
 
                 toplevel_window = self.get_toplevel().get_window()
                 toplevel_window.set_cursor(Gdk.Cursor.new(Gdk.CursorType.WATCH))
-                
+
                 # Fill list async
                 GObject.idle_add(self._fill_providers, selected_country)
 
@@ -377,11 +377,11 @@ class InitialTuningDataPage(BasePage):
                     if len(values) != 2:
                         continue
                     country, city = values
-                
+
                     if country == selected_country:
                         self.providers.append([city,
                             os.path.join(d, self.__data_dir, f)])
-    
+
         self.providers_view.set_sensitive(True)
         first_iter = self.providers.get_iter_first()
         self.providers_view.get_selection().select_iter(first_iter)
@@ -390,34 +390,34 @@ class InitialTuningDataPage(BasePage):
         self.emit("finished", True)
 
         return False
-        
+
     def on_providers_changed(self, selection):
         model, aiter = selection.get_selected()
-        
+
         if aiter != None:
             self.__tuning_data = self.providers[aiter][1]
             self.emit("finished", True)
-    
+
     def read_satellites(self):
         for d in DVB_APPS_DIRS:
             if os.access(d, os.F_OK | os.R_OK):
                 for f in os.listdir(os.path.join(d, 'dvb-s')):
                     self.satellites.append([f, os.path.join(d, 'dvb-s', f)])
-                        
+
     def on_satellite_changed(self, selection):
         model, aiter = selection.get_selected()
-        
+
         if aiter != None:
             self.__tuning_data = self.satellites[aiter][1]
             self.emit("finished", True)
-    
+
     def on_scan_all_toggled(self, checkbutton):
         state = not checkbutton.get_active()
         self.country_combo.set_sensitive(state)
         self.providers_view.set_sensitive(state)
         self.add_brute_force_scan()
         self.emit("finished", not state)
-    
+
     def add_brute_force_scan(self):
         self.__tuning_data = []
         for chan in range(5, 13):
@@ -454,4 +454,3 @@ class InitialTuningDataPage(BasePage):
             return 1
         else:
             return locale.strcoll(name1, name2)
-    
diff --git a/client/gnomedvb/ui/wizard/pages/IntroPage.py b/client/gnomedvb/ui/wizard/pages/IntroPage.py
index c5f945d..93ef771 100644
--- a/client/gnomedvb/ui/wizard/pages/IntroPage.py
+++ b/client/gnomedvb/ui/wizard/pages/IntroPage.py
@@ -21,10 +21,10 @@ from gnomedvb import _
 from gnomedvb.ui.wizard.pages.BasePage import BasePage
 
 class IntroPage(BasePage):
-    
+
     def __init__(self):
         BasePage.__init__(self)
-        
+
         text = "<b>%s</b>" % _('Welcome to the digital television Assistant.')
         self._label.set_markup(text)
         self._label.set_line_wrap(False)
@@ -36,16 +36,15 @@ class IntroPage(BasePage):
         label2.set_halign(Gtk.Align.START)
         label2.set_valign(Gtk.Align.START)
         self.pack_start(label2, True, True, 0)
-        
+
         self.expert_mode = Gtk.CheckButton.new_with_mnemonic(_('_Expert mode'))
         self.pack_start(self.expert_mode, False, False, 0)
-        
+
     def get_page_title(self):
         return _("Digital TV configuration")
-        
+
     def get_page_type(self):
         return Gtk.AssistantPageType.INTRO
-        
+
     def has_expert_mode(self):
         return self.expert_mode.get_active()
-    
diff --git a/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py b/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
index 6573d9f..5f4ae0a 100644
--- a/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
+++ b/client/gnomedvb/ui/wizard/pages/SaveChannelListPage.py
@@ -31,26 +31,26 @@ class SaveChannelListPage(BasePage):
         BasePage.__init__(self)
         self.__scanner = None
         self.__channels = None
-        
+
         text = _("Choose a location where you want to save the list of channels.")
         self._label.set_text(text)
 
         button_box = Gtk.ButtonBox()
         self.pack_start(button_box, True, True, 0)
-    
+
         save_button = Gtk.Button(stock=Gtk.STOCK_SAVE)
         save_button.connect("clicked", self.__on_save_button_clicked)
         button_box.pack_start(save_button, True, True, 0)
-            
+
     def get_page_title(self):
         return _("Save channels")
-    
+
     def set_scanner(self, scanner):
         self.__scanner = scanner
-        
+
     def set_channels(self, channels):
         self.__channels = channels
-        
+
     def __on_save_button_clicked(self, button):
         filechooser = Gtk.FileChooserDialog(action=Gtk.FileChooserAction.SAVE,
             buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
diff --git a/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py b/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py
index d8d4f06..a0f6af1 100644
--- a/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py
+++ b/client/gnomedvb/ui/wizard/pages/SetupDevicePage.py
@@ -25,7 +25,7 @@ from gnomedvb.ui.wizard import DVB_TYPE_TO_DESC
 from gnomedvb.ui.wizard.pages.BasePage import BasePage
 
 class SetupDevicePage(BasePage):
-    
+
     __gsignals__ = {
         "finished": (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, [bool]),
     }
@@ -40,39 +40,39 @@ class SetupDevicePage(BasePage):
         self._progressbar = None
         self._progressbar_timer = None
         self.__success = False
-            
+
     def get_page_title(self):
         return _("Configuring device")
-        
+
     def get_page_type(self):
         return Gtk.AssistantPageType.PROGRESS
-  
+
     def set_scanner(self, scanner):
         self.__scanner = scanner
-        
+
     def set_adapter(self, adapter):
         self.__adapter_info = adapter
 
     def set_channels(self, channels):
         self.__channels = channels
-   
+
     def get_summary(self):
         return self.__success, self.__summary
-        
+
     def can_be_added_to_group(self, adapter_info):
         self.__adapter_info = adapter_info
         ex_group = self.get_existing_group_of_same_type()
         self.__adapter_info = None
         return ex_group != None
-        
+
     def run(self, create_group):
         self.show_progressbar()
-        
+
         def reply_handler(proxy, success, user_data):
             self.destroy_progressbar()
             self.__success = True
             self.emit("finished", True)
-        
+
         existing_group = self.get_existing_group_of_same_type()
         if existing_group == None:
             self.create_group_automatically(result_handler=reply_handler,
@@ -80,7 +80,7 @@ class SetupDevicePage(BasePage):
         else:
             self.add_to_group(existing_group, result_handler=reply_handler,
                 error_handler=gnomedvb.global_error_handler)
-         
+
     def show_progressbar(self):
         # From parent
         self._label.hide()
@@ -91,7 +91,7 @@ class SetupDevicePage(BasePage):
         self._progressbar.show()
         self.pack_start(self._progressbar, False, True, 0)
         self._progressbar_timer = GObject.timeout_add(100, self.progressbar_pulse)
-        
+
     def destroy_progressbar(self):
         GObject.source_remove(self._progressbar_timer)
         self._progressbar_timer = None
@@ -100,7 +100,7 @@ class SetupDevicePage(BasePage):
     def progressbar_pulse(self):
         self._progressbar.pulse()
         return True
-   
+
     def get_existing_group_of_same_type(self):
         groups = self.__model.get_registered_device_groups(None)
         # Find group of same type
@@ -131,10 +131,10 @@ class SetupDevicePage(BasePage):
             self.__summary = ''
             channels_file = os.path.join(gnomedvb.get_config_dir(),
                 "channels_%s.conf" % self.__adapter_info["type"])
-            
+
             self.__scanner.write_channels_to_file(self.__channels, channels_file,
                 result_handler=write_channels_handler, error_handler=error_handler)
-                        
+
     def add_to_group(self, group, result_handler, error_handler):
         self.__summary = _('The device has been added to the group %s.') % group['name']
         group.add_device(self.__adapter_info['adapter'],
diff --git a/client/gnomedvb/ui/wizard/pages/SummaryPage.py b/client/gnomedvb/ui/wizard/pages/SummaryPage.py
index 33254a3..ba42251 100644
--- a/client/gnomedvb/ui/wizard/pages/SummaryPage.py
+++ b/client/gnomedvb/ui/wizard/pages/SummaryPage.py
@@ -24,7 +24,7 @@ class SummaryPage(BasePage):
 
     def __init__(self):
         BasePage.__init__(self)
-        
+
         self._details_label = Gtk.Label()
         self._details_label.set_line_wrap(True)
         self.pack_start(self._details_label, True, True, 0)
@@ -32,13 +32,13 @@ class SummaryPage(BasePage):
         self.configure_button = Gtk.Button(label=_('Configure Another Device'))
         self.configure_button.set_halign(Gtk.Align.CENTER)
         self.pack_start(self.configure_button, False, True, 0)
-    
+
     def get_page_title(self):
         return _("Configuration finished")
-        
+
     def get_page_type(self):
         return Gtk.AssistantPageType.SUMMARY
-        
+
     def set_device_name_and_details(self, name, details, success):
         if success:
             text = "<span weight=\"bold\">%s</span>" % (_("The device %s has been configured sucessfully.") % name)
diff --git a/client/totem-plugin/dvb-daemon.py b/client/totem-plugin/dvb-daemon.py
index fbbe5fe..5afcc04 100644
--- a/client/totem-plugin/dvb-daemon.py
+++ b/client/totem-plugin/dvb-daemon.py
@@ -156,24 +156,24 @@ class ScheduleDialog(Gtk.Dialog):
             parent=parent,
             flags=Gtk.DialogFlags.DESTROY_WITH_PARENT,
             buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE))
-            
+
         self._group = group
         self._sid = sid
-            
+
         self.set_default_size(640, 380)
         content_area = self.get_content_area()
         content_area.set_spacing(6)
-            
+
         self.schedulepaned = SchedulePaned()
         self.schedulepaned.show()
         content_area.pack_start(self.schedulepaned, True, True, 0)
-        
+
         self.scheduleview = self.schedulepaned.get_treeview()
         self.scheduleview.connect("button-press-event", self._on_event_selected)
-        
+
         self.schedulestore = ScheduleStore(group, sid)
         self.scheduleview.set_model(self.schedulestore)
-    
+
     def _on_event_selected(self, treeview, event):
         if event.type == Gdk.EventType._2BUTTON_PRESS:
             model, aiter = treeview.get_selection().get_selected()
@@ -188,7 +188,7 @@ class ScheduleDialog(Gtk.Dialog):
                     recorder = self._group.get_recorder()
                     rec_id, success = recorder.add_timer_for_epg_event(event_id, self._sid)
                 dialog.destroy()
-                
+
                 if response == Gtk.ResponseType.YES and not success:
                     dialog = TimerFailureDialog(self)
                     dialog.run()
@@ -201,17 +201,17 @@ class RunningNextDialog(Gtk.Dialog):
             parent=parent,
             flags=Gtk.DialogFlags.DESTROY_WITH_PARENT,
             buttons=(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE))
-            
+
         self._group = group
-        
+
         self.set_default_size(640, 380)
         content_area = self.get_content_area()
         content_area.set_spacing(6)
-        
+
         self.schedule = RunningNextStore(self._group)
         self.scheduleview = RunningNextView(self.schedule)
         self.scheduleview.show()
-        
+
         self.scrolledschedule = Gtk.ScrolledWindow()
         self.scrolledschedule.add(self.scheduleview)
         self.scrolledschedule.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
@@ -227,7 +227,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
     object = GObject.property(type = GObject.GObject)
 
     REC_GROUP_ID = -1
-    
+
     MENU = '''<ui>
     <popup name="dvb-popup">
         <menuitem name="dvb-program-guide" action="dvb-epg" />
@@ -238,7 +238,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
     </popup>
     </ui>
     '''
-    
+
     (ORDER_BY_NAME_ID,
      ORDER_BY_GROUP_ID,) = range(2)
 
@@ -299,7 +299,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
         self.manager = DVBModel()
 
         self.setup = DvbSetup()
-        
+
         self.manager.get_all_devices(lambda devs: self.enable_dvb_support(len(devs) > 0))
 
     def on_file_opened(self, obj, mrl):
@@ -321,7 +321,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
             self._setup_menu()
 
             self._get_and_add_recordings()
-            
+
             self.totem_object.add_sidebar_page ("dvb-daemon", _("Digital TV"), self.sidebar)
             self.sidebar.show_all()
 
@@ -337,38 +337,38 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
 
     def _setup_sidebar(self):
         self.sidebar = Gtk.VBox(spacing=6)
-        
+
         self.channels = ChannelsTreeStore()
         self.channels.connect("loading-finished", self._on_group_loaded)
-        
+
         self.channels_view = ChannelsView(self.channels, ChannelsTreeStore.COL_NAME)
         self.channels_view.connect("button-press-event", self._on_channel_selected)
         self.channels_view.get_selection().connect("changed", self._on_selection_changed)
-        
+
         self.scrolledchannels = Gtk.ScrolledWindow()
         self.scrolledchannels.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
         self.scrolledchannels.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
         self.scrolledchannels.add(self.channels_view)
         self.sidebar.pack_start(self.scrolledchannels, True, True, 0)
-        
+
         buttonbox = Gtk.HButtonBox()
         buttonbox.set_spacing(6)
         self.sidebar.pack_start(buttonbox, False, True, 0)
-        
+
         self.whatson_button = Gtk.Button(label=_("What's on now"))
         self.whatson_button.set_image(Gtk.Image.new_from_stock(Gtk.STOCK_INDEX, Gtk.IconSize.BUTTON))
         self.whatson_button.connect('clicked', self._on_action_whats_on_now)
         buttonbox.pack_start(self.whatson_button, True, True, 0)
         self.whatson_button.set_sensitive(False)
-        
+
         self.epg_button = Gtk.Button(label=_('Program Guide'))
         self.epg_button.connect('clicked', self._on_action_epg)
         self.epg_button.set_sensitive(False)
         buttonbox.pack_start(self.epg_button, True, True, 0)
-        
+
     def _setup_menu(self):
         uimanager = self.totem_object.get_ui_manager()
-        
+
         # Create actions
         actiongroup = Gtk.ActionGroup('dvb')
         actiongroup.add_actions([
@@ -391,7 +391,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
              self._on_order_reverse_toggled)
         ])
         uimanager.insert_action_group(actiongroup)
-        
+
         uimanager.add_ui_from_string(self.MENU)
         uimanager.ensure_update()
 
@@ -404,24 +404,24 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-timers', 'dvb-timers',
             Gtk.UIManagerItemType.AUTO, True)
-        
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-preferences', 'dvb-preferences',
             Gtk.UIManagerItemType.AUTO, True)
-            
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/edit/plugins', 'dvb-sep-1', None,
             Gtk.UIManagerItemType.AUTO, True)
-        
+
         # View menu
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-whatson', 'dvb-whatson',
             Gtk.UIManagerItemType.AUTO, True)
-        
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-epg', 'dvb-epg',
             Gtk.UIManagerItemType.AUTO, True)
-        
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/sidebar', 'dvb-sep-2', None,
             Gtk.UIManagerItemType.AUTO, True)
@@ -430,27 +430,27 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/show-controls', 'dvb-order-channels',
             'dvb-order-channels', Gtk.UIManagerItemType.MENU, False)
-            
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels',
             'dvb-order-by-name', 'dvb-order-by-name', Gtk.UIManagerItemType.AUTO, False)
-            
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels',
             'dvb-order-by-group', 'dvb-order-by-group', Gtk.UIManagerItemType.AUTO, False)
-        
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels', 'dvb-sep-3', None,
             Gtk.UIManagerItemType.AUTO, False)
-            
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/dvb-order-channels',
             'dvb-order-reverse', 'dvb-order-reverse', Gtk.UIManagerItemType.AUTO, False)
-        
+
         merge_id = uimanager.new_merge_id()
         uimanager.add_ui(merge_id, '/tmw-menubar/view/show-controls', 'dvb-sep-4', None,
             Gtk.UIManagerItemType.AUTO, False)
-        
+
         self.popup_menu = uimanager.get_widget('/dvb-popup')
         self.popup_recordings = uimanager.get_widget('/dvb-recording-popup')
 
@@ -459,20 +459,20 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
 
         watch_item = uimanager.get_widget('/tmw-menubar/movie/devices-placeholder/dvbdevice')
         watch_item.set_image(totemtv_image)
-        
+
         timers_image = Gtk.Image.new_from_icon_name("stock_timer", Gtk.IconSize.MENU)
         timers_image.show()
-        
+
         self.timers_item = uimanager.get_widget('/tmw-menubar/edit/dvb-timers')
         self.timers_item.set_image(timers_image)
-        
+
         self.epg_item = uimanager.get_widget('/tmw-menubar/view/dvb-epg')
         self.timers_item.set_sensitive(False)
         self.epg_item.set_sensitive(False)
-        
+
         self.whatson_item = uimanager.get_widget('/tmw-menubar/view/dvb-whatson')
         self.whatson_item.set_sensitive(False)
-        
+
     def _configure_mode(self):
         if self._size == 1:
             # Activate single group mode
@@ -480,11 +480,11 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
             group_iter = self.channels.iter_next(root_iter)
             self.single_group = self.channels[group_iter][self.channels.COL_GROUP]
             self._enable_single_group_mode(True)
-        
+
         # Monitor if channels are added (don't monitor it when channels are added when loading)
         self.channels.connect('row-deleted', self._on_channels_row_inserted_deleted)
         self.channels.connect('row-inserted', self._on_channels_row_inserted_deleted)
-            
+
     def _enable_single_group_mode(self, val):
         self.timers_item.set_sensitive(val)
         self.whatson_item.set_sensitive(val)
@@ -519,7 +519,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
                 dialog = RunningNextDialog(group, self.totem_object.get_main_window())
             dialog.connect("response", lambda d, resp: d.destroy())
             dialog.show()
-            
+
     def _on_action_whats_on_now(self, action, user_date=None):
         group, sid = self._get_selected_group_and_channel()
         if group == None:
@@ -528,11 +528,11 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
             dialog = RunningNextDialog(group, self.totem_object.get_main_window())
             dialog.connect("response", lambda d, resp: d.destroy())
             dialog.show()
-    
+
     def _on_action_preferences(self, action, user_date=None):
         prefs = Preferences(self.manager, self.totem_object.get_main_window())
         prefs.show()
-        
+
     def _on_action_delete(self, action, user_date=None):
         model, aiter = self.channels_view.get_selection().get_selected()
         if aiter != None:
@@ -546,7 +546,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
                 self.recstore.delete(model[aiter][model.COL_SID],
                     result_handler=self._delete_callback,
                     error_handler=global_error_handler)
-        
+
     def _on_action_details(self, action, user_date=None):
         model, aiter = self.channels_view.get_selection().get_selected()
         if aiter != None:
@@ -554,11 +554,11 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
             dialog = DetailsDialog(rec_id, self.totem_object.get_main_window())
             dialog.run()
             dialog.destroy()
-    
+
     def do_deactivate (self):
         if self.totem_object != None:
             self.totem_object.remove_sidebar_page ("dvb-daemon")
-        
+
     def _on_channel_selected(self, treeview, event):
         if event.type == Gdk.EventType._2BUTTON_PRESS:
             # double click
@@ -644,7 +644,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
             epg_status = model[aiter][model.COL_SID] != 0
             self.epg_item.set_sensitive(epg_status)
             self.epg_button.set_sensitive(epg_status)
-                
+
     def _add_recording(self, rid):
         name, success = self.recstore.get_name(rid)
         if name == "":
@@ -667,7 +667,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
                     self.channels.remove(child_iter)
                     break
                 child_iter = self.channels.iter_next(child_iter)
-                
+
     def _on_channels_row_inserted_deleted(self, treestore, path, aiter=None):
         if path.get_depth() == 1:
             # One entry is for recordings
@@ -678,11 +678,11 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
         self._loaded_groups += 1
         if self._loaded_groups == self._size:
             self._configure_mode()
-                        
+
     def _delete_callback(self, proxy, success, user_data):
         if not success:
             global_error_handler("Could not delete recording")
-            
+
     def _on_order_by_changed(self, action, current, user_date=None):
         val = current.get_current_value()
         sort_order = self.channels.get_sort_column_id()[1]
@@ -693,7 +693,7 @@ class DVBDaemonPlugin(GObject.GObject, Peas.Activatable):
         self.channels.set_sort_order(sort_order)
         self._get_and_add_recordings()
         self.channels_view.set_model(self.channels)
-        
+
     def _on_order_reverse_toggled(self, action, user_date=None):
         if action.get_active():
             self.channels.set_sort_order(Gtk.SortType.DESCENDING)
diff --git a/src/Cable/CableChannel.vala b/src/Cable/CableChannel.vala
index d7b94aa..3d29b0c 100644
--- a/src/Cable/CableChannel.vala
+++ b/src/Cable/CableChannel.vala
@@ -21,7 +21,7 @@
 namespace DVB {
 
     public class CableChannel : Channel {
-    
+
         public DvbSrcInversion Inversion {get; set;}
         public uint SymbolRate {get; set;}
         public DvbSrcCodeRate CodeRate {get; set;}
@@ -34,7 +34,7 @@ namespace DVB {
         public CableChannel.without_schedule () {
             Channel.without_schedule ();
         }
-        
+
         public override void setup_dvb_source (Gst.Element source) {
             source.set ("frequency", this.Frequency);
             source.set ("inversion", this.Inversion);
@@ -42,7 +42,7 @@ namespace DVB {
             source.set ("code-rate-hp", this.CodeRate);
             source.set ("modulation", this.Modulation);
         }
-        
+
         public override string to_string () {
             return "%s:%u:%s:%u:%s:%s:%u:%s:%u".printf(this.Name, this.Frequency,
                 Utils.get_nick_from_enum (typeof(DvbSrcInversion),
@@ -54,7 +54,7 @@ namespace DVB {
                                           this.Modulation),
                 this.VideoPID, this.get_audio_pids_string (), this.Sid);
         }
-    
+
     }
-    
+
 }
diff --git a/src/Cable/CableScanner.vala b/src/Cable/CableScanner.vala
index 9d31a20..c0b803c 100644
--- a/src/Cable/CableScanner.vala
+++ b/src/Cable/CableScanner.vala
@@ -56,7 +56,7 @@ namespace DVB {
             this.add_scanning_data (frequency, modulation, symbol_rate, code_rate);
             return true;
         }
-                
+
         private inline void add_scanning_data (uint frequency, string modulation,
                 uint symbol_rate, string code_rate) {
             var tuning_params = new Gst.Structure ("tuning_params",
@@ -64,79 +64,79 @@ namespace DVB {
             "symbol-rate", typeof(uint), symbol_rate,
             "inner-fec", typeof(string), code_rate,
             "modulation", typeof(string), modulation);
-            
-            base.add_structure_to_scan (tuning_params);  
+
+            base.add_structure_to_scan (tuning_params);
         }
-        
+
         protected override void add_scanning_data_from_string (string line) {
             // line looks like:
             // C freq sr fec mod
             string[] cols = Regex.split_simple ("\\s+", line);
-   
+
             if (cols.length < 5) return;
-            
+
             uint freq = (uint)int.parse (cols[1]);
             string modulation = cols[4];
             uint symbol_rate = (uint)(int.parse (cols[2]) / 1000);
             string code_rate = cols[3];
-            
+
             this.add_scanning_data (freq, modulation, symbol_rate, code_rate);
         }
-       
+
         protected override void prepare () {
             debug("Setting up pipeline for DVB-C scan");
-        
+
             Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc");
-            
+
             string[] keys = new string[] {
                 "frequency",
                 "symbol-rate"
             };
-            
+
             foreach (string key in keys) {
                 this.set_uint_property (dvbsrc, this.current_tuning_params, key);
             }
-            
+
             dvbsrc.set ("modulation",
                 get_modulation_val (this.current_tuning_params.get_string ("modulation")));
-            
+
             dvbsrc.set ("code-rate-hp", get_code_rate_val (
                 this.current_tuning_params.get_string ("inner-fec")));
         }
-        
+
         protected override ScannedItem get_scanned_item (Gst.Structure structure) {
             // TODO
             uint freq;
             structure.get_uint ("frequency", out freq);
             return new ScannedItem (freq);
         }
-        
+
         protected override Channel get_new_channel () {
             return new CableChannel.without_schedule ();
         }
-        
+
         protected override void add_values_from_structure_to_channel (
             Gst.Structure delivery, Channel channel) {
             if (!(channel is CableChannel)) return;
-            
+
             CableChannel cc = (CableChannel)channel;
-            
+
             // structure doesn't contain information about inversion
             // set it to auto
             cc.Inversion = DvbSrcInversion.INVERSION_AUTO;
-            
+
             cc.Modulation = get_modulation_val (delivery.get_string ("modulation"));
-            
+
             uint freq;
             delivery.get_uint ("frequency", out freq);
             cc.Frequency = freq;
-            
+
             uint symbol_rate;
             delivery.get_uint ("symbol-rate", out symbol_rate);
             cc.SymbolRate = symbol_rate;
-            
+
             cc.CodeRate = get_code_rate_val (delivery.get_string ("inner-fec"));
         }
     }
-    
+
 }
diff --git a/src/ChangeType.vala b/src/ChangeType.vala
index e21bcb2..22a4efd 100644
--- a/src/ChangeType.vala
+++ b/src/ChangeType.vala
@@ -24,5 +24,5 @@ namespace DVB {
         DELETED = 1,
         UPDATED = 2
     }
-    
+
 }
diff --git a/src/Channel.vala b/src/Channel.vala
index 899d2ba..f5fd1cf 100644
--- a/src/Channel.vala
+++ b/src/Channel.vala
@@ -52,11 +52,11 @@ namespace DVB {
                         Utils.remove_nonalphanums (this.Name));
             }
         }
-        
+
         private DVB.Schedule schedule;
         private uint sid;
         private bool has_schedule;
-        
+
         construct {
             this.AudioPIDs = new Gee.ArrayList<uint> ();
         }
@@ -69,7 +69,7 @@ namespace DVB {
         public Channel.without_schedule () {
             this.has_schedule = false;
         }
-        
+
         public string get_audio_pids_string () {
             StringBuilder apids = new StringBuilder ();
             int i = 1;
@@ -80,19 +80,19 @@ namespace DVB {
                     apids.append ("%u,".printf (pid));
                 i++;
             }
-            
+
             return apids.str;
         }
-        
+
         public bool is_radio () {
             return (this.VideoPID == 0);
         }
-        
+
         public virtual bool is_valid () {
             return (this.Name != null && this.Frequency != 0&& this.Sid != 0
                 && (this.VideoPID != 0 || this.AudioPIDs.size != 0));
         }
-        
+
         /**
          * @returns: TRUE if both channels are part of the same
          * transport stream (TS).
@@ -103,14 +103,14 @@ namespace DVB {
         public virtual bool on_same_transport_stream (Channel channel) {
             return (this.Frequency == channel.Frequency);
         }
-        
+
         /**
          * @returns: TRUE of both channels are identical
          */
         public virtual bool equals (Channel channel) {
             return (this.sid == channel.Sid);
         }
-        
+
         /**
          * @source: Either dvbbasebin or dvbsrc
          *
@@ -119,5 +119,5 @@ namespace DVB {
         public abstract void setup_dvb_source (Gst.Element source);
         public abstract string to_string ();
     }
-    
+
 }
diff --git a/src/ChannelList.vala b/src/ChannelList.vala
index 63ed691..713271d 100644
--- a/src/ChannelList.vala
+++ b/src/ChannelList.vala
@@ -28,26 +28,26 @@ namespace DVB {
     public class ChannelList : GLib.Object, Iterable<Channel>, IDBusChannelList {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-        
+
         public File? channels_file {get; construct;}
         public uint GroupId {get; set;}
         public int size {
             get { return this.channels.size; }
         }
-        
+
         /**
          * Maps channels' SID to the channels' data
          */
         protected HashMap<uint, Channel> channels;
-        
+
         construct {
             this.channels = new HashMap<uint, Channel> ();
         }
-        
+
         public ChannelList (File? channels=null) {
             base (channels_file: channels);
         }
-        
+
         public Channel? get_channel (uint sid) {
             Channel? val = null;
             lock (this.channels) {
@@ -56,19 +56,19 @@ namespace DVB {
             }
             return val;
         }
-        
+
         public void add (Channel channel) {
             lock (this.channels) {
                 this.channels.set (channel.Sid, channel);
             }
         }
-        
+
         public void remove (uint sid) {
             lock (this.channels) {
                 this.channels.unset (sid);
             }
         }
-        
+
         public bool contains (uint sid) {
             bool val;
             lock (this.channels) {
@@ -76,24 +76,24 @@ namespace DVB {
             }
             return val;
         }
-        
+
         public void clear () {
             lock (this.channels) {
                 this.channels.clear ();
             }
         }
-        
+
         public Type element_type { get { return typeof (Channel); } }
-      
+
         public Iterator<Channel> iterator () {
             return this.channels.values.iterator();
         }
-        
+
         public void load (AdapterType type) throws Error {
         	var reader = new DVB.io.ChannelListReader (this, type);
         	reader.read_into ();
         }
-        
+
         /**
          * @returns: List of channel IDs aka SIDs
          */
@@ -106,10 +106,10 @@ namespace DVB {
                     i++;
                 }
             }
-            
+
             return ids;
         }
-        
+
         /**
          * @returns: List of channel IDs aka SIDs of radio channels
          */
@@ -123,15 +123,15 @@ namespace DVB {
                 }
             }
             radio_channels.reverse ();
-            
+
             uint[] ids = new uint[radio_channels.length ()];
             for (int i=0; i<radio_channels.length (); i++) {
                 ids[i] = radio_channels.nth_data (i);
             }
-            
+
             return ids;
         }
-        
+
         /**
          * @returns: List of channel IDs aka SIDs of TV channels
          */
@@ -145,15 +145,15 @@ namespace DVB {
                 }
             }
             video_channels.reverse ();
-            
+
             uint[] ids = new uint[video_channels.length ()];
             for (int i=0; i<video_channels.length (); i++) {
                 ids[i] = video_channels.nth_data (i);
             }
-            
+
             return ids;
         }
-        
+
         /**
          * @channel_id: ID of channel
          * @channel_name: Name of channel if channel with id exists
@@ -165,7 +165,7 @@ namespace DVB {
         {
             bool ret = false;
             string val = "";
-            
+
             lock (this.channels) {
                 if (this.channels.has_key (channel_id)) {
                     string name = this.channels.get (channel_id).Name;
@@ -174,10 +174,10 @@ namespace DVB {
                 }
             }
             channel_name = val;
-            
+
             return ret;
         }
-        
+
         /**
          * @channel_id: ID of channel
          * @network: Name of network the channel belongs to
@@ -200,7 +200,7 @@ namespace DVB {
             network = val;
             return ret;
         }
-        
+
         /**
          * @channel_id: ID of channel
          * @radio: Whether the channel is a radio channel or not
@@ -220,7 +220,7 @@ namespace DVB {
             radio = val;
             return ret;
         }
-        
+
         /**
          * @channel_id: ID of channel
          * @url: URL to watch the channel
@@ -245,7 +245,7 @@ namespace DVB {
                 return true;
             }
         }
-        
+
         public ChannelInfo[] GetChannelInfos () throws DBusError {
             ChannelInfo[] channels = new ChannelInfo[this.channels.size];
             int i = 0;
@@ -316,7 +316,7 @@ namespace DVB {
 		 * @channel_id: ID of channel
 	     * @channel_group_id: ID of the ChannelGroup
          * @returns: TRUE on success
-         */       
+         */
 		public bool RemoveChannelFromGroup (uint channel_id,
                 int channel_group_id) throws DBusError
         {
diff --git a/src/Constants.vala b/src/Constants.vala
index 5684825..a010048 100644
--- a/src/Constants.vala
+++ b/src/Constants.vala
@@ -22,7 +22,7 @@ using GLib;
 namespace DVB.Constants {
 
     public static const string DBUS_SERVICE = "org.gnome.DVB";
-    
+
     public static const string DBUS_MANAGER_PATH = "/org/gnome/DVB/Manager";
     public static const string DBUS_DEVICE_GROUP_PATH = "/org/gnome/DVB/DeviceGroup/%u";
     public static const string DBUS_RECORDINGS_STORE_PATH = "/org/gnome/DVB/RecordingsStore";
diff --git a/src/Device.vala b/src/Device.vala
index 6dd04bf..0a422eb 100644
--- a/src/Device.vala
+++ b/src/Device.vala
@@ -33,11 +33,11 @@ namespace DVB {
         DVB_S,
         DVB_C
     }
-    
+
     public class Device : GLib.Object {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-    
+
         private static const int PRIME = 31;
 
         public uint Adapter { get; construct; }
@@ -50,7 +50,7 @@ namespace DVB {
         }
         public ChannelList Channels { get; set; }
         public File RecordingsDirectory { get; set; }
-        
+
         private string adapter_name;
         private AdapterType adapter_type;
 
@@ -71,9 +71,9 @@ namespace DVB {
 
         public static Device new_with_type (uint adapter, uint frontend) {
         	var device = new Device (adapter, frontend);
-            
+
             device.setAdapterTypeAndName(adapter, frontend);
-            
+
             return device;
         }
 
@@ -97,24 +97,24 @@ namespace DVB {
 
             return device;
         }
-        
+
         public static bool equal (Device* dev1, Device* dev2) {
             if (dev1 == null || dev2 == null) return false;
-            
+
             return (dev1->Adapter == dev2->Adapter
                     && dev2->Frontend == dev2->Frontend);
         }
-        
+
         public static uint hash (Device *device) {
             if (device == null) return 0;
-            
+
             return hash_without_device (device->Adapter, device->Frontend);
         }
-        
+
         public static uint hash_without_device (uint adapter, uint frontend) {
             return 2 * PRIME + PRIME * adapter + frontend;
         }
-        
+
         public bool is_busy () {
             Element dvbsrc = ElementFactory.make ("dvbsrc", "text_dvbsrc");
             if (dvbsrc == null) {
@@ -123,15 +123,15 @@ namespace DVB {
             }
             dvbsrc.set ("adapter", this.Adapter);
             dvbsrc.set ("frontend", this.Frontend);
-            
+
             Element pipeline = new Pipeline ("");
             ((Bin)pipeline).add (dvbsrc);
             pipeline.set_state (State.READY);
-            
+
             Gst.Bus bus = pipeline.get_bus();
-            
+
             bool busy_val = false;
-            
+
             while (bus.have_pending()) {
                 Message msg = bus.pop();
 
@@ -139,15 +139,15 @@ namespace DVB {
                     Error gerror;
                     string debug_text;
                     msg.parse_error (out gerror, out debug_text);
-                    
+
                     log.debug ("Error tuning: %s; %s", gerror.message, debug_text);
-                    
+
                     busy_val = true;
                 }
             }
-               
+
             pipeline.set_state(State.NULL);
-            
+
             return busy_val;
         }
 
@@ -159,16 +159,16 @@ namespace DVB {
             }
             dvbsrc.set ("adapter", adapter);
             dvbsrc.set ("frontend", frontend);
-            
+
             Element pipeline = new Pipeline ("type_name");
             ((Bin)pipeline).add (dvbsrc);
             pipeline.set_state (State.READY);
-            
+
             Gst.Bus bus = pipeline.get_bus();
-            
+
             bool success = false;
             string adapter_type = null;
-            
+
             while (bus.have_pending()) {
                 Message msg = bus.pop();
 
@@ -188,7 +188,7 @@ namespace DVB {
                     warning ("%s %s", gerror.message, debug);
                 }
             }
-               
+
             pipeline.set_state(State.NULL);
 
             this.adapter_type = get_type_from_string (adapter_type);
diff --git a/src/EPGScanner.vala b/src/EPGScanner.vala
index 54913ac..cbd2fcc 100644
--- a/src/EPGScanner.vala
+++ b/src/EPGScanner.vala
@@ -26,7 +26,7 @@ namespace DVB {
     public class EPGScanner : GLib.Object {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-    
+
         // how long to wait after all channels have been scanned
         // before the next iteration is started
         private static int CHECK_EIT_INTERVAL = -1;
@@ -48,14 +48,14 @@ namespace DVB {
         private Thread<void*> worker_thread;
         private uint bus_watch_id;
         private HashMap<uint, HashSet<Event>> channel_events;
-        
+
         construct {
             this.channels = new GLib.Queue<Channel> ();
             this.stop_counter = 0;
             this.context = new MainContext ();
             this.channel_events = new HashMap<uint, HashSet<Event>> ();
         }
-        
+
         /**
          * @device: The device where EPG should be collected from
          */
@@ -67,20 +67,20 @@ namespace DVB {
                 CHECK_EIT_INTERVAL = settings.get_epg_scan_interval ();
             }
         }
-        
+
         /**
          * Stop collecting EPG data
          */
         public void stop () {
             log.debug ("Stopping EPG scan for group %u (%d)", this.DeviceGroup.Id, this.stop_counter);
-        
+
             if (this.stop_counter == 0) {
                 this.remove_timeouts ();
                 this.reset ();
             }
             this.stop_counter += 1;
-        }   
-            
+        }
+
         private void remove_timeouts () {
             if (this.scan_source != null) {
                 this.scan_source.destroy ();
@@ -153,7 +153,7 @@ namespace DVB {
             this.channels.clear ();
             this.channel_events.clear ();
         }
-        
+
         /**
          * Start collection EPG data for all channels
          */
@@ -175,7 +175,7 @@ namespace DVB {
             foreach (Channel c in this.DeviceGroup.Channels) {
                 this.channels.push_tail (c);
             }
-            
+
             if (!setup_pipeline ()) return false;
 
             this.scan_source = new TimeoutSource.seconds (WAIT_FOR_EIT_DURATION);
@@ -184,7 +184,7 @@ namespace DVB {
 
             return false;
         }
-        
+
         /**
          * Scan the next frequency for EPG data
          */
@@ -215,24 +215,24 @@ namespace DVB {
                 this.queue_source.attach (this.context);
                 return false;
             }
-            
+
             Channel channel = this.channels.pop_head ();
             channel.Schedule.remove_expired_events ();
-/*            
+/*
             log.debug ("Scanning channel %s (%u left)",
                 channel.Name, this.channels.get_length ());
-*/          
+*/
             lock (this.pipeline) {
                 this.pipeline.set_state (Gst.State.READY);
                 Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc");
                 channel.setup_dvb_source (dvbsrc);
-                
+
                 this.pipeline.set_state (Gst.State.PLAYING);
             }
-            
+
             return true;
         }
-        
+
         private bool bus_watch_func (Gst.Bus bus, Gst.Message message) {
             switch (message.type) {
                 case Gst.MessageType.ELEMENT:
@@ -243,7 +243,7 @@ namespace DVB {
                         this.on_eit_structure (structure);
                     }
                 break;
-                
+
                 case Gst.MessageType.ERROR:
                     Error gerror;
                     string debug;
@@ -256,19 +256,19 @@ namespace DVB {
                         reset();
                         return false;
                     }
-                
+
                 default:
                 break;
             }
             return true;
         }
-        
+
         public void on_eit_structure (Gst.Structure structure) {
             Gst.Value events = structure.get_value ("events");
-            
+
             if (!(events.holds (Gst.Value.list_get_type ())))
                 return;
-            
+
             uint size = events.list_get_size ();
             Gst.Value val;
             weak Gst.Structure event;
@@ -314,7 +314,7 @@ namespace DVB {
 /*
                     Gst.Value components = event.get_value ("components");
                     add_components (components, event_class);
-*/  
+*/
                     //log.debug ("Adding new event: %s", event_class.to_string ());
 
                     list.add (event_class);
@@ -324,40 +324,40 @@ namespace DVB {
 /*
         private static void add_components (Gst.Value components, Event event_class) {
             uint components_len = components.list_get_size ();
-                
+
             Gst.Value comp_val;
             weak Gst.Structure component;
             for (uint j=0; j<components_len; j++) {
                 comp_val = components.list_get_value (j);
                 component = comp_val.get_structure ();
-                
+
                 string comp_name = component.get_name ();
                 if (comp_name == "audio") {
                     var audio = new Event.AudioComponent ();
                     audio.type = component.get_string ("type");
-                    
+
                     event_class.audio_components.append (audio);
                 } else if (comp_name == "video") {
                     var video = new Event.VideoComponent ();
-                    
+
                     bool highdef;
                     component.get_boolean ("high-definition", out highdef);
                     video.high_definition = highdef;
-                    
+
                     video.aspect_ratio = component.get_string ("aspect-ratio");
-                    
+
                     int freq;
                     component.get_int ("frequency", out freq);
                     video.frequency = freq;
-                    
+
                     event_class.video_components.append (video);
                 } else if (comp_name == "teletext") {
                     var teletext = new Event.TeletextComponent ();
                     teletext.type = component.get_string ("type");
-                    
+
                     event_class.teletext_components.append (teletext);
                 }
-            }            
+            }
         }
 */
         private static uint get_uint_val (Gst.Structure structure, string name) {
diff --git a/src/Event.vala b/src/Event.vala
index 7ab242d..01ca2d9 100644
--- a/src/Event.vala
+++ b/src/Event.vala
@@ -25,7 +25,7 @@ namespace DVB {
      * Represents an EPG event (i.e. a show with all its information)
      */
     public class Event {
-        
+
         // See EN 300 486 Table 6
         public static const uint RUNNING_STATUS_UNDEFINED = 0;
         public static const uint RUNNING_STATUS_NOT_RUNNING = 1;
@@ -36,7 +36,7 @@ namespace DVB {
         public uint id;
         /* Time is stored in UTC */
         public uint year;
-        public uint month; 
+        public uint month;
         public uint hour;
         public uint day;
         public uint minute;
@@ -51,14 +51,14 @@ namespace DVB {
         public SList<AudioComponent> audio_components;
         public SList<VideoComponent> video_components;
         public SList<TeletextComponent> teletext_components;
-        
+
         public Event () {
             this.audio_components = new SList<AudioComponent> ();
             this.video_components = new SList<VideoComponent> ();
             this.teletext_components = new SList<TeletextComponent> ();
-            
+
             this.year = 0;
-            this.month = 0; 
+            this.month = 0;
             this.hour = 0;
             this.day = 0;
             this.minute = 0;
@@ -66,7 +66,7 @@ namespace DVB {
             this.duration = 0;
             this.running_status = RUNNING_STATUS_UNDEFINED;
         }
-        
+
         /**
          * Whether the event has started and ended in the past
          */
@@ -76,21 +76,21 @@ namespace DVB {
             // otherwise mktime will add an hour,
             // because it respects dst
             current_utc.isdst = -1;
-            
+
             time_t current_time = current_utc.mktime ();
-           
+
             time_t end_timestamp = this.get_end_timestamp ();
-            
+
             return (end_timestamp < current_time);
         }
-        
+
         public bool is_running () {
             Time time_now = Time.gm (time_t ());
             Time time_start = this.get_utc_start_time ();
-            
+
             time_t timestamp_now = cUtils.timegm (time_now);
             time_t timestamp_start = cUtils.timegm (time_start);
-            
+
             if (timestamp_now - timestamp_start >= 0) {
                 // Has started, check if it's still running
                 return (!this.has_expired ());
@@ -99,7 +99,7 @@ namespace DVB {
                 return false;
             }
         }
-        
+
         public string to_string () {
             string text = "ID: %u\nDate: %04u-%02u-%02u %02u:%02u:%02u\n".printf (this.id,
             this.year, this.month, this.day, this.hour, this.minute, this.second)
@@ -111,14 +111,14 @@ namespace DVB {
             }
             return text;
         }
-        
+
         public Time get_local_start_time () {
             // Initialize time zone and set values
             Time utc_time = this.get_utc_start_time ();
-            
+
             time_t utc_timestamp = cUtils.timegm (utc_time);
             Time local_time = Time.local (utc_timestamp);
-            
+
             return local_time;
         }
 
@@ -141,15 +141,15 @@ namespace DVB {
             Time end_time = Utils.create_utc_time ((int)this.year, (int)this.month,
                 (int)this.day, (int)this.hour, (int)this.minute,
                 (int)this.second);
-                
+
             time_t before = end_time.mktime ();
-            
+
             end_time.second += (int)this.duration;
-            
+
             time_t after = end_time.mktime ();
-            
+
             assert (after - before == this.duration);
-            
+
             return after;
         }
 
@@ -179,15 +179,15 @@ namespace DVB {
             if (event1 == null && event2 == null) return 0;
             else if (event1 == null && event2 != null) return +1;
             else if (event1 != null && event2 == null) return -1;
-        
+
             time_t event1_time = event1->get_end_timestamp ();
             time_t event2_time = event2->get_end_timestamp ();
-            
+
             if (event1_time < event2_time) return -1;
             else if (event1_time > event2_time) return +1;
             else return 0;
         }
-        
+
         /**
          * @returns: TRUE if event1 and event2 represent the same event,
          * else FALSE
@@ -196,27 +196,27 @@ namespace DVB {
          */
         public static bool equal (Event* event1, Event* event2) {
             if (event1 == null || event2 == null) return false;
-            
+
             return (event1->id == event2->id);
         }
 
         public static uint hash (Event* event) {
             return event->id;
         }
-        
+
         public class AudioComponent {
             public string type;
         }
-        
+
         public class VideoComponent {
             public bool high_definition;
             public string aspect_ratio;
             public int frequency;
         }
-        
+
         public class TeletextComponent {
             public string type;
         }
     }
-    
+
 }
diff --git a/src/EventStorage.vala b/src/EventStorage.vala
index 3d636b9..59ef51f 100644
--- a/src/EventStorage.vala
+++ b/src/EventStorage.vala
@@ -32,12 +32,12 @@ namespace DVB {
         public uint id;
         /* Time is stored in UTC */
         public time_t starttime;
-    
+
         public static int compare (EventElement event1, EventElement event2) {
             if (event1 == null && event2 == null) return 0;
             else if (event1 == null && event2 != null) return +1;
             else if (event1 != null && event2 == null) return -1;
-        
+
             if (event1.starttime < event2.starttime) return -1;
             else if (event1.starttime > event2.starttime) return +1;
             else return 0;
@@ -207,7 +207,7 @@ namespace DVB {
                 return false;
             }
 
-            public bool has_next () {   
+            public bool has_next () {
                 assert (_stamp == _storage._stamp);
                 return (!_iter.is_end ());
             }
diff --git a/src/MpegTsEnums.vala b/src/MpegTsEnums.vala
index 9b9f9a6..fb37112 100644
--- a/src/MpegTsEnums.vala
+++ b/src/MpegTsEnums.vala
@@ -78,7 +78,7 @@ namespace DVB {
         INVERSION_ON,
         INVERSION_AUTO
     }
-    
+
     /**
      * @bandwith: 0, 6, 7 or 8
      */
@@ -93,7 +93,7 @@ namespace DVB {
         }
         return val;
     }
-    
+
     /**
      * @hierarchy: 0, 1, 2 or 4.
      * If value doesn't match one of above HIERARCHY_AUTO is returned.
@@ -109,7 +109,7 @@ namespace DVB {
         }
         return val;
     }
-    
+
     /**
      * @modulation: QPSK, QAM16, QAM32, QAM64, QAM128 or QAM256.
      * If value doesn't match one of above QAM_AUTO is returned.
@@ -130,10 +130,10 @@ namespace DVB {
             val = DvbSrcModulation.QAM_256;
         else
             val = DvbSrcModulation.QAM_AUTO;
-        
+
         return val;
     }
-    
+
     /**
      * @code_rate_string: "NONE", 1/2", "2/3", "3/4", "4/5", "5/6", "6/7",
      * "7/8" or "8/9".
@@ -161,10 +161,10 @@ namespace DVB {
             val = DvbSrcCodeRate.FEC_8_9;
         else
             val = DvbSrcCodeRate.FEC_AUTO;
-        
+
         return val;
     }
-    
+
     /**
      * @guard: 4, 8, 16 or 32.
      * If value doesn't match one of above GUARD_INTERVAL_AUTO is returned.
@@ -185,7 +185,7 @@ namespace DVB {
         }
         return val;
     }
-    
+
     /**
      * @transmode: "2k" or "8k"
      * If value doesn't match one of above TRANSMISSION_MODE_AUTO is returned.
@@ -199,7 +199,7 @@ namespace DVB {
             val = DvbSrcTransmissionMode.TRANSMISSION_MODE_8K;
         else
             val = DvbSrcTransmissionMode.TRANSMISSION_MODE_AUTO;
-            
+
         return val;
     }
 
diff --git a/src/Recorder.vala b/src/Recorder.vala
index 522fbf4..9c7ce6f 100644
--- a/src/Recorder.vala
+++ b/src/Recorder.vala
@@ -33,24 +33,24 @@ namespace DVB {
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
 
         public unowned DVB.DeviceGroup DeviceGroup { get; construct; }
-        
+
         public uint count {
             get { return this.recordings.size; }
         }
-        
+
         // Contains timer ids
         private Set<uint32> active_timers;
-        
+
         private bool have_check_timers_timeout;
         private uint check_timers_event_id;
         // Maps timer id to timer
         private HashMap<uint32, Timer> timers;
         // Maps timer id to Recording
         private Map<uint, Recording> recordings;
-        
+
         private const int CHECK_TIMERS_INTERVAL = 5;
         private const string ATTRIBUTES = FileAttribute.STANDARD_TYPE + "," + FileAttribute.ACCESS_CAN_WRITE;
-        
+
         construct {
             this.active_timers = new HashSet<uint32> ();
             this.timers = new HashMap<uint, Timer> ();
@@ -60,17 +60,17 @@ namespace DVB {
             this.recordings = new HashMap<uint, Recording> ();
             this.check_timers_event_id = 0;
         }
-        
+
         public Recorder (DVB.DeviceGroup dev) {
             base (DeviceGroup: dev);
         }
-        
+
 	public Type element_type { get { return typeof (Timer); } }
-    
+
         public Gee.Iterator<Timer> iterator () {
             return this.timers.values.iterator ();
         }
-        
+
         /**
          * @channel: Channel number
          * @start_year: The year when the recording should start
@@ -82,17 +82,17 @@ namespace DVB {
          * @timer_id: The new timer's id on success, or 0 if timer couldn't
          * be created
          * @returns: TRUE on success
-         * 
+         *
          * Add a new timer
          */
         public bool AddTimer (uint channel,
                 int start_year, int start_month, int start_day,
                 int start_hour, int start_minute, uint duration,
                 out uint32 timer_id) throws DBusError {
-            
+
             Timer new_timer = this.create_timer (channel, start_year, start_month,
                 start_day, start_hour, start_minute, duration);
-            
+
             if (new_timer == null) {
                 timer_id = 0;
                 return false;
@@ -100,7 +100,7 @@ namespace DVB {
                 return this.add_timer (new_timer, out timer_id);
             }
         }
-        
+
         /**
          * Works the same way as AddTimer() but adds a margin before and
          * after the timer.
@@ -113,7 +113,7 @@ namespace DVB {
                 int start_year, int start_month, int start_day,
                 int start_hour, int start_minute, uint duration,
                 out uint32 timer_id) throws DBusError {
-            
+
             Timer new_timer = this.create_timer (channel, start_year, start_month,
                 start_day, start_hour, start_minute, duration);
 
@@ -125,7 +125,7 @@ namespace DVB {
             Settings settings = new Factory().get_settings ();
             int start_margin = -1 * settings.get_timers_margin_start ();
             uint end_margin = (uint)(2 * settings.get_timers_margin_end ());
-    
+
             new_timer.Duration += end_margin;
             new_timer.add_to_start_time (start_margin);
 
@@ -149,12 +149,12 @@ namespace DVB {
             lock (this.timers) {
                 bool has_conflict = false;
                 int conflict_count = 0;
-                
+
                 // Check for conflicts
                 foreach (uint32 key in this.timers.keys) {
                     if (this.timers.get(key).conflicts_with (new_timer)) {
                         conflict_count++;
-                        
+
                         if (conflict_count >= this.DeviceGroup.size) {
                             log.debug ("Timer is conflicting with another timer: %s",
                                 this.timers.get(key).to_string ());
@@ -190,7 +190,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @event_id: id of the EPG event
          * @channel_sid: SID of channel
@@ -213,13 +213,13 @@ namespace DVB {
                 return false;
             }
             Time start = event.get_local_start_time ();
-            
+
             return this.AddTimerWithMargin (channel_sid,
                 start.year + 1900, start.month + 1,
                 start.day, start.hour, start.minute,
                 event.duration / 60, out timer_id);
         }
-        
+
         /**
          * @timer_id: The id of the timer you want to delete
          * @returns: TRUE on success
@@ -255,7 +255,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * dvb_recorder_GetTimers
          * @returns: A list of all timer ids
@@ -264,17 +264,17 @@ namespace DVB {
             uint32[] timer_arr;
             lock (this.timers) {
                 timer_arr = new uint32[this.timers.size];
-                
+
                 int i=0;
                 foreach (uint32 key in this.timers.keys) {
                     timer_arr[i] = this.timers.get(key).Id;
                     i++;
                 }
             }
-        
+
             return timer_arr;
         }
-        
+
         /**
          * @timer_id: Timer's id
          * @start_time: An array of length 5, where index 0 = year, 1 = month,
@@ -336,7 +336,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @timer_id: Timer's id
          * @end_time: Same as dvb_recorder_GetStartTime()
@@ -357,7 +357,7 @@ namespace DVB {
             }
             return ret;
         }
-        
+
         /**
          * @timer_id: Timer's id
          * @duration: Duration in seconds or 0 if there's no timer with
@@ -497,7 +497,7 @@ namespace DVB {
          */
         public uint32[] GetActiveTimers () throws DBusError {
             uint32[] val = new uint32[this.active_timers.size];
-            
+
             int i=0;
             foreach (uint32 timer_id in this.active_timers) {
                 Timer timer = this.timers.get (timer_id);
@@ -506,7 +506,7 @@ namespace DVB {
             }
             return val;
         }
-        
+
         /**
          * @timer_id: Timer's id
          * @returns: TRUE if timer is currently active
@@ -518,7 +518,7 @@ namespace DVB {
         protected bool is_timer_active (uint32 timer_id) {
             return this.active_timers.contains (timer_id);
         }
-        
+
         /**
          * @returns: TRUE if a timer is already scheduled in the given
          * period of time
@@ -533,7 +533,7 @@ namespace DVB {
                     OverlapType overlap = this.timers.get(key).get_overlap_local (
                         start_year, start_month, start_day, start_hour,
                         start_minute, duration);
-                    
+
                     if (overlap == OverlapType.PARTIAL
                             || overlap == OverlapType.COMPLETE) {
                         val = true;
@@ -541,10 +541,10 @@ namespace DVB {
                     }
                 }
             }
-        
+
             return val;
         }
-        
+
         public OverlapType HasTimerForEvent (uint event_id, uint channel_sid)
                 throws DBusError
         {
@@ -560,29 +560,29 @@ namespace DVB {
                 log.debug ("Could not find event with id %u", event_id);
                 return OverlapType.UNKNOWN;
             }
-            
+
             OverlapType val= OverlapType.NONE;
             lock (this.timers) {
                 foreach (uint32 key in this.timers.keys) {
                     Timer timer = this.timers.get (key);
-                    
+
                     if (timer.Channel.Sid == channel_sid) {
                         OverlapType overlap = timer.get_overlap_utc (
                             event.year, event.month, event.day, event.hour,
                             event.minute, event.duration/60);
-                        
+
                         if (overlap == OverlapType.PARTIAL
                                 || overlap == OverlapType.COMPLETE) {
                             val = overlap;
                             break;
                         }
                     }
-                } 
+                }
             }
-            
+
             return val;
         }
-        
+
         public void stop () {
             if (this.check_timers_event_id > 0)
                 Source.remove (this.check_timers_event_id);
@@ -600,7 +600,7 @@ namespace DVB {
             log.debug ("Creating new timer: channel: %u, start: %04d-%02d-%02d %02d:%02d, duration: %u",
                 channel, start_year, start_month, start_day,
                 start_hour, start_minute, duration);
-    
+
             ChannelList channels = this.DeviceGroup.Channels;
             if (!channels.contains (channel)) {
                 warning ("No channel %u for device group %u", channel,
@@ -622,7 +622,7 @@ namespace DVB {
          */
         protected void start_recording (Timer timer) {
             Channel channel = timer.Channel;
-            
+
             File? location = this.create_recording_dirs (channel,
                 timer.get_start_time ());
             if (location == null) return;
@@ -634,7 +634,7 @@ namespace DVB {
             }
             filesink.set ("location", location.get_path ());
             timer.sink = filesink;
-            
+
             ChannelFactory channel_factory = this.DeviceGroup.channel_factory;
             PlayerThread? player = channel_factory.watch_channel (channel,
                 filesink, true);
@@ -648,7 +648,7 @@ namespace DVB {
                     return;
                 }
                 player.eit_structure.connect (this.on_eit_structure);
-                
+
                 Recording recording = new Recording ();
                 recording.Id = timer.Id;
                 recording.ChannelSid = channel.Sid;
@@ -671,19 +671,19 @@ namespace DVB {
                             event.extended_description);
                     }
                 }
-                
+
                 lock (this.recordings) {
                     this.recordings.set (recording.Id, recording);
                 }
-                
+
                 RecordingsStore.get_instance().add (recording);
             }
-            
+
             this.active_timers.add (timer.Id);
-            
+
             this.recording_started (timer.Id);
         }
-        
+
         /**
          * Stop recording of specified timer
          */
@@ -697,39 +697,39 @@ namespace DVB {
                 log.debug ("Recording of channel %s stopped after %"
                     + int64.FORMAT +" seconds",
                     rec.ChannelName, rec.Length);
-                
+
                 rec.save_to_disk ();
 
                 ChannelFactory channel_factory = this.DeviceGroup.channel_factory;
                 channel_factory.stop_channel (timer.Channel, timer.sink);
-                
+
                 this.recordings.unset (timer.Id);
-            } 
+            }
             uint32 timer_id = timer.Id;
             lock (this.timers) {
                 this.active_timers.remove (timer_id);
                 this.timers.unset (timer_id);
             }
             rec.monitor_recording ();
-            
+
             this.changed (timer_id, ChangeType.DELETED);
-            
+
             this.recording_finished (rec.Id);
         }
-        
+
         /**
          * @returns: File on success, NULL otherwise
-         * 
+         *
          * Create directories and set location of recording
          */
         private File? create_recording_dirs (Channel channel, uint[] start) {
             string channel_name = Utils.remove_nonalphanums (channel.Name);
             string time = "%u-%u-%u_%u-%u".printf (start[0], start[1],
                 start[2], start[3], start[4]);
-            
+
             File dir = this.DeviceGroup.RecordingsDirectory.get_child (
                 channel_name).get_child (time);
-            
+
             if (!dir.query_exists (null)) {
                 try {
                     Utils.mkdirs (dir);
@@ -747,18 +747,18 @@ namespace DVB {
                 log.error ("Could not retrieve attributes: %s", e.message);
                 return null;
             }
-            
+
             if (info.get_attribute_uint32 (FileAttribute.STANDARD_TYPE)
                 != FileType.DIRECTORY) {
                 log.error ("%s is not a directory", dir.get_path ());
                 return null;
             }
-            
+
             if (!info.get_attribute_boolean (FileAttribute.ACCESS_CAN_WRITE)) {
                 log.error ("Cannot write to %s", dir.get_path ());
                 return null;
             }
-            
+
             File recording = dir.get_child ("001.mpeg");
             if (recording.query_exists (null)) {
                 warning ("Recording %s already exists", recording.get_path ());
@@ -766,10 +766,10 @@ namespace DVB {
             }
             return recording;
         }
-        
+
         private bool check_timers () {
             log.debug ("Checking timers");
-            
+
             bool val;
             SList<Timer> ended_recordings =
                 new SList<Timer> ();
@@ -828,18 +828,18 @@ namespace DVB {
             }
             return val;
         }
-        
+
         private void on_eit_structure (PlayerThread player, Gst.Structure structure) {
             uint sid;
             structure.get_uint ("service-id", out sid);
-            
+
             lock (this.recordings) {
                 // Find name and description for recordings
                 foreach (Recording rec in this.recordings.values) {
                     if (rec.Name == null && sid == rec.ChannelSid) {
                         Channel chan = this.DeviceGroup.Channels.get_channel (sid);
                         Schedule sched = chan.Schedule;
-                        
+
                         Event? event = sched.get_running_event ();
                         if (event != null) {
                             log.debug ("Found running event for active recording");
diff --git a/src/Recording.vala b/src/Recording.vala
index 7865816..4dfac30 100644
--- a/src/Recording.vala
+++ b/src/Recording.vala
@@ -28,7 +28,7 @@ namespace DVB {
     public class Recording : GLib.Object {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-    
+
         public uint32 Id {get; set;}
         public uint ChannelSid {get; set;}
         public string ChannelName {get; set;}
@@ -38,7 +38,7 @@ namespace DVB {
         public GLib.Time StartTime {get; set;}
         public int64 Length {get; set;}
         public FileMonitor file_monitor {get; set;}
-        
+
         public uint[] get_start () {
             return new uint[] {
                 this.StartTime.year + 1900,
@@ -66,13 +66,13 @@ namespace DVB {
                 log.error ("Could not save recording: %s", e.message);
             }
         }
- 
+
         private void on_recording_file_changed (FileMonitor monitor,
                 File file, File? other_file, FileMonitorEvent event) {
             if (event == FileMonitorEvent.DELETED) {
                 string location = file.get_path ();
                 log.debug ("%s has been deleted", location);
-                
+
                 monitor.cancel ();
 
                 RecordingsStore.get_instance().remove (this);
diff --git a/src/RecordingsStore.vala b/src/RecordingsStore.vala
index f483202..8d6231f 100644
--- a/src/RecordingsStore.vala
+++ b/src/RecordingsStore.vala
@@ -29,17 +29,17 @@ namespace DVB {
     public class RecordingsStore : GLib.Object, IDBusRecordingsStore {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-    
+
         private HashMap<uint32, Recording> recordings;
         private uint32 last_id;
         private static RecordingsStore instance;
         private static RecMutex instance_mutex = RecMutex ();
-        
+
         construct {
             this.recordings = new HashMap <uint32, Recording> ();
             this.last_id = 0;
         }
-        
+
         public static unowned RecordingsStore get_instance () {
             instance_mutex.lock ();
             if (instance == null) {
@@ -48,7 +48,7 @@ namespace DVB {
             instance_mutex.unlock ();
             return instance;
         }
-        
+
         public static void shutdown () {
             instance_mutex.lock ();
             RecordingsStore rs = instance;
@@ -83,7 +83,7 @@ namespace DVB {
             }
             return true;
         }
-        
+
         public bool add_and_monitor (Recording rec) {
             if (this.add (rec)) {
                 rec.monitor_recording ();
@@ -105,7 +105,7 @@ namespace DVB {
             }
             return val;
         }
-        
+
         /**
          * @returns: A list of ids for all recordings
          */
@@ -113,17 +113,17 @@ namespace DVB {
             uint32[] ids;
             lock (this.recordings) {
                 ids = new uint32[this.recordings.size];
-                
+
                 int i = 0;
                 foreach (uint32 key in this.recordings.keys) {
                     ids[i] = key;
                     i++;
                 }
             }
-            
+
             return ids;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @location: The location of the recording on the filesystem
@@ -142,7 +142,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @name: The name of the recording (e.g. the name of
@@ -163,7 +163,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @description: A short text describing the recorded item
@@ -184,7 +184,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @start_time: The starting time of the recording
@@ -204,7 +204,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @timestamp: Start time as UNIX timestamp
@@ -220,10 +220,10 @@ namespace DVB {
                     timestamp = 0;
                 }
             }
-            
+
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @length: The length of the recording in seconds
@@ -239,10 +239,10 @@ namespace DVB {
                     length = 0;
                 }
             }
-           
+
             return ret;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @returns: TRUE on success, FALSE otherwises
@@ -267,10 +267,10 @@ namespace DVB {
                     this.remove (rec);
                 }
             }
-            
+
             return val;
         }
-        
+
         /**
          * @rec_id: The id of the recording
          * @name: The channel's name or an empty string if
@@ -291,7 +291,7 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool GetAllInformations (uint32 rec_id, out RecordingInfo info) throws DBusError {
             bool ret;
             info = RecordingInfo ();
@@ -327,5 +327,5 @@ namespace DVB {
         }
 
     }
-    
+
 }
diff --git a/src/Satellite/SatelliteChannel.vala b/src/Satellite/SatelliteChannel.vala
index 6b387b1..15d7f32 100644
--- a/src/Satellite/SatelliteChannel.vala
+++ b/src/Satellite/SatelliteChannel.vala
@@ -21,7 +21,7 @@
 namespace DVB {
 
     public class SatelliteChannel : Channel {
-        
+
         public string Polarization {get; set;}
         public uint SymbolRate {get; set;}
         public int DiseqcSource {get; set;}
@@ -33,19 +33,19 @@ namespace DVB {
         public SatelliteChannel.without_schedule () {
             Channel.without_schedule ();
         }
-        
+
         public override bool is_valid () {
             return (base.is_valid () && this.SymbolRate != 0
                 && (this.Polarization == "v" || this.Polarization == "h"));
         }
-        
+
         public override void setup_dvb_source (Gst.Element source) {
             source.set ("frequency", this.Frequency);
             source.set ("polarity", this.Polarization);
             source.set ("symbol-rate", this.SymbolRate);
             source.set ("diseqc-source", this.DiseqcSource);
         }
-        
+
         public override string to_string () {
             return "%s:%u:%s:%d:%u:%u:%s:%u".printf(this.Name, this.Frequency,
                 this.Polarization, this.DiseqcSource, this.SymbolRate,
diff --git a/src/Satellite/SatelliteScanner.vala b/src/Satellite/SatelliteScanner.vala
index 7949c28..5cc8cff 100644
--- a/src/Satellite/SatelliteScanner.vala
+++ b/src/Satellite/SatelliteScanner.vala
@@ -20,41 +20,41 @@
 using GLib;
 
 namespace DVB {
-    
+
     [DBus (name = "org.gnome.DVB.Scanner.Satellite")]
     public interface IDBusSatelliteScanner : GLib.Object {
-    
+
         public abstract signal void frequency_scanned (uint frequency, uint freq_left);
         public abstract signal void finished ();
         public abstract signal void channel_added (uint frequency, uint sid,
             string name, string network, string type, bool scrambled);
         public abstract signal void frontend_stats (double signal_strength,
             double signal_noise_ratio);
-        
+
         public abstract void Run () throws DBusError;
         public abstract void Destroy () throws DBusError;
         public abstract bool WriteAllChannelsToFile (string path) throws DBusError;
         public abstract bool WriteChannelsToFile (uint[] channel_sids, string path) throws DBusError;
-        
+
         public abstract void AddScanningData (uint frequency,
                                      string polarization, // "horizontal", "vertical"
                                      uint symbol_rate) throws DBusError;
-        
+
         /**
          * @path: Path to file containing scanning data
          * @returns: TRUE when the file has been parsed successfully
          *
          * Parses initial tuning data from a file as provided by dvb-apps
-         */                            
+         */
         public abstract bool AddScanningDataFromFile (string path) throws DBusError;
     }
-    
+
     public class SatelliteScanner : Scanner, IDBusScanner {
-    
+
         public SatelliteScanner (DVB.Device device) {
             Object (Device: device);
         }
-     
+
         public bool AddScanningData (GLib.HashTable<string, Variant> data) throws DBusError
          {
             uint frequency, symbol_rate;
@@ -80,27 +80,27 @@ namespace DVB {
             this.add_scanning_data (frequency, polarization, symbol_rate);
             return true;
         }
-                
+
         private inline void add_scanning_data (uint frequency,
                 string polarization, uint symbol_rate) {
             var tuning_params = new Gst.Structure ("tuning_params",
             "frequency", typeof(uint), frequency,
             "symbol-rate", typeof(uint), symbol_rate,
             "polarization", typeof(string), polarization);
-            
+
             base.add_structure_to_scan (tuning_params);
         }
-        
+
         protected override void add_scanning_data_from_string (string line) {
             // line looks like:
             // S freq pol sr fec
             string[] cols = Regex.split_simple ("\\s+", line);
 
             if (cols.length < 5) return;
-            
+
             uint freq = (uint)int.parse (cols[1]);
             uint symbol_rate = (uint)(int.parse (cols[3]) / 1000);
-            
+
             string pol;
             string lower_pol = cols[2].down ();
             if (lower_pol == "h")
@@ -109,66 +109,66 @@ namespace DVB {
                 pol = "vertical";
             else
                 return;
-            
+
             // TODO what about fec?
-            
+
             this.add_scanning_data (freq, pol, symbol_rate);
         }
-        
+
         protected override void prepare () {
             debug("Setting up pipeline for DVB-S scan");
-        
+
             Gst.Element dvbsrc = ((Gst.Bin)base.pipeline).get_by_name ("dvbsrc");
-           
+
             string[] uint_keys = new string[] {"frequency", "symbol-rate"};
-            
+
             foreach (string key in uint_keys) {
                 base.set_uint_property (dvbsrc, base.current_tuning_params, key);
             }
-            
+
             string polarity =
                 base.current_tuning_params.get_string ("polarization")
                 .substring (0, 1);
             dvbsrc.set ("polarity", polarity);
-            
+
             uint code_rate;
             base.current_tuning_params.get_uint ("inner-fec", out code_rate);
             dvbsrc.set ("code-rate-hp", code_rate);
         }
-        
+
         protected override ScannedItem get_scanned_item (Gst.Structure structure) {
             // dup string because get_string returns weak string
             string pol = "%s".printf (
                 structure.get_string ("polarization"));
-            
+
             uint freq;
             structure.get_uint ("frequency", out freq);
             return new ScannedSatteliteItem (freq, pol);
         }
-        
+
         protected override Channel get_new_channel () {
             return new SatelliteChannel.without_schedule ();
         }
-        
+
         protected override void add_values_from_structure_to_channel (
             Gst.Structure delivery, Channel channel) {
             if (!(channel is SatelliteChannel)) return;
-            
+
             SatelliteChannel sc = (SatelliteChannel)channel;
-            
+
             uint freq;
             delivery.get_uint ("frequency", out freq);
             sc.Frequency = freq;
-            
+
             sc.Polarization = delivery.get_string ("polarization").substring (0, 1);
 
             uint srate;
-            delivery.get_uint ("symbol-rate", out srate);            
+            delivery.get_uint ("symbol-rate", out srate);
             sc.SymbolRate = srate;
-            
+
             // TODO
             sc.DiseqcSource = -1;
         }
     }
-    
+
 }
diff --git a/src/ScannedItem.vala b/src/ScannedItem.vala
index f3bf561..4d28fda 100644
--- a/src/ScannedItem.vala
+++ b/src/ScannedItem.vala
@@ -32,11 +32,11 @@ namespace DVB {
 
         public uint Frequency {get; construct;}
         private static const int PRIME = 31;
-        
+
         public ScannedItem (uint frequency) {
             Object (Frequency: frequency);
         }
-        
+
         public static uint hash (ScannedItem* o) {
             uint hashval;
             // Most specific class first
@@ -50,22 +50,22 @@ namespace DVB {
             }
             return hashval;
         }
-        
+
         public static bool equal (ScannedItem* o1, ScannedItem* o2) {
             if (o1 == null || o2 == null) return false;
-            
+
             if (o1->get_type().name() != o2->get_type().name()) return false;
-            
+
             if (o1 is ScannedSatteliteItem) {
                 ScannedSatteliteItem item1 = (ScannedSatteliteItem)o1;
                 ScannedSatteliteItem item2 = (ScannedSatteliteItem)o2;
-                
+
                 return ((ScannedItem)item1).Frequency == ((ScannedItem)item2).Frequency
                     && item1.Polarization == item2.Polarization;
             } else if (o1 is ScannedItem) {
                 ScannedItem item1 = (ScannedItem)o1;
                 ScannedItem item2 = (ScannedItem)o2;
-                
+
                 return (item1.Frequency == item2.Frequency);
             } else {
                 log.error ("Don't comparing ScannedItem instances");
@@ -77,7 +77,7 @@ namespace DVB {
     public class ScannedSatteliteItem : ScannedItem {
 
         public string Polarization {get; construct;}
-        
+
         public ScannedSatteliteItem (uint frequency, string polarization) {
             Object (Frequency: frequency, Polarization: polarization);
         }
diff --git a/src/Scanner.vala b/src/Scanner.vala
index b8e3cf0..1d1b4f7 100644
--- a/src/Scanner.vala
+++ b/src/Scanner.vala
@@ -40,7 +40,7 @@ namespace DVB {
          * Whether a new channel has been found on that frequency or not.
          */
         public signal void frequency_scanned (uint frequency, uint freq_left);
-        
+
         /**
          * @frequency: Frequency of the channel
          * @sid: SID of the channel
@@ -56,12 +56,12 @@ namespace DVB {
 
         public signal void frontend_stats (double signal_strength,
             double signal_noise_ratio);
-        
+
         /**
          * Emitted when all frequencies have been scanned
          */
         public signal void finished ();
-        
+
         /**
          * The DVB device the scanner should use
          */
@@ -72,32 +72,32 @@ namespace DVB {
         public ChannelList Channels {
             get { return this.channels; }
         }
-        
+
         protected ChannelList channels;
 
         /**
          * The Gst pipeline used for scanning
          */
         protected Gst.Element pipeline;
-        
+
         /**
          * Contains the tuning parameters we use for scanning
          */
         protected GLib.Queue<Gst.Structure> frequencies;
-        
+
         /**
          * The tuning paramters we're currently using
          */
         protected Gst.Structure? current_tuning_params;
-            
+
         /**
          * All the frequencies that have been scanned already
          */
         protected HashSet<ScannedItem> scanned_frequencies;
-        
+
         private static const string BASE_PIDS = "16:17"; // NIT, SDT
         private static const string PIPELINE_TEMPLATE = "dvbsrc name=dvbsrc adapter=%u frontend=%u pids=%s stats-reporting-interval=100 ! mpegtsparse ! fakesink silent=true";
-        
+
         // Contains SIDs
         private ArrayList<uint> new_channels;
         private Source check_for_lock_source;
@@ -122,23 +122,23 @@ namespace DVB {
             this.context = new MainContext ();
             this.running = false;
         }
-        
+
         /**
          * Setup the pipeline correctly
          */
         protected abstract void prepare();
-        
+
         /**
          * Use the frequency and possibly other data to
          * mark the tuning paramters as already used
          */
         protected abstract ScannedItem get_scanned_item (Gst.Structure structure);
-        
+
         /**
          * Return a new empty channel
          */
         protected abstract Channel get_new_channel ();
-        
+
         /**
          * Retrieve the data from structure and add it to the Channel
          */
@@ -148,14 +148,14 @@ namespace DVB {
          * Called to parse a line from the initial tuning data
          */
         protected abstract void add_scanning_data_from_string (string line);
-        
+
         /**
          * Start the scanner
          */
         public void Run () throws DBusError {
             if (this.running) return;
             this.running = true;
-        
+
             this.loop = new MainLoop (this.context, false);
             try {
                 this.worker_thread = new Thread<void*>.try ("Scanner-Worker-Thread", this.worker);
@@ -174,16 +174,16 @@ namespace DVB {
                 log.error ("Could not create pipeline: %s", e.message);
                 return;
             }
-            
+
             Gst.Bus bus = this.pipeline.get_bus();
             this.bus_watch_id = cUtils.gst_bus_add_watch_context (bus,
                     this.bus_watch_func, this.context);
 
             this.pipeline.set_state(Gst.State.READY);
-            
+
             this.queue_start_scan ();
         }
-        
+
         /**
          * Abort scanning and cleanup
          */
@@ -207,8 +207,8 @@ namespace DVB {
             }
             this.destroyed ();
         }
-        
-        /** 
+
+        /**
          * @path: Location where the file will be stored
          *
          * Write all the channels stored in this.Channels to file
@@ -224,17 +224,17 @@ namespace DVB {
                     success = false;
                 }
             }
-            
+
             try {
                 writer.close ();
             } catch (Error e) {
                 log.error ("Could not close file handle: %s", e.message);
                 success = false;
             }
-            
+
             return success;
         }
-        
+
         /**
          * @channel_sids: A list of channels' SIDs
          * @path: Location where the file will be stored
@@ -259,24 +259,24 @@ namespace DVB {
                     success = false;
                 }
             }
-            
+
             try {
                 writer.close ();
             } catch (Error e) {
                 log.error ("Could not close file handle: %s", e.message);
                 success = false;
             }
-            
+
             return success;
         }
 
         public bool AddScanningDataFromFile (string path) throws DBusError {
             File datafile = File.new_for_path(path);
-            
+
             log.debug ("Reading scanning data from %s", path);
 
             if (!Utils.is_readable_file (datafile)) return false;
-            
+
             DataInputStream reader;
             try {
                 reader = new DataInputStream (datafile.read (null));
@@ -293,7 +293,7 @@ namespace DVB {
 
                     line = line.chug ();
                     if (line.has_prefix ("#")) continue;
-                    
+
                     this.add_scanning_data_from_string (line);
                 }
             } catch (Error e) {
@@ -338,7 +338,7 @@ namespace DVB {
             this.new_channels.clear ();
             this.running = false;
         }
-        
+
         protected void clear_frequencies () {
             while (!this.frequencies.is_empty ()) {
                 Gst.Structure? s = this.frequencies.pop_head ();
@@ -347,19 +347,19 @@ namespace DVB {
             }
             this.frequencies.clear ();
         }
-        
+
         protected void add_structure_to_scan (owned Gst.Structure structure) {
             if (structure == null) return;
-            
+
             ScannedItem item = this.get_scanned_item (structure);
-            
+
             if (!this.scanned_frequencies.contains (item)) {
                 log.debug ("Queueing new frequency %u", item.Frequency);
                 this.frequencies.push_tail (structure);
                 this.scanned_frequencies.add (item);
             }
         }
-        
+
         /**
          * Pick up the next tuning paramters from the queue
          * and start scanning with them
@@ -377,13 +377,13 @@ namespace DVB {
             this.pat_arrived = false;
             this.pmt_arrived = false;
             this.locked = false;
-            
+
             if (this.current_tuning_params != null) {
                 uint old_freq;
                 this.current_tuning_params.get_uint ("frequency", out old_freq);
                 this.frequency_scanned (old_freq, this.frequencies.length);
             }
-            
+
             if (this.frequencies.is_empty()) {
                 message("Finished scanning");
                 // We don't have all the information for those channels
@@ -399,13 +399,13 @@ namespace DVB {
                 this.finished ();
                 return false;
             }
-            
+
             this.current_tuning_params = this.frequencies.pop_head();
-            
+
             // Remember that we already scanned this frequency
             uint freq;
             this.current_tuning_params.get_uint ("frequency", out freq);
-            
+
             log.debug("Starting scanning frequency %u (%u left)", freq,
                 this.frequencies.get_length ());
 
@@ -438,7 +438,7 @@ namespace DVB {
             }
             return false;
         }
-        
+
         protected bool wait_for_tables () {
             if (!(this.sdt_arrived && this.nit_arrived && this.pat_arrived
                     && this.pmt_arrived)) {
@@ -455,7 +455,7 @@ namespace DVB {
                 this.start_scan_source = null;
             }
         }
-        
+
         protected void remove_check_for_lock_timeout () {
             if (this.check_for_lock_source != null &&
                     !this.check_for_lock_source.is_destroyed ()) {
@@ -463,7 +463,7 @@ namespace DVB {
                 this.check_for_lock_source = null;
             }
         }
-        
+
         protected void remove_wait_for_tables_timeout () {
             if (this.wait_for_tables_source != null &&
                     !this.wait_for_tables_source.is_destroyed ()) {
@@ -482,14 +482,14 @@ namespace DVB {
                 this.start_scan_source.attach (this.context);
             }
         }
-        
+
         protected static void set_uint_property (Gst.Element src,
             Gst.Structure params, string key) {
             uint val;
             params.get_uint (key, out val);
             src.set (key, val);
         }
-        
+
         protected void on_dvb_frontend_stats_structure (Gst.Structure structure) {
             bool has_lock;
             structure.get_boolean ("lock", out has_lock);
@@ -509,22 +509,22 @@ namespace DVB {
             this.frontend_stats ((_signal / (double)0xffff),
                 (_snr / (double)0xffff));
         }
-        
+
         protected void on_dvb_read_failure_structure () {
             log.warning ("Read failure");
             /*
             this.Destroy ();
             */
         }
-        
+
         protected void on_pat_structure (Gst.Structure structure) {
             log.debug("Received PAT");
-        
+
             Set<uint> pid_set = new HashSet<uint> ();
             // add BASE_PIDS
             pid_set.add (16);
             pid_set.add (17);
-            
+
             Gst.Value programs = structure.get_value ("programs");
             uint size = programs.list_get_size ();
             Gst.Value val;
@@ -533,16 +533,16 @@ namespace DVB {
             for (uint i=0; i<size; i++) {
                 val = programs.list_get_value (i);
                 program = val.get_structure ();
-                
+
                 uint sid;
                 program.get_uint ("program-number", out sid);
-                
+
                 uint pmt;
                 program.get_uint ("pid", out pmt);
-                
+
                 pid_set.add (pmt);
             }
-            
+
             StringBuilder new_pids = new StringBuilder ();
             int i = 0;
             foreach (uint pid in pid_set) {
@@ -552,45 +552,45 @@ namespace DVB {
                     new_pids.append ("%u:".printf (pid));
                 i++;
             }
-            
+
             log.debug ("Setting %d pids: %s", pid_set.size, new_pids.str);
             // We want to parse the pmt as well
             Gst.Element dvbsrc = ((Gst.Bin)this.pipeline).get_by_name ("dvbsrc");
             dvbsrc.set ("pids", new_pids.str);
-            
+
             this.pat_arrived = true;
         }
-        
+
         protected void on_sdt_structure (Gst.Structure structure) {
             uint tsid;
             structure.get_uint ("transport-stream-id", out tsid);
-            
+
             log.debug("Received SDT (0x%x)", tsid);
-            
+
             Gst.Value services = structure.get_value ("services");
             uint size = services.list_get_size ();
-            
+
             Gst.Value val;
             weak Gst.Structure service;
             // Iterate over services
             for (uint i=0; i<size; i++) {
                 val = services.list_get_value (i);
                 service = val.get_structure ();
-                
+
                 // Returns "service-%d"
                 string name = service.get_name ();
                 // Get the number at the end
                 int sid = int.parse (name.substring (8, name.length - 8));
-                
+
                 if (service.has_field ("name"))
                     name = service.get_string ("name");
-                
+
                 if (!this.channels.contains (sid)) {
                     this.add_new_channel (sid);
                 }
-                
+
                 Channel channel = this.channels.get_channel (sid);
-                
+
                 if (service.has_field ("scrambled")) {
                     bool scrambled;
                     service.get_boolean ("scrambled", out scrambled);
@@ -598,11 +598,11 @@ namespace DVB {
                 } else {
                     channel.Scrambled = false;
                 }
-                
+
                 if (name.validate ()) {
                     channel.Name = name.replace ("\\s", " ");
                 }
-                
+
                 channel.TransportStreamId = tsid;
                 string provider = service.get_string ("provider-name");
                 if (provider != null && provider.validate ()) {
@@ -614,10 +614,10 @@ namespace DVB {
                 log.debug ("Found service 0x%x, %s, scrambled: %s", sid,
                     channel.Name, channel.Scrambled.to_string ());
             }
-        
+
             this.sdt_arrived = true;
         }
-        
+
         protected void on_nit_structure (Gst.Structure structure) {
             bool actual;
             structure.get_boolean ("actual-network", out actual);
@@ -625,7 +625,7 @@ namespace DVB {
                 return;
 
             log.debug("Received NIT");
-            
+
             string name;
             if (structure.has_field ("network-name")) {
                 name = structure.get_string ("network-name");
@@ -635,7 +635,7 @@ namespace DVB {
                 name = "%u".printf (nid);
             }
             log.debug ("Network name '%s'", name);
-                        
+
             Gst.Value transports = structure.get_value ("transports");
             uint size = transports.list_get_size ();
             Gst.Value val;
@@ -644,88 +644,88 @@ namespace DVB {
             for (uint i=0; i<size; i++) {
                 val = transports.list_get_value (i);
                 transport = val.get_structure ();
-                
+
                 uint tsid;
                 transport.get_uint ("transport-stream-id", out tsid);
-                
+
                 if (transport.has_field ("delivery")) {
                     Gst.Value delivery_val = transport.get_value ("delivery");
                     weak Gst.Structure delivery =
                         delivery_val.get_structure ();
-                 
+
                     log.debug ("Received TS 0x%x", tsid);
-                    
+
                     uint freq;
                     delivery.get_uint ("frequency", out freq);
                     // Takes care of duplicates
                     this.add_structure_to_scan (delivery);
                 }
-                
+
                 if (transport.has_field ("channels")) {
                     Gst.Value channels = transport.get_value ("channels");
                     uint channels_size = channels.list_get_size ();
-                    
+
                     Gst.Value channel_val;
                     weak Gst.Structure channel_struct;
                     // Iterate over channels
                     for (int j=0; j<channels_size; j++) {
                         channel_val = channels.list_get_value (j);
                         channel_struct = channel_val.get_structure ();
-                        
+
                         uint sid;
                         channel_struct.get_uint ("service-id", out sid);
-                        
+
                         if (!this.channels.contains (sid)) {
                             this.add_new_channel (sid);
                         }
-                        
+
                         Channel dvb_channel = this.channels.get_channel (sid);
-                        
+
                         if (name.validate ()) {
                             dvb_channel.Network = name;
                         } else {
                             dvb_channel.Network = "";
                         }
-                        
+
                         uint lcnumber;
                         channel_struct.get_uint ("logical-channel-number", out lcnumber);
                         dvb_channel.LogicalChannelNumber = lcnumber;
                     }
                 }
             }
-            
+
             this.nit_arrived = true;
         }
-        
+
         protected void on_pmt_structure (Gst.Structure structure) {
             log.debug ("Received PMT");
-            
+
             uint program_number;
             structure.get_uint ("program-number", out program_number);
-            
+
             if (!this.channels.contains (program_number)) {
                 this.add_new_channel (program_number);
             }
-            
+
             Channel dvb_channel = this.channels.get_channel (program_number);
-            
+
             Gst.Value streams = structure.get_value ("streams");
             uint size = streams.list_get_size ();
-            
+
             Gst.Value stream_val;
             weak Gst.Structure stream;
             // Iterate over streams
             for (int i=0; i<size; i++) {
                 stream_val = streams.list_get_value (i);
                 stream = stream_val.get_structure ();
-                
+
                 uint pid;
                 stream.get_uint ("pid", out pid);
-                
+
                 // See ISO/IEC 13818-1 Table 2-29
                 uint stream_type;
                 stream.get_uint ("stream-type", out stream_type);
-                
+
                 switch (stream_type) {
                     case 0x01:
                     case 0x02:
@@ -747,10 +747,10 @@ namespace DVB {
                     break;
                 }
             }
-            
+
             this.pmt_arrived = true;
         }
-        
+
         protected bool bus_watch_func (Gst.Bus bus, Gst.Message message) {
             switch (message.type) {
                 case Gst.MessageType.ELEMENT: {
@@ -771,7 +771,7 @@ namespace DVB {
                     else
                         return true; /* We are not interested in the message */
                 break;
-                }            
+                }
                 case Gst.MessageType.ERROR: {
                     Error gerror;
                     string debug;
@@ -783,16 +783,16 @@ namespace DVB {
                     return true; /* We are not interested in the message */
             }
 
-            // NIT gives us the transport stream, SDT links SID and TS ID 
+            // NIT gives us the transport stream, SDT links SID and TS ID
             if (this.nit_arrived && this.sdt_arrived && this.pat_arrived) {
                 // We received all tables at least once. Add valid channels.
                 lock (this.new_channels) {
                     ArrayList<uint> del_channels = new ArrayList<uint> ();
                     foreach (uint sid in this.new_channels) {
                         DVB.Channel channel = this.channels.get_channel (sid);
-                             
+
                         // If this fails we may miss video or audio pid,
-                        // because we didn't came across the sdt or pmt, yet   
+                        // because we didn't came across the sdt or pmt, yet
                         if (channel.is_valid ()) {
                             string type = (channel.is_radio ()) ? "Radio" : "TV";
                             log.debug ("Channel added: %s", channel.to_string ());
@@ -807,26 +807,26 @@ namespace DVB {
                             this.pmt_arrived = false;
                         }
                     }
-                    
+
                     // Only remove those channels we have all the information for
                     foreach (uint sid in del_channels) {
                         this.new_channels.remove (sid);
                     }
                 }
             }
-            
+
             // If we collect all information we can continue scanning
             // the next frequency
             if (this.sdt_arrived && this.nit_arrived && this.pat_arrived
                     && this.pmt_arrived) {
                 this.remove_wait_for_tables_timeout ();
-                
+
                 this.queue_start_scan ();
             }
 
             return true;
         }
-        
+
         protected void add_new_channel (uint sid) {
             log.debug ("Adding new channel with SID 0x%x", sid);
             Channel new_channel = this.get_new_channel ();
@@ -841,5 +841,5 @@ namespace DVB {
             }
         }
     }
-    
+
 }
diff --git a/src/Schedule.vala b/src/Schedule.vala
index 8b80819..0aa16f0 100644
--- a/src/Schedule.vala
+++ b/src/Schedule.vala
@@ -41,7 +41,7 @@ namespace DVB {
 
         private EPGStore epgstore;
         private EventStorage events;
-        
+
         construct {
             this.events = new EventStorage ();
             this.epgstore = new Factory().get_epg_store ();
@@ -49,7 +49,7 @@ namespace DVB {
 
         public async void restore () {
             Gee.List<Event> levents;
-            try {                        
+            try {
                 levents = this.epgstore.get_events (
                     this.channel.Sid, this.channel.GroupId);
             } catch (SqlError e1) {
@@ -83,11 +83,11 @@ namespace DVB {
             log.debug ("Finished restoring %d EPG events for channel %u",
                 this.events.size, this.channel.Sid);
         }
-        
+
         public Schedule (Channel channel) {
             base (channel: channel);
         }
-        
+
         public void remove_expired_events () {
             int last_expired = -1;
 
@@ -138,7 +138,7 @@ namespace DVB {
          */
         public void add (Event event) {
             if (event.has_expired ()) return;
-            
+
             lock (this.events) {
                 try {
                     this.store_event (event);
@@ -159,7 +159,7 @@ namespace DVB {
                             this.store_event (event);
                     }
 
-                    ((database.sqlite.SqliteDatabase)this.epgstore).end_transaction ();                    
+                    ((database.sqlite.SqliteDatabase)this.epgstore).end_transaction ();
                 } catch (SqlError e) {
                     log.error ("%s", e.message);
                 } finally {
@@ -204,7 +204,7 @@ namespace DVB {
             time_t ref_start = ref_event.get_start_timestamp ();
             time_t ref_end = ref_event.get_end_timestamp ();
 
-            double max_score = 0;            
+            double max_score = 0;
             foreach (Event event in events) {
                 double score = 0;
                 time_t e_start = event.get_start_timestamp ();
@@ -248,7 +248,7 @@ namespace DVB {
                     }
                 }
             }
-            
+
             return running_event;
         }
 
@@ -346,12 +346,12 @@ namespace DVB {
         {
             bool ret;
             event_info = EventInfo();
-            
-            lock (this.events) {        
+
+            lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     EventElement element = this.events.get_by_id (event_id);
                     Event? event = this.get_event (element.id);
-                    
+
                     event_info = event_to_event_info (event);
                     EventElement? next_element = this.events.next (element);
                     if (next_element == null) {
@@ -370,16 +370,16 @@ namespace DVB {
                     ret = false;
                 }
             }
-            
+
             return ret;
         }
-        
+
         public uint32 NowPlaying () throws DBusError {
             Event? event = this.get_running_event ();
-            
+
             return (event == null) ? 0 : event.id;
         }
-        
+
         public uint32 Next (uint32 event_id) throws DBusError {
             uint32 next_event = 0;
             lock (this.events) {
@@ -395,15 +395,15 @@ namespace DVB {
                     log.debug ("No event with id %u", event_id);
                 }
             }
-            
+
             return next_event;
         }
-        
+
         public bool GetName (uint32 event_id, out string name) throws DBusError {
             bool ret = false;
             name = "";
 
-            lock (this.events) {        
+            lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
                     if (event != null && event.name != null) {
@@ -417,13 +417,13 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool GetShortDescription (uint32 event_id,
                 out string description) throws DBusError
         {
             bool ret = false;
             description = "";
-            
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
@@ -438,13 +438,13 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool GetExtendedDescription (uint32 event_id,
                 out string description) throws DBusError
         {
             bool ret = false;
             description = "";
-            
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
@@ -459,13 +459,13 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool GetDuration (uint32 event_id, out uint duration)
                 throws DBusError
         {
             bool ret = false;
             duration = 0;
-        
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
@@ -480,13 +480,13 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool GetLocalStartTime (uint32 event_id, out uint[] start_time)
                 throws DBusError
         {
             bool ret = false;
             start_time = new uint[0];
-        
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
@@ -499,10 +499,10 @@ namespace DVB {
                     log.debug ("No event with id %u", event_id);
                 }
             }
-            
+
             return ret;
         }
-        
+
         public bool GetLocalStartTimestamp (uint32 event_id, out int64 timestamp)
                 throws DBusError
         {
@@ -522,13 +522,13 @@ namespace DVB {
 
             return ret;
         }
-        
+
         public bool IsRunning (uint32 event_id, out bool running)
                 throws DBusError
         {
             bool ret = false;
             running = false;
-        
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
@@ -540,16 +540,16 @@ namespace DVB {
                     log.debug ("No event with id %u", event_id);
                 }
             }
-            
+
             return ret;
         }
-        
+
         public bool IsScrambled (uint32 event_id, out bool scrambled)
                 throws DBusError
         {
             bool ret = false;
             scrambled = false;
-        
+
             lock (this.events) {
                 if (this.events.contains_event_with_id (event_id)) {
                     Event? event = this.get_extended_event_by_id (event_id);
diff --git a/src/Settings.vala b/src/Settings.vala
index 5031da5..26cdf76 100644
--- a/src/Settings.vala
+++ b/src/Settings.vala
@@ -21,15 +21,15 @@ using GLib;
 using DVB.Logging;
 
 namespace DVB {
-    
+
     public class Settings : GLib.Object {
 
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
-    
+
         private static const string TIMERS_SECTION = "timers";
         private static const string MARGIN_START = "margin_start";
         private static const string MARGIN_END = "margin_end";
-        
+
         private static const string EPG_SECTION = "epg";
         private static const string SCAN_INTERVAL = "scan_interval";
 
@@ -57,7 +57,7 @@ namespace DVB {
         scan_interval=30
         [streaming]
         interface=lo""";
-        
+
         private KeyFile keyfile;
 
         construct {
@@ -144,10 +144,10 @@ namespace DVB {
                 Environment.get_user_config_dir ());
             File our_config = config_dir.get_child ("gnome-dvb-daemon");
             File settings_file = our_config.get_child ("settings.ini");
-            
+
             return settings_file;
         }
-        
+
         public bool load () {
             File settings_file = this.get_settings_file ();
             bool success = true;
@@ -160,7 +160,7 @@ namespace DVB {
                         settings_file.get_path (), e.message);
                     return false;
                 }
-                
+
                 try {
                     stream.write (DEFAULT_SETTINGS.data);
                 } catch (Error e) {
@@ -168,7 +168,7 @@ namespace DVB {
                         settings_file.get_path (), e.message);
                     success = false;
                 }
-                
+
                 try {
                     stream.close (null);
                 } catch (Error e) {
@@ -176,7 +176,7 @@ namespace DVB {
                     success = false;
                 }
             }
-            
+
             if (success) {
                 try {
                     keyfile.load_from_file (settings_file.get_path (), 0);
@@ -188,13 +188,13 @@ namespace DVB {
                     success = false;
                 }
             }
-            
+
             return success;
         }
-        
+
         public bool save () {
             File settings_file = this.get_settings_file ();
-            
+
             FileOutputStream stream = null;
             try {
                 stream = settings_file.replace (null, true, 0, null);
@@ -203,11 +203,11 @@ namespace DVB {
                     settings_file.get_path (), e.message);
                 return false;
             }
-            
+
             string data = null;
             size_t data_len;
             data = this.keyfile.to_data (out data_len);
-                
+
             try {
                 stream.write_all (data.data, null);
             } catch (Error e) {
@@ -215,69 +215,69 @@ namespace DVB {
                     settings_file.get_path (), e.message);
                 return false;
             }
-                
-            
+
+
             try {
                 stream.close (null);
             } catch (Error e) {
                 log.error ("%s", e.message);
             }
-        
+
             return false;
         }
-        
+
         public string get_string (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_string (group_name, key);
         }
-        
+
         public bool get_boolean (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_boolean (group_name, key);
         }
-        
+
         public int get_integer (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_integer (group_name, key);
         }
-        
+
         public double get_double (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_double (group_name, key);
         }
-        
+
         public string[] get_string_list (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_string_list (group_name, key);
         }
-        
+
         public bool[] get_boolean_list (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_boolean_list (group_name, key);
         }
-        
+
         public int[] get_integer_list (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_integer_list (group_name, key);
         }
-        
+
         public double[] get_double_list (string group_name, string key) throws KeyFileError {
             return this.keyfile.get_double_list (group_name, key);
         }
-        
+
         public void set_string (string group_name, string key, string val) throws KeyFileError {
             this.keyfile.set_string (group_name, key, val);
         }
-        
+
         public void set_boolean (string group_name, string key, bool val) throws KeyFileError {
             this.keyfile.set_boolean (group_name, key, val);
         }
-        
+
         public void set_double (string group_name, string key, double val) throws KeyFileError {
             this.keyfile.set_double (group_name, key, val);
         }
-        
+
         public void set_integer (string group_name, string key, int val) throws KeyFileError {
             this.keyfile.set_integer (group_name, key, val);
         }
-        
+
         public void set_string_list (string group_name, string key, string[] val) throws KeyFileError {
             this.keyfile.set_string_list (group_name, key, val);
         }
-        
+
         public void set_boolean_list (string group_name, string key, bool[] val) throws KeyFileError {
             this.keyfile.set_boolean_list (group_name, key, val);
         }
@@ -285,11 +285,11 @@ namespace DVB {
         public void set_double_list (string group_name, string key, double[] val) throws KeyFileError {
             this.keyfile.set_double_list (group_name, key, val);
         }
-        
+
         public void set_integer_list (string group_name, string key, int[] val) throws KeyFileError {
             this.keyfile.set_integer_list (group_name, key, val);
         }
-        
+
     }
 
 }
diff --git a/src/Terrestrial/TerrestrialChannel.vala b/src/Terrestrial/TerrestrialChannel.vala
index f429649..5d78283 100644
--- a/src/Terrestrial/TerrestrialChannel.vala
+++ b/src/Terrestrial/TerrestrialChannel.vala
@@ -22,7 +22,7 @@ using GLib;
 namespace DVB {
 
     public class TerrestrialChannel : Channel {
-    
+
         public DvbSrcInversion Inversion {get; set;}
         public DvbSrcBandwidth Bandwidth {get; set;}
         public DvbSrcCodeRate CodeRateHP {get; set;}
@@ -39,7 +39,7 @@ namespace DVB {
         public TerrestrialChannel.without_schedule () {
             Channel.without_schedule ();
         }
-        
+
         public override void setup_dvb_source (Gst.Element source) {
             source.set ("modulation", this.Constellation);
             source.set ("trans-mode", this.TransmissionMode);
@@ -51,7 +51,7 @@ namespace DVB {
             source.set ("hierarchy", this.Hierarchy);
             source.set ("inversion", this.Inversion);
         }
-        
+
         public override string to_string () {
             return "%s:%u:%s:%s:%s:%s:%s:%s:%s:%s:%u:%s:%u".printf(this.Name, this.Frequency,
                 Utils.get_nick_from_enum (typeof(DvbSrcInversion),
@@ -72,7 +72,7 @@ namespace DVB {
                                           this.Hierarchy),
                 this.VideoPID, this.get_audio_pids_string (), this.Sid);
         }
-    
+
     }
 
 }
diff --git a/src/Terrestrial/TerrestrialScanner.vala b/src/Terrestrial/TerrestrialScanner.vala
index 67a6bae..599bb25 100644
--- a/src/Terrestrial/TerrestrialScanner.vala
+++ b/src/Terrestrial/TerrestrialScanner.vala
@@ -22,11 +22,11 @@ using GLib;
 namespace DVB {
 
     public class TerrestrialScanner : Scanner, IDBusScanner {
-    
+
         public TerrestrialScanner (DVB.Device device) {
             Object (Device: device);
         }
-        
+
         /**
           * See enums in MpegTsEnums
           */
@@ -87,7 +87,7 @@ namespace DVB {
         private inline void add_scanning_data (uint frequency, uint hierarchy,
                 uint bandwidth, string transmode, string code_rate_hp,
                 string code_rate_lp, string constellation, uint guard) {
-             
+
             Gst.Structure tuning_params = new Gst.Structure ("tuning_params",
                 "frequency", typeof(uint), frequency,
                 "hierarchy", typeof(uint), hierarchy,
@@ -97,22 +97,22 @@ namespace DVB {
                 "code-rate-lp", typeof(string), code_rate_lp,
                 "constellation", typeof(string), constellation,
                 "guard-interval", typeof(uint), guard);
-            
+
             base.add_structure_to_scan (tuning_params);
         }
-        
+
         protected override void add_scanning_data_from_string (string line) {
         	// line looks like:
             // T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
 
             string[] cols = Regex.split_simple ("\\s+", line);
-            
+
             if (cols.length < 9) {
                 return;
             }
-            
+
             uint freq = (uint)int.parse (cols[1]);
-            
+
             uint hierarchy = 0;
             if (cols[8] == "1") {
                 hierarchy = 1;
@@ -121,7 +121,7 @@ namespace DVB {
             } else if (cols[8] == "4") {
                 hierarchy = 3;
             }
-            
+
             string bandwidth_str = cols[2].split("MHz")[0];
             uint bandwidth = (uint)int.parse (bandwidth_str);
             string transmode = cols[6];
@@ -141,84 +141,84 @@ namespace DVB {
                 bandwidth, transmode, code_rate_hp,
                 code_rate_lp, constellation, guard);
         }
-        
+
         protected override void prepare () {
             debug("Setting up pipeline for DVB-T scan");
-        
+
             Gst.Element dvbsrc = ((Gst.Bin)base.pipeline).get_by_name ("dvbsrc");
-            
+
             base.set_uint_property (dvbsrc, base.current_tuning_params, "frequency");
-            
+
             uint bandwidth;
             this.current_tuning_params.get_uint ("bandwidth", out bandwidth);
             dvbsrc.set ("bandwidth", get_bandwidth_val (bandwidth));
-            
+
             uint hierarchy;
             this.current_tuning_params.get_uint ("hierarchy", out hierarchy);
             dvbsrc.set ("hierarchy", get_hierarchy_val (hierarchy));
-            
+
             string constellation = this.current_tuning_params.get_string ("constellation");
             dvbsrc.set ("modulation", get_modulation_val (constellation));
-                
+
             dvbsrc.set ("code-rate-hp", get_code_rate_val (
                 this.current_tuning_params.get_string ("code-rate-hp")));
             dvbsrc.set ("code-rate-lp", get_code_rate_val (
                 this.current_tuning_params.get_string ("code-rate-lp")));
-            
+
             uint guard;
             this.current_tuning_params.get_uint ("guard-interval", out guard);
             dvbsrc.set ("guard", get_guard_interval_val (guard));
-            
+
             string transmode = this.current_tuning_params.get_string ("transmission-mode");
             dvbsrc.set ("trans-mode", get_transmission_mode_val (transmode));
         }
-        
+
         protected override ScannedItem get_scanned_item (Gst.Structure structure) {
             uint freq;
             structure.get_uint ("frequency", out freq);
             return new ScannedItem (freq);
         }
-        
+
         protected override Channel get_new_channel () {
             return new TerrestrialChannel.without_schedule ();
         }
-        
+
         protected override void add_values_from_structure_to_channel (
             Gst.Structure delivery, Channel channel) {
             if (!(channel is TerrestrialChannel)) return;
-            
+
             TerrestrialChannel tc = (TerrestrialChannel)channel;
-            
+
             // structure doesn't contain information about inversion
             // set it to auto
             tc.Inversion = DvbSrcInversion.INVERSION_AUTO;
-            
+
             uint freq;
             delivery.get_uint ("frequency", out freq);
             tc.Frequency = freq;
-            
+
             uint bandwidth;
             delivery.get_uint ("bandwidth", out bandwidth);
             tc.Bandwidth = get_bandwidth_val (bandwidth);
-            
+
             uint hierarchy;
             delivery.get_uint ("hierarchy", out hierarchy);
             tc.Hierarchy = get_hierarchy_val (hierarchy);
-            
+
             string constellation = delivery.get_string ("constellation");
             tc.Constellation = get_modulation_val (constellation);
-            
+
             tc.CodeRateHP = get_code_rate_val (delivery.get_string ("code-rate-hp"));
             tc.CodeRateLP = get_code_rate_val (delivery.get_string ("code-rate-lp"));
-            
+
             uint guard;
             delivery.get_uint ("guard-interval", out guard);
             tc.GuardInterval = get_guard_interval_val (guard);
-            
+
             string transmode = delivery.get_string ("transmission-mode");
             tc.TransmissionMode = get_transmission_mode_val (transmode);
         }
-        
+
     }
-    
+
 }
diff --git a/src/Timer.vala b/src/Timer.vala
index d45b073..2e1cbb5 100644
--- a/src/Timer.vala
+++ b/src/Timer.vala
@@ -25,23 +25,23 @@ namespace DVB {
      * This class represents an event that should be recorded
      */
     public class Timer : GLib.Object {
-    
+
         public uint32 Id {get; construct;}
         public Channel Channel {get; construct;}
         public uint Duration {get; set;}
         public Gst.Element sink {get; set;}
         public uint EventID {get; set;}
-        
+
         private Time starttime;
-        
+
         public Timer (uint32 id, Channel channel,
         int year, int month, int day, int hour, int minute, uint duration) {
             base (Id: id, Channel: channel);
 
             this.EventID = 0;
-           
+
             this.Duration = duration;
-            
+
             this.set_start_time (year, month, day, hour, minute);
         }
 
@@ -52,21 +52,21 @@ namespace DVB {
                 day, hour, minute);
             this.update_epg_event ();
         }
-        
+
         /**
          * Whether the timer conflicts with the other one
          */
         public bool conflicts_with (Timer t2) {
             time_t this_start = this.get_start_time_timestamp ();
             time_t other_start = t2.get_start_time_timestamp ();
-            
+
             Channel t1_c = this.Channel;
             Channel t2_c = t2.Channel;
             if (t1_c.on_same_transport_stream (t2_c)) {
                 // Recordings on the same TS never conflict
                 return false;
             }
-            
+
             if (this_start <= other_start) {
                 // No conflict when this timer ends before other starts
                 time_t this_end = this.get_end_time_timestamp ();
@@ -77,7 +77,7 @@ namespace DVB {
                 return (other_end > this_start);
             }
         }
-        
+
         /**
          * @duration: in minutes
          * @returns: The overlap between the timer and the given time range.
@@ -91,16 +91,16 @@ namespace DVB {
                 uint duration) {
             time_t this_start = this.get_start_time_timestamp ();
             time_t this_end = this.get_end_time_timestamp ();
-            
+
             Time other_time = Utils.create_time ((int)start_year, (int)start_month,
                 (int)start_day, (int)start_hour, (int)start_minute);
             time_t other_start = other_time.mktime ();
             other_time.minute += (int)duration;
             time_t other_end = other_time.mktime ();
-            
+
             return get_overlap (this_start, this_end, other_start, other_end);
-        }   
-        
+        }
+
         /**
          * Same as get_overlap_local but the given time range is UTC time.
          */
@@ -109,19 +109,19 @@ namespace DVB {
                 uint duration) {
             time_t this_start = this.get_start_time_timestamp ();
             time_t this_end = this.get_end_time_timestamp ();
-            
+
             Time other_time = Utils.create_time ((int)start_year, (int)start_month,
                 (int)start_day, (int)start_hour, (int)start_minute);
             time_t other_start = cUtils.timegm (other_time);
             other_time.minute += (int)duration;
             time_t other_end = cUtils.timegm (other_time);
-                
+
             return get_overlap (this_start, this_end, other_start, other_end);
         }
-            
+
         private static OverlapType get_overlap (time_t this_start, time_t this_end,
                 time_t other_start, time_t other_end) {
-            
+
             if (this_start <= other_start) {
                 // No conflict when this timer ends before other starts
                 if (this_end <= other_start) {
@@ -134,7 +134,7 @@ namespace DVB {
                     else
                         // this starts before other and ends before other
                         return OverlapType.PARTIAL;
-                }   
+                }
             } else {
                 // No conflict when other timer ends before this starts
                 if (this_end <= other_end) {
@@ -150,7 +150,7 @@ namespace DVB {
                 }
             }
         }
-        
+
         /**
          * Add the specified amount of minutes to the starting time
          */
@@ -158,7 +158,7 @@ namespace DVB {
             this.starttime.minute += minutes;
             this.starttime.mktime ();
         }
-              
+
         public uint[] get_start_time () {
             uint[] start = new uint[] {
                 this.starttime.year + 1900,
@@ -169,14 +169,14 @@ namespace DVB {
             };
             return start;
         }
-        
+
         public Time get_start_time_time () {
              return this.starttime;
         }
-        
+
         public uint[] get_end_time () {
             var l = Time.local (this.get_end_time_timestamp ());
-            
+
             return new uint[] {
                 l.year + 1900,
                 l.month + 1,
@@ -185,37 +185,37 @@ namespace DVB {
                 l.minute
             };
         }
-        
+
         /**
          * Whether the start time of the timer is after the current local time
          * and the timer hasn't expired, yet.
          */
         public bool is_start_due () {
             var localtime = time_t ();
-            
+
             return (localtime - this.starttime.mktime () >= 0
                 && !this.has_expired ());
         }
-        
+
         /**
          * Whether the end time of the timer equals the current local time
          */
         public bool is_end_due () {
             var localtime = Time.local (time_t ());
             var endtime = Time.local (this.get_end_time_timestamp ());
-            
+
             return (endtime.year == localtime.year && endtime.month == localtime.month
                     && endtime.day == localtime.day && endtime.hour == localtime.hour
                     && endtime.minute == localtime.minute);
         }
-        
+
         /**
          * Whether the timer ends in the past
          */
         public bool has_expired () {
             time_t current_time = time_t ();
             time_t end_time = this.get_end_time_timestamp ();
-            
+
             return (end_time < current_time);
         }
 
@@ -243,18 +243,18 @@ namespace DVB {
             var t = Utils.create_time (this.starttime.year + 1900,
                 this.starttime.month + 1, this.starttime.day,
                 this.starttime.hour, this.starttime.minute);
-            
+
             // TODO Do we change the value of this.starttime each time?
             t.minute += (int)this.Duration;
-            
+
             return t.mktime ();
         }
-        
+
         private time_t get_start_time_timestamp () {
             var t = this.get_start_time_time ();
             return t.mktime ();
         }
-    
+
     }
 
 }
diff --git a/src/Utils.vala b/src/Utils.vala
index bd99c23..3ddbf22 100644
--- a/src/Utils.vala
+++ b/src/Utils.vala
@@ -23,11 +23,11 @@ namespace DVB.Utils {
 
     private const string NAME_ATTRS = FileAttribute.STANDARD_TYPE + "," + FileAttribute.STANDARD_NAME;
     private const string READ_ATTRS = FileAttribute.STANDARD_TYPE + "," + FileAttribute.ACCESS_CAN_READ;
-        
+
     public static inline unowned string? get_nick_from_enum (GLib.Type enumtype, int val) {
         EnumClass eclass = (EnumClass)enumtype.class_ref ();
         unowned EnumValue? eval = eclass.get_value (val);
-        
+
         if (eval == null) {
             Main.log.error ("Enum has no value %d", val);
             return null;
@@ -35,11 +35,11 @@ namespace DVB.Utils {
             return eval.value_nick;
         }
     }
-    
+
     public static inline bool get_value_by_name_from_enum (GLib.Type enumtype, string name, out int evalue) {
         EnumClass enumclass = (EnumClass)enumtype.class_ref ();
         unowned EnumValue? eval = enumclass.get_value_by_name (name);
-        
+
         if (eval == null) {
             Main.log.error ("Enum has no member named %s", name);
             evalue = 0;
@@ -49,11 +49,11 @@ namespace DVB.Utils {
             return true;
         }
     }
-    
+
     public static inline unowned string? get_name_by_value_from_enum (GLib.Type enumtype, int val) {
         EnumClass enumclass = (EnumClass)enumtype.class_ref ();
         unowned EnumValue? eval = enumclass.get_value (val);
-        
+
         if (eval == null) {
             Main.log.error ("Enum has no value %d", val);
             return null;
@@ -61,23 +61,23 @@ namespace DVB.Utils {
             return eval.value_name;
         }
     }
-    
+
     public static void mkdirs (File directory) throws Error {
         SList<File> create_dirs = new SList<File> ();
-        
+
         File current_dir = directory;
         while (current_dir != null) {
             if (current_dir.query_exists (null)) break;
             create_dirs.prepend (current_dir);
             current_dir = current_dir.get_parent ();
         }
-        
+
         foreach (File dir in create_dirs) {
             Main.log.debug ("Creating %s", dir.get_path ());
             dir.make_directory (null);
         }
     }
-    
+
     public static string remove_nonalphanums (string text) {
         Regex regex;
         try {
@@ -86,7 +86,7 @@ namespace DVB.Utils {
             Main.log.error ("RegexError: %s", e.message);
             return text;
         }
-        
+
         string new_text;
         try {
             new_text = regex.replace_literal (text, -1, 0, "_", 0);
@@ -94,56 +94,56 @@ namespace DVB.Utils {
             Main.log.error ("RegexError: %s", e.message);
             return text;
         }
-        
+
         return new_text;
     }
-    
+
     /**
      * @returns: Difference in seconds
-     */ 
+     */
     public static inline time_t difftime (Time t1, Time t2) {
         time_t ts1 = t1.mktime ();
         time_t ts2 = t2.mktime ();
-        
+
         time_t diff = ts1 - ts2;
         if (diff < 0) return -1*diff;
         else return diff;
     }
-    
+
     /**
      * Creates Time of local time
      */
     public static inline Time create_time (int year, int month, int day, int hour,
         int minute, int second=0) {
-        
+
         assert (year >= 1900 && month >= 1 && day >= 1 && hour >= 0 && minute >= 0
             && second >= 0);
-        
+
         // Create Time with some initial value, otherwise time is wrong
         var t = Time.local (time_t ());
-        
+
         t.year = year - 1900;
         t.month = month - 1;
         t.day = day;
         t.hour = hour;
         t.minute = minute;
         t.second = second;
-        
+
         return t;
     }
-    
+
     /**
      * Creates Time of UTC time
      */
     public static inline Time create_utc_time (int year, int month, int day, int hour,
         int minute, int second=0) {
-        
+
         assert (year >= 1900 && month >= 1 && day >= 1 && hour >= 0 && minute >= 0
             && second >= 0);
-        
+
         // Create Time with some initial value, otherwise time is wrong
         var t = Time.gm (time_t ());
-        
+
         t.year = year - 1900;
         t.month = month - 1;
         t.day = day;
@@ -151,7 +151,7 @@ namespace DVB.Utils {
         t.minute = minute;
         t.second = second;
         t.isdst = -1; // undefined
-        
+
         return t;
     }
 
@@ -163,12 +163,12 @@ namespace DVB.Utils {
             Main.log.error ("Could not retrieve attributes: %s", e.message);
             return false;
         }
-        
+
         if (info.get_file_type () != FileType.REGULAR) {
             Main.log.error ("%s is not a regular file", file.get_path ());
             return false;
         }
-        
+
         if (!info.get_attribute_boolean (FileAttribute.ACCESS_CAN_READ)) {
             Main.log.error ("Cannot read %s", file.get_path ());
             return false;
@@ -181,26 +181,26 @@ namespace DVB.Utils {
         FileEnumerator files;
         files = dir.enumerate_children (NAME_ATTRS, 0, null);
         if (files == null) return;
-        
+
         FileInfo childinfo;
         while ((childinfo = files.next_file (null)) != null) {
             uint32 type = childinfo.get_attribute_uint32 (
                 FileAttribute.STANDARD_TYPE);
-            
+
             File child = dir.get_child (childinfo.get_name ());
-        
+
             switch (type) {
                 case FileType.DIRECTORY:
                 delete_dir_recursively (child);
                 break;
-                
+
                 case FileType.REGULAR:
                 Main.log.debug ("Deleting file %s", child.get_path ());
                 child.delete (null);
                 break;
             }
         }
-        
+
         Main.log.debug ("Deleting directory %s", dir.get_path ());
         dir.delete (null);
     }
diff --git a/src/database/ConfigStore.vala b/src/database/ConfigStore.vala
index 49a614e..2fed09f 100644
--- a/src/database/ConfigStore.vala
+++ b/src/database/ConfigStore.vala
@@ -22,7 +22,7 @@ using GLib;
 namespace DVB.database {
 
     public interface ConfigStore : GLib.Object {
-        
+
         public abstract Gee.List<DeviceGroup> get_all_device_groups () throws SqlError;
         public abstract bool add_device_group (DeviceGroup dev_group) throws SqlError;
         public abstract bool remove_device_group (DeviceGroup devgroup) throws SqlError;
@@ -38,7 +38,7 @@ namespace DVB.database {
         public abstract Gee.List<uint> get_channels_of_group (uint dev_group_id, int channel_group_id) throws SqlError;
         public abstract bool add_channel_to_group (Channel channel, int group_id) throws SqlError;
         public abstract bool remove_channel_from_group (Channel channel, int group_id) throws SqlError;
-        
+
     }
 
 }
diff --git a/src/database/EPGStore.vala b/src/database/EPGStore.vala
index 3d235db..75a381d 100644
--- a/src/database/EPGStore.vala
+++ b/src/database/EPGStore.vala
@@ -22,7 +22,7 @@ using GLib;
 namespace DVB.database {
 
     public interface EPGStore : GLib.Object {
-     
+
         public abstract bool add_or_update_event (Event event, uint channel_sid, uint group_id) throws SqlError;
         public abstract Event? get_event (uint event_id, uint channel_sid, uint group_id) throws SqlError;
         public abstract bool remove_event (uint event_id, uint channel_sid, uint group_id) throws SqlError;
@@ -30,7 +30,7 @@ namespace DVB.database {
         public abstract bool contains_event (Event event, uint channel_sid, uint group_id) throws SqlError;
         public abstract Gee.List<Event> get_events (uint channel_sid, uint group_id) throws SqlError;
         public abstract bool remove_events_of_group (uint group_id) throws SqlError;
-        
+
     }
 
 }
diff --git a/src/database/TimersStore.vala b/src/database/TimersStore.vala
index ab4b9c4..0612474 100644
--- a/src/database/TimersStore.vala
+++ b/src/database/TimersStore.vala
@@ -22,7 +22,7 @@ using GLib;
 namespace DVB.database {
 
     public interface TimersStore : GLib.Object {
-        
+
         public abstract Gee.List<Timer> get_all_timers_of_device_group (DeviceGroup dev) throws SqlError;
         public abstract bool add_timer_to_device_group (Timer timer, DeviceGroup dev) throws SqlError;
         public abstract bool remove_timer_from_device_group (uint timer_id, DeviceGroup dev) throws SqlError;
diff --git a/src/database/sqlite/SqliteDatabase.vala b/src/database/sqlite/SqliteDatabase.vala
index 78cd1cb..766950d 100644
--- a/src/database/sqlite/SqliteDatabase.vala
+++ b/src/database/sqlite/SqliteDatabase.vala
@@ -28,7 +28,7 @@ namespace DVB.database.sqlite {
         private static Logger log = LogManager.getLogManager().getDefaultLogger();
 
         public File database_file {get; construct;}
-        
+
         protected Database db;
         private int new_version;
 
@@ -54,14 +54,14 @@ namespace DVB.database.sqlite {
                     log.error ("Could not create directory: %s", e.message);
                     return;
                 }
-            }                
+            }
 
             if (Database.open (dbfile.get_path (), out this.db) != Sqlite.OK) {
                 this.throw_last_error ();
             }
 
             int version = this.get_version ();
-            
+
             if (create_tables) {
                 log.debug ("Creating tables");
                 this.create ();
diff --git a/src/database/sqlite/SqliteEPGStore.vala b/src/database/sqlite/SqliteEPGStore.vala
index 242aa43..b2fb980 100644
--- a/src/database/sqlite/SqliteEPGStore.vala
+++ b/src/database/sqlite/SqliteEPGStore.vala
@@ -30,7 +30,7 @@ namespace DVB.database.sqlite {
 
         private static const int VERSION = 2;
 
-        private static const string CREATE_EVENTS_TABLE_STATEMENT = 
+        private static const string CREATE_EVENTS_TABLE_STATEMENT =
             """CREATE TABLE events (group_id INTEGER,
             sid INTEGER,
             event_id INTEGER,
@@ -43,12 +43,12 @@ namespace DVB.database.sqlite {
             extended_description TEXT,
             PRIMARY KEY (group_id, sid, event_id))""";
 
-        private static const string INSERT_EVENT_SQL = 
+        private static const string INSERT_EVENT_SQL =
             "INSERT INTO events VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
-            
-        private static const string DELETE_EVENT_STATEMENT = 
+
+        private static const string DELETE_EVENT_STATEMENT =
             "DELETE FROM events WHERE group_id=? AND sid=? AND event_id=?";
-            
+
         private static const string SELECT_ALL_EVENTS_STATEMENT =
             """SELECT event_id, datetime(starttime),
             duration, running_status, free_ca_mode, name,
@@ -59,31 +59,31 @@ namespace DVB.database.sqlite {
             """SELECT event_id, datetime(starttime),
             duration FROM events WHERE group_id='%u' AND sid='%u'
             ORDER BY starttime ASC""";
-            
+
         private static const string HAS_EVENT_STATEMENT =
             "SELECT 1 FROM events WHERE group_id=? AND sid=? AND event_id=? LIMIT 1";
-            
+
         private static const string UPDATE_EVENT_SQL =
             """UPDATE events SET starttime=?, duration=?, running_status=?,
             free_ca_mode=?, name=?, description=?,
             extended_description=? WHERE group_id=? AND sid=? AND event_id=?""";
-            
+
         private static const string TO_JULIAN_SQL =
             "SELECT julianday(?)";
-            
+
         private static const string SELECT_EVENT_SQL =
             """SELECT event_id, datetime(starttime),
             duration, running_status, free_ca_mode, name,
             description, extended_description
             FROM events WHERE group_id=? AND sid=? AND event_id=?""";
-            
+
         private static const string DELETE_EVENTS_GROUP =
         "DELETE FROM events WHERE group_id=?";
 
         private static const string DELETE_EXPIRED_EVENTS =
         """DELETE FROM events WHERE starttime <= julianday(?, 'unixepoch')
         AND sid=? AND group_id=?""";
-            
+
         private Statement to_julian_statement;
         private Statement insert_event_statement;
         private Statement update_event_statement;
@@ -138,19 +138,19 @@ namespace DVB.database.sqlite {
                 uint group_id) throws SqlError
         {
             int free_ca_mode = (event.free_ca_mode) ? 1 : 0;
-            
+
             string name = SqliteUtils.escape (event.name);
             string desc = SqliteUtils.escape (event.description);
             string ext_desc = SqliteUtils.escape (event.extended_description);
             double julian_start = this.to_julian (event.year, event.month,
                 event.day, event.hour, event.minute, event.second);
-            
+
             // Check if start time got converted correctly
             if (julian_start <= 0) {
                 log.warning ("Failed to convert start time");
                 return false;
             }
-            
+
             if (this.contains_event (event, channel_sid, group_id)) {
                 if (this.update_event_statement.bind_double (1, julian_start) != Sqlite.OK
                         || this.update_event_statement.bind_int (2, (int)event.duration) != Sqlite.OK
@@ -165,7 +165,7 @@ namespace DVB.database.sqlite {
                     this.throw_last_error ();
                     return false;
                 }
-                
+
                 if (this.update_event_statement.step () != Sqlite.DONE) {
                     this.throw_last_error_reset (this.update_event_statement);
                     return false;
@@ -186,7 +186,7 @@ namespace DVB.database.sqlite {
                     this.throw_last_error ();
                     return false;
                 }
-                
+
                 if (this.insert_event_statement.step () != Sqlite.DONE) {
                     this.throw_last_error_reset (this.insert_event_statement);
                     return false;
@@ -196,7 +196,7 @@ namespace DVB.database.sqlite {
             }
             return true;
         }
-        
+
         public Event? get_event (uint event_id, uint channel_sid,
                 uint group_id) throws SqlError
         {
@@ -206,24 +206,24 @@ namespace DVB.database.sqlite {
                 this.throw_last_error ();
                 return null;
             }
-            
+
             int rc = this.select_event_statement.step ();
-            
+
             if (rc != Sqlite.ROW && rc != Sqlite.DONE) {
                 this.throw_last_error_reset (this.select_event_statement);
                 return null;
             }
-            
+
             // ROW means there's data, DONE means there's none
             Event? event = null;
             if (rc != Sqlite.DONE) {
                 event = this.create_event_from_statement (this.select_event_statement);
-            }                
+            }
             this.select_event_statement.reset ();
 
             return event;
         }
-        
+
         public bool remove_event (uint event_id, uint channel_sid,
                 uint group_id) throws SqlError
         {
@@ -233,14 +233,14 @@ namespace DVB.database.sqlite {
                 this.throw_last_error ();
                 return false;
             }
-            
+
             if (this.delete_event_statement.step () != Sqlite.DONE) {
                 this.throw_last_error_reset (this.delete_event_statement);
                 return false;
             }
-  
+
             this.delete_event_statement.reset ();
-                      
+
             return true;
         }
 
@@ -266,7 +266,7 @@ namespace DVB.database.sqlite {
 
             return true;
         }
-        
+
         public bool contains_event (Event event, uint channel_sid, uint group_id) throws SqlError
         {
             if (this.has_event_statement.bind_int (1, (int)group_id) != Sqlite.OK
@@ -275,64 +275,64 @@ namespace DVB.database.sqlite {
                 this.throw_last_error ();
                 return false;
             }
-            
+
             int c = 0;
             while (this.has_event_statement.step () == Sqlite.ROW) {
                 c = this.has_event_statement.column_int (0);
             }
-     
+
             this.has_event_statement.reset ();
-                   
+
             return (c > 0);
         }
-        
+
         public Gee.List<Event> get_events (uint channel_sid, uint group_id)
                 throws SqlError
         {
             Gee.List<Event> events = new ArrayList<Event> ();
-            
+
             if (this.db == null) {
                 log.warning ("DB not initialized");
                 return events;
             }
-            
+
             string statement_str = SELECT_MINIMAL_EVENTS_STATEMENT.printf (
                 group_id, channel_sid);
-            
+
             Statement statement;
             if (this.db.prepare (statement_str, -1, out statement) != Sqlite.OK) {
                 this.throw_last_error ();
                 return events;
             }
-            
+
             while (statement.step () == Sqlite.ROW) {
                 Event event = this.create_minimal_event (statement);
                 events.add (event);
             }
-            
+
             return events;
         }
-        
+
         public bool remove_events_of_group (uint group_id) throws SqlError {
             if (this.delete_events_group.bind_int (1, (int)group_id) != Sqlite.OK) {
                 this.throw_last_error ();
                 return false;
             }
-            
+
             if (this.delete_events_group.step () != Sqlite.DONE) {
                 this.throw_last_error_reset (this.delete_events_group);
                 return false;
             }
-            
+
             this.delete_events_group.reset ();
-            
+
             return true;
         }
 
         private Event create_minimal_event (Statement statement) {
             var event = new Event ();
             event.id = (uint)statement.column_int (0);
-            
+
             weak string starttime = statement.column_text (1);
             starttime.scanf ("%04u-%02u-%02u %02u:%02u:%02u",
                 &event.year,
@@ -341,16 +341,16 @@ namespace DVB.database.sqlite {
                 &event.hour,
                 &event.minute,
                 &event.second);
-            
+
             event.duration = (uint)statement.column_int (2);
 
             return event;
         }
-        
+
         private Event create_event_from_statement (Statement statement) {
             var event = new Event ();
             event.id = (uint)statement.column_int (0);
-            
+
             weak string starttime = statement.column_text (1);
             starttime.scanf ("%04u-%02u-%02u %02u:%02u:%02u",
                 &event.year,
@@ -359,7 +359,7 @@ namespace DVB.database.sqlite {
                 &event.hour,
                 &event.minute,
                 &event.second);
-            
+
             event.duration = (uint)statement.column_int (2);
             event.running_status = (uint)statement.column_int (3);
             event.free_ca_mode = (statement.column_int (4) == 1);
@@ -373,7 +373,7 @@ namespace DVB.database.sqlite {
             event.audio_components = null;
             event.video_components = null;
             event.teletext_components = null;
-            
+
             return event;
         }
 
@@ -382,20 +382,20 @@ namespace DVB.database.sqlite {
 
             string datetime_str = "%04u-%02u-%02u %02u:%02u:%02u".printf (
                 year, month, day, hour, minute, second);
-            
+
             if (this.to_julian_statement.bind_text (1, datetime_str)
                     != Sqlite.OK) {
                 this.throw_last_error ();
-                return 0;       
+                return 0;
             }
-            
+
             if (this.to_julian_statement.step () != Sqlite.ROW) {
                 this.throw_last_error ();
                 return 0;
             }
-            
+
             double val = this.to_julian_statement.column_double (0);
-            
+
             this.to_julian_statement.reset ();
 
             return val;
diff --git a/src/database/sqlite/SqliteUtils.vala b/src/database/sqlite/SqliteUtils.vala
index 6bb608b..7aee201 100644
--- a/src/database/sqlite/SqliteUtils.vala
+++ b/src/database/sqlite/SqliteUtils.vala
@@ -26,7 +26,7 @@ namespace DVB.database.SqliteUtils {
      */
     public static string escape (string? text) {
         if (text == null) return "";
-    
+
         Regex regex;
         try {
             regex = new Regex ("'",
@@ -36,7 +36,7 @@ namespace DVB.database.SqliteUtils {
             warning ("RegexError: %s", e.message);
             return text;
         }
-        
+
         string escaped_str;
         try {
             escaped_str = regex.replace_literal (text, -1,
@@ -45,10 +45,10 @@ namespace DVB.database.SqliteUtils {
             warning ("RegexError: %s", e.message);
             return text;
         }
-        
+
         return escaped_str;
     }
-    
+
     /**
      * Replace "''" with "'"
      */
@@ -62,7 +62,7 @@ namespace DVB.database.SqliteUtils {
             warning ("RegexError: %s", e.message);
             return text;
         }
-        
+
         string new_str;
         try {
             new_str = regex.replace_literal (text, -1,
@@ -71,7 +71,7 @@ namespace DVB.database.SqliteUtils {
             warning ("RegexError: %s", e.message);
             return text;
         }
-        
+
         return new_str;
     }
 
diff --git a/src/dbus/IDBusChannelList.vala b/src/dbus/IDBusChannelList.vala
index 6ca093e..8bec53a 100644
--- a/src/dbus/IDBusChannelList.vala
+++ b/src/dbus/IDBusChannelList.vala
@@ -27,27 +27,27 @@ namespace DVB {
 
 	[DBus (name = "org.gnome.DVB.ChannelList")]
 	public interface IDBusChannelList : GLib.Object {
-	
+
 		/**
          * @type: 0: added, 1: deleted, 2: updated
          */
         public abstract signal void changed (uint channel_id, uint type);
-        
+
         /**
          * @returns: List of channel IDs aka SIDs of all channels
          */
         public abstract uint[] GetChannels () throws DBusError;
-        
+
         /**
          * @returns: List of channel IDs aka SIDs of radio channels
          */
         public abstract uint[] GetRadioChannels () throws DBusError;
-        
+
         /**
          * @returns: List of channel IDs aka SIDs of TV channels
          */
         public abstract uint[] GetTVChannels () throws DBusError;
-        
+
         /**
          * @channel_id: ID of channel
          * @channel_name: Name of channel if channel with id exists
@@ -55,7 +55,7 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool GetChannelName (uint channel_id, out string channel_name) throws DBusError;
-        
+
         /**
          * @channel_id: ID of channel
          * @network: Name of network the channel belongs to
@@ -64,21 +64,21 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool GetChannelNetwork (uint channel_id, out string network) throws DBusError;
-        
+
         /**
          * @channel_id: ID of channel
          * @radio: Whether the channel is a radio channel or not
          * @returns: TRUE on success
          */
         public abstract bool IsRadioChannel (uint channel_id, out bool radio) throws DBusError;
-        
+
         /**
          * @channel_id: ID of channel
          * @url: URL to watch the channel
          * @returns: TRUE on success
          */
         public abstract bool GetChannelURL (uint channel_id, out string url) throws DBusError;
-        
+
         public abstract ChannelInfo[] GetChannelInfos () throws DBusError;
 
 		/**
@@ -99,7 +99,7 @@ namespace DVB {
 		 * @channel_id: ID of channel
 	     * @channel_group_id: ID of the ChannelGroup
          * @returns: TRUE on success
-         */       
+         */
 		public abstract bool RemoveChannelFromGroup (uint channel_id, int channel_group_id) throws DBusError;
 	}
 
diff --git a/src/dbus/IDBusDeviceGroup.vala b/src/dbus/IDBusDeviceGroup.vala
index 6937a53..d3c7558 100644
--- a/src/dbus/IDBusDeviceGroup.vala
+++ b/src/dbus/IDBusDeviceGroup.vala
@@ -26,20 +26,20 @@ namespace DVB {
 
         public abstract signal void device_added (uint adapter, uint frontend);
         public abstract signal void device_removed (uint adapter, uint frontend);
-    
+
         /**
          * @returns: Name of adapter type the group holds
          * or an empty string when group with given id doesn't exist.
          */
         public abstract string GetType () throws DBusError;
-        
+
         /**
          * @returns: Object path of the device's recorder
-         * 
+         *
          * Returns the object path to the device's recorder.
          */
         public abstract ObjectPath GetRecorder () throws DBusError;
-               
+
          /**
          * @adapter: Number of the device's adapter
          * @frontend: Number of the device's frontend
@@ -50,8 +50,8 @@ namespace DVB {
          * The new device will inherit all settings from the group's
          * reference device.
          */
-        public abstract bool AddDevice (uint adapter, uint frontend) throws DBusError; 
-              
+        public abstract bool AddDevice (uint adapter, uint frontend) throws DBusError;
+
         /**
          * @adapter: Number of the device's adapter
          * @frontend: Number of the device's frontend
@@ -61,29 +61,29 @@ namespace DVB {
          * no devices after the removal it's removed as well.
          */
         public abstract bool RemoveDevice (uint adapter, uint frontend) throws DBusError;
-            
+
         /**
          * @returns: Object path to the ChannelList service for this device
          */
         public abstract ObjectPath GetChannelList () throws DBusError;
-        
+
         /**
          * @returns: Name of the device group
          */
         public abstract string GetName () throws DBusError;
-        
+
         /**
          * @name: Name of the group
          * @returns: TRUE on success
          */
         public abstract bool SetName (string name) throws DBusError;
-        
+
         /**
          * @returns: List of paths to the devices that are part of
          * the group (e.g. /dev/dvb/adapter0/frontend0)
          */
         public abstract string[] GetMembers () throws DBusError;
-        
+
         /**
          * @channel_sid: ID of the channel
          * @opath: Object path to Schedule service
@@ -95,7 +95,7 @@ namespace DVB {
          * @returns: Location of the recordings directory
          */
         public abstract string GetRecordingsDirectory () throws DBusError;
-        
+
         /**
          * @location: Location of the recordings directory
          * @returns: TRUE on success
@@ -103,5 +103,5 @@ namespace DVB {
         public abstract bool SetRecordingsDirectory (string location) throws DBusError;
 
     }
-    
+
 }
diff --git a/src/dbus/IDBusManager.vala b/src/dbus/IDBusManager.vala
index cc52442..9341349 100644
--- a/src/dbus/IDBusManager.vala
+++ b/src/dbus/IDBusManager.vala
@@ -33,10 +33,10 @@ namespace DVB {
 
     [DBus (name = "org.gnome.DVB.Manager")]
     public interface IDBusManager : GLib.Object {
-    
+
         public abstract signal void group_added (uint group_id);
         public abstract signal void group_removed (uint group_id);
-         
+
         /**
          * @adapter: Number of the device's adapter
          * @frontend: Number of the device's frontend
@@ -48,19 +48,19 @@ namespace DVB {
          */
         public abstract bool GetScannerForDevice (uint adapter, uint frontend,
                 out ObjectPath opath, out string dbusiface) throws DBusError;
-        
+
         /**
          * @returns: Device groups' DBus path
          */
         public abstract ObjectPath[] GetRegisteredDeviceGroups () throws DBusError;
-        
+
         /**
          * @group_id: A group ID
          * @opath: Device group's DBus path
          * @returns: TRUE on success
          */
         public abstract bool GetDeviceGroup (uint group_id, out ObjectPath opath) throws DBusError;
-        
+
         /**
          * @adapter: Number of the device's adapter
          * @frontend: Number of the device's frontend
@@ -88,7 +88,7 @@ namespace DVB {
          */
         public abstract bool GetNameOfRegisteredDevice (uint adapter, uint frontend,
         	out string name) throws DBusError;
-        
+
         /**
          * @returns: the numner of configured device groups
          */
diff --git a/src/dbus/IDBusRecorder.vala b/src/dbus/IDBusRecorder.vala
index 5f0891e..13fe62f 100644
--- a/src/dbus/IDBusRecorder.vala
+++ b/src/dbus/IDBusRecorder.vala
@@ -29,15 +29,15 @@ namespace DVB {
 
     [DBus (name = "org.gnome.DVB.Recorder")]
     public interface IDBusRecorder : GLib.Object {
-    
+
         public abstract signal void recording_started (uint32 timer_id);
         public abstract signal void recording_finished (uint32 recording_id);
-        
+
         /**
          * @type: 0: added, 1: deleted, 2: updated
          */
         public abstract signal void changed (uint32 timer_id, uint type);
-        
+
         /**
          * @channel: Channel number
          * @start_year: The year when the recording should start
@@ -49,13 +49,13 @@ namespace DVB {
          * @timer_id: The new timer's id on success, or 0 if timer couldn't
          * be created
          * @returns: TRUE on success
-         * 
+         *
          * Add a new timer
          */
         public abstract bool AddTimer (uint channel,
             int start_year, int start_month, int start_day,
             int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBusError;
-        
+
          /**
          * Works the same way as AddTimer() but adds a margin before and
          * after the timer.
@@ -63,7 +63,7 @@ namespace DVB {
         public abstract bool AddTimerWithMargin (uint channel,
             int start_year, int start_month, int start_day,
             int start_hour, int start_minute, uint duration, out uint32 timer_id) throws DBusError;
-        
+
         /**
          * @event_id: id of the EPG event
          * @channel_sid: SID of channel
@@ -73,7 +73,7 @@ namespace DVB {
          */
         public abstract bool AddTimerForEPGEvent (uint event_id,
             uint channel_sid, out uint32 timer_id) throws DBusError;
-            
+
         /**
          * @timer_id: The id of the timer you want to delete
          * @returns: TRUE on success
@@ -82,13 +82,13 @@ namespace DVB {
          * active timer recording is aborted.
          */
         public abstract bool DeleteTimer (uint32 timer_id) throws DBusError;
-        
+
         /**
          * dvb_recorder_GetTimers
          * @returns: A list of all timer ids
          */
         public abstract uint32[] GetTimers () throws DBusError;
-        
+
         /**
          * @timer_id: Timer's id
          * @start_time: An array of length 5, where index 0 = year, 1 = month,
@@ -109,14 +109,14 @@ namespace DVB {
          */
         public abstract bool SetStartTime (uint32 timer_id, int start_year,
             int start_month, int start_day, int start_hour, int start_minute) throws DBusError;
-        
+
         /**
          * @timer_id: Timer's id
          * @end_time: Same as dvb_recorder_GetStartTime()
          * @returns: TRUE on success
          */
         public abstract bool GetEndTime (uint32 timer_id, out uint[] end_time) throws DBusError;
-        
+
         /**
          * @timer_id: Timer's id
          * @duration: Duration in seconds or 0 if there's no timer with
@@ -131,7 +131,7 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool SetDuration (uint32 timer_id, uint duration) throws DBusError;
-        
+
         /**
          * @timer_id: Timer's id
          * @name: The name of the channel the timer belongs to or an
@@ -157,30 +157,30 @@ namespace DVB {
          * about a particular timer at once
          */
         public abstract bool GetAllInformations (uint32 timer_id, out TimerInfo info) throws DBusError;
-        
+
         /**
          * @returns: The currently active timers
          */
         public abstract uint32[] GetActiveTimers () throws DBusError;
-        
+
         /**
          * @timer_id: Timer's id
          * @returns: TRUE if timer is currently active
          */
         public abstract bool IsTimerActive (uint32 timer_id) throws DBusError;
-        
+
         /**
          * @returns: TRUE if a timer is already scheduled in the given
          * period of time
          */
         public abstract bool HasTimer (uint start_year, uint start_month,
             uint start_day, uint start_hour, uint start_minute, uint duration) throws DBusError;
-        
+
         /**
          * Checks if a timer overlaps with the given event
          */
         public abstract OverlapType HasTimerForEvent (uint event_id, uint channel_sid) throws DBusError;
-        
+
     }
 
 }
diff --git a/src/dbus/IDBusRecordingsStore.vala b/src/dbus/IDBusRecordingsStore.vala
index 0730b94..07545a1 100644
--- a/src/dbus/IDBusRecordingsStore.vala
+++ b/src/dbus/IDBusRecordingsStore.vala
@@ -31,24 +31,24 @@ namespace DVB {
 
     [DBus (name = "org.gnome.DVB.RecordingsStore")]
     public interface IDBusRecordingsStore : GLib.Object {
-        
+
         /**
          * @type: 0: added, 1: deleted, 2: updated
          */
         public abstract signal void changed (uint32 rec_id, uint type);
-        
+
         /**
          * @returns: A list of ids for all recordings
          */
         public abstract uint32[] GetRecordings () throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @location: The location of the recording on the filesystem
          * @returns: TRUE on success
          */
         public abstract bool GetLocation (uint32 rec_id, out string location) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @name: The name of the recording (e.g. the name of
@@ -56,7 +56,7 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool GetName (uint32 rec_id, out string name) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @description: A short text describing the recorded item
@@ -64,28 +64,28 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool GetDescription (uint32 rec_id, out string description) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @start_time: The starting time of the recording
          * @returns: TRUE on success
          */
         public abstract bool GetStartTime (uint32 rec_id, out uint[] start_time) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @timestamp: Start time as UNIX timestamp
          * @returns: TRUE on success
          */
         public abstract bool GetStartTimestamp (uint32 rec_id, out int64 timestamp) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @length: The length of the recording in seconds
          * @returns: TRUE on success
          */
         public abstract bool GetLength (uint32 rec_id, out int64 length) throws DBusError;
-        
+
          /**
          * @rec_id: The id of the recording
          * @returns: TRUE on success, FALSE otherwises
@@ -94,7 +94,7 @@ namespace DVB {
          * created by the Recorder
          */
         public abstract bool Delete (uint32 rec_id) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @name: The channel's name or an empty string if
@@ -102,7 +102,7 @@ namespace DVB {
          * @returns: TRUE on success
          */
         public abstract bool GetChannelName (uint32 rec_id, out string name) throws DBusError;
-        
+
         /**
          * @rec_id: The id of the recording
          * @returns: TRUE on success
@@ -111,7 +111,7 @@ namespace DVB {
          * about a particular recording at once
          */
         public abstract bool GetAllInformations (uint32 rec_id, out RecordingInfo infos) throws DBusError;
-        
+
     }
 
 }
diff --git a/src/dbus/IDBusScanner.vala b/src/dbus/IDBusScanner.vala
index 8833d9d..f71b0d2 100644
--- a/src/dbus/IDBusScanner.vala
+++ b/src/dbus/IDBusScanner.vala
@@ -42,7 +42,7 @@ namespace DVB {
          * @returns: TRUE when the file has been parsed successfully
          *
          * Parses initial tuning data from a file as provided by dvb-apps
-         */                             
+         */
         public abstract bool AddScanningDataFromFile (string path) throws DBusError;
     }
 }
diff --git a/src/dbus/IDBusSchedule.vala b/src/dbus/IDBusSchedule.vala
index 6905c79..303e7e9 100644
--- a/src/dbus/IDBusSchedule.vala
+++ b/src/dbus/IDBusSchedule.vala
@@ -32,45 +32,45 @@ namespace DVB {
 
     [DBus (name = "org.gnome.DVB.Schedule")]
     public interface IDBusSchedule : GLib.Object {
-    
+
         public abstract uint32[] GetAllEvents () throws DBusError;
-        
+
         public abstract EventInfo[] GetAllEventInfos () throws DBusError;
-        
+
         public abstract bool GetInformations (uint32 event_id, out EventInfo event_info) throws DBusError;
-    
+
         /**
          * @returns: ID of currently running event
          */
         public abstract uint32 NowPlaying () throws DBusError;
-        
+
         /**
          * @returnns: ID of event that follows the given event
          */
         public abstract uint32 Next (uint32 event_id) throws DBusError;
-        
+
         public abstract bool GetName (uint32 event_id, out string name) throws DBusError;
-        
+
         public abstract bool GetShortDescription (uint32 event_id, out string description) throws DBusError;
-        
+
         public abstract bool GetExtendedDescription (uint32 event_id, out string description) throws DBusError;
-        
+
         public abstract bool GetDuration (uint32 event_id, out uint duration) throws DBusError;
-        
+
         public abstract bool GetLocalStartTime (uint32 event_id, out uint[] start_time) throws DBusError;
-        
+
         public abstract bool GetLocalStartTimestamp (uint32 event_id, out int64 timestamp) throws DBusError;
-        
+
         public abstract bool IsRunning (uint32 event_id, out bool running) throws DBusError;
-        
+
         public abstract bool IsScrambled (uint32 event_id, out bool scrambled) throws DBusError;
         /*
         public abstract bool IsHighDefinition (uint32 event_id);
-        
+
         public abstract string GetAspectRatio (uint32 event_id);
-        
+
         public abstract string GetAudioType (uint32 event_id);
-        
+
         public abstract string GetTeletextType (uint32 event_id);
         */
     }
diff --git a/src/io/ChannelListReader.vala b/src/io/ChannelListReader.vala
index e558a3c..a07df10 100644
--- a/src/io/ChannelListReader.vala
+++ b/src/io/ChannelListReader.vala
@@ -28,17 +28,17 @@ namespace DVB.io {
 
         public ChannelList channels {get; construct;}
         public AdapterType Type {get; construct;}
-        
+
         public ChannelListReader (ChannelList channels, AdapterType type) {
             base (channels: channels, Type: type);
         }
 
         public void read_into () throws Error {
             return_if_fail (this.channels.channels_file != null);
-        
+
             var reader = new DataInputStream (
                 this.channels.channels_file.read (null));
-        	
+
         	string line = null;
         	size_t len;
         	while ((line = reader.read_line (out len, null)) != null) {
@@ -59,20 +59,20 @@ namespace DVB.io {
                 case AdapterType.DVB_T:
                 c = parse_terrestrial_channel (line);
                 break;
-                
+
                 case AdapterType.DVB_S:
                 c = parse_satellite_channel (line);
                 break;
-                
+
                 case AdapterType.DVB_C:
                 c = parse_cable_channel (line);
                 break;
-                
+
                 default:
                 log.error ("Unknown adapter type");
                 break;
             }
-            
+
             if (c != null && c.is_valid ()) {
                 return c;
             } else {
@@ -81,19 +81,19 @@ namespace DVB.io {
                 return null;
             }
         }
-        
+
         /**
          * @line: The line to parse
          * @returns: #TerrestrialChannel representing that line
-         * 
+         *
          * A line looks like
          * Das Erste:212500000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_1_2:QAM_16:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:513:514:32
          */
         private TerrestrialChannel? parse_terrestrial_channel (string line) {
             var channel = new TerrestrialChannel (this.channels.GroupId);
-            
+
             string[] fields = line.split(":");
-            
+
             int i=0;
             string val;
             bool failed = false;
@@ -179,21 +179,21 @@ namespace DVB.io {
                         failed = true;
                         break;
                     }
-                } else if (i == 10) {                
+                } else if (i == 10) {
                     channel.VideoPID = (uint)int.parse (val);
                 } else if (i == 11) {
                     channel.AudioPIDs.add ((uint)int.parse (val));
                 } else if (i == 12) {
                     channel.Sid = (uint)int.parse (val);
                 }
-                
+
                 i++;
             }
-            
+
             if (failed) return null;
             else return channel;
         }
-        
+
         /**
          *
          * A line looks like
@@ -201,9 +201,9 @@ namespace DVB.io {
          */
         private SatelliteChannel? parse_satellite_channel (string line) {
             var channel = new SatelliteChannel (this.channels.GroupId);
-            
+
             string[] fields = line.split(":");
-            
+
             int i=0;
             string val;
             while ( (val = fields[i]) != null) {
@@ -225,20 +225,20 @@ namespace DVB.io {
                 } else if (i == 4) {
                     // symbol rate is stored in kBaud
                     channel.SymbolRate = (uint)int.parse (val);
-                } else if (i == 5) {                
+                } else if (i == 5) {
                     channel.VideoPID = (uint)int.parse (val);
                 } else if (i == 6) {
                     channel.AudioPIDs.add ((uint)int.parse (val));
                 } else if (i == 7) {
                     channel.Sid = (uint)int.parse (val);
                 }
-                
+
                 i++;
             }
-            
+
             return channel;
         }
-        
+
         /**
          *
          * line looks like
@@ -246,9 +246,9 @@ namespace DVB.io {
          */
         private CableChannel? parse_cable_channel (string line) {
             var channel = new CableChannel (this.channels.GroupId);
-            
+
             string[] fields = line.split(":");
-            
+
             int i=0;
             string val;
             bool failed = false;
@@ -291,25 +291,25 @@ namespace DVB.io {
                         failed = true;
                         break;
                     }
-                } else if (i == 6) {                
+                } else if (i == 6) {
                     channel.VideoPID = (uint)int.parse (val);
                 } else if (i == 7) {
                     channel.AudioPIDs.add ((uint)int.parse (val));
                 } else if (i == 8) {
                     channel.Sid = (uint)int.parse (val);
                 }
-                
+
                 i++;
             }
-            
+
             if (failed) return null;
             else return channel;
         }
-        
+
         private static bool get_value_with_prefix (GLib.Type enumtype, string name,
                                                   string prefix, out int val) {
             return Utils.get_value_by_name_from_enum (enumtype, prefix + name, out val);
         }
     }
-    
+
 }
diff --git a/src/io/ChannelListWriter.vala b/src/io/ChannelListWriter.vala
index 685904a..cd22240 100644
--- a/src/io/ChannelListWriter.vala
+++ b/src/io/ChannelListWriter.vala
@@ -20,7 +20,7 @@
 using GLib;
 
 namespace DVB.io {
-    
+
     /**
      * Example:
      * try {
@@ -34,37 +34,37 @@ namespace DVB.io {
      * }
      */
     public class ChannelListWriter : GLib.Object {
-    
+
         public File file {get; construct;}
-    
+
         private OutputStream stream;
-        
+
         private void open_stream () throws Error {
             FileOutputStream fostream = null;
-            
+
             if (file.query_exists (null)) {
                 fostream = this.file.replace (null, true, 0, null);
             } else {
                 fostream = this.file.create (0, null);
             }
-            
+
             this.stream = new BufferedOutputStream (fostream);
         }
-        
+
         public ChannelListWriter (File file) {
             base (file: file);
         }
-        
+
         public void write (Channel channel) throws Error {
             if (this.stream == null) this.open_stream ();
             if (this.stream == null) return;
-        
+
             string buffer;
-        
+
             // Write channel name
             buffer = "%s:".printf (channel.Name);
             this.stream.write_all (buffer.data, null, null);
-            
+
             // Write special data
             if (channel is TerrestrialChannel) {
                 this.write_terrestrial_channel ((TerrestrialChannel)channel);
@@ -75,65 +75,65 @@ namespace DVB.io {
             } else {
                 warning ("Unknown channel type");
             }
-            
+
             uint apid;
             if (channel.AudioPIDs.size == 0)
                 apid = 0;
             else
                 apid = channel.AudioPIDs.get (0);
-            
+
             // Write common data
             buffer = ":%u:%u:%u\n".printf (channel.VideoPID,
                 apid, channel.Sid);
             this.stream.write_all (buffer.data, null);
         }
-        
+
         public bool close () throws Error {
             if (this.stream == null) return true;
             return this.stream.close (null);
-        } 
-    
+        }
+
         private void write_terrestrial_channel (TerrestrialChannel channel) throws Error {
             string[] elements = new string[9];
-            
+
             elements[0] = "%u".printf (channel.Frequency);
-            
+
             elements[1] = get_name_without_prefix (typeof(DvbSrcInversion),
                                                       channel.Inversion,
                                                       "DVB_DVB_SRC_INVERSION_");
-            
+
             elements[2] = get_name_without_prefix (typeof(DvbSrcBandwidth),
                                                       channel.Bandwidth,
                                                       "DVB_DVB_SRC_BANDWIDTH_");
-            
+
             elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate),
                                                       channel.CodeRateHP,
                                                       "DVB_DVB_SRC_CODE_RATE_");
-            
+
             elements[4] = get_name_without_prefix (typeof(DvbSrcCodeRate),
                                                       channel.CodeRateLP,
                                                       "DVB_DVB_SRC_CODE_RATE_");
-            
+
             elements[5] = get_name_without_prefix (typeof(DvbSrcModulation),
                                                       channel.Constellation,
                                                       "DVB_DVB_SRC_MODULATION_");
-            
+
             elements[6] = get_name_without_prefix (typeof(DvbSrcTransmissionMode),
                                                       channel.TransmissionMode,
                                                       "DVB_DVB_SRC_TRANSMISSION_MODE_");
-            
+
             elements[7] = get_name_without_prefix (typeof(DvbSrcGuard),
                                                       channel.GuardInterval,
                                                       "DVB_DVB_SRC_GUARD_");
-            
+
             elements[8] = get_name_without_prefix (typeof(DvbSrcHierarchy),
                                                       channel.Hierarchy,
                                                       "DVB_DVB_SRC_HIERARCHY_");
-                                                      
+
             string buffer = string.joinv (":", elements);
             this.stream.write_all (buffer.data, null);
         }
-        
+
         private void write_satellite_channel (SatelliteChannel channel) throws Error {
             string buffer = "%u:%s:%d:%u".printf (channel.Frequency / 1000,
                                                   channel.Polarization,
@@ -141,30 +141,30 @@ namespace DVB.io {
                                                   channel.SymbolRate);
             this.stream.write_all (buffer.data, null);
         }
-        
+
         private void write_cable_channel (CableChannel channel) throws Error {
             string[] elements = new string [5];
-            
+
             elements[0] = "%u".printf (channel.Frequency);
-                        
+
             elements[1] = get_name_without_prefix (typeof(DvbSrcInversion),
                                                       channel.Inversion,
                                                       "DVB_DVB_SRC_INVERSION_");
-            
+
             elements[2] = "%u".printf (channel.SymbolRate * 1000);
-                                    
+
             elements[3] = get_name_without_prefix (typeof(DvbSrcCodeRate),
                                                       channel.CodeRate,
                                                       "DVB_DVB_SRC_CODE_RATE_");
-                                                      
+
             elements[4] = get_name_without_prefix (typeof(DvbSrcModulation),
                                                       channel.Modulation,
                                                       "DVB_DVB_SRC_MODULATION_");
-                                                      
+
             string buffer = string.joinv (":", elements);
             this.stream.write_all (buffer.data, null);
         }
-        
+
         private static string? get_name_without_prefix (GLib.Type enumtype,
                                                              int val, string prefix) {
             string? name = Utils.get_name_by_value_from_enum (enumtype,
@@ -173,7 +173,7 @@ namespace DVB.io {
             else return name.substring (prefix.length,
                 name.length - prefix.length);
         }
-        
+
     }
-    
+
 }
diff --git a/src/io/RecordingReader.vala b/src/io/RecordingReader.vala
index 010bf09..16d7938 100644
--- a/src/io/RecordingReader.vala
+++ b/src/io/RecordingReader.vala
@@ -105,12 +105,12 @@ namespace DVB.io {
 
                     File child = recordingsbasedir.get_child (
                         childinfo.get_name ());
-                    
+
                     switch (type) {
                         case FileType.DIRECTORY:
                             this.restore_from_dir (child, depth + 1);
                         break;
-                        
+
                         case FileType.REGULAR:
                             if (childinfo.get_name () == "info.rec") {
                                 Recording rec = null;
@@ -125,8 +125,8 @@ namespace DVB.io {
                                     log.debug ("Restored recording from %s",
                                         child.get_path ());
                                     this.store.add_and_monitor (rec);
-                                    
-                                    
+
+
                                 }
                             }
                         break;
@@ -146,7 +146,7 @@ namespace DVB.io {
 
             return success;
         }
- 
+
         protected Recording? deserialize (File file) throws Error {
             var reader = new DataInputStream (file.read (null));
 
@@ -156,21 +156,21 @@ namespace DVB.io {
 
             var rec = new Recording ();
             StringBuilder description = new StringBuilder ();
-        	
+
         	while ((line = reader.read_line (out len, null)) != null) {
                 switch (line_number) {
                     case 0:
                         rec.Id = (uint32)int.parse (line);
                     break;
-                    
+
                     case 1:
                         rec.ChannelName = line;
                     break;
-                    
+
                     case 2:
                         rec.Location = (len == 0) ? null : File.new_for_path (line);
                     break;
-                    
+
                     case 3: {
                         int year = 0;
                         int month = 0;
@@ -185,15 +185,15 @@ namespace DVB.io {
                         }
                     break;
                     }
-                    
+
                     case 4:
                         rec.Length = (int64)int.parse (line);
                     break;
-                    
+
                     case 5:
                         rec.Name = (len == 0) ? null : line;
                     break;
-                    
+
                     default:
                         description.append (line);
                     break;
@@ -203,9 +203,9 @@ namespace DVB.io {
         	}
         	reader.close (null);
             rec.Description = description.str;
-            
+
             return rec;
         }
-          
+
     }
 }
diff --git a/src/io/RecordingWriter.vala b/src/io/RecordingWriter.vala
index 9f53d3b..1882c4a 100644
--- a/src/io/RecordingWriter.vala
+++ b/src/io/RecordingWriter.vala
@@ -38,28 +38,28 @@ namespace DVB.io {
          */
         public void write () throws GLib.Error {
             File parentdir = this.rec.Location.get_parent ();
-        
+
             File recfile = parentdir.get_child ("info.rec");
-            
+
             log.debug ("Saving recording to %s", recfile.get_path() );
-            
+
             if (recfile.query_exists (null)) {
                 log.debug ("Deleting old info.rec");
                 recfile.delete (null);
             }
-            
+
             FileOutputStream stream = recfile.create (0, null);
-            
+
             string text = this.serialize (this.rec);
             stream.write (text.data);
-            
+
             stream.close (null);
         }
-        
+
         protected string serialize (Recording rec) {
             uint[] started = rec.get_start ();
             return ("%u\n%s\n%s\n%u-%u-%u %u:%u\n%"+int64.FORMAT+"\n%s\n%s").printf (
-                rec.Id, rec.ChannelName, rec.Location.get_path (),                
+                rec.Id, rec.ChannelName, rec.Location.get_path (),
                 started[0], started[1], started[2], started[3],
                 started[4], rec.Length,
                 (rec.Name == null) ? "" : rec.Name,
@@ -68,5 +68,5 @@ namespace DVB.io {
         }
 
     }
-        
+
 }
diff --git a/src/rtsp/MediaMapping.vala b/src/rtsp/MediaMapping.vala
index eb41517..0d5b918 100644
--- a/src/rtsp/MediaMapping.vala
+++ b/src/rtsp/MediaMapping.vala
@@ -22,13 +22,13 @@ using GLib;
 namespace DVB {
 
     public class MediaMapping : Gst.RTSPMediaMapping {
-        
+
         private static Gst.RTSPMediaFactory factory_instance = new MediaFactory ();
-        
+
         public override Gst.RTSPMediaFactory? find_media (Gst.RTSPUrl url) {
             return factory_instance;
         }
-        
+
     }
 
 }
diff --git a/src/rtsp/Server.vala b/src/rtsp/Server.vala
index 6b3c497..1777f4a 100644
--- a/src/rtsp/Server.vala
+++ b/src/rtsp/Server.vala
@@ -56,19 +56,19 @@ namespace DVB.RTSPServer {
         server.attach (null);
         timeout_id = GLib.Timeout.add_seconds (2, (GLib.SourceFunc)timeout);
     }
-    
+
     public static void shutdown () {
         GLib.Source.remove (timeout_id);
         server = null;
     }
-    
+
     public static void stop_streaming (Channel channel) {
         log.debug ("Stop streaming channel %s", channel.Name);
-        
+
         var helper = new StopChannelHelper (channel.URL);
         server.session_pool.filter (helper.session_filter_func);
     }
-    
+
     private static bool timeout () {
         Gst.RTSPSessionPool pool = server.get_session_pool ();
         pool.cleanup ();
@@ -77,19 +77,19 @@ namespace DVB.RTSPServer {
 
     private class StopChannelHelper {
         private Gst.RTSPUrl url;
-        
+
         public StopChannelHelper (string url_str) {
             Gst.RTSPUrl.parse (url_str, out this.url);
         }
-        
+
         public Gst.RTSPFilterResult session_filter_func (Gst.RTSPSessionPool pool,
                 Gst.RTSPSession session) {
             if (session.get_media (this.url) != null) {
                 return Gst.RTSPFilterResult.REMOVE;
             } else {
                 return Gst.RTSPFilterResult.KEEP;
-            }    
+            }
         }
     }
-    
+
 }
diff --git a/src/rygel/Interfaces2.vala b/src/rygel/Interfaces2.vala
index 2f6f955..0712f6f 100644
--- a/src/rygel/Interfaces2.vala
+++ b/src/rygel/Interfaces2.vala
@@ -18,11 +18,11 @@
  */
 [DBus (name = "org.gnome.UPnP.MediaObject2")]
 public interface MediaObject2 : GLib.Object {
-    
+
     public abstract ObjectPath Parent {
         owned get;
     }
-    
+
     public abstract string DisplayName {
         owned get;
     }
@@ -38,25 +38,25 @@ public interface MediaObject2 : GLib.Object {
 
 [DBus (name = "org.gnome.UPnP.MediaContainer2")]
 public interface MediaContainer2 : GLib.Object {
-    
+
     public abstract signal void Updated ();
-    
+
     public abstract uint ChildCount {
         get;
     }
-    
+
     public abstract uint ItemCount {
         get;
     }
-    
+
     public abstract uint ContainerCount {
         get;
     }
-    
+
     public abstract bool Searchable {
         get;
     }
-    
+
     public abstract GLib.HashTable<string, Variant?>[] ListChildren (
         uint offset, uint max, string[] filter) throws DBusError;
 
@@ -65,16 +65,16 @@ public interface MediaContainer2 : GLib.Object {
 
     public abstract GLib.HashTable<string, Variant?>[] ListItems (
         uint offset, uint max, string[] filter) throws DBusError;
-    
+
 }
 
 [DBus (name = "org.gnome.UPnP.MediaItem2")]
 public interface MediaItem2 : GLib.Object {
-    
+
     public abstract string[] URLs {
         owned get;
     }
-    
+
     public abstract string MIMEType {
         owned get;
     }
diff --git a/src/rygel/Services2.vala b/src/rygel/Services2.vala
index 42cd9c8..ac1e49c 100644
--- a/src/rygel/Services2.vala
+++ b/src/rygel/Services2.vala
@@ -26,38 +26,38 @@ namespace DVB.MediaServer2 {
 
     private static const string SERVICE_NAME = "org.gnome.UPnP.MediaServer2.DVBDaemon";
     private static const string ROOT_PATH = "/org/gnome/UPnP/MediaServer2/DVBDaemon";
-    
+
     private static const string GROUP_PATH = "/org/gnome/UPnP/MediaServer2/DVBDaemon/Group%u";
     private static const string CHANNEL_PATH = GROUP_PATH + "/Channel%u";
-    
+
     /**
      * Holds all device groups
      *
      * It only contains containers only and no items
      */
     public class DeviceGroupsMediaContainer2 : GLib.Object, MediaContainer2, MediaObject2 {
-        
+
         private HashMap<uint, ChannelsMediaContainer2> containers;
         private ObjectPath path;
-        
+
         construct {
             containers = new  HashMap<uint, ChannelsMediaContainer2> ();
-        
+
             Manager manager = Manager.get_instance ();
             manager.group_added.connect (this.on_device_added);
             manager.group_removed.connect (this.on_device_removed);
-            
+
             this.path = new ObjectPath (ROOT_PATH);
         }
-        
+
         public void create_container_services () {
             Manager manager = Manager.get_instance ();
-            
+
             foreach (DeviceGroup devgroup in manager.device_groups) {
                 this.create_service (devgroup);
             }
         }
-        
+
         private void create_service (DeviceGroup devgroup) {
             log.debug ("Creating container for device group %u", devgroup.Id);
 
@@ -73,7 +73,7 @@ namespace DVB.MediaServer2 {
 
             this.containers.set (devgroup.Id, devgroup_container);
         }
-        
+
         public ObjectPath Parent {
             owned get {
                 // root container => ref to itsself
@@ -86,7 +86,7 @@ namespace DVB.MediaServer2 {
                 return ROOT_PATH;
             }
         }
-        
+
         public string DisplayName {
             owned get {
                 return "@REALNAME@'s TV on @HOSTNAME@";
@@ -110,19 +110,19 @@ namespace DVB.MediaServer2 {
                 return ContainerCount;
             }
         }
-       
+
         public uint ContainerCount {
             get {
                 return this.containers.size;
             }
         }
-        
+
         public bool Searchable {
             get {
                 return false;
             }
         }
-     
+
         public GLib.HashTable<string, Variant?>[] ListContainers (
                 uint offset, uint max, string[] filter) throws DBusError {
 
@@ -159,20 +159,20 @@ namespace DVB.MediaServer2 {
                 uint offset, uint max, string[] filter) throws DBusError {
             return new GLib.HashTable<string, Variant?>[0];
         }
-        
+
         private void on_device_added (uint group_id) {
             Manager manager = Manager.get_instance ();
             DeviceGroup devgroup = manager.get_device_group_if_exists (group_id);
             this.create_service (devgroup);
             this.Updated ();
         }
-        
+
         private void on_device_removed (uint group_id) {
             this.containers.unset (group_id);
             this.Updated ();
         }
     }
-    
+
 
     /**
      * Holds a list of channels for a single device group
@@ -185,22 +185,22 @@ namespace DVB.MediaServer2 {
 
         private DeviceGroup device_group;
         private HashMap<uint, ChannelMediaItem2> items;
-        
+
         construct {
             this.items = new HashMap<uint, ChannelMediaItem2> ();
         }
-        
+
         public ChannelsMediaContainer2(DeviceGroup devgroup, ObjectPath parent) {
             this.device_group = devgroup;
             this.parent = parent;
         }
-        
+
         public void create_item_services (DBusConnection conn) {
             foreach (Channel channel in this.device_group.Channels) {
                 this.create_service (channel);
             }
         }
-        
+
         public void create_service (Channel channel) {
             log.debug ("Creating container for channel %u", channel.Sid);
 
@@ -210,10 +210,10 @@ namespace DVB.MediaServer2 {
                     channel_item.Path, channel_item);
             Utils.dbus_register_object<MediaObject2> (conn,
                     channel_item.Path, channel_item);
-                    
+
             this.items.set (channel.Sid, channel_item);
         }
-    
+
         public ObjectPath Parent {
             owned get {
                 return this.parent;
@@ -231,7 +231,7 @@ namespace DVB.MediaServer2 {
                 return this.device_group.Name;
             }
         }
-    
+
         public string Type {
             owned get {
                 return "container";
@@ -264,7 +264,7 @@ namespace DVB.MediaServer2 {
 
         public GLib.HashTable<string, Variant?>[] ListItems (
                 uint offset, uint max, string[] filter) throws DBusError {
-        
+
             uint num_elements = get_num_elements (this.items.size, offset, max);
 
             GLib.HashTable<string, Variant?>[] hash =
@@ -289,7 +289,7 @@ namespace DVB.MediaServer2 {
 
             return hash;
         }
-        
+
         public GLib.HashTable<string, Variant?>[] ListContainers (
                 uint offset, uint max, string[] filter) throws DBusError {
             return new GLib.HashTable<string, Variant?>[0];
@@ -299,10 +299,10 @@ namespace DVB.MediaServer2 {
                 uint offset, uint max, string[] filter) throws DBusError {
             return ListItems(offset, max, filter);
         }
-        
+
     }
-    
-    
+
+
     /**
      * Holds a single channel
      */
@@ -315,7 +315,7 @@ namespace DVB.MediaServer2 {
             this.channel = channel;
             this.parent = parent;
         }
-    
+
         public ObjectPath Parent {
             owned get {
                 return this.parent;
@@ -333,7 +333,7 @@ namespace DVB.MediaServer2 {
                 return this.channel.Name;
             }
         }
-    
+
          public string[] URLs {
             owned get {
                 return new string[] {
@@ -341,13 +341,13 @@ namespace DVB.MediaServer2 {
                 };
             }
         }
-        
+
         public string MIMEType {
             owned get {
                 return "video/mpeg";
             }
         }
-        
+
         public string Type {
             owned get {
                 return "video";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]