diff options
author | Nikos Kouremenos <kourem@gmail.com> | 2007-01-17 02:26:38 +0300 |
---|---|---|
committer | Nikos Kouremenos <kourem@gmail.com> | 2007-01-17 02:26:38 +0300 |
commit | e9afe36ff3adb92192b1be908e42c1394ae95af3 (patch) | |
tree | b4b12a6b0e28aa42ddeba55928e6d11b99ea7200 /src/atom_window.py | |
parent | abcb9a35f14e3c94d2b2d8558e2c6f749163159b (diff) |
clean code and update to using GTK/PyGTK 2.8; see #2248
Diffstat (limited to 'src/atom_window.py')
-rw-r--r-- | src/atom_window.py | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/atom_window.py b/src/atom_window.py index 622aea2db..3bab31fdf 100644 --- a/src/atom_window.py +++ b/src/atom_window.py @@ -1,8 +1,25 @@ -'''atom_window.py - a window to display atom entries from pubsub. For now greatly simplified, -supports only simple feeds like the one from pubsub.com. ''' +## atom_window.py - a window to display atom entries from pubsub. +## +## For now greatly simplified, supports only simple feeds like the +## one from pubsub.com. +## +## Copyright (C) 2006-2007 Yann Le Boulanger <asterix@lagaule.org> +## Copyright (C) 2007 Nikos Kouremenos <kourem@gmail.com> +## Copyright (C) 2006-2007 Liori (I think) put ur self here please +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published +## by the Free Software Foundation; version 2 only. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + import gtk -import gtk.gdk +import gobject import gtkgui_helpers from common import helpers @@ -11,7 +28,7 @@ class AtomWindow: window = None entries = [] - @classmethod # python2.4 decorator + @classmethod def newAtomEntry(cls, entry): ''' Queue new entry, open window if there's no one opened. ''' cls.entries.append(entry) @@ -52,22 +69,22 @@ class AtomWindow: if newentry.feed_link is not None: self.feed_title_label.set_markup( u'<span foreground="blue" underline="single">%s</span>' % \ - gtkgui_helpers.escape_for_pango_markup(newentry.feed_title)) + gobject.markup_escape_text(newentry.feed_title)) else: self.feed_title_label.set_markup( - gtkgui_helpers.escape_for_pango_markup(newentry.feed_title)) + gobject.markup_escape_text(newentry.feed_title)) self.feed_tagline_label.set_markup( u'<small>%s</small>' % \ - gtkgui_helpers.escape_for_pango_markup(newentry.feed_tagline)) + gobject.markup_escape_text(newentry.feed_tagline)) if newentry.uri is not None: self.entry_title_label.set_markup( u'<span foreground="blue" underline="single">%s</span>' % \ - gtkgui_helpers.escape_for_pango_markup(newentry.title)) + gobject.markup_escape_text(newentry.title)) else: self.entry_title_label.set_markup( - gtkgui_helpers.escape_for_pango_markup(newentry.title)) + gobject.markup_escape_text(newentry.title)) self.last_modified_label.set_text(newentry.updated) @@ -97,7 +114,7 @@ class AtomWindow: self.displayNextEntry() def on_entry_title_button_press_event(self, widget, event): - # TODO: make it using special gtk2.10 widget + #FIXME: make it using special gtk2.10 widget if event.button == 1: # left click uri = self.entry.uri if uri is not None: @@ -105,7 +122,7 @@ class AtomWindow: return True def on_feed_title_button_press_event(self, widget, event): - # TODO: make it using special gtk2.10 widget + #FIXME: make it using special gtk2.10 widget if event.button == 1: # left click uri = self.entry.feed_uri if uri is not None: |