-rw-r--r-- | library/tzselect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/tzselect.cpp b/library/tzselect.cpp index e16b8d4..9436867 100644 --- a/library/tzselect.cpp +++ b/library/tzselect.cpp | |||
@@ -62,65 +62,65 @@ TZCombo::TZCombo( QWidget *p, const char* n ) | |||
62 | } | 62 | } |
63 | setCurrentItem(index); | 63 | setCurrentItem(index); |
64 | } else { | 64 | } else { |
65 | setCurrentItem(0); | 65 | setCurrentItem(0); |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | 69 | ||
70 | // listen on QPE/System | 70 | // listen on QPE/System |
71 | #if defined(Q_WS_QWS) | 71 | #if defined(Q_WS_QWS) |
72 | #if !defined(QT_NO_COP) | 72 | #if !defined(QT_NO_COP) |
73 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); | 73 | QCopChannel *channel = new QCopChannel( "QPE/System", this ); |
74 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 74 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
75 | this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) ); | 75 | this, SLOT(handleSystemChannel(const QCString&, const QByteArray&)) ); |
76 | #endif | 76 | #endif |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | 79 | ||
80 | } | 80 | } |
81 | 81 | ||
82 | TZCombo::~TZCombo() | 82 | TZCombo::~TZCombo() |
83 | { | 83 | { |
84 | } | 84 | } |
85 | 85 | ||
86 | void TZCombo::updateZones() | 86 | void TZCombo::updateZones() |
87 | { | 87 | { |
88 | QString cur = currentText(); | 88 | QString cur = currentText(); |
89 | clear(); | 89 | clear(); |
90 | identifiers.clear(); | 90 | identifiers.clear(); |
91 | int curix=0; | 91 | int curix=0; |
92 | QString tz = getenv("TZ"); | 92 | QString tz = getenv("TZ"); |
93 | bool tzFound = FALSE; | 93 | bool tzFound = FALSE; |
94 | Config cfg("WorldTime"); | 94 | Config cfg("CityTime"); |
95 | cfg.setGroup("TimeZones"); | 95 | cfg.setGroup("TimeZones"); |
96 | int listIndex = 0; | 96 | int listIndex = 0; |
97 | if (parent()->inherits("TimeZoneSelector")) { | 97 | if (parent()->inherits("TimeZoneSelector")) { |
98 | if ( ((TimeZoneSelector *)parent())->localIncluded() ) { | 98 | if ( ((TimeZoneSelector *)parent())->localIncluded() ) { |
99 | // overide to the 'local' type. | 99 | // overide to the 'local' type. |
100 | identifiers.append( "None" ); | 100 | identifiers.append( "None" ); |
101 | insertItem( tr("None") ); | 101 | insertItem( tr("None") ); |
102 | if ( cur == tr("None")) | 102 | if ( cur == tr("None")) |
103 | curix = 0; | 103 | curix = 0; |
104 | listIndex++; | 104 | listIndex++; |
105 | } | 105 | } |
106 | } | 106 | } |
107 | int cfgIndex = 0; | 107 | int cfgIndex = 0; |
108 | while (1) { | 108 | while (1) { |
109 | QString zn = cfg.readEntry("Zone"+QString::number(cfgIndex), QString::null); | 109 | QString zn = cfg.readEntry("Zone"+QString::number(cfgIndex), QString::null); |
110 | if ( zn.isNull() ) | 110 | if ( zn.isNull() ) |
111 | break; | 111 | break; |
112 | if ( zn == tz ) | 112 | if ( zn == tz ) |
113 | tzFound = TRUE; | 113 | tzFound = TRUE; |
114 | QString nm = cfg.readEntry("ZoneName"+QString::number(cfgIndex)); | 114 | QString nm = cfg.readEntry("ZoneName"+QString::number(cfgIndex)); |
115 | identifiers.append(zn); | 115 | identifiers.append(zn); |
116 | insertItem(nm); | 116 | insertItem(nm); |
117 | if ( nm == cur ) | 117 | if ( nm == cur ) |
118 | curix = listIndex; | 118 | curix = listIndex; |
119 | ++cfgIndex; | 119 | ++cfgIndex; |
120 | ++listIndex; | 120 | ++listIndex; |
121 | } | 121 | } |
122 | if ( !listIndex ) { | 122 | if ( !listIndex ) { |
123 | QStringList list = timezoneDefaults(); | 123 | QStringList list = timezoneDefaults(); |
124 | for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) { | 124 | for ( QStringList::Iterator it = list.begin(); it!=list.end(); ++it ) { |
125 | QString zn = *it; | 125 | QString zn = *it; |
126 | QString nm = *++it; | 126 | QString nm = *++it; |