From 8fc21161b3c9ccfd72e3572c80a8b74ba506a152 Mon Sep 17 00:00:00 2001 From: Anna Date: Sun, 11 Apr 2010 20:01:45 -0400 Subject: [PATCH] Fixed the gtk version checks --- mytwitter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mytwitter.py b/mytwitter.py index 2ca9691..caabd14 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -202,7 +202,7 @@ class TweetBox(gtk.VBox): self.text.set_alignment(0.0, 0.0) self.text.set_selectable(True) self.text.set_line_wrap(True) - if gtk.pygtk_version[0] > 2 or (gtk.pygtk_version[0] == 2 and gtk.pygtk_version[1] >= 18): + if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18): self.text.connect('activate-link', self.on_url_clicked) button_box = gtk.HBox() @@ -238,7 +238,7 @@ class TweetBox(gtk.VBox): # and the text new_text = status.text new_text = re.sub(r'&([^;]*?)( |$)', r'&\1\2', new_text) - if gtk.pygtk_version[0] > 2 or (gtk.pygtk_version[0] == 2 and gtk.pygtk_version[1] >= 18): + if gtk.gtk_version[0] > 2 or (gtk.gtk_version[0] == 2 and gtk.gtk_version[1] >= 18): new_text = re.sub(r"(http://.*?)( |$)", r'\1\2', new_text) self.text.set_markup(new_text) @@ -261,7 +261,8 @@ class TweetBox(gtk.VBox): def on_url_clicked(self, widget): # fixme: for now, hard code firefox, since that's what I use # Eventually make this configgable - subprocess.call('firefox ' + self.text.get_current_uri()) + print 'debug: on_url_clicked()' + subprocess.Popen('/usr/bin/firefox ' + self.text.get_current_uri(), shell=False).pid # end class TweetBox