summaryrefslogtreecommitdiffabout
path: root/pwmanager
Side-by-side diff
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/main.cpp2
-rw-r--r--pwmanager/pwmanager/pwm.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 3f2d055..81e257f 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -183,31 +183,31 @@ int main(int argc, char *argv[])
QString fileName ;
fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
KPimGlobalPrefs::instance()->setGlobalConfig();
a.newInstance();
//US KAddressBookMain m ;
//US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
/*US
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );
#else
a.setMainWidget( &m );
m.resize (640, 480 );
m.show();
#endif
*/
a.exec();
-
+ KPimGlobalPrefs::instance()->writeConfig();
}
qDebug("PWMPI: Bye! ");
#endif
}
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index b7b5307..d92c90d 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -151,75 +151,77 @@ enum {
// Button IDs for toolbar
enum {
BUTTON_TOOL_NEW = 0,
BUTTON_TOOL_OPEN,
BUTTON_TOOL_SAVE,
BUTTON_TOOL_SAVEAS,
BUTTON_TOOL_PRINT,
BUTTON_TOOL_ADD,
BUTTON_TOOL_EDIT,
BUTTON_TOOL_DEL,
BUTTON_TOOL_FIND,
BUTTON_TOOL_LOCK,
BUTTON_TOOL_DEEPLOCK,
BUTTON_TOOL_UNLOCK
};
PwM::PwM(PwMInit *_init, PwMDoc *doc,
bool virginity,
QWidget *parent, const char *name)
: KMainWindow(parent, "HALLO")
, forceQuit (false)
, forceMinimizeToTray (false)
{
+ syncManager = 0;
virgin = !virginity;
init = _init;
connect(doc, SIGNAL(docClosed(PwMDoc *)),
this, SLOT(docClosed(PwMDoc *)));
initMenubar();
initToolbar();
initMetrics();
setVirgin(virginity);
setFocusPolicy(QWidget::WheelFocus);
#ifndef PWM_EMBEDDED
statusBar()->show();
#endif
view = makeNewListView(doc);
setCentralWidget(view);
updateCaption();
showStatMsg(i18n("Ready."));
}
PwM::~PwM()
{
//qDebug("PwM::~PwM()");
disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)),
this, SLOT(docClosed(PwMDoc *)));
conf()->confWndMainWndSize(size());
emit closed(this);
//qDebug("PwM::~PwM() emited closed(this)");
delete view;
+ delete syncManager;
}
void PwM::initMenubar()
{
KIconLoader* picons;
#ifndef PWM_EMBEDDED
KIconLoader icons;
picons = &icons;
#else
picons = KGlobal::iconLoader();
syncPopup = new KPopupMenu(this);
syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup);
syncManager->setBlockSave(false);
connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
syncManager->fillSyncMenu();
#endif
filePopup = new KPopupMenu(this);
importPopup = new KPopupMenu(filePopup);
exportPopup = new KPopupMenu(filePopup);