~jm-leddy/ubuntu/precise/ubiquity/lp929092

« back to all changes in this revision

Viewing changes to ubiquity/components/ubi-timezone.py

  • Committer: Bazaar Package Importer
  • Author(s): Evan Dandrea, Evan Dandrea, Colin Watson
  • Date: 2009-11-13 10:41:42 UTC
  • mfrom: (281.1.2 karmic-updates)
  • Revision ID: james.westby@ubuntu.com-20091113104142-ghwoqmn0bko416c2
Tags: 2.1.0
[ Evan Dandrea ]
* Run X with -nolisten tcp (LP: #462394).
* Make sure we never try to install onto the live filesystem.
* Only print the filenames being blacklisted if in debug mode.
* Provide human readable sizes in the partitions-too-small warning
  (LP: #298974).
* Mark the "Installation Complete" window as always on top
  (LP: #462178).
* Fixes from Pychecker for the KDE frontend (kde_ui):
  - Don't import datetime or math.  The timezone code is in a separate
    module now.
  - Remove some unused variables.
  - Don't assign to a variable that's going to be immediately discarded.
* Signal to GTK+ when using a right-to-left language, so that it
  composes the interface from right to left (LP: #222845).
* Signal to the slideshow when the installer is using a right-to-left
  language (LP: #446989).
* Set SUDO_UID and SUDO_GID in ubiquity-dm so ubiquity knows what user
  to drop privileges to (LP: #422254).
* Do not try to configure networking in oem-config (LP: #471498).
* Make migration-assistant import failures non-fatal to the overall
  install.
* pkgsel now provides a debconf question to avoid warning the end user
  when the language packs could not be installed (LP: #471553).
* Make sure a device exists as part of the grub target device
  validation.
* Allow the user to retry grub installation with a different device on
  failure.
* Automatic update of included source packages: apt-setup
  1:0.42ubuntu1, choose-mirror 2.29ubuntu2, clock-setup 0.100ubuntu1,
  debian-installer-utils 1.71ubuntu1, grub-installer 1.47ubuntu1, hw-
  detect 1.73ubuntu1, netcfg 1.51ubuntu1, partman-base 135ubuntu1,
  tzsetup 1:0.26ubuntu1, user-setup 1.28ubuntu1.

[ Colin Watson ]
* Add a debian/rules target to run pychecker. I've fixed several warnings,
  but there are still several left so this is not yet enabled by default.
* Fix debconf frontend:
  - Start oem-config on stopping rc, as well as when starting display
    managers.
  - Add some missing imports (ubiquity.frontend.base.Controller,
    ubiquity.plugin.Plugin, ubiquity.i18n, signal,
    ubiquity.components.install).
  - If there's a containing debconf frontend, talk to it rather than using
    debconf-communicator.
  - Set a controller in the language plugin.
  - Use spaces rather than ${!TAB} in localechooser when using the debconf
    frontend, since debconf doesn't support the latter yet.
  - Don't handle user-setup preseeding for the debconf frontend.
  - Remove unused progress_position handling.
  - Fix exception names in ubi-network and ubi-tasks.
* Require Python 2.5, so we can now use hashlib rather than md5 and avoid
  a slew of warnings.
* Add an intro message noting that we're alpha again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
                    break
97
97
                iterator = m.iter_next(iterator)
98
98
 
99
 
    def select_city(self, widget, city):
 
99
    def select_city(self, unused_widget, city):
100
100
        loc = self.tzdb.get_loc(city)
101
101
        if not loc:
102
102
            return
182
182
        self.controller = controller
183
183
        try:
184
184
            from PyQt4 import uic
185
 
            from PyQt4.QtGui import QVBoxLayout
186
185
            from PyQt4.QtCore import SIGNAL
187
186
            from ubiquity.frontend.kde_components.Timezone import TimezoneMap
188
187
            self.page = uic.loadUi('/usr/share/ubiquity/qt/stepLocation.ui')
375
374
        names, codes = zip(*continents.items())
376
375
        codes = [c.replace(' ', '_') for c in codes]
377
376
        
378
 
        nones = [None for key in continents]
 
377
        nones = [None for _ in continents]
379
378
        pairs = zip(names, nones, codes)
380
379
        pairs.sort(key=self.collation_key)
381
380
        return pairs
390
389
                    del shortlist[pair[0]]
391
390
                    break
392
391
            names, codes = zip(*shortlist.items())
393
 
            nones = [None for key in names]
 
392
            nones = [None for _ in names]
394
393
            shortlist = zip(names, codes, nones)
395
394
            shortlist.sort(key=self.collation_key)
396
395
            return shortlist
436
435
            shortlist = shortlist.items()
437
436
            shortlist.sort(key=self.collation_key)
438
437
            return shortlist
439
 
        except debconf.DebconfError, e:
 
438
        except debconf.DebconfError:
440
439
            return []
441
440
 
442
441
    def get_country_name(self, country):
522
521
    def build_longlist_timezone_pairs_by_continent(self, continent):
523
522
        if 'LANG' not in os.environ:
524
523
            return [] # ?
525
 
        locale = os.environ['LANG'].rsplit('.', 1)[0]
526
 
        tz_format = PyICU.SimpleDateFormat('VVVV', PyICU.Locale(locale))
527
 
        now = time.time()*1000
528
524
        rv = []
529
525
        try:
530
526
            regions = self.choices_untranslated('localechooser/countrylist/%s' % continent)
549
545
 
550
546
    def cleanup(self):
551
547
        Plugin.cleanup(self)
552
 
        i18n.reset_locale(just_country=True)
 
548
        i18n.reset_locale(just_country=True, db=self.db)
553
549
 
554
550
class Install(InstallPlugin):
555
551
    def prepare(self, unfiltered=False):