~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to UpdateManager/MetaReleaseGObject.py

  • Committer: Michael Vogt
  • Date: 2011-07-08 07:46:54 UTC
  • mfrom: (2146.2.16 pygi)
  • Revision ID: michael.vogt@ubuntu.com-20110708074654-nbcspqmsrlbxc6p0
merged from the pygi branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18
18
#  USA
19
19
 
20
 
import pygtk
21
 
pygtk.require('2.0')
22
 
import gobject
 
20
from gi.repository import GObject
23
21
import thread
24
22
import urllib2
25
23
import os
30
28
from subprocess import Popen,PIPE
31
29
from Core.MetaRelease import MetaReleaseCore
32
30
 
33
 
import gtk
34
 
 
35
 
 
36
 
class MetaRelease(MetaReleaseCore,gobject.GObject):
 
31
from gi.repository import Gtk
 
32
 
 
33
 
 
34
class MetaRelease(MetaReleaseCore,GObject.GObject):
37
35
 
38
36
    __gsignals__ = { 
39
 
        'new_dist_available' : (gobject.SIGNAL_RUN_LAST,
40
 
                                gobject.TYPE_NONE,
41
 
                                (gobject.TYPE_PYOBJECT,)),
42
 
        'dist_no_longer_supported' : (gobject.SIGNAL_RUN_LAST,
43
 
                                      gobject.TYPE_NONE,
 
37
        'new_dist_available' : (GObject.SignalFlags.RUN_LAST,
 
38
                                None,
 
39
                                (GObject.TYPE_PYOBJECT,)),
 
40
        'dist_no_longer_supported' : (GObject.SignalFlags.RUN_LAST,
 
41
                                      None,
44
42
                                      ())
45
43
 
46
44
        }
47
45
 
48
46
    def __init__(self, useDevelopmentRelease=False, useProposed=False):
49
 
        gobject.GObject.__init__(self)
 
47
        GObject.GObject.__init__(self)
50
48
        MetaReleaseCore.__init__(self, useDevelopmentRelease, useProposed)
51
49
        # in the gtk space to test if the download already finished
52
50
        # this is needed because gtk is not thread-safe
53
 
        gobject.timeout_add(1000, self.check)
 
51
        GObject.timeout_add(1000, self.check)
54
52
 
55
53
    def check(self):
56
54
        # check if we have a metarelease_information file