From 78178cc390178f8f47669bfb9d8e090162c10b50 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 12 May 2010 07:31:07 -0500 Subject: [PATCH] Only selecting radio program on the current date and not just time --- src/windows.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/windows.py b/src/windows.py index 9b38968..65947b3 100644 --- a/src/windows.py +++ b/src/windows.py @@ -476,9 +476,14 @@ class RadioWindow(BasicWindow): row = program["time"], program["title"] self._programmingModel.append(row) - path = (self._get_current_row(), ) - self._treeView.scroll_to_cell(path) - self._treeView.get_selection().select_path(path) + currentDate = datetime.datetime.now() + if currentDate.date() != self._dateShown.date(): + self._treeView.get_selection().set_mode(gtk.SELECTION_NONE) + else: + self._treeView.get_selection().set_mode(gtk.SELECTION_SINGLE) + path = (self._get_current_row(), ) + self._treeView.scroll_to_cell(path) + self._treeView.get_selection().select_path(path) @misc_utils.log_exception(_moduleLogger) def _on_load_error(self, exception): -- 1.7.9.5