File gnome-blog-deprecation-warning.patch of Package gnome-blog

RCS file: /cvs/gnome/gnome-blog/blog_applet.py,v
retrieving revision 1.20
retrieving revision 1.22
diff -u -r1.20 -r1.22
--- blog_applet.py	2005/06/11 00:50:06	1.20
+++ blog_applet.py	2006/07/10 19:49:04	1.22
@@ -5,8 +5,7 @@
 import gtk
 import gobject
 import gnome
-import gnome.ui
-import gnome.applet
+import gnomeapplet
 import gconf
 import string  # maybe someone can do this trick without string?
 
@@ -24,12 +23,12 @@
 icon_info = icon_theme.lookup_icon('gnome-blog', -1, 0)
 gtk.window_set_default_icon_from_file(icon_info.get_filename())
         
-class BloggerApplet(gnome.applet.Applet):
+class BloggerApplet(gnomeapplet.Applet):
     def __init__(self):
         self.__gobject_init__()
 
     def init(self):
-        self.set_applet_flags(gnome.applet.EXPAND_MINOR)
+        self.set_applet_flags(gnomeapplet.EXPAND_MINOR)
         self.toggle = gtk.ToggleButton()
         self.applet_tooltips = gtk.Tooltips()
         self.setup_menu_from_file (None, "GNOME_BlogApplet.xml",
@@ -71,9 +70,16 @@
         return True
     
     def _showAboutDialog(self, uicomponent, verb):
-        gnome.ui.About(gnome_blog_globals.name, gnome_blog_globals.version, "Copyright 2003 Seth Nickell",
-                       _("A GNOME Web Blogging Applet"),["Seth Nickell <seth@gnome.org>"],[],
-                       "",gtk.gdk.pixbuf_new_from_file(gnome_blog_globals.image_dir + "/gnome-blog.png")).show()
+        about = gtk.AboutDialog()
+        about.set_name(gnome_blog_globals.name)
+        about.set_version(gnome_blog_globals.version)
+        about.set_copyright("Copyright 2003 Seth Nickell")
+        about.set_comments(_("A GNOME Web Blogging Applet"))
+        about.set_authors(["Seth Nickell <seth@gnome.org>"])
+        about.set_translator_credits(_("translator-credits"))
+        about.set_logo(gtk.gdk.pixbuf_new_from_file(gnome_blog_globals.image_dir + "/gnome-blog.png"))
+        about.connect("response", lambda dialog, response: dialog.destroy())
+        about.show()
 
     def _showPrefDialog(self):
         prefs_dialog = blogger_prefs.BloggerPrefs(self.prefs_key)
@@ -123,7 +129,7 @@
     print "Returning blogger applet"
     return applet.init()
 
-gnome.applet.bonobo_factory("OAFIID:GNOME_BlogApplet_Factory", 
+gnomeapplet.bonobo_factory("OAFIID:GNOME_BlogApplet_Factory", 
                             BloggerApplet.__gtype__, 
                             "Blog", "0", foo)
openSUSE Build Service is sponsored by