author | zecke <zecke> | 2004-10-15 02:30:08 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-15 02:30:08 (UTC) |
commit | 5c3759f02725c17ba0efc386193a83da55a9a5da (patch) (side-by-side diff) | |
tree | b03e604b282de315096b74b6f404851c2bba3ad6 /inputmethods/pickboard/pickboardpicks.cpp | |
parent | fefeafe35f8dac30f4baab9e3bff8e2ffbd1afd0 (diff) | |
download | opie-5c3759f02725c17ba0efc386193a83da55a9a5da.zip opie-5c3759f02725c17ba0efc386193a83da55a9a5da.tar.gz opie-5c3759f02725c17ba0efc386193a83da55a9a5da.tar.bz2 |
Apply patch from Qtopia1.7 to allow 'Umlaute' in the pickboard
and make 'strings' translatable.
This also fixes #501
Diffstat (limited to 'inputmethods/pickboard/pickboardpicks.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/pickboard/pickboardpicks.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/inputmethods/pickboard/pickboardpicks.cpp b/inputmethods/pickboard/pickboardpicks.cpp index a80bbf8..b9d9928 100644 --- a/inputmethods/pickboard/pickboardpicks.cpp +++ b/inputmethods/pickboard/pickboardpicks.cpp @@ -1,16 +1,16 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are @@ -24,25 +24,27 @@ #include <qpainter.h> #include <qlist.h> #include <qbitmap.h> #include <qlayout.h> #include <qvbox.h> #include <qdialog.h> #include <qscrollview.h> #include <qpopupmenu.h> #include <qhbuttongroup.h> #include <qpushbutton.h> #include <qmessagebox.h> +#ifdef QWS #include <qwindowsystem_qws.h> +#endif void PickboardPicks::doMenu() { QWidget* cause = (QWidget*)sender(); // evil QPopupMenu popup(this); config()->fillMenu(popup); QPoint pos = cause->mapToGlobal(cause->rect().topRight()); QSize sz = popup.sizeHint(); pos.ry() -= sz.height(); pos.rx() -= sz.width(); @@ -239,48 +241,45 @@ static const char *Space_xpm[] = { "a.......a", "a.......a", "a.......a", "a.......a", "a.......a", "a.......a", "aaaaaaaaa" }; PickboardPicks::PickboardPicks(QWidget* parent, const char* name, WFlags f ) : QFrame(parent,name,f) { + configs.setAutoDelete( TRUE ); } void PickboardPicks::initialise(void) { setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); mode = 0; DictFilterConfig* dc = new DictFilterConfig(this); - dc->addSet("ABC"); - dc->addSet("DEF"); - dc->addSet("GHI"); - dc->addSet("JKL"); - dc->addSet("MNO"); - dc->addSet("PQR"); - dc->addSet("STU"); - dc->addSet("VWX"); - dc->addSet("YZ-'"); + QStringList sets_a = QStringList::split(' ',tr("ABC DEF GHI JKL MNO PQR STU VWX YZ-'")); + QStringList sets = QStringList::split(' ', + tr("ABC%/1iso8859-15 DEF%/1iso8859-15 GHI%/1iso8859-15 JKL MNO%/1iso8859-15 PQR%/1iso8859-15 STU%/1iso8859-15 VWX YZ-'%/1iso8859-15")); + for (QStringList::ConstIterator it = sets.begin(), it_a = sets_a.begin(); it!=sets.end(); ++it,++it_a) + dc->addSet(*it_a,*it); dc->addMode("123"); dc->addMode("@*!?"); - dc->addMode("KEY"); - dc->addMode("Space"); - dc->addMode("Back"); - dc->addMode("Enter"); - dc->addMode("Shift"); + dc->addMode(tr("KEY")); + dc->addMode(tr("Space")); + dc->addMode(tr("Back")); + dc->addMode(tr("Enter")); + dc->addMode(tr("Shift")); configs.append(dc); CharStringConfig* number = new CharStringConfig(this); number->addChar("0"); number->addChar("1"); number->addChar("2"); number->addChar("3"); number->addChar("4"); number->addChar("5"); number->addChar("6"); number->addChar("7"); number->addChar("8"); |