Author: asterix
Date: 2008-08-03 23:36:26 +0200 (Sun, 03 Aug 2008)
New Revision: 10117
Modified:
trunk/src/tooltips.py
Log:
don't indent status row in systray tooltip. fixes #4171
Modified: trunk/src/tooltips.py
===================================================================
--- trunk/src/tooltips.py 2008-08-03 21:15:10 UTC (rev 10116)
+++ trunk/src/tooltips.py 2008-08-03 21:36:26 UTC (rev 10117)
@@ -194,7 +194,8 @@
str_status += ' - <i>' + status + '</i>'
return str_status
- def add_status_row(self, file_path, show, str_status, status_time = None, show_lock = False):
+ def add_status_row(self, file_path, show, str_status, status_time=None,
+ show_lock=False, indent=True):
''' appends a new row with status icon to the table '''
self.current_row += 1
state_file = show.replace(' ', '_')
@@ -209,8 +210,9 @@
break
spacer = gtk.Label(self.spacer_label)
image.set_alignment(1, 0.5)
- self.table.attach(spacer, 1, 2, self.current_row,
- self.current_row + 1, 0, 0, 0, 0)
+ if indent:
+ self.table.attach(spacer, 1, 2, self.current_row,
+ self.current_row + 1, 0, 0, 0, 0)
self.table.attach(image, 2, 3, self.current_row,
self.current_row + 1, gtk.FILL, gtk.FILL, 2, 0)
status_label = gtk.Label()
@@ -253,13 +255,13 @@
if message:
self.add_status_row(file_path, acct['show'],
gobject.markup_escape_text(acct['name']) + \
- ' - ' + message, show_lock=show_lock)
+ ' - ' + message, show_lock=show_lock, indent=False)
else:
self.add_status_row(file_path, acct['show'],
gobject.markup_escape_text(acct['name'])
- , show_lock=show_lock)
+ , show_lock=show_lock, indent=False)
for line in acct['event_lines']:
- self.add_text_row(' ' + line, 2)
+ self.add_text_row(' ' + line, 1)
def populate(self, data):
self.create_window()