1
# Copyright (c) 2004-2007 Canonical
3
# Author: Michael Vogt <michael.vogt@ubuntu.com>
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License as
7
# published by the Free Software Foundation; either version 2 of the
8
# License, or (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
30
from subprocess import Popen,PIPE
31
from Core.MetaRelease import MetaReleaseCore
33
class MetaRelease(MetaReleaseCore,gobject.GObject):
36
'new_dist_available' : (gobject.SIGNAL_RUN_LAST,
38
(gobject.TYPE_PYOBJECT,)),
39
'dist_no_longer_supported' : (gobject.SIGNAL_RUN_LAST,
45
def __init__(self, useDevelopmentRelase=False, useProposed=False):
46
gobject.GObject.__init__(self)
47
MetaReleaseCore.__init__(self, useDevelopmentRelase, useProposed)
48
# in the gtk space to test if the download already finished
49
# this is needed because gtk is not thread-safe
50
gobject.timeout_add(1000, self.check)
53
# check if we have a metarelease_information file
55
if self.no_longer_supported is not None:
57
self.emit("dist_no_longer_supported",self.no_longer_supported )
58
if self.new_dist is not None:
60
self.emit("new_dist_available", self.new_dist)