Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix extension to work with the new API in Epiphany 2.22 (thanks Thiba…

…uld Nion

<tibonihoo@free.fr>).
  • Loading branch information...
commit 4e592c8461b8d60dc294d692212cf9a84474898a 1 parent a9e2776
Ross Burton authored April 29, 2008

Showing 1 changed file with 7 additions and 3 deletions. Show diff stats Hide diff stats

  1. 10  deliciouspost.py
10  deliciouspost.py
@@ -62,10 +62,14 @@ def _find_group(self, window):
62 62
             raise AssertionError("Cannot find SpecialToolbarActions group")
63 63
 
64 64
     def _delicious_post_activate_cb(self, action, window):
65  
-        embed = window.get_active_embed()
66  
-
  65
+        try:
  66
+            embed = window.get_active_child()
  67
+            sitetitle = urllib.quote(embed.get_properties("title")[0])
  68
+        except:
  69
+            # Fallback on previous api (pre 2.22)
  70
+            embed = window.get_active_embed()
  71
+            sitetitle = urllib.quote(embed.get_title())
67 72
         siteurl = urllib.quote(embed.get_location(toplevel=True))
68  
-        sitetitle = urllib.quote(embed.get_title())
69 73
 
70 74
         url = "http://del.icio.us/post?v=4;url=%s;title=%s" % (siteurl, sitetitle)
71 75
         embed.load_url(url)

0 notes on commit 4e592c8

Please sign in to comment.
Something went wrong with that request. Please try again.