~ubuntu-branches/ubuntu/intrepid/update-manager/intrepid

« back to all changes in this revision

Viewing changes to gnome-software-properties

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2006-04-20 18:23:54 UTC
  • Revision ID: james.westby@ubuntu.com-20060420182354-mbpnqmq3owrrvvwu
Tags: 0.42.2ubuntu13
* po/POTFILES.in: add missing desktop file (ubuntu: #39410)
* UpdateManager/UpdateManager.py: 
  - fix in the get_changelog logic (ubuntu: #40058)
  - correct a error in the changelog parser (ubuntu: #40060)
  - fix download size reporting (ubuntu: #39579)
* debian/rules: added dh_iconcache
* setup.py: install the icons into the hicolor icon schema
  (thanks to Sebastian Heinlein)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python2.4
2
 
# update-manager.in - easy updating application
3
 
#  
4
 
#  Copyright (c) 2004,2005 Canonical
5
 
#                2004,2005 Michiel Sikkes
6
 
#  
7
 
#  Author: Michiel Sikkes <michiel@eyesopened.nl>
8
 
#          Michael Vogt <mvo@debian.org>
9
 
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.
14
 
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.
19
 
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
23
 
#  USA
24
 
 
25
 
import pygtk
26
 
pygtk.require('2.0')
27
 
import gtk
28
 
import gtk.gdk
29
 
import gtk.glade
30
 
import gobject
31
 
import gnome
32
 
import gettext
33
 
import os
34
 
import sys
35
 
 
36
 
from optparse import OptionParser
37
 
 
38
 
#sys.path.append("@prefix@/share/update-manager/python")
39
 
 
40
 
from SoftwareProperties import SoftwareProperties
41
 
 
42
 
if __name__ == "__main__":
43
 
  _ = gettext.gettext
44
 
 
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)")
55
 
                   
56
 
 
57
 
  (options, args) = parser.parse_args()
58
 
  # Check for root permissions
59
 
  if os.geteuid() != 0:
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)
63
 
    dialog.run()
64
 
    dialog.destroy()
65
 
    sys.exit(1)
66
 
                     
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)
73
 
 
74
 
  data_dir="/usr/share/update-manager/"
75
 
  #data_dir="/tmp/xxx/share/update-manager/"
76
 
  file = None
77
 
  if len(args) > 0:
78
 
      file = args[0]
79
 
  app = SoftwareProperties.SoftwareProperties(data_dir, options, file)
80
 
  app.run()
81
 
  sys.exit(app.modified)