summaryrefslogtreecommitdiff
path: root/core/settings
Side-by-side diff
Diffstat (limited to 'core/settings') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/taskbarsettings.cpp4
-rw-r--r--core/settings/security/multiauthconfig.cpp8
3 files changed, 8 insertions, 8 deletions
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;