summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile613
-rw-r--r--microkde/kdeui/kmainwindow.cpp1
-rw-r--r--microkde/kdeui/kmainwindow.h5
-rw-r--r--pwmanager/pwmanager/getmasterpwwnd_emb.cpp2
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp4
-rw-r--r--pwmanager/pwmanager/libgcryptif.cpp5
-rw-r--r--pwmanager/pwmanager/main.cpp1
-rw-r--r--pwmanager/pwmanager/pwm.cpp10
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp1
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp15
-rw-r--r--pwmanager/pwmanager/pwminit.cpp17
11 files changed, 296 insertions, 378 deletions
diff --git a/Makefile b/Makefile
index da5feba..19e1685 100644
--- a/Makefile
+++ b/Makefile
@@ -1,362 +1,253 @@
-export KDEPIMDIR = $(shell pwd)
-
-export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version)
-
-ifeq ($(PLATFORM) , zaurus)
- BUILD_NO_LDAP_PLUGIN=1
-endif
-
-ifneq ($(PLATFORM) , zaurus)
- BUILD_NO_SHARP_PLUGIN=1
-endif
-
-SUBDIRS_MICROKDE = \
- libical/src/libical \
- libical/src/libicalss \
- qtcompat \
- microkde \
- libkcal \
- libkdepim \
- kabc \
- kabc/formats/binary \
- kabc/plugins/file \
- kabc/plugins/dir \
- korganizer \
- kalarmd \
- kaddressbook
-
-SUBDIRS_QTOPIA_PLUGIN = \
- kabc/plugins/qtopia
-
-SUBDIRS_OPIE_PLUGIN = \
- kabc/plugins/opie
-
-SUBDIRS_SHARP_PLUGIN = \
- kabc/plugins/sharpdtm
-
-SUBDIRS_LDAP_PLUGIN = \
- kabc/plugins/ldap
-
-SUBDIRS_MICROMAIL = \
- kmicromail/libetpan \
- kmicromail/libmailwrapper \
- kmicromail
-
-SUBDIRS_GAMMU = \
- gammu/emb/common \
- gammu/emb/gammu
-
-SUBDIRS_PWMANAGER = \
- pwmanager/libcrypt/mpi \
- pwmanager/libcrypt/error \
- pwmanager/libcrypt/cipher \
- pwmanager/libcrypt/zlib \
- pwmanager/pwmanager
-
-SUBDIRS = \
- $(SUBDIRS_MICROKDE) \
- $(SUBDIRS_QTOPIA_PLUGIN) \
- $(SUBDIRS_OPIE_PLUGIN) \
- $(SUBDIRS_SHARP_PLUGIN) \
- $(SUBDIRS_LDAP_PLUGIN) \
- $(SUBDIRS_MICROMAIL) \
- $(SUBDIRS_GAMMU) \
- $(SUBDIRS_PWMANAGER)
-
-
-all: build_microkde \
- build_qtopia_plugin \
- build_opie_plugin \
- build_sharp_plugin \
- build_ldap_plugin \
- build_micromail \
- build_gammu \
- build_pwmanager
-
-
-build_microkde: variable_test tmake
- for i in $(SUBDIRS_MICROKDE); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
-
-build_qtopia_plugin: build_microkde
- ifdef BUILD_NO_QTOPIA_PLUGIN
- @echo == qtopia plugin not build.
- else
- for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-build_opie_plugin: build_microkde
- ifdef BUILD_NO_OPIE_PLUGIN
- @echo == opie plugin not build.
- else
- for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-build_sharp_plugin: build_microkde
- ifdef BUILD_NO_SHARP_PLUGIN
- @echo == ldap plugin not build.
- else
- for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-build_ldap_plugin: build_microkde
- ifdef BUILD_NO_LDAP_PLUGIN
- @echo == ldap plugin not build.
- else
- for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-
-build_micromail: build_microkde
- ifdef BUILD_NO_MICROMAIL
- @echo == kmicromail not build.
- else
- for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-build_gammu: variable_test tmake
- ifdef BUILD_NO_GAMMU
- @echo == gammu not build.
- else
- for i in $(SUBDIRS_GAMMU); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-build_pwmanager: build_microkde
- ifdef BUILD_NO_PWMANAGER
- @echo == pwmanager not build.
- else
- for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \
- make -f Makefile$(PLATFORM) || exit 1; popd; \
- done
- endif
-
-
-variable_info:
- @echo --------------------------------------
- @echo KDEPIM buildsystem, variableinfo...
- @echo KDEPIMDIR=$(KDEPIMDIR)
- @echo QTDIR=$(QTDIR)
- @echo QPEDIR=$(QPEDIR)
- @echo OPIEDIR=$(OPIEDIR)
- @echo PLATFORM=$(PLATFORM)
- @echo RELEASE_DEBUG=$(RELEASE_DEBUG)
- @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL)
- @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN)
- @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN)
- @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN)
- @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN)
- ifndef BUILD_NO_SHARP_PLUGIN
- @echo SHARPDTMSDK=$(SHARPDTMSDK)
- endif
- @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU)
- @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER)
- @echo --------------------------------------
-
-variable_test: variable_info
- @echo KDEPIM buildsystem, variablecheck...
- ifndef KDEPIMDIR
- @echo KDEPIMDIR is not defined.
- $(error KDEPIMDIR is not defined)
- endif
- ifndef PLATFORM
- @echo PLATFORM is not defined.
- $(error PLATFORM is not defined)
- endif
- ifdef BUILD_NO_LDAP_PLUGIN
- @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN)
- endif
- ifdef BUILD_NO_OPIE_PLUGIN
- @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN)
- endif
- ifdef BUILD_NO_QTOPIA_PLUGIN
- @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN)
- endif
- ifdef BUILD_NO_MICROMAIL
- @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL)
- endif
- ifdef BUILD_NO_SHARP_PLUGIN
- @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN)
- else
- ifndef SHARPDTMSDK
- @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK)
- $(error SHARPDTMSDK is not defined)
- endif
- endif
- ifdef BUILD_NO_GAMMU
- @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU)
- endif
- ifdef BUILD_NO_PWMANAGER
- @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER)
- endif
- @echo --------------------------------------
-
-
-objects:
- for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
- for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
- mkdir -p libical/lib/$(PLATFORM)
- mkdir -p pwmanager/libcrypt/$(PLATFORM)
-
-clean:
- rm -rf libical/lib/$(PLATFORM)/*;
- rm -rf pwmanager/libcrypt/$(PLATFORM)/*;
- for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
- rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
- done
-
-install:
-
- cd bin/kdepim; make install
- cp -r Pim $(QPEDIR)/apps
- cp db2file/db2file $(QPEDIR)/bin/db2file
- cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
- cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
- cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop
- cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop
-
-dist:
- @echo Dont forget to do "make install" before "make dist"
- rm -f *arm.ipk
- rm -f *~
- cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim
- mkipks kmicrokdelibs.control
- mkipks korganizer.control
- mkipks kaddressbook.control
- ifndef BUILD_NO_MICROMAIL
- mkipks kopiemail.control
- endif
- mkipks korganizer-alarm.control
- ifndef BUILD_NO_GAMMU
- mkipks phoneaccess.control
- endif
- ifndef BUILD_NO_PWMANAGER
- mkipks pwmanager.control
- endif
- mkipks pim_TAB_icon.control
-
-tmake: objects \
- qtcompat/Makefile$(PLATFORM) \
- microkde/Makefile$(PLATFORM) \
- libkcal/Makefile$(PLATFORM) \
- libkdepim/Makefile$(PLATFORM) \
- korganizer/Makefile$(PLATFORM) \
- kalarmd/Makefile$(PLATFORM) \
- libical/src/libical/Makefile$(PLATFORM) \
- libical/src/libicalss/Makefile$(PLATFORM) \
- kabc/Makefile$(PLATFORM) \
- kabc/formats/binary/Makefile$(PLATFORM) \
- kabc/plugins/file/Makefile$(PLATFORM) \
- kabc/plugins/dir/Makefile$(PLATFORM) \
- kabc/plugins/ldap/Makefile$(PLATFORM) \
- kabc/plugins/opie/Makefile$(PLATFORM) \
- kabc/plugins/qtopia/Makefile$(PLATFORM) \
- kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
- kaddressbook/Makefile$(PLATFORM) \
- kmicromail/Makefile$(PLATFORM) \
- kmicromail/libetpan/Makefile$(PLATFORM) \
- kmicromail/libmailwrapper/Makefile$(PLATFORM) \
- gammu/emb/common/Makefile$(PLATFORM) \
- gammu/emb/gammu/Makefile$(PLATFORM) \
- pwmanager/pwmanager/Makefile$(PLATFORM) \
- pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \
- pwmanager/libcrypt/error/Makefile$(PLATFORM) \
- pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \
- pwmanager/libcrypt/zlib/Makefile$(PLATFORM)
-
-qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
- cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM)
-
-microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
- cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM)
-
-libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
- cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM)
-
-
-libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
- cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM)
-
-kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
- cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM)
-
-korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
- cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM)
-
-libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
- cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM)
-
-libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
- cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM)
-
-kabc/Makefile$(PLATFORM): kabc/kabcE.pro
- cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM)
-
-kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
- cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro
- cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro
- cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro
- cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
- cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
- cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM)
-
-kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
- cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM)
-
-kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
- cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM)
-
-kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
- cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM)
-
-kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro
- cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM)
-
-kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
- cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM)
-
-gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro
- cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM)
-
-gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro
- cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM)
-
-pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro
- cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM)
-
-
-pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro
- cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM)
-
-pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro
- cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM)
-
-pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro
- cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM)
-
-pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro
- cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM)
-
+#############################################################################
+# Makefile for building: kdepim-desktop
+# Generated by qmake (1.07a) (Qt 3.3.1) on: Mon Oct 25 11:25:22 2004
+# Project: kdepim-desktop.pro
+# Template: subdirs
+# Command: $(QMAKE) -o Makefile kdepim-desktop.pro
+#############################################################################
+
+MAKEFILE = Makefile
+QMAKE = qmake
+DEL_FILE = rm -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+SUBTARGETS = \
+ sub-gammu-emb-common \
+ sub-gammu-emb-gammu \
+ sub-libical \
+ sub-libkcal \
+ sub-microkde \
+ sub-libkdepim \
+ sub-kabc \
+ sub-korganizer \
+ sub-kaddressbook \
+ sub-kabc-plugins-file \
+ sub-kabc-plugins-dir \
+ sub-kabc-plugins-file \
+ sub-kabc-plugins-qtopia \
+ sub-pwmanager-libcrypt-cipher \
+ sub-pwmanager-libcrypt-error \
+ sub-pwmanager-libcrypt-mpi \
+ sub-pwmanager-libcrypt-zlib \
+ sub-pwmanager-pwmanager
+
+first: all
+
+all: Makefile $(SUBTARGETS)
+
+gammu/emb/common/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common"
+ cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE)
+sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE
+ cd gammu/emb/common && $(MAKE) -f $(MAKEFILE)
+
+gammu/emb/gammu/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu"
+ cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE)
+sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE
+ cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE)
+
+libical/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical"
+ cd libical && $(QMAKE) libical.pro -o $(MAKEFILE)
+sub-libical: libical/$(MAKEFILE) FORCE
+ cd libical && $(MAKE) -f $(MAKEFILE)
+
+libkcal/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal"
+ cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE)
+sub-libkcal: libkcal/$(MAKEFILE) FORCE
+ cd libkcal && $(MAKE) -f $(MAKEFILE)
+
+microkde/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde"
+ cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE)
+sub-microkde: microkde/$(MAKEFILE) FORCE
+ cd microkde && $(MAKE) -f $(MAKEFILE)
+
+libkdepim/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim"
+ cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE)
+sub-libkdepim: libkdepim/$(MAKEFILE) FORCE
+ cd libkdepim && $(MAKE) -f $(MAKEFILE)
+
+kabc/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc"
+ cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE)
+sub-kabc: kabc/$(MAKEFILE) FORCE
+ cd kabc && $(MAKE) -f $(MAKEFILE)
+
+korganizer/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer"
+ cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE)
+sub-korganizer: korganizer/$(MAKEFILE) FORCE
+ cd korganizer && $(MAKE) -f $(MAKEFILE)
+
+kaddressbook/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook"
+ cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE)
+sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE
+ cd kaddressbook && $(MAKE) -f $(MAKEFILE)
+
+kabc/plugins/file/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file"
+ cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE)
+sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
+ cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
+
+kabc/plugins/dir/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir"
+ cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE)
+sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE
+ cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE)
+
+kabc/plugins/file/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file"
+ cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE)
+sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE
+ cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE)
+
+kabc/plugins/qtopia/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia"
+ cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE)
+sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE
+ cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE)
+
+pwmanager/libcrypt/cipher/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher"
+ cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE)
+sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE
+ cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE)
+
+pwmanager/libcrypt/error/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error"
+ cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE)
+sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE
+ cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE)
+
+pwmanager/libcrypt/mpi/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi"
+ cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE)
+sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE
+ cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE)
+
+pwmanager/libcrypt/zlib/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib"
+ cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE)
+sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE
+ cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE)
+
+pwmanager/pwmanager/$(MAKEFILE):
+ @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager"
+ cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE)
+sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE
+ cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE)
+
+Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf
+ $(QMAKE) -o Makefile kdepim-desktop.pro
+qmake: qmake_all
+ @$(QMAKE) -o Makefile kdepim-desktop.pro
+
+all: $(SUBTARGETS)
+qmake_all: gammu/emb/common/$(MAKEFILE) gammu/emb/gammu/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/qtopia/$(MAKEFILE) pwmanager/libcrypt/cipher/$(MAKEFILE) pwmanager/libcrypt/error/$(MAKEFILE) pwmanager/libcrypt/mpi/$(MAKEFILE) pwmanager/libcrypt/zlib/$(MAKEFILE) pwmanager/pwmanager/$(MAKEFILE)
+ ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+ ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true
+clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE
+ ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+ ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true
+uninstall_subdirs: qmake_all FORCE
+ ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+ ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true
+install_subdirs: qmake_all FORCE
+ ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true
+ ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true
+distclean: qmake_all FORCE
+ ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+ ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true
+
+install: install_subdirs
+
+uninstall: uninstall_subdirs
+
+FORCE:
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index bd5a2cc..3ae4c87 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -255,96 +255,97 @@ application config.
if ( readPropertiesInternal( config, number ) ){
if ( show )
KMainWindow::show();
return FALSE;
}
return FALSE;
}
void KMainWindow::setCaption( const QString &caption )
{
//US setPlainCaption( kapp->makeStdCaption(caption) );
setPlainCaption( caption );
}
void KMainWindow::setCaption( const QString &caption, bool modified )
{
//US setPlainCaption( kapp->makeStdCaption(caption, true, modified) );
setPlainCaption( caption + "modified:" );
}
void KMainWindow::setPlainCaption( const QString &caption )
{
QMainWindow::setCaption( caption );
#ifndef Q_WS_QWS
//US the following is disabled for the embedded version
//US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
//US info.setName( caption.utf8().data() );
#endif
}
void KMainWindow::slotStateChanged(const QString &newstate)
{
stateChanged(newstate, KXMLGUIClient::StateNoReverse);
}
/*
* Get rid of this for KDE 4.0
*/
void KMainWindow::slotStateChanged(const QString &newstate,
KXMLGUIClient::ReverseStateChange reverse)
{
stateChanged(newstate, reverse);
}
void KMainWindow::closeEvent ( QCloseEvent *e )
{
+ //qDebug("MainWindow::closeEvent ");
// Save settings if auto-save is enabled, and settings have changed
if (d->settingsDirty && d->autoSaveSettings)
saveAutoSaveSettings();
if (queryClose()) {
e->accept();
int not_withdrawn = 0;
/*US
QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
for (it.toFirst(); it.current(); ++it){
if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this )
not_withdrawn++;
}
*/
if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
/*US
if ( queryExit() && !kapp->sessionSaving()) { // Yes, Quit app?
// don't call queryExit() twice
disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
kapp->deref(); // ...and quit aplication.
} else {
// cancel closing, it's stupid to end up with no windows at all....
e->ignore();
}
*/
//US we have no sessionmanagement. Simply close app.
if ( queryExit() ) { // Yes, Quit app?
qDebug("KMainWindow::closeEvent: Exit application ???");
// don't call queryExit() twice
//US disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
}
}
}
}
bool KMainWindow::queryExit()
{
return TRUE;
}
bool KMainWindow::queryClose()
{
return TRUE;
}
void KMainWindow::saveGlobalProperties( KConfig* )
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index e76e732..2aafb9d 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -18,127 +18,128 @@
$Id$
*/
#ifndef KMAINWINDOW_H
#define KMAINWINDOW_H
/*US
#include "kxmlguifactory.h"
#include "kxmlguiclient.h"
#include "kxmlguibuilder.h"
#include <qmetaobject.h>
class KPopupMenu;
class KXMLGUIFactory;
class KConfig;
class KHelpMenu;
class KStatusBar;
class QStatusBar;
class KMenuBar;
class KMWSessionManaged;
class KAccel;
class KToolBarMenuAction;
*/
class QMenuBar;
class QStatusBar;
class KMainWindowPrivate;
class KAction;
#include <ktoolbar.h>
#include <ktoolbarhandler.h>
#include <kxmlguiclient.h>
#include <qmainwindow.h>
#include <qptrlist.h>
class KActionCollection;
class KMainWindow : public QMainWindow, virtual public KXMLGUIClient
{
Q_OBJECT
private:
//US create private defaultconstructor
KMainWindow() {;};
-public:
+
public:
/**
* Construct a main window.
*
* @param parent The widget parent. This is usually 0 but it may also be the window
* group leader. In that case, the KMainWindow becomes sort of a
* secondary window.
*
* @param name The object name. For session management and window management to work
* properly, all main windows in the application should have a
* different name. When passing 0 (the default), KMainWindow will create
* a unique name, but it's recommended to explicitly pass a window name that will
* also describe the type of the window. If there can be several windows of the same
* type, append '#' (hash) to the name, and KMainWindow will append numbers to make
* the names unique. For example, for a mail client which has one main window showing
* the mails and folders, and which can also have one or more windows for composing
* mails, the name for the folders window should be e.g. "mainwindow" and
* for the composer windows "composer#".
*
* @param f Specify the widget flags. The default is
* WType_TopLevel and WDestructiveClose. TopLevel indicates that a
* main window is a toplevel window, regardless of whether it has a
* parent or not. DestructiveClose indicates that a main window is
* automatically destroyed when its window is closed. Pass 0 if
* you do not want this behavior.
*
* KMainWindows must be created on the heap with 'new', like:
* <pre> KMainWindow *kmw = new KMainWindow (...</pre>
**/
- KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ //LR remove WDestructiveClose
+ KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ );
/**
* Destructor.
*
* Will also destroy the toolbars, and menubar if
* needed.
*/
virtual ~KMainWindow();
/**
* Retrieve the standard help menu.
*
* It contains entires for the
* help system (activated by F1), an optional "What's This?" entry
* (activated by Shift F1), an application specific dialog box,
* and an "About KDE" dialog box.
*
* Example (adding a standard help menu to your application):
* <pre>
* KPopupMenu *help = helpMenu( <myTextString> );
* menuBar()->insertItem( i18n("&Help"), help );
* </pre>
*
* @param aboutAppText The string that is used in the application
* specific dialog box. If you leave this string empty the
* information in the global @ref KAboutData of the
* application will be used to make a standard dialog box.
*
* @param showWhatsThis Set this to false if you do not want to include
* the "What's This" menu entry.
*
* @return A standard help menu.
*/
//US KPopupMenu* helpMenu( const QString &aboutAppText = QString::null,
//US bool showWhatsThis = TRUE );
/**
* Returns the help menu. Creates a standard help menu if none exists yet.
*
* It contains entries for the
* help system (activated by F1), an optional "What's This?" entry
* (activated by Shift F1), an application specific dialog box,
* and an "About KDE" dialog box. You must create the application
* specific dialog box yourself. When the "About application"
* menu entry is activated, a signal will trigger the
* @ref showAboutApplication slot. See @ref showAboutApplication for more
* information.
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
index 8404c3e..678f05f 100644
--- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
@@ -81,97 +81,97 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
numberLayout->setSpacing( 0 );
QPushButton* p1 = new QPushButton( i18n("1"), numberBox );
numberLayout->addWidget( p1, 0, 0 );
QPushButton* p2 = new QPushButton( i18n("2"), numberBox );
numberLayout->addWidget( p2, 0, 1 );
QPushButton* p3 = new QPushButton( i18n("3"), numberBox );
numberLayout->addWidget( p3, 0, 2 );
QPushButton* p4 = new QPushButton( i18n("4"), numberBox );
numberLayout->addWidget( p4, 1, 0 );
QPushButton* p5 = new QPushButton( i18n("5"), numberBox );
numberLayout->addWidget( p5, 1, 1 );
QPushButton* p6 = new QPushButton( i18n("6"), numberBox );
numberLayout->addWidget( p6, 1, 2 );
QPushButton* p7 = new QPushButton( i18n("7"), numberBox );
numberLayout->addWidget( p7, 2, 0 );
QPushButton* p8 = new QPushButton( i18n("8"), numberBox );
numberLayout->addWidget( p8, 2, 1 );
QPushButton* p9 = new QPushButton( i18n("9"), numberBox );
numberLayout->addWidget( p9, 2, 2 );
QPushButton* clear = new QPushButton( i18n("x"), numberBox );
numberLayout->addWidget( clear, 3, 0 );
QPushButton* p0 = new QPushButton( i18n("0"), numberBox );
numberLayout->addWidget( p0, 3, 1 );
QPushButton* backspace = new QPushButton( i18n("-"), numberBox );
numberLayout->addWidget( backspace, 3, 2 );
pageLayout->addWidget(numberBox);
#ifdef DESKTOP_VERSION
resize( sizeHint() );
#else
resize( 200,sizeHint().height() );
#endif
connect( p0, SIGNAL( clicked() ), this, SLOT( add0() ) );
connect( p1, SIGNAL( clicked() ), this, SLOT( add1() ) );
connect( p2, SIGNAL( clicked() ), this, SLOT( add2() ) );
connect( p3, SIGNAL( clicked() ), this, SLOT( add3() ) );
connect( p4, SIGNAL( clicked() ), this, SLOT( add4() ) );
connect( p5, SIGNAL( clicked() ), this, SLOT( add5() ) );
connect( p6, SIGNAL( clicked() ), this, SLOT( add6() ) );
connect( p7, SIGNAL( clicked() ), this, SLOT( add7() ) );
connect( p8, SIGNAL( clicked() ), this, SLOT( add8() ) );
connect( p9, SIGNAL( clicked() ), this, SLOT( add9() ) );
connect( backspace, SIGNAL( clicked() ), this, SLOT( backspace() ) );
connect( clear, SIGNAL( clicked() ), this, SLOT( clear() ) );
-
+ pwLineEdit->setFocus();
}
/*
* Destroys the object and frees any allocated resources
*/
getMasterPwWnd::~getMasterPwWnd()
{
// no need to delete child widgets, Qt does it all for us
}
void getMasterPwWnd::okButton_slot()
{
qWarning( "getMasterPwWnd::okButton_slot(): Not implemented yet" );
}
void getMasterPwWnd::cancelButton_slot()
{
qWarning( "getMasterPwWnd::cancelButton_slot(): Not implemented yet" );
}
void getMasterPwWnd::add0()
{
addCharacter("0");
}
void getMasterPwWnd::add1()
{
addCharacter("1");
}
void getMasterPwWnd::add2()
{
addCharacter("2");
}
void getMasterPwWnd::add3()
{
addCharacter("3");
}
void getMasterPwWnd::add4()
{
addCharacter("4");
}
void getMasterPwWnd::add5()
{
addCharacter("5");
}
void getMasterPwWnd::add6()
{
addCharacter("6");
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index 26b9708..a8696ea 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -103,103 +103,103 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
QLabel* kcfg_crypt_label = new QLabel(i18n("Encryption:"), filePage);
fileLayout->addWidget(kcfg_crypt_label,i,0);
kcfg_cryptAlgo = new QComboBox(filePage, "kcfg_cryptAlgo");
kcfg_cryptAlgo->insertItem(i18n("Blowfish (128 bit)"));
#ifdef CONFIG_PWMANAGER_GCRY
kcfg_cryptAlgo->insertItem(i18n("AES-128, Rijndael (128 bit)"));
kcfg_cryptAlgo->insertItem(i18n("AES-192, Rijndael (192 bit)"));
kcfg_cryptAlgo->insertItem(i18n("AES-256, Rijndael (256 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Triple-DES (168 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Twofish (256 bit)"));
kcfg_cryptAlgo->insertItem(i18n("Twofish-128 (128 bit)"));
#endif // CONFIG_PWMANAGER_GCRY
fileLayout->addWidget( kcfg_cryptAlgo,i,1);
++i;
QLabel* kcfg_hash_label = new QLabel(i18n("Hashing:"), filePage);
fileLayout->addWidget(kcfg_hash_label,i,0);
kcfg_hashAlgo = new QComboBox(filePage, "kcfg_hashAlgo");
kcfg_hashAlgo->insertItem(i18n("SHA-160, SHA1 (160 bit)"));
#ifdef CONFIG_PWMANAGER_GCRY
kcfg_hashAlgo->insertItem(i18n("SHA-256 (256 bit)"));
kcfg_hashAlgo->insertItem(i18n("SHA-384 (384 bit)"));
kcfg_hashAlgo->insertItem(i18n("SHA-512 (512 bit)"));
kcfg_hashAlgo->insertItem(i18n("MD5 (128 bit)"));
kcfg_hashAlgo->insertItem(i18n("RIPE-MD-160 (160 bit)"));
kcfg_hashAlgo->insertItem(i18n("Tiger (192 bit)"));
#endif // CONFIG_PWMANAGER_GCRY
fileLayout->addWidget( kcfg_hashAlgo,i,1);
++i;
permissionLineEdit = new QLineEdit(filePage);
QLabel* permissionLineLabel = new QLabel(permissionLineEdit, i18n("Permissions:"), filePage);
fileLayout->addWidget(permissionLineLabel,i,0);
fileLayout->addWidget(permissionLineEdit,i,1);
++i;
KPrefsWidBool *sb = addWidBool(i18n("Make backup before saving"),
&(prefs->mMakeFileBackup),filePage);
fileLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// Timeout page
//////////////////////////////////////////////////////
QWidget *timeoutPage = new QWidget( this );
QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2);
i = 0;
- pwTimeoutSpinBox = new QSpinBox( timeoutPage, "pwTimeoutSpinBox" );
+ pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" );
QLabel* timeoutLabel = new QLabel(pwTimeoutSpinBox, i18n("Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:"), timeoutPage);
timeoutLayout->addMultiCellWidget(timeoutLabel,i, i, 0 ,0);
timeoutLayout->addWidget(pwTimeoutSpinBox,i,1);
++i;
- lockTimeoutSpinBox = new QSpinBox( timeoutPage, "lockTimeoutSpinBox" );
+ lockTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "lockTimeoutSpinBox" );
QLabel* lockTimeoutLabel = new QLabel(lockTimeoutSpinBox, i18n("Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:"), timeoutPage);
timeoutLayout->addMultiCellWidget(lockTimeoutLabel,i, i, 0 ,0);
timeoutLayout->addWidget(lockTimeoutSpinBox,i,1);
++i;
sb = addWidBool(i18n("deep-lock on autolock"),
&(prefs->mAutoDeeplock),timeoutPage);
timeoutLayout->addMultiCellWidget(sb->checkBox(), i,i,0,1);
++i;
// 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);
diff --git a/pwmanager/pwmanager/libgcryptif.cpp b/pwmanager/pwmanager/libgcryptif.cpp
index eafd318..ff94bf6 100644
--- a/pwmanager/pwmanager/libgcryptif.cpp
+++ b/pwmanager/pwmanager/libgcryptif.cpp
@@ -394,56 +394,61 @@ bool LibGCryptIf::doHashPassphrase(DEK *dek,
if (count < 8) {
gcry_md_write(md, s2k->salt, count);
} else {
gcry_md_write(md, s2k->salt, 8);
count -= 8;
gcry_md_write(md, pw, count);
}
} else
gcry_md_write(md, pw, pwlen);
gcry_md_final(md);
i = gcry_md_get_algo_dlen(s2k->hash_algo);
if (i > dek->keylen - used)
i = dek->keylen - used;
memcpy(dek->key+used, gcry_md_read(md, s2k->hash_algo), i);
used += i;
}
gcry_md_close(md);
out:
return ret;
}
void LibGCryptIf::padData(unsigned char *buf,
size_t bufLen,
size_t boundary)
{
size_t numPadBytes = boundary - ((bufLen + 1) % boundary);
buf[bufLen] = static_cast<char>(0x01);
size_t i = 0;
Randomizer *rnd = Randomizer::obj();
char c;
unsigned char *b;
while (i < numPadBytes) {
c = rnd->genRndChar();
if (c == static_cast<char>(0x01))
continue;
b = buf + bufLen + 1 + i;
*b = c;
++i;
}
}
void LibGCryptIf::unpadData(const unsigned char *buf,
size_t *bufLen)
{
size_t pos;
BUG_ON(*bufLen % 8);
pos = *bufLen - 1;
while (buf[pos] != static_cast<char>(0x01)) {
+ qDebug("pos %d %d %d", pos, buf[pos], static_cast<char>(0x01) );
BUG_ON(!pos);
+ //LR BUG we should terminte the loop if p == 0
+ if ( pos == 0 )
+ break;
--pos;
}
*bufLen = pos;
+ qDebug("ente ");
}
#endif // CONFIG_PWMANAGER_GCRY
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 1ca7ba8..70df15d 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -164,56 +164,57 @@ int main(int argc, char *argv[])
#else
bool exitHelp = false;
if ( argc > 1 ) {
QString command = argv[1];
if ( command == "-help" ){
printf("PWM/PI command line commands:\n");
printf(" no command: Start PWM/PI in usual way\n");
printf(" -help: This output\n");
printf(" PWM/PI is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
PwMApplication a(argc, argv);
KGlobal::setAppName( "pwmanager" );
#ifndef DESKTOP_VERSION
//qDebug("width %d ",QApplication::desktop()->width() );
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
#else
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
*/
+ QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit()));
a.exec();
KPimGlobalPrefs::instance()->writeConfig();
}
qDebug("PWMPI: Bye! ");
#endif
}
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 1ab2b71..2b8f2fa 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -148,101 +148,103 @@ enum {
};
#endif
// 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()");
+ qDebug("PwM::~PwM() %x", this);
disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)),
this, SLOT(docClosed(PwMDoc *)));
conf()->confWndMainWndSize(size());
- emit closed(this);
+ //LR closing of windows changed
+ //needed for fastload option on PDA
+ //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);
managePopup = new KPopupMenu(this);
#ifdef CONFIG_KEYCARD
chipcardPopup = new KPopupMenu(this);
#endif // CONFIG_KEYCARD
viewPopup = new KPopupMenu(this);
optionsPopup = new KPopupMenu(this);
// "file" popup menu
filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
i18n("&New"), this,
SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
i18n("&Open"), this,
SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
i18n("&Close"), this,
SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
filePopup->insertSeparator();
filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
i18n("&Save"), this,
SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
@@ -842,101 +844,105 @@ void PwM::config_slot()
int newStyle = conf()->confWndMainViewStyle();
// reinitialize tray
init->initTray();
// reinitialize KWallet emulation
init->initKWalletEmu();
PwMDocList *_dl = PwMDoc::getOpenDocList();
const vector<PwMDocList::listItem> *dl = _dl->getList();
vector<PwMDocList::listItem>::const_iterator i = dl->begin(),
end = dl->end();
PwMDoc *doc;
while (i != end) {
doc = (*i).doc;
// unlock-without-mpw timeout
doc->timer()->start(DocTimer::id_mpwTimer);
// auto-lock timeout
doc->timer()->start(DocTimer::id_autoLockTimer);
++i;
}
const QValueList<PwM *> *ml = init->mainWndList();
#ifndef PWM_EMBEDDED
QValueList<PwM *>::const_iterator i2 = ml->begin(),
end2 = ml->end();
#else
QValueList<PwM *>::ConstIterator i2 = ml->begin(),
end2 = ml->end();
#endif
PwM *pwm;
while (i2 != end2) {
pwm = *i2;
// reinitialize the window style.
if (oldStyle != newStyle)
pwm->curView()->initStyle(newStyle);
// set the new font
pwm->curView()->setFont(conf()->confGlobEntryFont());
++i2;
}
}
void PwM::activateMpButton(bool activate)
{
managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate);
}
void PwM::closeEvent(QCloseEvent *e)
{
+ qDebug("PwM::closeEvent ");
+ emit closed( this );
+ return;
e->accept();
}
void PwM::docClosed(PwMDoc *doc)
{
+ qDebug("PwM::docClosed ");
PARAM_UNUSED(doc);
PWM_ASSERT(doc == curDoc());
close();
}
void PwM::find_slot()
{
PWM_ASSERT(curDoc());
if (curDoc()->isDocEmpty())
return;
if (curDoc()->isDeepLocked())
return;
curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
FindWndImpl findWnd(view);
findWnd.exec();
curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
}
void PwM::exportToText()
{
PWM_ASSERT(curDoc());
if (curDoc()->isDocEmpty()) {
KMessageBox::information(this,
i18n
("Sorry, there's nothing to export.\n"
"Please first add some passwords."),
i18n("nothing to do"));
return;
}
curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
QString fn(KFileDialog::getSaveFileName(QString::null,
i18n("*|plain-text file"),
this));
if (fn == "") {
curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
return;
}
PwMerror ret = curDoc()->exportToText(&fn);
if (ret != e_success) {
KMessageBox::error(this,
i18n("Error: Couldn't write to file.\n"
"Please check if you have permission to write\n"
"to the file in that directory."),
i18n("error while writing"));
} else
showStatMsg(i18n("Successfully exported data."));
curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 129bf7b..cf8690f 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -2932,96 +2932,97 @@ void PwMDoc::ensureLvp()
}
/*/debug
entrBegin = catI->d.begin();
entrEnd = catI->d.end();
entrI = entrBegin;
while (entrI != entrEnd) {
qDebug("check: %s, pos=%i", (*entrI).desc.c_str(), (*entrI).listViewPos);
++entrI;
}
*/
++catI;
}
}
QString PwMDoc::getTitle()
{
/* NOTE: We have to ensure, that the returned title
* is unique and not reused somewhere else while
* this document is valid (open).
*/
QString title(getFilename());
//US ENH: The whole filename on PDAs is too long. So use only the last characters
if (QApplication::desktop()->width() < 640)
{
if (title.length() > 30)
title = "..." + title.right(30);
}
if (title.isEmpty()) {
if (unnamedNum == 0) {
unnamedNum = PwMDocList::getNewUnnamedNumber();
PWM_ASSERT(unnamedNum != 0);
}
title = DEFAULT_TITLE;
title += " ";
title += tostr(unnamedNum).c_str();
}
return title;
}
bool PwMDoc::tryDelete()
{
+
if (deleted)
return true;
int ret;
if (isDirty()) {
ret = dirtyAskSave(getTitle());
if (ret == 0) { // save to disk
if (!saveDocUi(this))
goto out_ignore;
} else if (ret == 1) { // don't save and delete
goto out_accept;
} else { // cancel operation
goto out_ignore;
}
}
out_accept:
deleted = true;
delete this;
return true;
out_ignore:
return false;
}
#ifdef PWM_EMBEDDED
//US ENH: this is the magic function that syncronizes the this doc with the remote doc
//US it could have been defined as static, but I did not want to.
PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* syncRemote, int mode )
{
int addedPasswordsLocal = 0;
int addedPasswordsRemote = 0;
int deletedPasswordsRemote = 0;
int deletedPasswordsLocal = 0;
int changedLocal = 0;
int changedRemote = 0;
PwMSyncItem* syncItemLocal;
PwMSyncItem* syncItemRemote;
QString mCurrentSyncName = manager->getCurrentSyncName();
QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
bool fullDateRange = false;
int take;
// local->resetTempSyncStat();
QDateTime mLastSync = QDateTime::currentDateTime();
QDateTime modifiedSync = mLastSync;
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index 71b4a8d..a9916c2 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -159,123 +159,126 @@ void PwMDocUi::noMpwMsgBox(bool chipcard, QString prefix, QString postfix)
{
QString msg;
if (prefix != "") {
msg += prefix;
msg += "\n";
}
if (chipcard) {
msg += i18n("No key-card found!\n"
"Please insert the\n"
"correct key-card.");
} else {
msg += i18n("No master-password given!");
}
if (postfix != "") {
msg += "\n";
msg += postfix;
}
KMessageBox::error(currentView, msg,
(chipcard) ? (i18n("no chipcard"))
: (i18n("password error")));
}
void PwMDocUi::rootAlertMsgBox()
{
KMessageBox::error(currentView,
i18n("This feature is not available,n"
"if you execute PwM with \"root\" \n"
"UID 0 privileges, for security reasons!"),
i18n("not allowed as root!"));
}
void PwMDocUi::cantDeeplock_notSavedMsgBox()
{
KMessageBox::error(currentView,
i18n("Can't deep-lock, because the document\n"
"hasn't been saved, yet. Please save\n"
"to a file and try again."),
i18n("not saved, yet"));
}
void PwMDocUi::gpmPwLenErrMsgBox()
{
KMessageBox::error(currentView,
i18n("GPasman does not support passwords\n"
"shorter than 4 characters! Please try\n"
"again with a longer password."),
- i18n("password too short"));
+ i18n("Password too short"));
}
int PwMDocUi::dirtyAskSave(const QString &docTitle)
{
int ret;
#ifndef PWM_EMBEDDED
ret = KMessageBox::questionYesNoCancel(currentView,
- i18n("The list \"") +
+ i18n("The list\n\"") +
docTitle +
i18n
("\" has been modified.\n"
"Do you want to save it?"),
- i18n("save?"));
+ i18n("Save?"));
if (ret == KMessageBox::Yes) {
return 0;
} else if (ret == KMessageBox::No) {
return 1;
}
#else
+ QString doc = docTitle;
+ if ( doc.length() > 33 )
+ doc = "..." + doc.right(30);
ret = KMessageBox::warningYesNoCancel(currentView,
- i18n("The list \"") +
- docTitle +
+ i18n("The list\n \"") +
+ doc +
i18n
("\"\nhas been modified.\n"
"Do you want to save it?"),
- i18n("save?"));
+ i18n("Save?"));
if (ret == KMessageBox::Yes) {
return 0;
} else if (ret == KMessageBox::No) {
return 1;
}
#endif
// cancel
return -1;
}
bool PwMDocUi::saveDocUi(PwMDoc *doc)
{
PWM_ASSERT(doc);
doc->timer()->getLock(DocTimer::id_autoLockTimer);
if (doc->isDocEmpty()) {
KMessageBox::information(currentView,
i18n
("Sorry, there's nothing to save.\n"
"Please first add some passwords."),
i18n("nothing to do"));
doc->timer()->putLock(DocTimer::id_autoLockTimer);
return true;
}
PwMerror ret = doc->saveDoc(conf()->confGlobCompression());
if (ret == e_filename) {
doc->timer()->putLock(DocTimer::id_autoLockTimer);
return saveAsDocUi(doc);
} else if (ret == e_weakPw) {
KMessageBox::error(currentView,
i18n("Error: This is a weak password.\n"
"Please select another password."),
i18n("weak password"));
doc->timer()->putLock(DocTimer::id_autoLockTimer);
return false;
} else if (ret == e_fileBackup) {
KMessageBox::error(currentView,
i18n("Error: Couldn't make backup-file!"),
i18n("backup failed"));
doc->timer()->putLock(DocTimer::id_autoLockTimer);
return false;
} else if (ret == e_noPw ||
ret == e_wrongPw ||
ret == e_openFile) {
doc->timer()->putLock(DocTimer::id_autoLockTimer);
return false;
} else if (ret != e_success) {
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index d775aa9..fbd17a7 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -43,188 +43,188 @@
#include <qmessagebox.h>
#include <kmessagebox.h>
#ifndef PWM_EMBEDDED
#include <kcmdlineargs.h>
#include <kwin.h>
#include <dcopclient.h>
#endif
#include <kapplication.h>
#include <kiconloader.h>
#include <signal.h>
static PwMInit *sig_init_pointer;
#ifdef _WIN32_
static void sig_handler(int signum)
#else
static NOREGPARM void sig_handler(int signum)
#endif
{
switch (signum) {
case SIGINT:
case SIGTERM:
sig_init_pointer->shutdownApp(20 + signum);
break;
default:
printDebug(string("unhandled signal ")
+ tostr(signum));
}
}
PwMInit::PwMInit(PwMApplication *_app)
: runStatus (unknown)
, _curWidget (0)
, _dcopClient (0)
, _kwalletEmu (0)
, _keycard (0)
, _tray (0)
{
sig_init_pointer = this;
app = _app;
}
PwMInit::~PwMInit()
{
+ qDebug("PwMInit::~PwMInit() ");
#ifndef PWM_EMBEDDED
SelfTest::cancel();
// close all open mainwnds
QValueList<PwM *>::iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#else
// close all open mainwnds
QValueList<PwM *>::Iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#endif
while (i != end) {
disconnect(*i, SIGNAL(closed(PwM *)),
this, SLOT(mainWndClosed(PwM *)));
delete *i;
++i;
}
_mainWndList.clear();
// close all remaining open documents
PwMDocList *_dl = PwMDoc::getOpenDocList();
vector<PwMDocList::listItem> dl = *(_dl->getList());
vector<PwMDocList::listItem>::iterator i2 = dl.begin(),
end2 = dl.end();
while (i2 != end2) {
delete (*i2).doc;
++i2;
}
#ifdef CONFIG_KWALLETIF
delete_ifnot_null(_kwalletEmu);
#endif // CONFIG_KWALLETIF
#ifdef CONFIG_KEYCARD
delete_ifnot_null(_keycard);
#endif // CONFIG_KEYCARD
delete_ifnot_null(_tray);
Randomizer::cleanup();
#ifndef PWM_EMBEDDED
Configuration::cleanup();
#endif
}
void PwMInit::initializeApp()
{
//qDebug("PwMInit::initializeApp() ");
PWM_ASSERT(runStatus == unknown);
runStatus = init;
initPosixSignalHandler();
Randomizer::init();
#ifndef PWM_EMBEDDED
Configuration::init();
#endif
initDCOP();
initKWalletEmu();
initKeycard();
initTray();
handleCmdLineArgs();
bool openDeeplocked = false;
if (conf()->confGlobAutostartDeepLocked() ||
savedCmd.open_deeplocked)
openDeeplocked = true;
if ( false ){
// LR is not working
//if (conf()->confWndAutoMinimizeOnStart() ||
// savedCmd.minToTray) {
PwMDoc *newDoc = createDoc();
qDebug(" createDoc()");
if (!newDoc->openDocUi(newDoc,
conf()->confGlobAutoStart(),
openDeeplocked)) {
delete newDoc;
}
//US ENH for embedded devices: in the case of failure, open a document the default way
createMainWnd(conf()->confGlobAutoStart(),
openDeeplocked,
true,
0,
savedCmd.minimized);
// }
} else {
createMainWnd(conf()->confGlobAutoStart(),
openDeeplocked,
true,
0,
savedCmd.minimized);
}
-
runStatus = running;
}
void PwMInit::shutdownApp(int exitStatus)
{
printDebug(string("PwMInit::shutdownApp(")
+ tostr(exitStatus) + ") called.");
PWM_ASSERT((runStatus == running) || (runStatus == init));
runStatus = shutdown;
QApplication::exit(exitStatus);
/* The destructor of PwMInit is called when control
* leaves main()
*/
}
void PwMInit::initPosixSignalHandler()
{
signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);
}
void PwMInit::initDCOP()
{
#ifndef PWM_EMBEDDED
_dcopClient = app->dcopClient();
_dcopClient->setNotifications(true);
#endif
}
void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload)
{
#ifdef CONFIG_KWALLETIF
if (!conf()->confGlobKwalletEmu() ||
forceDisable) {
delete_ifnot_null(_kwalletEmu);
return;
}
try {
if (_kwalletEmu && forceReload)
delete_and_null(_kwalletEmu);
if (!_kwalletEmu)
_kwalletEmu = new KWalletEmu(this);
} catch (PwMException e) {
string errMsg("initializing KWallet emulation failed. ID: ");
errMsg += tostr(static_cast<int>(e.getId()));
errMsg += " err-message: ";
errMsg += e.getMessage();
@@ -277,205 +277,214 @@ void PwMInit::initTray()
end = dl->end();
while (i != end) {
_tray->connectDocToTray((*i).doc);
++i;
}
}
void PwMInit::removeTrayAndQuit()
{
PWM_ASSERT(_tray);
// _tray is deleted in ~PwMInit
shutdownApp(0);
}
PwM * PwMInit::createMainWnd(const QString &loadFile,
bool loadFileDeepLocked,
bool virginity,
PwMDoc *doc,
bool minimized)
{
PwM *newWnd;
if (!doc)
doc = createDoc();
newWnd = new PwM(this, doc, virginity);
#ifndef PWM_EMBEDDED
_mainWndList.push_back(newWnd);
#else
_mainWndList.append(newWnd);
#endif
connect(newWnd, SIGNAL(closed(PwM *)),
this, SLOT(mainWndClosed(PwM *)));
connect(newWnd, SIGNAL(gotFocus(PwM *)),
this, SLOT(setCurWidget(PwM *)));
connect(newWnd, SIGNAL(lostFocus(PwM *)),
this, SLOT(resetCurWidget()));
//US ENH
#ifndef PWM_EMBEDDED
if (minimized)
newWnd->showMinimized();
else
newWnd->show();
#else //PWM_EMBEDDED
#ifndef DESKTOP_VERSION
app->showMainWidget( newWnd );
#else //DESKTOP_VERSION
- app->setMainWidget( newWnd );
newWnd->resize (640, 480 );
newWnd->show();
- qDebug("show ");
#endif //DESKTOP_VERSION
#endif //PWM_EMBEDDED
if (loadFile != QString::null &&
loadFile != "") {
newWnd->openDoc(loadFile, loadFileDeepLocked);
}
return newWnd;
}
PwMDoc * PwMInit::createDoc()
{
PwMDoc *doc = new PwMDoc(this);
#ifdef CONFIG_KEYCARD
doc->setPwMKeyCard(keycard());
#endif
#ifdef CONFIG_KWALLETIF
if (kwalletEmu())
kwalletEmu()->connectDocSignals(doc);
#endif
if (_tray)
_tray->connectDocToTray(doc);
return doc;
}
void PwMInit::mainWndClosed(PwM *wnd)
{
bool doMinimizeToTray = false;
bool doDeleteDoc = false;
#ifndef PWM_EMBEDDED
dcopClient()->suspend();
dcopClient()->setAcceptCalls(false);
#endif
again:
if (wnd->isForceMinimizeToTray()) {
if (unlikely(!_tray)) {
/* This should not happen! If we set forceMinimizeToTray ,
* we must be sure that _tray exists.
*/
BUG();
wnd->setForceMinimizeToTray(false);
goto again;
}
doMinimizeToTray = true;
} else {
// Ask to minimize to tray. If not, delete doc.
if (_tray &&
runStatus != shutdown &&
!wnd->isForceQuit() &&
!wnd->curDoc()->isDeleted()) {
if (conf()->confWndClose())
doDeleteDoc = true;
else
doMinimizeToTray = true;
} else {
doDeleteDoc = true;
}
}
if (doMinimizeToTray) {
-
+ qDebug("doMinimizeToTray ");
PWM_ASSERT(_tray);
int mmlock = conf()->confGlobMinimizeLock();
switch (mmlock) {
case 0: // don't lock anything
break;
case 1: // normal lock
wnd->curDoc()->lockAll(true);
break;
case 2: // deep-lock
wnd->curDoc()->deepLock();
break;
default:
WARN();
}
} else if (doDeleteDoc) {
+ qDebug("doDeleteDoc ");
if (!wnd->curDoc()->tryDelete()) {
/* We failed deleting the doc,
* so open a new window with it, again.
*/
createMainWnd(QString::null, false,
false, wnd->curDoc());
}
}
#ifndef PWM_EMBEDDED
// find the closed window in the "mainWndList" and delete it.
QValueList<PwM *>::iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#else
// find the closed window in the "mainWndList" and delete it.
QValueList<PwM *>::Iterator i = _mainWndList.begin(),
end = _mainWndList.end();
#endif
while (i != end) {
if (*i == wnd) {
#ifndef PWM_EMBEDDED
_mainWndList.erase(i);
#else
_mainWndList.remove(i);
#endif
+
+ if ( app->mainWidget() == wnd ) {
+ if ( _mainWndList.count() ) {
+#ifndef DESKTOP_VERSION
+ app->showMainWidget(_mainWndList.first() );
+#endif //DESKTOP_VERSION
+
+ }
+ }
+ delete wnd;
goto out_success;
}
++i;
}
BUG();
out_success:
#ifndef PWM_EMBEDDED
if (!_mainWndList.size())
#else
if (!_mainWndList.count())
#endif
{
/* If there's no main window and no tray icon
* left, we have no user interface, so we can
* shut down the application.
*/
if (!_tray) {
#ifndef PWM_EMBEDDED
dcopClient()->setAcceptCalls(true);
dcopClient()->resume();
#endif
shutdownApp(0);
return;
}
/* There is no widget left, so set
* _curWidget to 0
*/
resetCurWidget();
}
#ifndef PWM_EMBEDDED
dcopClient()->setAcceptCalls(true);
dcopClient()->resume();
#endif
}
void PwMInit::trayIconClosed(PwMTray *tray)
{
if (runStatus != running)
return;
PARAM_UNUSED(tray);
PWM_ASSERT(tray == _tray);
/* If there's no main wnd left we have to
* shutdown the app (same as in mainWndClosed())
*/
#ifndef PWM_EMBEDDED
if (!_mainWndList.size())
shutdownApp(0);