-rw-r--r-- | library/tzselect.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/tzselect.cpp b/library/tzselect.cpp index 2e5a433..335037e 100644 --- a/library/tzselect.cpp +++ b/library/tzselect.cpp @@ -16,32 +16,34 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_TZSELECT_INC_LOCAL #include "tzselect.h" #include "resource.h" #include "global.h" #include "config.h" #include <qtoolbutton.h> #include <qfile.h> #include <stdlib.h> #include <qcopchannel_qws.h> +#include <qpe/qpeapplication.h> +#include <qmessagebox.h> class TimeZoneSelectorPrivate { public: TimeZoneSelectorPrivate() : includeLocal(FALSE) {} bool includeLocal; }; TZCombo::TZCombo( QWidget *p, const char* n ) : QComboBox( p, n ) { updateZones(); // check to see if TZ is set, if it is set the current item to that QString tz = getenv("TZ"); if (parent()->inherits("TimeZoneSelector")) { if ( ((TimeZoneSelector *)parent())->localIncluded() ) { @@ -232,33 +234,37 @@ QString TimeZoneSelector::currentZone() const return cmbTz->currZone(); } void TimeZoneSelector::setCurrentZone( const QString& id ) { cmbTz->setCurrZone( id ); } void TimeZoneSelector::slotTzActive( int ) { emit signalNewTz( cmbTz->currZone() ); } void TimeZoneSelector::slotExecute( void ) { // execute the world time application... + if (QFile::exists(QPEApplication::qpeDir()+"bin/citytime")) Global::execute( "citytime" ); + else + QMessageBox::warning(this,tr("citytime executable not found"), + tr("In order to choose the time zones,\nplease install citytime.")); } QStringList timezoneDefaults( void ) { QStringList tzs; // load up the list just like the file format (citytime.cpp) tzs.append( "America/New_York" ); tzs.append( "New York" ); tzs.append( "America/Los_Angeles" ); tzs.append( "Los Angeles" ); tzs.append( "Australia/Brisbane" ); tzs.append( "Brisbane" ); tzs.append( "Europe/Berlin" ); tzs.append( "Berlin" ); tzs.append( "Asia/Tokyo" ); tzs.append( "Tokyo" ); |