From 616d8de4228629ecc4ffd8af3ff1fea213f0ca64 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 14 Apr 2005 22:08:09 +0000 Subject: [PATCH] some better stuff for my previous commit [new version related] --- plugins/gtkgui/check_for_new_version.py | 11 +++++++---- plugins/gtkgui/gtkgui.glade | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/gtkgui/check_for_new_version.py b/plugins/gtkgui/check_for_new_version.py index fb7080e60..f8133670b 100644 --- a/plugins/gtkgui/check_for_new_version.py +++ b/plugins/gtkgui/check_for_new_version.py @@ -14,13 +14,14 @@ GTKGUI_GLADE='plugins/gtkgui/gtkgui.glade' class Check_for_new_version_dialog: def __init__(self, plugin): self.plugin = plugin + self.check_for_new_version() + + def parse_glade(self): xml = gtk.glade.XML(GTKGUI_GLADE, 'new_version_available_dialog', APP) self.window = xml.get_widget('new_version_available_dialog') self.information_label = xml.get_widget('information_label') self.changes_textview = xml.get_widget('changes_textview') xml.signal_autoconnect(self) - self.check_for_new_version() - def on_new_version_available_dialog_delete_event(self, widget, event): self.window.destroy() @@ -28,6 +29,7 @@ class Check_for_new_version_dialog: def on_open_download_page_button_clicked(self, widget): url = 'http://www.gajim.org/downloads.php?lang=' self.plugin.launch_browser_mailer('url', url) + self.window.destroy() def check_for_new_version(self): '''parse online Changelog to find out last version @@ -46,8 +48,7 @@ class Check_for_new_version_dialog: if latest_version > version.version: start_date = finish_version + 2 # one space and one ( date = first_line[start_date:-2] # remove the last ) and \n - text = 'Gajim ' + latest_version + ' was released in ' + date + '!' - self.information_label.set_text(text) + info = 'Gajim ' + latest_version + ' was released in ' + date + '!' changes = '' while True: line = changelog.readline() @@ -57,6 +58,8 @@ class Check_for_new_version_dialog: if line != '\n': changes += line + self.parse_glade() + self.information_label.set_text(info) buf = self.changes_textview.get_buffer() buf.set_text(changes) self.window.show_all() diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index ff3c11699..680f5cfb4 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -10253,6 +10253,7 @@ send a chat message to + 5 True 0 0.5 @@ -10286,7 +10287,7 @@ send a chat message to False True GTK_JUSTIFY_LEFT - GTK_WRAP_NONE + GTK_WRAP_WORD False 0 0