1
#!/usr/bin/env python2.4
2
# update-manager.in - easy updating application
4
# Copyright (c) 2004,2005 Canonical
5
# 2004,2005 Michiel Sikkes
7
# Author: Michiel Sikkes <michiel@eyesopened.nl>
8
# Michael Vogt <mvo@debian.org>
10
# This program is free software; you can redistribute it and/or
11
# modify it under the terms of the GNU General Public License as
12
# published by the Free Software Foundation; either version 2 of the
13
# License, or (at your option) any later version.
15
# This program is distributed in the hope that it will be useful,
16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
# GNU General Public License for more details.
20
# You should have received a copy of the GNU General Public License
21
# along with this program; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
36
from optparse import OptionParser
38
#sys.path.append("@prefix@/share/update-manager/python")
40
from SoftwareProperties import SoftwareProperties
42
if __name__ == "__main__":
45
# Begin parsing of options
46
parser = OptionParser()
47
parser.add_option ("-n", "--no-update", action="store_true",
48
dest="no_update", default=False,
49
help="No update on repository change (usefull if called "\
50
"from a external program).")
51
parser.add_option("-t", "--toplevel",
52
action="store", type="string", dest="toplevel",
53
help="Set x-window-id of the toplevel parent for the "\
54
"dialog (usefull for embedding)")
57
(options, args) = parser.parse_args()
58
# Check for root permissions
60
dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK,
61
_("You need to be root to run this program") )
62
dialog.set_default_response(gtk.RESPONSE_OK)
67
localesApp="update-manager"
68
localesDir="/usr/share/locale"
69
gettext.bindtextdomain(localesApp, localesDir)
70
gettext.textdomain(localesApp)
71
gtk.glade.bindtextdomain(localesApp, localesDir)
72
gtk.glade.textdomain(localesApp)
74
data_dir="/usr/share/update-manager/"
75
#data_dir="/tmp/xxx/share/update-manager/"
79
app = SoftwareProperties.SoftwareProperties(data_dir, options, file)
81
sys.exit(app.modified)