Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés Ambrois <andresambrois@gmail.com>2010-05-23 07:01:09 (GMT)
committer Anish Mangal <anish@sugarlabs.org>2011-08-26 05:55:54 (GMT)
commit27ad3124c7f9d3ad9c9aba53c5eedeecf42e5550 (patch)
tree5ede3102f7801821204f41574d6e01b15f1f49c9
parent41853413efe73b8eba1e8c3709dc56e375ef50ec (diff)
Rename the date column to 'sort_column'
As it will be used to display the currently active sorting property. Signed-off-by: Andrés Ambrois <andresambrois@gmail.com> Signed-off-by: Anish Mangal <anish@sugarlabs.org>
-rw-r--r--src/jarabe/journal/listview.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 2974f16..279dbbb 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -99,7 +99,7 @@ class BaseListView(gtk.Bin):
self.cell_title = None
self.cell_icon = None
self._title_column = None
- self.date_column = None
+ self.sort_column = None
self._add_columns()
self.tree_view.enable_model_drag_source(gtk.gdk.BUTTON1_MASK,
@@ -192,15 +192,15 @@ class BaseListView(gtk.Bin):
date = util.timestamp_to_elapsed_string(timestamp)
date_width = self._get_width_for_string(date)
- self.date_column = gtk.TreeViewColumn()
- self.date_column.props.sizing = gtk.TREE_VIEW_COLUMN_FIXED
- self.date_column.props.fixed_width = date_width
- self.date_column.set_alignment(1)
- self.date_column.props.resizable = True
- self.date_column.props.clickable = True
- self.date_column.pack_start(cell_text)
- self.date_column.add_attribute(cell_text, 'text', ListModel.COLUMN_DATE)
- self.tree_view.append_column(self.date_column)
+ self.sort_column = gtk.TreeViewColumn()
+ self.sort_column.props.sizing = gtk.TREE_VIEW_COLUMN_FIXED
+ self.sort_column.props.fixed_width = date_width
+ self.sort_column.set_alignment(1)
+ self.sort_column.props.resizable = True
+ self.sort_column.props.clickable = True
+ self.sort_column.pack_start(cell_text)
+ self.sort_column.add_attribute(cell_text, 'text', ListModel.COLUMN_TIMESTAMP)
+ self.tree_view.append_column(self.sort_column)
def _get_width_for_string(self, text):
# Add some extra margin
@@ -417,7 +417,7 @@ class BaseListView(gtk.Bin):
while True:
x, y, width, height = self.tree_view.get_cell_area(path,
- self.date_column)
+ self.sort_column)
x, y = self.tree_view.convert_tree_to_widget_coords(x, y)
self.tree_view.queue_draw_area(x, y, width, height)
if path == end_path: