summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-10-20 00:14:50 (UTC)
committer ulf69 <ulf69>2004-10-20 00:14:50 (UTC)
commit675831e02387f0f838f63c3ea9d51d9679d070c5 (patch) (side-by-side diff)
tree760bdc02ea21a49a1ef39c9875e345dc9cd09fde
parenta9119c4edc272815121ddc863963b5289bb95b13 (diff)
downloadkdepimpi-675831e02387f0f838f63c3ea9d51d9679d070c5.zip
kdepimpi-675831e02387f0f838f63c3ea9d51d9679d070c5.tar.gz
kdepimpi-675831e02387f0f838f63c3ea9d51d9679d070c5.tar.bz2
removed some debugoutput.
removed configsettings for some unneeded operations in pwmanager config
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/klistview.cpp2
-rw-r--r--pwmanager/pwmanager/globalstuff.h4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp7
-rw-r--r--pwmanager/pwmanager/pwmprefs.h4
4 files changed, 9 insertions, 8 deletions
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 6477d11..5b50ba9 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -1832,97 +1832,97 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
kdWarning () << "Warning: illegal selection mode " << int(mode) << " set!" << endl;
break;
}
}
KListView::SelectionModeExt KListView::selectionModeExt () const
{
return d->selectionMode;
}
int KListView::itemIndex( const QListViewItem *item ) const
{
if ( !item )
return -1;
if ( item == firstChild() )
return 0;
else {
QListViewItemIterator it(firstChild());
uint j = 0;
for (; it.current() && it.current() != item; ++it, ++j );
if( !it.current() )
return -1;
return j;
}
}
QListViewItem* KListView::itemAtIndex(int index)
{
if (index<0)
return 0;
int j(0);
for (QListViewItemIterator it=firstChild(); it.current(); it++)
{
if (j==index)
return it.current();
j++;
};
return 0;
}
void KListView::emitContextMenu (KListView*, QListViewItem* i)
{
QPoint p;
- qDebug("KListView::emitContextMenu ");
+ // qDebug("KListView::emitContextMenu ");
if (i)
p = viewport()->mapToGlobal(itemRect(i).center());
else
p = mapToGlobal(rect().center());
emit contextMenu (this, i, p);
}
void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
{
qDebug("KListView::emitContextMenu col");
emit contextRequest( i, p, col );
emit contextMenu (this, i, p);
}
void KListView::setAcceptDrops (bool val)
{
QListView::setAcceptDrops (val);
viewport()->setAcceptDrops (val);
}
int KListView::dropVisualizerWidth () const
{
return d->mDropVisualizerWidth;
}
void KListView::viewportPaintEvent(QPaintEvent *e)
{
QListView::viewportPaintEvent(e);
if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
{
QPainter painter(viewport());
// This is where we actually draw the drop-visualizer
painter.fillRect(d->mOldDropVisualizer, Dense4Pattern);
}
if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
{
QPainter painter(viewport());
qDebug("KListView::viewportPaintEvent has to be verified");
// This is where we actually draw the drop-highlighter
//US style().drawPrimitive(QStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(),
//US QStyle::Style_FocusAtBorder);
diff --git a/pwmanager/pwmanager/globalstuff.h b/pwmanager/pwmanager/globalstuff.h
index 4f70f68..090fcda 100644
--- a/pwmanager/pwmanager/globalstuff.h
+++ b/pwmanager/pwmanager/globalstuff.h
@@ -1,101 +1,101 @@
/***************************************************************************
* *
* copyright (C) 2003, 2004 by Michael Buesch *
* email: mbuesch@freenet.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 *
* as published by the Free Software Foundation. *
* *
***************************************************************************/
/***************************************************************************
* copyright (C) 2004 by Ulf Schenk
* This file is originaly based on version 1.0.1 of pwmanager
* and was modified to run on embedded devices that run microkde
*
* $Id$
**************************************************************************/
#ifndef __GLOBALSTUFF_H
#define __GLOBALSTUFF_H
#ifndef PWM_EMBEDDED
#include "config.h"
#endif
#include "compiler.h"
//US BUG: the following code caused compile errors with certain gcccompilers (2.95).
// Because of that I replaced it with a Qt version, which should do the same.
#include <string>
#ifndef PWM_EMBEDDED
#include <sstream>
#else
#include <qstring.h>
#include <qtextstream.h>
#endif
#ifndef CONFIG_KEYCARD
class QWidget;
void no_keycard_support_msg_box(QWidget *parentWidget);
#endif // CONFIG_KEYCARD
#ifdef PROG_NAME
# undef PROG_NAME
#endif
-#define PROG_NAME "PwManager-MicroKDE"
+#define PROG_NAME "PwM/Pi"
#ifdef PACKAGE_NAME
# undef PACKAGE_NAME
#endif
-#define PACKAGE_NAME "pwmanager-microkde"
+#define PACKAGE_NAME "pwm-pi"
#ifdef PACKAGE_VER
# undef PACKAGE_VER
#endif
#define PACKAGE_VER "1.0.1"
#ifdef CONFIG_DEBUG
# define PWM_DEBUG
#else
# undef PWM_DEBUG
#endif
#ifdef QT_MAKE_VERSION
# undef QT_MAKE_VERSION
#endif
#define QT_MAKE_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
/** remove "unused parameter" warnings */
#ifdef PARAM_UNUSED
# undef PARAM_UNUSED
#endif
#define PARAM_UNUSED(x) (void)x
/** return the number of elements in an array */
#ifdef array_size
# undef array_size
#endif
#define array_size(x) (sizeof(x) / sizeof((x)[0]))
//US BUG: the following code caused compile errors with certain gcccompilers (2.95).
// Because of that I replaced it with a Qt version, which should do the same.
#ifndef PWM_EMBEDDED
/** convert something to string using ostringstream */
template <class T> inline
std::string tostr(const T &t)
{
std::ostringstream s;
s << t;
return s.str();
}
#else
/** convert something to string using ostringstream */
template <class T> inline
std::string tostr(const T &t)
{
QString result;
QTextOStream(&result) << t;
return result.latin1();
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index 720dfcc..26b9708 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -168,125 +168,126 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
// Autostart page
//////////////////////////////////////////////////////
QWidget *autostartPage = new QWidget( this );
QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2);
i = 0;
autostartLineEdit = new KURLRequester(autostartPage, "autoStartLineEdit");
QLabel* autostartLineLabel = new QLabel(autostartLineEdit, "Open this file automatically on startup:",autostartPage);
autostartLayout->addMultiCellWidget(autostartLineLabel,i,i,0,1);
++i;
autostartLayout->addMultiCellWidget(autostartLineEdit,i,i,0,1);
++i;
sb = addWidBool(i18n("open deeplocked"),
&(prefs->mAutostartDeeplocked),autostartPage);
autostartLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// external app page
//////////////////////////////////////////////////////
QWidget *externalappPage = new QWidget( this );
QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2);
i = 0;
browserLineEdit = new QLineEdit(externalappPage);
QLabel* browserLineLabel = new QLabel(browserLineEdit, i18n("Favourite browser:"), externalappPage);
externalappLayout->addWidget(browserLineLabel,i,0);
externalappLayout->addWidget(browserLineEdit,i,1);
++i;
xtermLineEdit = new QLineEdit(externalappPage);
QLabel* xtermLineLabel = new QLabel(xtermLineEdit, i18n("Favourite x-terminal:"), externalappPage);
externalappLayout->addWidget(xtermLineLabel,i,0);
externalappLayout->addWidget(xtermLineEdit,i,1);
++i;
// miscelaneous page
//////////////////////////////////////////////////////
QWidget *miscPage = new QWidget( this );
QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2);
i = 0;
+ /*US ENH: PWM/Pi has no tray and con be minimized
sb = addWidBool(i18n("Show icon in system-tray"),&(prefs->mTray),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
-
+ */
sb = addWidBool(i18n("Open document with passwords unlocked"),&(prefs->mUnlockOnOpen),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
+ /*US ENH: PWM/Pi has no tray and con be minimized
sb = addWidBool(i18n("auto-minimize to tray on startup"),&(prefs->mAutoMinimizeOnStart),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
- sb->checkBox()->setEnabled (FALSE);
++i;
KPrefsWidRadios * minimizeRadio = addWidRadios(i18n("auto-lock on minimize:") ,&(prefs->mMinimizeLock), miscPage);
minimizeRadio->addRadio(i18n("don't lock"));
minimizeRadio->addRadio(i18n("normal lock"));
minimizeRadio->addRadio(i18n("deep-lock"));
miscLayout->addMultiCellWidget( (QWidget*)minimizeRadio->groupBox(),i,i,0,2);
++i;
sb = addWidBool(i18n("KWallet emulation"),&(prefs->mKWalletEmu),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
sb = addWidBool(i18n("Close instead Minimize into tray"),&(prefs->mClose),miscPage);
miscLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
-
+ */
tabWidget->addTab( windowStylePage, i18n( "Look && feel" ) );
tabWidget->addTab( filePage, i18n( "File" ) );
tabWidget->addTab( timeoutPage, i18n( "Timeout" ) );
tabWidget->addTab( autostartPage, i18n( "Autostart" ) );
tabWidget->addTab( externalappPage, i18n( "External apps" ) );
tabWidget->addTab( miscPage, i18n( "Miscellaneous" ) );
connect( permissionLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
connect( pwTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) );
connect( lockTimeoutSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( modified() ) );
connect( autostartLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
connect( browserLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
connect( xtermLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( modified() ) );
}
void PWMConfigWidget::usrReadConfig()
{
PWMPrefs* prefs = PWMPrefs::instance();
setFilePermissions(prefs->mFilePermissions);
pwTimeoutSpinBox->setValue(prefs->mPwTimeout);
lockTimeoutSpinBox->setValue(prefs->mLockTimeout);
autostartLineEdit->setURL(prefs->mAutoStart);
browserLineEdit->setText(prefs->mBrowserCommand);
xtermLineEdit->setText(prefs->mXTermCommand);
kcfg_compression->setCurrentItem(prefs->mCompression);
kcfg_cryptAlgo->setCurrentItem(prefs->mCryptAlgo);
kcfg_hashAlgo->setCurrentItem(prefs->mHashAlgo);
}
void PWMConfigWidget::usrWriteConfig()
{
PWMPrefs* prefs = PWMPrefs::instance();
prefs->mFilePermissions = getFilePermissions();
prefs->mPwTimeout = pwTimeoutSpinBox->value();
prefs->mLockTimeout = lockTimeoutSpinBox->value();
prefs->mAutoStart = autostartLineEdit->url();
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h
index 1c8b982..5b8f9d8 100644
--- a/pwmanager/pwmanager/pwmprefs.h
+++ b/pwmanager/pwmanager/pwmprefs.h
@@ -1,104 +1,104 @@
/*
This file is part of PwManager/Pi
Copyright (c) 2004 Ulf Schenk
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
$Id$
*/
#ifndef PWMPREFS_H
#define PWMPREFS_H
#include <qstringlist.h>
#include <qsize.h>
#include <kpimprefs.h>
class KConfig;
#define conf() PWMPrefs::instance()
#define CONF_DEFAULT_PWTIMEOUT 10/* 10 sec */
#define CONF_DEFAULT_LOCKTIMEOUT 0/* 0 == disable */
-#define CONF_DEFAULT_TRAY true
+#define CONF_DEFAULT_TRAY false
#define CONF_DEFAULT_UNLOCKONOPEN true
#define CONF_DEFAULT_MAINVIEWSTYLE 1/* Category List Left */
#define CONF_DEFAULT_COMPRESSION 0x01/* gzip */
#define CONF_DEFAULT_CRYPTALGO (0x01 - 1)/* blowfish */
#define CONF_DEFAULT_HASHALGO (0x01 - 1)/* sha1 */
#define CONF_DEFAULT_AUTOMINIMIZE false
#define CONF_DEFAULT_BROWSERCOMMAND ""
#define CONF_DEFAULT_XTERMCOMMAND "konsole -e"
#define CONF_DEFAULT_FILEPERMISSIONS 0600
#define CONF_DEFAULT_MAKEFILEBACKUP false
#define CONF_DEFAULT_AUTOSTART_DEEPL true
#define CONF_DEFAULT_AUTODEEPLOCK true
-#define CONF_DEFAULT_KWALLETEMU true
+#define CONF_DEFAULT_KWALLETEMU false
#define CONF_DEFAULT_MINIMIZELOCK 2/* deep-lock */
#define CONF_DEFAULT_NEWENTRLOCKSTAT false/* new entries unlocked */
#define CONF_DEFAULT_WNDCLOSE true/* don't minimize to tray */
class PWMPrefs : public KPimPrefs
{
public:
virtual ~PWMPrefs();
static PWMPrefs *instance();
public:
/* functions for reading the configuration settings */
/* GLOBAL */
QString confGlobAutoStart();
QString confGlobBrowserCommand();
QString confGlobXtermCommand();
QFont confGlobEntryFont();
int confGlobPwTimeout();
int confGlobLockTimeout();
int confGlobCompression();
int confGlobCryptAlgo();
int confGlobHashAlgo();
int confGlobFilePermissions();
int confGlobMinimizeLock();
bool confGlobUnlockOnOpen();
bool confGlobTray();
bool confGlobMakeFileBackup();
bool confGlobAutostartDeepLocked();
bool confGlobAutoDeepLock();
bool confGlobKwalletEmu();
bool confGlobNewEntrLockStat();
/* WND */
QSize confWndMainWndSize();
int confWndMainViewStyle();
bool confWndAutoMinimizeOnStart();
bool confWndClose();
public:
/* functions for writing the configuration settings */
/* GLOBAL */
void confGlobAutoStart(const QString &e);
void confGlobBrowserCommand(const QString &e);
void confGlobXtermCommand(const QString &e);
void confGlobEntryFont(const QFont &e);
void confGlobPwTimeout(int e);
void confGlobLockTimeout(int e);