rpms/gwibber/F-13 721_713.diff, NONE, 1.1 gwibber-2.30.0.1-define_pango_overlay_before_using.patch, NONE, 1.1 gwibber.spec, 1.40, 1.41

Tom Callaway spot at fedoraproject.org
Fri May 7 16:00:10 UTC 2010


Author: spot

Update of /cvs/pkgs/rpms/gwibber/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26980/F-13

Modified Files:
	gwibber.spec 
Added Files:
	721_713.diff 
	gwibber-2.30.0.1-define_pango_overlay_before_using.patch 
Log Message:
fix pango_overlay issue (bz 587715), update to bzr721

721_713.diff:
 INSTALL                              |    1 
 gwibber/accounts.py                  |    5 ++--
 gwibber/gwui.py                      |    2 -
 gwibber/lib/gtk/digg.py              |    5 +++-
 gwibber/lib/gtk/facebook.py          |   25 +++++++++++++++++---
 gwibber/lib/gtk/flickr.py            |    5 +++-
 gwibber/lib/gtk/friendfeed.py        |    5 ++--
 gwibber/lib/gtk/identica.py          |    5 ++--
 gwibber/lib/gtk/qaiku.py             |    4 ++-
 gwibber/lib/gtk/statusnet.py         |    5 ++--
 gwibber/lib/gtk/twitter.py           |   43 ++---------------------------------
 gwibber/microblog/util/exceptions.py |    8 ++++++
 gwibber/preferences.py               |    7 +++++
 13 files changed, 65 insertions(+), 55 deletions(-)

--- NEW FILE 721_713.diff ---
=== modified file 'INSTALL'
--- INSTALL	2009-05-23 22:42:02 +0000
+++ INSTALL	2010-04-28 03:45:42 +0000
@@ -22,6 +22,7 @@
     * python-feedparser (4.1)
     * python-xdg (0.15)
     * python-mako (0.2.2)
+    * python-pycurl
 
   Installation
   ------------

=== modified file 'gwibber/accounts.py'
--- gwibber/accounts.py	2010-04-15 13:13:54 +0000
+++ gwibber/accounts.py	2010-05-03 14:56:46 +0000
@@ -271,7 +271,7 @@
           if not new_account:
               self.aw = eval(protocol["name"]).AccountWidget(self.account)
           else:
-              self.aw = eval(protocol["name"]).AccountWidget()
+              self.aw = eval(protocol["name"]).AccountWidget(None, self.ui)
           self.aw.show()
 	except NameError:
           print ("%s not available", protocol["name"])
@@ -280,7 +280,7 @@
         if new_account:
             self.account = {}
             self.account["protocol"] = protocol["name"]
-            self.ui.get_object('vbox_create').show()
+            #self.ui.get_object('vbox_create').show()
         self.aw.account = self.account
         self.populate_account_data()
 
@@ -388,4 +388,5 @@
         self.account_show(icon=icon)
 
     def on_button_close_clicked(self, widget, data=None):
+        self.gwibber_service.RefreshCreds()
         gtk.main_quit()  

