Ignore:
Timestamp:
Oct 18, 2013 10:59:01 AM (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
a27573b9, 4069c7b
Parents:
688b57d
Message:

On first-boot wizard, add ability to detect users timezone if internet
is connected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-firstbootgui/firstboot.cpp

    r3890273 r5a1d1a0  
    4949    // Load the timezones 
    5050    comboBoxTimezone->clear(); 
     51    QString curZone = Scripts::Backend::guessTimezone(); 
    5152    comboBoxTimezone->addItems(Scripts::Backend::timezones()); 
    52     // Set America/New_York to default 
    53     int index = comboBoxTimezone->findText("America/New_York", Qt::MatchStartsWith); 
    54     if (index != -1) 
    55        comboBoxTimezone->setCurrentIndex(index); 
     53    if ( ! curZone.isEmpty() ) { 
     54      int index = comboBoxTimezone->findText(curZone, Qt::MatchStartsWith); 
     55      if (index != -1) 
     56         comboBoxTimezone->setCurrentIndex(index); 
     57    } else { 
     58      // Set America/New_York to default 
     59      int index = comboBoxTimezone->findText("America/New_York", Qt::MatchStartsWith); 
     60      if (index != -1) 
     61         comboBoxTimezone->setCurrentIndex(index); 
     62    } 
    5663 
    5764    // Load the hostname 
Note: See TracChangeset for help on using the changeset viewer.