summaryrefslogtreecommitdiff
authorgroucho <groucho>2003-01-27 10:34:16 (UTC)
committer groucho <groucho>2003-01-27 10:34:16 (UTC)
commit41b4b9c38bada39b0e5d53b481f132e85e796463 (patch) (side-by-side diff)
tree8498fab432e1c4895be182f29fc944f6e33581f1
parentb20483d184a2c32ade729f117e1fcd380f29649f (diff)
downloadopie-41b4b9c38bada39b0e5d53b481f132e85e796463.zip
opie-41b4b9c38bada39b0e5d53b481f132e85e796463.tar.gz
opie-41b4b9c38bada39b0e5d53b481f132e85e796463.tar.bz2
Added translation for aqpkg
Fixed a bug where aqpkg would not close the window, when the close button had been translated ;-)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/aqpkg.pro17
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp2
2 files changed, 18 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/aqpkg.pro b/noncore/settings/aqpkg/aqpkg.pro
index 98c358c..d8eee6a 100644
--- a/noncore/settings/aqpkg/aqpkg.pro
+++ b/noncore/settings/aqpkg/aqpkg.pro
@@ -1,47 +1,64 @@
TEMPLATE = app
CONFIG = qt warn_on release
HEADERS = global.h \
mainwin.h \
datamgr.h \
settingsimpl.h \
ipkg.h \
package.h \
installdlgimpl.h \
instoptionsimpl.h \
destination.h \
utils.h \
server.h \
helpwindow.h \
letterpushbutton.h \
inputdlg.h \
categoryfilterimpl.h
SOURCES = mainwin.cpp \
datamgr.cpp \
mem.cpp \
settingsimpl.cpp \
ipkg.cpp \
main.cpp \
package.cpp \
installdlgimpl.cpp \
instoptionsimpl.cpp \
destination.cpp \
utils.cpp \
server.cpp \
helpwindow.cpp \
letterpushbutton.cpp \
inputdlg.cpp \
version.cpp \
categoryfilterimpl.cpp
INTERFACES = settings.ui \
install.ui \
instoptions.ui \
categoryfilter.ui
TARGET = aqpkg
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie -lstdc++
DESTDIR = $(OPIEDIR)/bin
+TRANSLATIONS = ../../../i18n/de/aqpkg.ts \
+ ../../../i18n/xx/aqpkg.ts \
+ ../../../i18n/en/aqpkg.ts \
+ ../../../i18n/es/aqpkg.ts \
+ ../../../i18n/fr/aqpkg.ts \
+ ../../../i18n/hu/aqpkg.ts \
+ ../../../i18n/ja/aqpkg.ts \
+ ../../../i18n/ko/aqpkg.ts \
+ ../../../i18n/no/aqpkg.ts \
+ ../../../i18n/pl/aqpkg.ts \
+ ../../../i18n/pt/aqpkg.ts \
+ ../../../i18n/pt_BR/aqpkg.ts \
+ ../../../i18n/sl/aqpkg.ts \
+ ../../../i18n/zh_CN/aqpkg.ts \
+ ../../../i18n/zh_TW/aqpkg.ts \
+ ../../../i18n/it/aqpkg.ts \
+ ../../../i18n/da/aqpkg.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index bf2c482..75ce1a1 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -96,129 +96,129 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d
else if ( item.option == "U" || item.option == "R" )
{
updateList.push_back( item );
QString type = " (Upgrade)";
if ( item.option == "R" )
type = " (ReInstall)";
upgrade += " " + item.packageName + type + "\n";
}
}
output->setText( remove + install + upgrade );
displayAvailableSpace( destination->currentText() );
}
InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget *parent, const char *name, bool modal, WFlags fl )
: InstallDlg( parent, name, modal, fl )
{
pIpkg = ipkg;
output->setText( initialText );
}
InstallDlgImpl::~InstallDlgImpl()
{
}
bool InstallDlgImpl :: showDlg()
{
showMaximized();
bool ret = exec();
return ret;
}
void InstallDlgImpl :: optionsSelected()
{
InstallOptionsDlgImpl opt( flags, this, "Option", true );
opt.exec();
// set options selected from dialog
flags = opt.getFlags();
#ifdef QWS
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "installFlags", flags );
#endif
}
void InstallDlgImpl :: installSelected()
{
if ( btnInstall->text() == "Abort" )
{
if ( pIpkg )
{
displayText( "\n**** User Clicked ABORT ***" );
pIpkg->abort();
displayText( "**** Process Aborted ****" );
}
btnInstall->setText( tr( "Close" ) );
return;
}
- else if ( btnInstall->text() == "Close" )
+ else if ( btnInstall->text() == tr( "Close" ) )
{
done( 1 );
return;
}
// Disable buttons
btnOptions->setEnabled( false );
// btnInstall->setEnabled( false );
btnInstall->setText( "Abort" );
if ( pIpkg )
{
output->setText( "" );
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
pIpkg->runIpkg();
}
else
{
output->setText( "" );
vector<Destination>::iterator d = dataMgr->getDestination( destination->currentText() );
QString dest = d->getDestinationName();
QString destDir = d->getDestinationPath();
int instFlags = flags;
if ( d->linkToRoot() )
instFlags |= MAKE_LINKS;
#ifdef QWS
// Save settings
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "dest", dest );
#endif
pIpkg = new Ipkg;
connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
// First run through the remove list, then the install list then the upgrade list
vector<InstallData>::iterator it;
pIpkg->setOption( "remove" );
for ( it = removeList.begin() ; it != removeList.end() ; ++it )
{
pIpkg->setDestination( it->destination->getDestinationName() );
pIpkg->setDestinationDir( it->destination->getDestinationPath() );
pIpkg->setPackage( it->packageName );
int tmpFlags = flags;
if ( it->destination->linkToRoot() )
tmpFlags |= MAKE_LINKS;
pIpkg->setFlags( tmpFlags );
pIpkg->runIpkg();
}
pIpkg->setOption( "install" );
pIpkg->setDestination( dest );
pIpkg->setDestinationDir( destDir );
pIpkg->setFlags( instFlags );
for ( it = installList.begin() ; it != installList.end() ; ++it )
{
pIpkg->setPackage( it->packageName );
pIpkg->runIpkg();
}