Hello community, here is the log from the commit of package umtsmon checked in at Tue Jan 29 01:44:47 CET 2008. -------- --- umtsmon/umtsmon.changes 2008-01-24 15:45:23.000000000 +0100 +++ /mounts/work_src_done/STABLE/umtsmon/umtsmon.changes 2008-01-28 10:36:35.000000000 +0100 @@ -1,0 +2,8 @@ +Mon Jan 28 10:10:10 CET 2008 - seife@suse.de + +- update to current CVS + - language selectable on command line, still needs packaging fix + - Gerald's UI improvement patches accepted upstream + - refined network operator dialog + +------------------------------------------------------------------- Old: ---- gp-mainwindow.ui.h-messages gp-mainwindow.ui-shortcuts gp-newprofiledialog.ui-patch umtsmon-0.7.90.20080124.tar.bz2 New: ---- umtsmon-0.7.90.20080128.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ umtsmon.spec ++++++ --- /var/tmp/diff_new_pack.Z26926/_old 2008-01-29 01:44:37.000000000 +0100 +++ /var/tmp/diff_new_pack.Z26926/_new 2008-01-29 01:44:37.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package umtsmon (Version 0.7.90.20080124) +# spec file for package umtsmon (Version 0.7.90.20080128) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ Name: umtsmon BuildRequires: libusb-devel qt3-devel -Version: 0.7.90.20080124 +Version: 0.7.90.20080128 Release: 1 Summary: Control/monitor your UMTS card License: GPL v2 or later @@ -21,9 +21,6 @@ AutoReqProv: on Source0: %name-%version.tar.bz2 Patch0: umtsmon-0.7.90-pppverbosity.diff -Patch1: gp-mainwindow.ui-shortcuts -Patch2: gp-mainwindow.ui.h-messages -Patch3: gp-newprofiledialog.ui-patch %description A program to control your UMTS (and GPRS/EDGE) card: enter SIM PIN @@ -39,9 +36,6 @@ %prep %setup0 -n umtsmon %patch0 -p0 -%patch1 -p0 -%patch2 -p0 -%patch3 -p0 %build qmake @@ -60,6 +54,11 @@ rm -rf %{buildroot} %changelog +* Mon Jan 28 2008 seife@suse.de +- update to current CVS + - language selectable on command line, still needs packaging fix + - Gerald's UI improvement patches accepted upstream + - refined network operator dialog * Thu Jan 24 2008 seife@suse.de - update to current CVS - SMS, month rollover and single serial port fixes included ++++++ umtsmon-0.7.90.20080124.tar.bz2 -> umtsmon-0.7.90.20080128.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/main.cpp new/umtsmon/main.cpp --- old/umtsmon/main.cpp 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/main.cpp 2008-01-28 10:18:15.000000000 +0100 @@ -62,6 +62,7 @@ printf(" -s <at>[,<ppp>] will prevent autodetection of devices and use serial port <at>[,<ppp>]\n"); printf(" --verbose [level] set verbosity, 1=little (default), %d=all\n", MAX_VERBOSITY); printf(" -v [level] set verbosity\n"); + printf(" --language [locale] set the language, e.g. nl or pt_BR\n"); printf("\n"); exit(1); } @@ -72,6 +73,91 @@ return true; } +static bool validateLocale(const QString& aLocale) +{ + // allowed formats are: nl, nl_NL or nl_nl. + // No numbers, no dots, etc. + QRegExp myRegExp_nl("^[a-z]{2}$"); + QRegExp myRegExp_nl_nl("^[a-z]{2}_[a-zA-Z0-9.-]{0,15}$"); + if (myRegExp_nl.search(aLocale) == 0) + return true; + if (myRegExp_nl_nl.search(aLocale) == 0) + return true; + return false; +} + + +static QString theLanguage; +static bool setLang(char* anArgument) +{ + theLanguage = anArgument; + + if (validateLocale(theLanguage)==true) + return true; + + printf("ERROR: you did not specify a valid locale.\n"); + return false; +} + + +QTranslator* loadTranslator(const QString& aFileName, const QString& aLocale) +{ + DEBUG5("loadTranslator('%s', '%s')\n", aFileName.ascii(), aLocale.ascii()); + + if (validateLocale(aLocale) == false) + { + DEBUG1("aLocale '%s' denied\n", aLocale.ascii()); + return NULL; + } + + // Fix up the locale if required + // i.e. pt_pt is not allowed, should be pt_PT :-( + QString myLocale; + if (aLocale.length()>3) + { + myLocale = aLocale.left(2).lower() + "_" + aLocale.right(aLocale.length()-3).upper(); + } + else + myLocale = aLocale.lower(); + + QTranslator* myTranslator = new QTranslator(0); + QString myQMFile = aFileName + "_" + myLocale; + DEBUG5("Translation filename: '%s'\n", myQMFile.ascii()); + // try in three locations: current dir, subdir i18n and a global dir. + // note that QTranslator itself already tries several permutations, + // including aLocale equal to "de" if "de_AT" is not found + if (myTranslator->load( myQMFile, ".")) + { + DEBUG5(" .. found in '.'\n"); + goto done; + } + if (myTranslator->load( myQMFile, "i18n")) + { + DEBUG5(" .. found in 'i18n'\n"); + goto done; + } + if (myTranslator->load( myQMFile, "/usr/share/" + aFileName + "/translations")) + { + DEBUG5(" .. found in system translations\n"); + goto done; + } + + // failed: + DEBUG5(" ... NOT FOUND\n"); + delete myTranslator; + myTranslator = NULL; + + // just one extra: if "pt" doesn't work, try for "pt_PT" + if (aLocale.length() == 2) + return loadTranslator(aFileName, aLocale + "_" + aLocale); + +done: + if (myTranslator != NULL) + theLanguage = myLocale; + return myTranslator; +} + + static bool setserial(char* anArgument) { DEBUG5("setserial: '%s'\n", anArgument); @@ -129,6 +215,7 @@ { "--serial", "-s", true, setserial, }, { "--verbosity", "-v", true, setVerbosity, }, { "--force-autodetect", "", false, setForceAutodetection, }, + { "--language", "", true, setLang, }, // keep this one last { "\0", "\0", false, NULL, }, }; @@ -164,18 +251,6 @@ puts( APPNAME " version " APPRELEASE " ." ); - // translation file for Qt - QTranslator myQTTranslator(0); - myQTTranslator.load( QString( "qt_" ) + QTextCodec::locale(), "." ); - a.installTranslator( &myQTTranslator ); - - // translation file for application strings - QTranslator myAppTranslator( 0 ); - myAppTranslator.load( QString( APPNAME "_" ) + QTextCodec::locale(), "i18n" ); - a.installTranslator( &myAppTranslator ); - - - // perform command line parsing // skip argv[0] because we know what's in there for ( int i = 1; i < a.argc(); i++ ) @@ -277,6 +352,32 @@ } + // translation file for Qt, if it doesn't exist, we don't really care + QTranslator* myQTTranslatorPtr = loadTranslator("qt", theLanguage); + if (myQTTranslatorPtr == NULL) + myQTTranslatorPtr = loadTranslator("qt", QTextCodec::locale()); + if (myQTTranslatorPtr != NULL) + a.installTranslator( myQTTranslatorPtr ); + + // translation file for application strings, if specified on command line we do care + QTranslator* myAppTranslatorPtr = NULL; + if (!theLanguage.isEmpty()) + { + myAppTranslatorPtr = loadTranslator(APPNAME, theLanguage); + if (myAppTranslatorPtr == NULL) + { + printf("You specified locale '%s' which wasn't found.\n", theLanguage.ascii()); + exit(1); + } + } + if (myAppTranslatorPtr == NULL) + myAppTranslatorPtr = loadTranslator(APPNAME, QTextCodec::locale()); + if (myAppTranslatorPtr != NULL) + { + DEBUG2("Installing Translator files for locale '%s'\n", theLanguage.ascii()); + a.installTranslator( myAppTranslatorPtr ); + } + // If the user has specified command line parameters, these are already set // inside the Singleton TheDeviceManagerSingleton::getDeviceCapsRef(); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/mainwindow.ui new/umtsmon/mainwindow.ui --- old/umtsmon/mainwindow.ui 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/mainwindow.ui 2008-01-28 10:18:15.000000000 +0100 @@ -230,7 +230,7 @@ <string>Connect</string> </property> <property name="menuText"> - <string>Connect</string> + <string>&Connect</string> </property> <property name="accel"> <string></string> @@ -256,7 +256,7 @@ <string>Disconnect</string> </property> <property name="menuText"> - <string>Disconnect</string> + <string>&Disconnect</string> </property> <property name="accel"> <string>Ctrl+D</string> @@ -270,10 +270,10 @@ <bool>false</bool> </property> <property name="text"> - <string>power down card</string> + <string>Power down card</string> </property> <property name="menuText"> - <string>power down card</string> + <string>P&ower down card</string> </property> </action> <action> @@ -287,7 +287,7 @@ <string>Reset card</string> </property> <property name="menuText"> - <string>Reset card</string> + <string>R&eset card</string> </property> <property name="accel"> <string></string> @@ -304,7 +304,7 @@ <string>New SMS</string> </property> <property name="menuText"> - <string>New SMS</string> + <string>&New SMS</string> </property> <property name="accel"> <string>Ctrl+S</string> @@ -324,7 +324,7 @@ <string>Enable PIN</string> </property> <property name="menuText"> - <string>Enable PIN</string> + <string>&Enable PIN</string> </property> </action> <action> @@ -338,7 +338,7 @@ <bool>false</bool> </property> <property name="text"> - <string>Disable PIN</string> + <string>&Disable PIN</string> </property> <property name="menuText"> <string>Disable PIN</string> @@ -361,7 +361,7 @@ <string>Change PIN</string> </property> <property name="menuText"> - <string>Change PIN</string> + <string>&Change PIN</string> </property> </action> <action> @@ -375,7 +375,7 @@ <string>System Info</string> </property> <property name="menuText"> - <string>System Info</string> + <string>System &Info</string> </property> <property name="accel"> <string>F2</string> @@ -392,7 +392,7 @@ <string>Autodetection log</string> </property> <property name="menuText"> - <string>Autodetection log</string> + <string>Autodetection &log</string> </property> </action> <action> @@ -406,7 +406,7 @@ <string>About</string> </property> <property name="menuText"> - <string>About APPNAME</string> + <string>&About APPNAME</string> </property> <property name="accel"> <string>F3</string> @@ -426,7 +426,7 @@ <string>Help</string> </property> <property name="menuText"> - <string>Help</string> + <string>&Help</string> </property> <property name="accel"> <string>F1</string> @@ -443,7 +443,7 @@ <string>Manage Profiles</string> </property> <property name="menuText"> - <string>Manage Profiles</string> + <string>Manage &Profiles...</string> </property> <property name="accel"> <string>Ctrl+P</string> @@ -457,10 +457,10 @@ <iconset>system-log-out-16x16.png</iconset> </property> <property name="text"> - <string>Exit APPNAME</string> + <string>Quit APPNAME</string> </property> <property name="menuText"> - <string>Exit APPNAME</string> + <string>&Quit APPNAME</string> </property> <property name="accel"> <string>Ctrl+Q</string> @@ -485,7 +485,7 @@ <string>Select network operator</string> </property> <property name="menuText"> - <string>Select network operator</string> + <string>&Select network operator...</string> </property> </action> <action> @@ -499,7 +499,7 @@ <string>Radio Preferences</string> </property> <property name="menuText"> - <string>Radio Preferences</string> + <string>&Radio Preferences...</string> </property> </action> </actions> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/mainwindow.ui.h new/umtsmon/mainwindow.ui.h --- old/umtsmon/mainwindow.ui.h 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/mainwindow.ui.h 2008-01-28 10:18:15.000000000 +0100 @@ -66,8 +66,8 @@ myRefreshTimer = NULL; setCaption(APPNAME " " APPRELEASE); - menu_help_about->setMenuText("About " APPNAME ); - menu_connection_exit->setMenuText("Exit " APPNAME ); + menu_help_about->setMenuText("&About " APPNAME ); + menu_connection_exit->setMenuText("&Quit " APPNAME ); Toolbar->setCaption(APPNAME" Toolbar"); // lets check the PIN-Status... so we can make the menu user friendly... :) @@ -488,8 +488,8 @@ //--------------------- problems: DEBUG1("start PPP NOT successful :-(\n"); - Popup::Warning(tr("starting PPP was not successful\n" - "please run from commandline with -v5 and check output"), this); + Popup::Warning(tr("Failed to start PPP.\n" + "Please re-run umtsmon from the commandline with -v5 and check the output."), this); cleanup: sleep(1); @@ -563,7 +563,7 @@ aDialogToExecPtr->exec(); return true; } - Popup::Warning(tr("PPP active\ncannot run this in parallel"), this); + Popup::Warning(tr("PPP is active, cannot run this in parallel."), this); return false; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/networkoperatordialog.ui new/umtsmon/src/view/networkoperatordialog.ui --- old/umtsmon/src/view/networkoperatordialog.ui 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/src/view/networkoperatordialog.ui 2008-01-28 10:18:15.000000000 +0100 @@ -44,7 +44,7 @@ <cstring>pushButtonFindNetworks</cstring> </property> <property name="text"> - <string>find networks</string> + <string>Find networks</string> </property> <property name="iconSet"> <iconset>system-search-16x16.png</iconset> @@ -75,7 +75,7 @@ <bool>false</bool> </property> <property name="text"> - <string>select</string> + <string>Select</string> </property> <property name="iconSet"> <iconset>ok.png</iconset> @@ -90,7 +90,7 @@ </property> <property name="minimumSize"> <size> - <width>172</width> + <width>250</width> <height>0</height> </size> </property> @@ -103,7 +103,7 @@ <bool>true</bool> </property> <property name="text"> - <string>cancel</string> + <string>Cancel</string> </property> <property name="iconSet"> <iconset>no.png</iconset> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/networkoperatordialog.ui.h new/umtsmon/src/view/networkoperatordialog.ui.h --- old/umtsmon/src/view/networkoperatordialog.ui.h 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/src/view/networkoperatordialog.ui.h 2008-01-28 10:18:15.000000000 +0100 @@ -130,7 +130,7 @@ networkPicker->setEnabled(true); pushButtonSelect->setEnabled(true); - networkPickerComments->setText(tr("select your operator from the above list")); + networkPickerComments->setText(tr("Select your operator from the above list.")); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/src/view/newprofiledialog.ui new/umtsmon/src/view/newprofiledialog.ui --- old/umtsmon/src/view/newprofiledialog.ui 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/src/view/newprofiledialog.ui 2008-01-28 10:18:15.000000000 +0100 @@ -17,7 +17,7 @@ </font> </property> <property name="caption"> - <string>create new profile</string> + <string>New Profile</string> </property> <property name="icon"> <pixmap>document-new-22x22.png</pixmap> @@ -31,7 +31,7 @@ <cstring>textLabel1</cstring> </property> <property name="text"> - <string>profilename</string> + <string>Profile name</string> </property> </widget> <widget class="QLineEdit"> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/umtsmon/TODO new/umtsmon/TODO --- old/umtsmon/TODO 2008-01-24 15:36:10.000000000 +0100 +++ new/umtsmon/TODO 2008-01-28 10:18:15.000000000 +0100 @@ -130,10 +130,11 @@ * internationalization / dutch (nl) - Klaas * brazilian portugese (pt-br) - Alvaro - X german (de) - Lubomir + / german (de) - Lubomir * french/polish/russian/spanish/korean/other languages only if volunteers X fix the LCDDisplay to show "operator" "profile" and such i18n as well - * auto update of stats should be always enabled until registered. + X language selection from command line + X language selection through "LANG" environment variable * Fix network selection of Novatel XU870 * icons - get more icons from the Tango series @@ -160,6 +161,8 @@ -------------------------------------------------------------------------- For "FUTURE RELEASES": + * auto update of stats should be always enabled until registered. + * add menu option to fix to certain language - don't care about environment. * TO BE REPORTED BUG: when a usb serial plug is inserted *AND* a usb2serial-based card like the Option, the new autodetection code will decide ttyUSB0 and ttyUSB3 first. the test for AT will fail - the card will only use ttyUSB3. Not good. @@ -214,4 +217,6 @@ * (See Bug 1856802) for some device/operator, the MTU changes between GPRS and UMTS operation. The only workaround is currently to set a fixed MTU in the file /etc/ppp/options, which then is used for both radio modes. - + * add location identification, like shown in this application: + http://www.ullihome.de/index.php/Hauptseite#Net_Monitor + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org