[nautilus-python/nautilus-3.0] Updated examples to work with pygobject 3



commit 1ca0cfb05560251eb8d3dff5891eb81282b6661d
Author: Adam Plumb <adamplumb gmail com>
Date:   Tue Oct 11 13:14:20 2011 -0400

    Updated examples to work with pygobject 3

 examples/background-image.py         |    5 ++---
 examples/location-widget-provider.py |    5 ++---
 examples/md5sum-property-page.py     |    5 ++---
 examples/open-terminal.py            |    5 ++---
 examples/submenu.py                  |    5 ++---
 examples/update-file-info-async.py   |    5 ++---
 6 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/examples/background-image.py b/examples/background-image.py
index 9411f24..f23c2a6 100644
--- a/examples/background-image.py
+++ b/examples/background-image.py
@@ -2,13 +2,12 @@ import urllib
 
 import gconf
 
-import gobject
-from gi.repository import Nautilus
+from gi.repository import Nautilus, GObject
 
 SUPPORTED_FORMATS = 'image/jpeg', 'image/png'
 BACKGROUND_KEY = '/desktop/gnome/background/picture_filename'
 
-class BackgroundImageExtension(gobject.GObject, Nautilus.MenuProvider):
+class BackgroundImageExtension(GObject.GObject, Nautilus.MenuProvider):
     def __init__(self):
         self.gconf = gconf.client_get_default()
     
diff --git a/examples/location-widget-provider.py b/examples/location-widget-provider.py
index 4153eaf..e5a6cb0 100644
--- a/examples/location-widget-provider.py
+++ b/examples/location-widget-provider.py
@@ -1,7 +1,6 @@
-import gobject
-from gi.repository import Nautilus, Gtk
+from gi.repository import Nautilus, Gtk, GObject
 
-class LocationProviderExample(gobject.GObject, Nautilus.LocationWidgetProvider):
+class LocationProviderExample(GObject.GObject, Nautilus.LocationWidgetProvider):
     def __init__(self):
         pass
     
diff --git a/examples/md5sum-property-page.py b/examples/md5sum-property-page.py
index 00e192c..c098738 100644
--- a/examples/md5sum-property-page.py
+++ b/examples/md5sum-property-page.py
@@ -1,10 +1,9 @@
 import hashlib
 import urllib
 
-import gobject
-from gi.repository import Nautilus, Gtk
+from gi.repository import Nautilus, Gtk, GObject
 
-class MD5SumPropertyPage(gobject.GObject, Nautilus.PropertyPageProvider):
+class MD5SumPropertyPage(GObject.GObject, Nautilus.PropertyPageProvider):
     def __init__(self):
         pass
     
diff --git a/examples/open-terminal.py b/examples/open-terminal.py
index cc38670..1a12f01 100644
--- a/examples/open-terminal.py
+++ b/examples/open-terminal.py
@@ -4,12 +4,11 @@ import urllib
 
 import gconf
 
-import gobject
-from gi.repository import Nautilus
+from gi.repository import Nautilus, GObject
 
 TERMINAL_KEY = '/desktop/gnome/applications/terminal/exec'
 
-class OpenTerminalExtension(gobject.GObject, Nautilus.MenuProvider):
+class OpenTerminalExtension(GObject.GObject, Nautilus.MenuProvider):
     def __init__(self):
         self.client = gconf.client_get_default()
         
diff --git a/examples/submenu.py b/examples/submenu.py
index 5be7cfa..f3f2783 100644
--- a/examples/submenu.py
+++ b/examples/submenu.py
@@ -1,7 +1,6 @@
-import gobject
-from gi.repository import Nautilus
+from gi.repository import Nautilus, GObject
 
-class ExampleMenuProvider(gobject.GObject, Nautilus.MenuProvider):
+class ExampleMenuProvider(GObject.GObject, Nautilus.MenuProvider):
     def __init__(self):
         pass
         
diff --git a/examples/update-file-info-async.py b/examples/update-file-info-async.py
index f4e4114..a926a03 100644
--- a/examples/update-file-info-async.py
+++ b/examples/update-file-info-async.py
@@ -1,7 +1,6 @@
-import gobject
-from gi.repository import Nautilus
+from gi.repository import Nautilus, GObject
 
-class UpdateFileInfoAsync(gobject.GObject, Nautilus.InfoProvider):
+class UpdateFileInfoAsync(GObject.GObject, Nautilus.InfoProvider):
     def __init__(self):
         pass
     



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]