=== modified file 'gwibber/gwui.py'
--- gwibber/gwui.py	2010-04-13 14:14:57 +0000
+++ gwibber/gwui.py	2010-05-03 04:24:55 +0000
@@ -162,7 +162,7 @@
         for feature in default_streams:
           aname = self.features[feature]["stream"]
           item["items"].append({
-            "name": aname.capitalize(),
+            "name": _(aname.capitalize()),
             "account": aId,
             "stream": aname,
             "view": self.messages.execute_view("account_stream_time", "messages")[[aId, aname, {}]:[aId, aname, 0]],

=== modified file 'gwibber/lib/gtk/digg.py'
--- gwibber/lib/gtk/digg.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/digg.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring digg accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring digg accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,4 +36,7 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
+    if dialog:
+      dialog.get_object("vbox_create").show()
+
     

=== modified file 'gwibber/lib/gtk/facebook.py'
--- gwibber/lib/gtk/facebook.py	2010-03-24 20:26:06 +0000
+++ gwibber/lib/gtk/facebook.py	2010-05-03 17:18:39 +0000
@@ -35,7 +35,7 @@
   """AccountWidget: A widget that provides a user interface for configuring facebook accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring facebook accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -49,13 +49,27 @@
       self.account = account
     else:
       self.account = {}
+    self.dialog = dialog
+    has_secret_key = True
+    if self.account.has_key("_id"):
+      try:
+        value = gnomekeyring.find_items_sync(gnomekeyring.ITEM_GENERIC_SECRET, {"id": str("%s/%s" % (self.account["_id"], "secret_key"))})[0].secret
+      except gnomekeyring.NoMatchError:
+        has_secret_key = False
     try:
-      if self.account["session_key"] and self.account["secret_key"] and self.account["username"]:
+      if self.account["session_key"] and self.account["secret_key"] and self.account["username"] and has_secret_key:
         self.ui.get_object("hbox_facebook_auth").hide()
         self.ui.get_object("fb_auth_done_label").set_label(_("%s has been authorized by Facebook") % str(self.account["username"]))
         self.ui.get_object("hbox_facebook_auth_done").show()
+      else:
+        self.ui.get_object("hbox_facebook_auth_done").hide()
+        self.ui.get_object("facebook_auth_button").modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red"))
+        if self.dialog:
+            self.dialog.get_object('vbox_create').hide()
     except:
       self.ui.get_object("hbox_facebook_auth_done").hide()
+      if self.dialog:
+        self.dialog.get_object("vbox_create").hide()
 
   def on_facebook_auth_clicked(self, widget, data=None):
     (self.win_w, self.win_h) = self.window.get_size()
@@ -97,6 +111,8 @@
         fbc.session_key = self.account["session_key"]
         fbc.secret_key = str(data["secret"])
         self.account["username"] = str(fbc.users.getInfo(fbuid)[0]["name"])
+        if not self.account.has_key("username"):
+            self.account["username"] = str(fbc.users.getInfo(fbuid)[0]["uid"])
 
         if "_id" not in self.account:
           valid = string.ascii_letters + string.digits + "-"
@@ -110,11 +126,12 @@
                 "Gwibber pref: %s/%s" % (self.account["_id"], "secret_key"),
                 {"id": str("%s/%s" % (self.account["_id"], "secret_key"))},
                 str(data["secret"]), True)
-
         
         self.ui.get_object("hbox_facebook_auth").hide()
         self.ui.get_object("fb_auth_done_label").set_label(_("%s has been authorized by Facebook") % str(self.account["username"]))
         self.ui.get_object("hbox_facebook_auth_done").show()
+        if self.dialog:
+          self.dialog.get_object("vbox_create").show()
       except:
         #FIXME: We should do this in the same window
         pass
@@ -124,9 +141,11 @@
       self.ui.get_object("expander1").show()
 
     if title.get_title() == "Failure":
+      gtk.gdk.threads_enter()
       d = gtk.MessageDialog(None, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR,
         gtk.BUTTONS_OK, _("Facebook authorization failed. Please try again."))
       if d.run(): d.destroy()
+      gtk.gdk.threads_leave()
 
       web.hide()
       self.window.resize(self.win_w, self.win_h)

=== modified file 'gwibber/lib/gtk/flickr.py'
--- gwibber/lib/gtk/flickr.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/flickr.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring flickr accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring flickr accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,4 +36,7 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
+    if dialog:
+      dialog.get_object("vbox_create").show()
+
     

=== modified file 'gwibber/lib/gtk/friendfeed.py'
--- gwibber/lib/gtk/friendfeed.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/friendfeed.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring friendfeed accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring friendfeed accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,4 +36,5 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
-    
+    if dialog:
+      dialog.get_object("vbox_create").show()

=== modified file 'gwibber/lib/gtk/identica.py'
--- gwibber/lib/gtk/identica.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/identica.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring identica accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring identica accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,4 +36,5 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
-    
+    if dialog:
+       dialog.get_object("vbox_create").show()

=== modified file 'gwibber/lib/gtk/qaiku.py'
--- gwibber/lib/gtk/qaiku.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/qaiku.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring qaiku accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring qaiku accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,3 +36,5 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
+    if dialog:
+       dialog.get_object("vbox_create").show()

=== modified file 'gwibber/lib/gtk/statusnet.py'
--- gwibber/lib/gtk/statusnet.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/statusnet.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring identica accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring identica accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,4 +36,5 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
-    
+    if dialog:
+       dialog.get_object("vbox_create").show()

=== modified file 'gwibber/lib/gtk/twitter.py'
--- gwibber/lib/gtk/twitter.py	2010-03-22 13:05:28 +0000
+++ gwibber/lib/gtk/twitter.py	2010-05-03 14:56:46 +0000
@@ -26,7 +26,7 @@
   """AccountWidget: A widget that provides a user interface for configuring twitter accounts in Gwibber
   """
   
-  def __init__(self, account=None):
+  def __init__(self, account=None, dialog=None):
     """Creates the account pane for configuring twitter accounts"""
     gtk.VBox.__init__( self, False, 20 )
     self.ui = gtk.Builder()
@@ -36,42 +36,5 @@
     self.vbox_settings = self.ui.get_object("vbox_settings")
     self.pack_start(self.vbox_settings, False, False)
     self.vbox_settings.show_all()
-    
-"""
-    gtk.VBox.__init__( self, False, 20 )
-    username_box = gtk.HBox(False,2)
-    self.pack_start(username_box, False, False)
-    username_label = gtk.Label("Username:")
-    username_box.pack_start(username_label, False, False)
-    username_entry = gtk.Entry()
-    username_box.pack_start(username_entry, False, False)
-    username_box.show_all()
-
-    password_box = gtk.HBox(False,2)
-    self.pack_start(password_box, False, False)
-    password_label = gtk.Label("Password:")
-    password_box.pack_start(password_label, False, False)
-    password_entry = gtk.Entry()
-    password_entry.set_visibility(False)
-    password_box.pack_start(password_entry, False, False)
-    password_box.show_all()
-
-    button_box = gtk.HButtonBox()
-    button_box.set_border_width(5)
-    button_box.set_layout(gtk.BUTTONBOX_END)
-    button_box.set_spacing(0)
-    cancel_button = gtk.Button(stock='gtk-cancel')
-    button_box.add(cancel_button)
-    cancel_button.connect("clicked", self.on_cancel_clicked)
-    save_button = gtk.Button(stock='gtk-save')
-    button_box.add(save_button)
-    save_button.connect("clicked", self.on_save_clicked)
-    self.pack_end(button_box, False, False)
-    button_box.show_all()
-
-  def on_cancel_clicked(elf, widget, data=None):
-    print "on_cancel_clicked"
-  
-  def on_save_clicked(elf, widget, data=None):
-    print "on_save_clicked"
-"""
+    if dialog:
+      dialog.get_object("vbox_create").show()

=== modified file 'gwibber/microblog/util/exceptions.py'
--- gwibber/microblog/util/exceptions.py	2010-04-14 15:29:20 +0000
+++ gwibber/microblog/util/exceptions.py	2010-05-03 04:20:56 +0000
@@ -1,5 +1,6 @@
 import log
 import os, subprocess
+import xdg, time
 
 class GwibberError(Exception):
     """Base class for exceptions in gwibber."""
@@ -17,8 +18,15 @@
     def __init__(self, type="UNKNOWN", protocol="UNKNOWN", username="UNKNOWN", message="UNKNOWN"):
         if type == "keyring":
             log.logger.error("Failed to find credentials in the keyring")
+            accounts_error = os.path.join(xdg.BaseDirectory.xdg_cache_home, "gwibber", ".accounts_error")
+            if os.path.exists(accounts_error) and os.path.getmtime(accounts_error) > time.time()-600:
+                log.logger.info("gwibber-accounts was raised less than 600 seconds")
+                return
+            else:
+                open(accounts_error, 'w').close() 
         else:
             log.logger.error("%s failure: %s:%s - %s", type, protocol, username, message)
+
         display_message = "There was an %s failure from %s for account %s, error was %s" % (type, protocol, username, message)
         title = "Gwibber"
         level = "info"

=== modified file 'gwibber/preferences.py'
--- gwibber/preferences.py	2010-03-24 20:26:06 +0000
+++ gwibber/preferences.py	2010-05-03 04:23:47 +0000
@@ -59,6 +59,13 @@
     def populate_settings_data(self, widget, data=None):
         self.ui.get_object("interval").set_value(self.settings["interval"])
         
+        for setting in "show_notifications", "notify_mentions_only", "show_fullname", "shorten_urls", "reply_append_colon", "global_retweet":
+            if isinstance(self.settings[setting], str) and self.settings[setting].lower() == "true":
+                self.settings[setting] = True
+                self.settings.save()
+            if isinstance(self.settings[setting], str) and self.settings[setting].lower() == "false":
+                self.settings[setting] = False
+                self.settings.save()
         self.ui.get_object("autostart").set_active(self.gc.get_bool("/apps/gwibber/autostart"))
         self.ui.get_object("show_notifications").set_active(self.settings["show_notifications"])
         self.ui.get_object("notify_mentions_only").set_active(self.settings["notify_mentions_only"])


gwibber-2.30.0.1-define_pango_overlay_before_using.patch:
 gwui.py |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE gwibber-2.30.0.1-define_pango_overlay_before_using.patch ---
diff -up gwibber-2.30.0.1/gwibber/gwui.py.BAD gwibber-2.30.0.1/gwibber/gwui.py
--- gwibber-2.30.0.1/gwibber/gwui.py.BAD	2010-05-07 10:54:59.206164796 -0400
+++ gwibber-2.30.0.1/gwibber/gwui.py	2010-05-07 10:57:23.104165212 -0400
@@ -906,6 +906,8 @@ class InputTextView(gtk.TextView):
             error_handler=error_shortened)
 
   def set_overlay_text(self, text):
+    if not self.pango_overlay:
+      self.pango_overlay = self.create_pango_layout("")
     self.pango_overlay.set_markup(self.overlay_text % (self.overlay_color, text))
 
   def on_size_allocate(self, *args):


Index: gwibber.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gwibber/F-13/gwibber.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- gwibber.spec	28 Apr 2010 18:24:38 -0000	1.40
+++ gwibber.spec	7 May 2010 16:00:10 -0000	1.41
@@ -4,7 +4,7 @@
 
 Name:           gwibber
 Version:        %{basever}.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 Epoch:          1
 Summary:        An open source microblogging client for GNOME developed with Python and GTK
 Group:          Applications/Internet
@@ -31,6 +31,13 @@ Patch2:		gwibber-2.30.0.1-notify-icon-48
 # https://bugs.launchpad.net/bugs/571367
 Patch3:		gwibber-2.30.0.1-use-makedirs.patch
 
+# Update to bzr revision 721
+Patch4:		721_713.diff
+
+# Define pango_overlay before using it
+# https://bugs.launchpad.net/gwibber/+bug/577050
+Patch5:		gwibber-2.30.0.1-define_pango_overlay_before_using.patch
+
 Requires:	libsoup, python-pycurl, PyXML
 Requires:	python 
 Requires:	dbus-python >= 0.80.2
@@ -62,6 +69,8 @@ and GTK. It supports Twitter, Jaiku, Ide
 %patch1 -p1 -b .notification-area
 %patch2 -p1 -b .notify-icon-48
 %patch3 -p1 -b .makedirs
+%patch4 -p0 -b .bzr721
+%patch5 -p1 -b .pango_overlay
 
 sed -i -e '/^#! \?\//, 1d' $(find %{name} | grep "\.py$")
 
@@ -105,6 +114,9 @@ rm -rf %{buildroot}
 %{_datadir}/indicators/messages/applications/gwibber
 
 %changelog
+* Fri May  7 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1:2.30.0.1-6
+- update to bzr revision 721
+
 * Wed Apr 28 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 1:2.30.0.1-5
 - if ~/.cache/gwibber does not exist, create it with os.makedirs() not os.mkdir()
 



More information about the scm-commits mailing list