summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/multikeyapplet/multikey.cpp2
-rw-r--r--core/apps/taboapp/main.cpp4
-rw-r--r--core/launcher/inputmethods.cpp6
-rw-r--r--core/launcher/irserver.cpp4
-rw-r--r--core/launcher/startmenu.cpp4
-rw-r--r--core/launcher/systray.cpp4
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp2
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp2
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp2
-rw-r--r--core/opie-login/main.cpp2
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/taskbarsettings.cpp4
-rw-r--r--core/settings/security/multiauthconfig.cpp8
-rw-r--r--core/tools/quicklauncher/dropins.h4
14 files changed, 26 insertions, 26 deletions
diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp
index 195d8a4..8cb9083 100644
--- a/core/applets/multikeyapplet/multikey.cpp
+++ b/core/applets/multikeyapplet/multikey.cpp
@@ -62,49 +62,49 @@ void Multikey::mousePressEvent(QMouseEvent *ev)
}
void Multikey::mouseReleaseEvent(QMouseEvent *ev)
{
if (!sw_maps.count())
return;
lang = lang < sw_maps.count()-1 ? lang+1 : 0;
QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)");
//odebug << "Lang=" << lang << ", count=" << sw_maps.count() << ", lab=" << labels[lang].ascii() << "" << oendl;
e << sw_maps[lang];
setText(labels[lang]);
}
void Multikey::message(const QCString &message, const QByteArray &data)
{
if ( message == "setsw(QString,QString)" ) {
QDataStream stream(data, IO_ReadOnly);
QString maps, current_map;
stream >> maps >> current_map;
QStringList sw = QStringList::split(QChar('|'), maps);
sw.append(current_map);
- QDir map_dir(QPEApplication::qpeDir() + "/share/multikey/", "*.keymap");
+ QDir map_dir(QPEApplication::qpeDir() + "share/multikey/", "*.keymap");
lang = 0;
labels.clear();
sw_maps.clear();
popupMenu.clear();
for (uint i = 0; i < sw.count(); ++i) {
QString keymap_map;
if (sw[i][0] != '/') {
keymap_map = map_dir.absPath() + "/" + sw[i];
} else {
if ((map_dir.exists(QFileInfo(sw[i]).fileName(), false)
&& i != sw.count()-1) || !QFile::exists(sw[i])) {
continue;
}
keymap_map = sw[i];
}
QFile map(keymap_map);
if (map.open(IO_ReadOnly)) {
QString line;
map.readLine(line, 1024);
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index e43f118..e999803 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -1,57 +1,57 @@
/* OPIE */
#include <oappinterface.h>
#include <oappplugin.h>
#include <opie2/odebug.h>
#include <opie2/otabwidget.h>
#include <qpe/qpeapplication.h>
#include <qpe/qlibrary.h>
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
#include <qdir.h>
int main( int argc, char **argv )
{
QPEApplication a( argc, argv );
OTabWidget *tabwidget = new OTabWidget(0, "tab widget");
- QString path = QPEApplication::qpeDir() + "/plugins/app";
+ QString path = QPEApplication::qpeDir() + "plugins/app";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
QInterfacePtr<OAppInterface> iface;
for ( it = list.begin(); it != list.end(); ++it ) {
QLibrary *lib = new QLibrary( path + "/" + *it );
odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
if ( lib->queryInterface( IID_OAppInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
odebug << "accepted: " << QString( path + "/" + *it ) << "" << oendl;
QList<QWidget> list = iface->widgets();
QWidget *widget;
for ( widget = list.first(); widget != 0; widget = list.next() )
tabwidget->addTab(widget, QString(*it), QString(*it));
QString lang = getenv( "LANG" );
if (lang.isNull())
lang = "en";
QTranslator *trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
if (type.left(3) == "lib")
type = type.mid(3);
type = type.right( type.find("lib") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
}
}
a.showMainDocumentWidget(tabwidget);
return a.exec();
}
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 586628b..24669ac 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -196,108 +196,108 @@ QRect InputMethods::inputRect() const
return QRect();
else
return mkeyboard->widget->geometry();
}
void InputMethods::unloadInputMethods()
{
unloadMethod( inputMethodList );
unloadMethod( inputModifierList );
inputMethodList.clear();
inputModifierList.clear();
}
void InputMethods::unloadMethod( QValueList<InputMethod>& list ) {
QValueList<InputMethod>::Iterator it;
for (it = list.begin(); it != list.end(); ++it )
(*it).releaseInterface();
}
QStringList InputMethods::plugins()const {
- QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
+ QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
#ifdef Q_OS_MACX
QDir dir( path, "lib*.dylib" );
#else
QDir dir( path, "lib*.so" );
#endif /* Q_OS_MACX */
return dir.entryList();
}
void InputMethods::installTranslator( const QString& type ) {
QStringList langs = Global::languageList();
QStringList::ConstIterator lit;
for ( lit= langs.begin(); lit!=langs.end(); ++lit) {
QString lang = *lit;
QTranslator * trans = new QTranslator(qApp);
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
}
}
void InputMethods::setPreferedHandlers() {
Config cfg("qpe");
cfg.setGroup("InputMethod");
QString current = cfg.readEntry("current");
QString im = cfg.readEntry("im");
QValueList<InputMethod>::Iterator it;
if (!inputModifierList.isEmpty() && !im.isEmpty() ) {
for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it )
if ( (*it).name() == im ) {
imethod = &(*it); break;
}
}
if (!inputMethodList.isEmpty() && !current.isEmpty() ) {
for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
if ( (*it).name() == current ) {
owarn << "preferred keyboard is " << current << "" << oendl;
mkeyboard = &(*it);
kbdButton->setPixmap( *mkeyboard->icon() );
break;
}
}
}
void InputMethods::loadInputMethods()
{
#ifndef QT_NO_COMPONENT
hideInputMethod();
mkeyboard = 0;
unloadInputMethods();
- QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
+ QString path = QPEApplication::qpeDir() + "plugins/inputmethods";
QStringList list = plugins();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
InputMethodInterface *iface = 0;
ExtInputMethodInterface *eface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) {
InputMethod input;
input.newIM = FALSE;
input.library = lib;
input.libName = *it;
input.interface = iface;
input.widget = input.interface->inputMethod( 0, inputWidgetStyle );
input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) );
inputMethodList.append( input );
} else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) {
InputMethod input;
input.newIM = TRUE;
input.library = lib;
input.libName = *it;
input.extInterface = eface;
input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle );
// may be either a simple, or advanced.
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 092eb0c..19cf904 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -13,64 +13,64 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "irserver.h"
#include "obexinterface.h"
/* OPIE */
#include <opie2/odebug.h>
#include <qtopia/qlibrary.h>
#include <qtopia/qpeapplication.h>
/* QT */
#include <qdir.h>
IrServer::IrServer( QObject *parent, const char *name )
: QObject( parent, name ), obexIface(0)
{
lib = 0;
obexIface = 0;
- QString path = QPEApplication::qpeDir() + "/plugins/obex/";
+ QString path = QPEApplication::qpeDir() + "plugins/obex/";
#ifdef Q_OS_MACX
QDir dir( path, "lib*.dylib" );
#else
QDir dir( path, "lib*.so" );
#endif /* Q_OS_MACX */
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
QLibrary *trylib = new QLibrary( path + *it );
//odebug << "trying lib " << (path + (*it)) << "" << oendl;
if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
lib = trylib;
//odebug << "found obex lib" << oendl;
QString lang = getenv( "LANG" );
QTranslator * trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
//odebug << "tr fpr obex: " << tfn << "" << oendl;
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
break;
} else {
delete lib;
}
}
if ( !lib )
odebug << "could not load IR plugin" << oendl;
}
IrServer::~IrServer()
{
if ( obexIface )
obexIface->release();
delete lib;
}
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index f3a7651..66f665f 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -294,68 +294,68 @@ void StartMenu::clearApplets()
applet->iface->release();
applet->library->unload();
delete applet-> library;
}
menuApplets.clear();
}
void StartMenu::loadApplets()
{
Config cfg( "StartMenu" );
cfg.setGroup( "Applets" );
// SafeMode causes too much problems, so we disable it for now --
// maybe we should reenable it for OPIE 1.0 - sandman 26.09.02
// removed in the remerge PluginManager could handle it
// we don't currently use it -zecke
QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
QString lang = getenv( "LANG" );
- QString path = QPEApplication::qpeDir() + "/plugins/applets";
+ QString path = QPEApplication::qpeDir() + "plugins/applets";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
int napplets = 0;
MenuApplet* *xapplets = new MenuApplet*[list.count()];
for ( it = list.begin(); it != list.end(); ++it ) {
if ( exclude.find( *it ) != exclude.end() )
continue;
MenuAppletInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
MenuApplet *applet = new MenuApplet;
xapplets[napplets++] = applet;
applet->library = lib;
applet->iface = iface;
QTranslator *trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
} else {
exclude += *it;
delete lib;
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions);
while ( napplets-- ) {
MenuApplet *applet = xapplets[napplets];
applet->popup = applet->iface->popup( this );
// menuApplets got an id < -1
menuApplets.insert( -( currentItem + 2 ), new MenuApplet( *applet ) );
currentItem++;
}
delete [] xapplets;
addApplets( launchMenu );
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 3c72d25..d0f1808 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -76,73 +76,73 @@ void SysTray::clearApplets()
QValueList<TaskbarApplet>::Iterator mit;
for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) {
(*mit).iface->release();
(*mit).library->unload();
delete (*mit).library;
}
#endif
appletList.clear();
if ( layout )
delete layout;
layout = new QHBoxLayout( this, 0, 1 );
layout->setAutoAdd(TRUE);
}
void SysTray::addApplets()
{
hide();
#ifndef QT_NO_COMPONENTS
Config cfg( "Taskbar" );
cfg.setGroup( "Applets" );
QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
QString lang = getenv( "LANG" );
- QString path = QPEApplication::qpeDir() + "/plugins/applets";
+ QString path = QPEApplication::qpeDir() + "plugins/applets";
#ifdef Q_OS_MACX
QDir dir( path, "lib*.dylib" );
#else
QDir dir( path, "lib*.so" );
#endif /* Q_OS_MACX */
QStringList list = dir.entryList();
QStringList::Iterator it;
int napplets=0;
TaskbarApplet* *applets = new TaskbarApplet*[list.count()];
for ( it = list.begin(); it != list.end(); ++it ) {
if ( exclude.find( *it ) != exclude.end() )
continue;
owarn << "Found Applet: " << (*it) << "" << oendl;
TaskbarAppletInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
TaskbarApplet *applet = new TaskbarApplet;
applets[napplets++] = applet;
applet->library = lib;
applet->iface = iface;
QTranslator *trans = new QTranslator(qApp);
QString type = (*it).left( (*it).find(".") );
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm";
if ( trans->load( tfn ))
qApp->installTranslator( trans );
else
delete trans;
} else {
exclude += *it;
delete lib;
}
}
cfg.writeEntry( "ExcludeApplets", exclude, ',' );
qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions);
while (napplets--) {
TaskbarApplet *applet = applets[napplets];
applet->applet = applet->iface->applet( this );
appletList.append(*applet);
}
delete [] applets;
#else /* ## FIXME single app */
TaskbarApplet * const applet = new TaskbarApplet();
applet->iface = new ClockAppletImpl();
applet->applet = applet->iface->applet( this );
appletList.append( applet );
#endif
show();
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index b700cd1..8b0fbbc 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -118,49 +118,49 @@ MediaPlayerDecoder *MediaPlayerState::curDecoder() {
}
// ### hack to get true sample count
MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() {
return libmpeg3decoder;
}
// ### hack to get true sample count
// MediaPlayerDecoder *MediaPlayerState::libWavDecoder() {
// return libwavdecoder;
// }
void MediaPlayerState::loadPlugins() {
// odebug << "load plugins" << oendl;
#ifndef QT_NO_COMPONENT
QValueList<MediaPlayerPlugin>::Iterator mit;
for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) {
(*mit).iface->release();
(*mit).library->unload();
delete (*mit).library;
}
pluginList.clear();
- QString path = QPEApplication::qpeDir() + "/plugins/codecs";
+ QString path = QPEApplication::qpeDir() + "plugins/codecs";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
MediaPlayerPluginInterface *iface = 0;
QLibrary *lib = new QLibrary( path + "/" + *it );
// odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl;
if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) {
// odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl;
MediaPlayerPlugin plugin;
plugin.library = lib;
plugin.iface = iface;
plugin.decoder = plugin.iface->decoder();
plugin.encoder = plugin.iface->encoder();
pluginList.append( plugin );
// ### hack to get true sample count
if ( plugin.decoder->pluginName() == QString("LibMpeg3Plugin") )
libmpeg3decoder = plugin.decoder;
} else {
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 46aeff2..db2bf1b 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1361,49 +1361,49 @@ void PlayListWidget::doBlank() {
}
}
void PlayListWidget::doUnblank() {
// this crashes opieplayer with a segfault
// int fd;
// fd=open("/dev/fb0",O_RDWR);
// odebug << "do unblanking" << oendl;
if (fd != -1) {
ioctl(fd,FBIOBLANK,0);
close(fd);
}
QCopEnvelope h("QPE/System", "setBacklight(int)");
h <<-3;// v[1]; // -3 Force on
}
void PlayListWidget::populateSkinsMenu() {
int item = 0;
defaultSkinIndex = 0;
QString skinName;
Config cfg( "OpiePlayer" );
cfg.setGroup("Options" );
QString skin = cfg.readEntry( "Skin", "default" );
- QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" );
+ QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" );
skinsDir.setFilter( QDir::Dirs );
skinsDir.setSorting(QDir::Name );
const QFileInfoList *skinslist = skinsDir.entryInfoList();
QFileInfoListIterator it( *skinslist );
QFileInfo *fi;
while ( ( fi = it.current() ) ) {
skinName = fi->fileName();
// odebug << fi->fileName() << oendl;
if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
item = skinsMenu->insertItem( fi->fileName() ) ;
}
if( skinName == "default" ) {
defaultSkinIndex = item;
}
if( skinName == skin ) {
skinsMenu->setItemChecked( item, TRUE );
}
++it;
}
}
void PlayListWidget::skinsMenuActivated( int item ) {
for( int i = defaultSkinIndex; i > defaultSkinIndex - static_cast<int>(skinsMenu->count()); i-- ) {
skinsMenu->setItemChecked( i, FALSE );
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 2396ed5..c545511 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -77,49 +77,49 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 )
{
setCaption( tr("OpiePlayer") );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
QString skinPath;
skinPath = "opieplayer2/skins/" + skin;
if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists())
skinPath = "opieplayer2/skins/default";
// QString skinPath = "opieplayer2/skins/" + skin;
pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
imgButtonMask->fill( 0 );
for ( int i = 0; i < 7; i++ ) {
- QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath +
+ QString filename = QString( QPEApplication::qpeDir() + "pics/" + skinPath +
"/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
// odebug << "loading "+filename << oendl;
masks[i] = new QBitmap( filename );
if ( !masks[i]->isNull() ) {
QImage imgMask = masks[i]->convertToImage();
uchar **dest = imgButtonMask->jumpTable();
for ( int y = 0; y < imgUp->height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < imgUp->width(); x++ ) {
if ( !qRed( imgMask.pixel( x, y ) ) )
line[x] = i + 1;
}
}
}
}
for ( int i = 0; i < 7; i++ ) {
buttonPixUp[i] = NULL;
buttonPixDown[i] = NULL;
}
QWidget *d = QApplication::desktop();
int width = d->width();
int height = d->height();
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index f0a8ba2..0699d0a 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -159,49 +159,49 @@ int main ( int argc, char **argv )
::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig );
QWSServer::setDesktopBackground ( QImage ( ));
QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer );
app-> setFont ( QFont ( "Helvetica", 10 ));
app-> setStyle ( new QPEStyle ( ));
// const char *sig = ::strsignal ( killedbysig );
const char *sig = ::sys_siglist[killedbysig];
QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool );
l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig ));
l-> setAlignment ( Qt::AlignCenter );
l-> move ( 0, 0 );
l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( ));
l-> show ( );
QTimer::singleShot ( 3000, app, SLOT( quit()));
app-> exec ( );
delete app;
qApp = 0;
}
}
else {
if ( !autolog ) {
- QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf";
+ QString confFile=QPEApplication::qpeDir() + "etc/opie-login.conf";
Config cfg ( confFile, Config::File );
cfg. setGroup ( "General" );
QString user = cfg. readEntry ( "AutoLogin" );
if ( !user. isEmpty ( ))
autolog = ::strdup ( user. latin1 ( ));
}
if ( autolog && !userExited ) {
QWSServer::setDesktopBackground( QImage() );
ODevice::inst ( )-> setDisplayStatus ( true );
ODevice::inst ( )-> setSoftSuspend ( false );
LoginApplication *app = new LoginApplication ( argc, argv, ppid );
LoginApplication::setLoginAs ( autolog );
if ( LoginApplication::changeIdentity ( ))
::exit ( LoginApplication::login ( ));
else
::exit ( 0 );
}
else {
::exit ( login_main ( argc, argv, ppid ));
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 2b64c47..55bf358 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -60,67 +60,67 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
m_list-> header ( )-> hide ( );
lay-> addWidget ( m_list );
m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this );
lay-> addWidget ( m_menutabs );
m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this );
lay-> addWidget ( m_menusubpopup );
QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
init ( );
}
void MenuSettings::init ( )
{
Config cfg ( "StartMenu" );
cfg. setGroup ( "Applets" );
QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
- QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
+ QString path = QPEApplication::qpeDir ( ) + "plugins/applets";
#ifdef Q_OS_MACX
QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
#else
QStringList list = QDir ( path, "lib*.so" ). entryList ( );
#endif /* Q_OS_MACX */
for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
QString name;
QPixmap icon;
MenuAppletInterface *iface = 0;
QLibrary *lib = new QLibrary ( path + "/" + *it );
lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface );
if ( iface ) {
QString lang = getenv( "LANG" );
QTranslator *trans = new QTranslator ( qApp );
QString type = (*it). left ((*it). find ("."));
- QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm";
+ QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm";
if ( trans-> load ( tfn ))
qApp-> installTranslator ( trans );
else
delete trans;
name = iface-> name ( );
icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal );
iface-> release ( );
lib-> unload ( );
QCheckListItem *item;
item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
if ( !icon. isNull ( ))
item-> setPixmap ( 0, icon );
item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
m_applets [*it] = item;
} else {
delete lib;
}
}
cfg. setGroup ( "Menu" );
m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) );
m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) );
m_menusubpopup->setEnabled( m_menutabs->isChecked() );
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index 8dd9e97..861ff3a 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -56,70 +56,70 @@ TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name )
QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this );
lay-> addWidget ( l );
m_list = new QListView ( this );
m_list-> addColumn ( "foobar" );
m_list-> header ( )-> hide ( );
lay-> addWidget ( m_list );
QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." ));
connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
init ( );
}
void TaskbarSettings::init ( )
{
Config cfg ( "Taskbar" );
cfg. setGroup ( "Applets" );
QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
- QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
+ QString path = QPEApplication::qpeDir ( ) + "plugins/applets";
#ifdef Q_OS_MACX
QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
#else
QStringList list = QDir ( path, "lib*.so" ). entryList ( );
#endif /* Q_OS_MACX */
for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
QString name;
QPixmap icon;
TaskbarNamedAppletInterface *iface = 0;
owarn << "Load applet: " << (*it) << "" << oendl;
QLibrary *lib = new QLibrary ( path + "/" + *it );
lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface );
owarn << "<1>" << oendl;
if ( iface ) {
owarn << "<2>" << oendl;
QString lang = getenv( "LANG" );
QTranslator *trans = new QTranslator ( qApp );
QString type = (*it). left ((*it). find ("."));
- QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm";
+ QString tfn = QPEApplication::qpeDir ( ) + "i18n/" + lang + "/" + type + ".qm";
if ( trans-> load ( tfn ))
qApp-> installTranslator ( trans );
else
delete trans;
name = iface-> name ( );
icon = iface-> icon ( );
iface-> release ( );
}
owarn << "<3>" << oendl;
if ( !iface ) {
owarn << "<4>" << oendl;
lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface );
if ( iface ) {
owarn << "<5>" << oendl;
name = (*it). mid ( 3 );
owarn << "Found applet: " << name << "" << oendl;
#ifdef Q_OS_MACX
int sep = name. find( ".dylib" );
#else
int sep = name. find( ".so" );
#endif /* Q_OS_MACX */
if ( sep > 0 )
name. truncate ( sep );
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp
index e545e17..45d691b 100644
--- a/core/settings/security/multiauthconfig.cpp
+++ b/core/settings/security/multiauthconfig.cpp
@@ -133,49 +133,49 @@ static void test_and_start() {
pcfg.setGroup( "Misc" );
bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true);
if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) {
owarn << "authentication failed, not showing opie-security" << oendl;
exit( -1 );
}
}
MultiauthConfig::MultiauthConfig(QWidget* par, const char* w = "MultiauthConfig dialog", WFlags f = 0)
: QDialog(par, w, TRUE, f),
m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0),
m_generalConfig(0), m_loginWidget(0), m_syncWidget(0),
m_nbSuccessReq(0), m_plugins_changed(false)
{
/* Initializes the global configuration window
*/
test_and_start();
/* Checks (and memorizes) if any authentication plugins are
* installed on the system
*/
- QString path = QPEApplication::qpeDir() + "/plugins/security";
+ QString path = QPEApplication::qpeDir() + "plugins/security";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
m_pluginsInstalled = ! list.isEmpty();
if (m_pluginsInstalled == false)
owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl;
setCaption( tr( "Security configuration" ) );
QVBoxLayout *layout = new QVBoxLayout( this );
m_mainTW = new Opie::Ui::OTabWidget( this, "main tab widget" );
layout->addWidget(m_mainTW);
if (m_pluginsInstalled)
{
m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget");
QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget);
pluginListLayout->setSpacing(6);
pluginListLayout->setMargin(11);
QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget );
pluginListLayout->addWidget(pluginListTitle);
QHBox * pluginListHB = new QHBox(m_pluginListWidget);
pluginListLayout->addWidget(pluginListHB);
m_pluginListView = new QListView(pluginListHB);
@@ -353,49 +353,49 @@ void MultiauthConfig::readConfig()
}
/*
cfg.setGroup("Remote");
if ( telnetAvailable() )
telnet->setChecked(cfg.readEntry("allow_telnet"));
else
telnet->hide();
if ( sshAvailable() )
ssh->setChecked(cfg.readEntry("allow_ssh"));
else
ssh->hide();
*/
// release the Config handler
delete pcfg;
// indeed, selectNet will open the config file...
selectNet(auth_peer,auth_peer_bits,TRUE);
connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)),
this, SLOT(setSyncNet(const QString&)));
- QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
+ QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
Config loginCfg(configFile,Config::File);
loginCfg.setGroup("General");
autoLoginName=loginCfg.readEntry("AutoLogin","");
if (autoLoginName.stripWhiteSpace().isEmpty()) {
autoLogin=false;
} else {
autoLogin=true;
}
connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
loadUsers();
updateGUI();
}
void MultiauthConfig::writeConfig()
{
@@ -468,69 +468,69 @@ void MultiauthConfig::writeConfig()
value = 0x01;
break;
case 1:
value = 0x02;
break;
case 2:
value = 0x04;
break;
}
pcfg->setGroup("SyncMode");
pcfg->writeEntry( "Mode", value );
/*
pcfg->setGroup("Remote");
if ( telnetAvailable() )
pcfg->writeEntry("allow_telnet",telnet->isChecked());
if ( sshAvailable() )
pcfg->writeEntry("allow_ssh",ssh->isChecked());
// ### write ssh/telnet sys config files
*/
//release the Config handler
delete pcfg;
- QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf";
+ QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
Config loginCfg(configFile,Config::File);
loginCfg.setGroup("General");
if (autoLogin) {
loginCfg.writeEntry("AutoLogin",autoLoginName);
} else {
loginCfg.removeEntry("AutoLogin");
}
}
/// slot used to record the fact plugins order has been modified
void MultiauthConfig::pluginsChanged() {
m_plugins_changed = true;
}
/// loads each multiauth plugin
void MultiauthConfig::loadPlugins() {
- QString path = QPEApplication::qpeDir() + "/plugins/security";
+ QString path = QPEApplication::qpeDir() + "plugins/security";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
// temporary list used to sort plugins
QMap<QString, MultiauthPlugin> sortList;
for ( it = list.begin(); it != list.end(); ++it ) {
QInterfacePtr<MultiauthPluginInterface> iface;
QLibrary *lib = new QLibrary( path + "/" + *it );
QString libPath(path + "/" + *it);
if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
MultiauthPlugin plugin;
plugin.library = lib;
plugin.iface = iface;
plugin.name = QString(*it);
// find out if plugins should be launched
if ( m_excludePlugins.grep( *it ).isEmpty() ) {
plugin.active = true;
} else {
plugin.active = false;
diff --git a/core/tools/quicklauncher/dropins.h b/core/tools/quicklauncher/dropins.h
index a9664f8..df364ce 100644
--- a/core/tools/quicklauncher/dropins.h
+++ b/core/tools/quicklauncher/dropins.h
@@ -24,48 +24,48 @@ namespace QuickPrivate {
QMap<QUnknownInterface*, QLibrary*> libs;
};
/*
* We can skip installing a Translator here because Opies QPEApplication
* will do that in initApp for us as well
*/
QRESULT PluginLoader::queryInterface( const QString& libFile, const QUuid& uuid, QUnknownInterface** iface ) {
QRESULT res = QS_FALSE;
*iface = 0;
// This code is very platform specific.. We should find better
// solutions to handle names.. Maybe one central function would be
// better than checking this ".so" stuff all around in the sources..
// (eilers)
// Below lines from TT then mine again
QString name = libFile;
if ( libFile.findRev(".so") == (int)libFile.length()-3 ) {
name = libFile.left( libFile.length()-3 );
if ( name.find( "lib" ) == 0 )
name = name.mid( 3 );
}
#ifdef Q_OS_MACX
- QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".dylib";
+ QString path = QPEApplication::qpeDir() + "plugins/application/lib"+name+".dylib";
#else
- QString path = QPEApplication::qpeDir() + "/plugins/application/lib"+name+".so";
+ QString path = QPEApplication::qpeDir() + "plugins/application/lib"+name+".so";
#endif
QLibrary *lib = new QLibrary( path );
if ( lib->queryInterface( uuid, iface ) == QS_OK && iface ) {
libs.insert( *iface, lib );
res = QS_OK;
}
return res;
}
void PluginLoader::releaseInterface( QUnknownInterface* iface ) {
if ( libs.contains( iface ) ) {
iface->release();
delete libs[iface];
libs.remove( iface ); // we only handle pointers so even if the object is not valid the address-space is
}
}
}