Index: protocols/atomBloggerAPI.py
===================================================================
--- protocols/atomBloggerAPI.py	(Revision 0)
+++ protocols/atomBloggerAPI.py	(Revision 0)
@@ -0,0 +1,122 @@
+import gdata;
+from gdata import service;
+import atom;
+
+import gconf
+
+import gettext
+_ = gettext.gettext
+
+from gnomeblog import hig_alert
+from gnomeblog import proxy
+
+
+
+class Blog:
+    def __init__(self):
+        pass
+    
+    def _getURL(self, base_url, client, gconf_prefix):
+        url_ending = client.get_string (gconf_prefix + "/url_ending")
+        return base_url + url_ending
+    
+    def getBlogList(self, username, password, base_url, client, gconf_prefix):
+
+        # TODO: consider GNOME proxy configurations, as in bloggerAPI.py
+
+        try:
+            bloggerservice = self._login(username, password)
+        except service.CaptchaRequired:
+            hig_alert.reportError(_("Could not get list of blogs"), _("A captcha was required for authentication.") )
+            return
+        except service.BadAuthentication, e:
+            hig_alert.reportError(_("Could not get list of blogs."), _("Username and password failed to authenticate.") )
+            return
+        except socket.gaierror, e:
+            hig_alert.reportError(_("Could not get list of blogs."), _("Socket error.  Perhaps try again.  ["+e.message+"]"));
+            return;
+        except service.Error, e:
+            hig_alert.reportError(_("Could not get list of blogs."), _("Username and password failed to authenticate.") )
+            return
+
+        bloglist = bloggerservice.Get('/feeds/default/blogs')
+            
+        if ((bloglist.entry == None) or (len(bloglist.entry) == 0)):
+            # No blogs found!
+            hig_alert.reportError("No Blogs Found", "No errors were reported, but no blogs were found at %s for username %s\n" % ( url, username))
+            return
+        
+        string_value_pairs = []
+
+        for blog in bloglist.entry:
+            blogtitle = blog.title.text
+            blogid = blog.id.text.split('-')[-1]
+            string_value_pairs.append( (blogtitle, blogid) )
+
+        return string_value_pairs
+
+    def _login(self, username, password):
+        if username.endswith('@gmail.com') == False:
+            username = username + '@gmail.com'
+
+        service = gdata.service.GDataService(username, password)
+        service.source = "GnomeBlog patch"
+        service.service = "blogger"
+        service.server = "www.blogger.com"
+        service.ProgrammaticLogin()
+            
+        return service
+
+    def postEntry (self, username, password, base_url, title, entry, client, gconf_prefix):
+        #print "DBG atomBloggerAPI.postEntry(): base_url[%s] client[%s] gconf_prefix[%s]\n" % (base_url, client, gconf_prefix)
+
+        blog_id = client.get_string(gconf_prefix + "/blog_id")
+
+        #print "DBG atomBloggerAPI.postEntry(): blog_id[%s]\n" % (blog_id)
+
+        if (blog_id == None):
+            blog_id = ""
+
+        if (username == None):
+            username = ""
+
+        if (password == None):
+            password = ""
+            
+        success = True
+
+        # TODO consider GNOME proxy configuration
+            
+        post = gdata.GDataEntry()
+        #post.author.append( atom.Author( atom.Name(text = "SOMEAUTHORNAME_dbg")))
+        post.title = atom.Title(title_type = 'xhtml', text = title)
+        post.content = atom.Content(content_type='html', text = entry)
+        
+        try:
+            bloggerservice = self._login(username, password)
+        except service.CaptchaRequired:
+            hig_alert.reportError(_("Could not post entry."), _("A captcha was required for authentication.") )
+            success = False
+        except service.BadAuthentication, e:
+            hig_alert.reportError(_("Could not post entry."), _("Username and password failed to authenticate.") )
+            success = False
+        except service.Error, e:
+            hig_alert.reportError(_("Could not post entry."), _("Username and password failed to authenticate.") )
+            success = False
+        except socket.gaierror, e:
+            hig_alert.reportError(_("Could not post entry."), _("Socket error.  Perhaps try again.  ["+e.message+"]"));
+            success = False
+
+
+        try:
+            bloggerservice.Post(post, '/feeds/'+blog_id+'/posts/default')
+        except service.RequestError, e:
+            hig_alert.reportError(_("Could not post entry."), _("Reason: %s" % (e.message['body'])) )
+            # TODO catch "socket.gaierror: (-2, 'Der Name oder der Dienst ist nicht bekannt')"
+
+        print ("Success is....")
+        print (success)
+
+        return success
+
+blog = Blog()
Index: protocols/Makefile.am
===================================================================
--- protocols/Makefile.am	(Revision 299)
+++ protocols/Makefile.am	(Arbeitskopie)
@@ -3,6 +3,7 @@
 gnomeblogdir = $(pythondir)/gnomeblog
 
 gnomeblog_PYTHON = 		\
+	atomBloggerAPI.py	\
 	bloggerAPI.py		\
 	MetaWeblog.py		\
 	advogato.py		\
Index: blogger_prefs.py
===================================================================
--- blogger_prefs.py	(Revision 299)
+++ blogger_prefs.py	(Arbeitskopie)
@@ -32,9 +32,10 @@
 
         blogTypeMenu = gconf_widgets.OptionMenu(gconf_prefix + "/blog_type")
         blogTypeMenu.setStringValuePairs([("blogs.gnome.org", "blogs.gnome.org"),
-                                          ("Blogger.com", "blogger.com"),
+                                          ("Blogger.com", "atom-blogger.com"),
                                           ("Advogato", "advogato.org"),
                                           ("LiveJournal", "livejournal.com"),
+                                          ("Blogger.com (old)", "blogger.com"),
                                           ("-", ""),
                                           (_("Self-Run MovableType"), "custom-mt"),
                                           (_("Self-Run Pyblosxom"), "custom-pybloxsom"),
@@ -49,7 +50,8 @@
 
 
         self.blogProtocolMenu = gconf_widgets.OptionMenu(gconf_prefix + "/blog_protocol")
-        self.blogProtocolMenu.setStringValuePairs([("BloggerAPI", "bloggerAPI"),
+        self.blogProtocolMenu.setStringValuePairs([("BloggerAPI (old)", "bloggerAPI"),
+                                                   ("BloggerAPI", "atomBloggerAPI"),
                                                    ("Advogato", "advogato"),
                                                    ("LiveJournal", "livejournal"),
                                                    ("MetaWeblog", "MetaWeblog")])
@@ -140,6 +142,11 @@
             url_ending = ""
             protocol = "bloggerAPI"
             url_description = _("XML-RPC URL:")
+        elif blog_type == "atom-blogger.com":
+            url = "http://www.blogger.com"
+            url_ending = ""
+            protocol = "atomBloggerAPI"
+            url_description = _("ATOM-based");
         elif blog_type == "advogato.org":
             url = "http://www.advogato.org/XMLRPC"
             url_ending = ""
