-rw-r--r-- | Makefile | 263 | ||||
-rw-r--r-- | kabc/kabc.pro | 4 | ||||
-rw-r--r-- | kabc/plugins/dir/dir.pro | 29 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 6 | ||||
-rw-r--r-- | kabc/plugins/file/file.pro | 30 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/addresseewidget.cpp | 1 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 7 | ||||
-rw-r--r-- | kopi-desktop.pro | 2 | ||||
-rw-r--r-- | kopiemail.control | 2 | ||||
-rw-r--r-- | microkde/kdecore/klibloader.cpp | 17 | ||||
-rw-r--r-- | microkde/kdecore/kstandarddirs.cpp | 3 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 2 | ||||
-rw-r--r-- | microkde/kresources/factory.cpp | 3 | ||||
-rw-r--r-- | microkde/microkde.pro | 10 |
15 files changed, 239 insertions, 146 deletions
@@ -1,118 +1,147 @@ -DISTPATH = $(shell pwd) -DISTDIR = $(shell basename $(DISTPATH)) - -SUBDIRS = libical/src/libical libical/src/libicalss qtcompat microkde \ - libkcal libkdepim kabc kabc/converter/opie kabc/formats/binary kabc/plugins/file kabc/plugins/dir \ - kabc/plugins/opie \ - korganizer kalarmd kaddressbook kmicromail/libetpan kmicromail/libmailwrapper kmicromail -all: tmake - for i in $(SUBDIRS); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - -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) - -clean: - rm -f libical/lib/$(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 db2file/db2file $(QPEDIR)/bin/db2file - cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop - cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop - cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop - -dist: - @echo Dont forget to do "make install" before "make dist" - rm -f *arm.ipk - rm -f *~ - cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc kdepim - mkipks kmicrokdelibs.control - mkipks korganizer.control - mkipks kaddressbook.control - mkipks kopiemail.control - mkipks korganizer-alarm.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/converter/opie/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) \ - kaddressbook/Makefile$(PLATFORM) \ - kmicromail/Makefile$(PLATFORM) \ - kmicromail/libetpan/Makefile$(PLATFORM) \ - kmicromail/libmailwrapper/Makefile$(PLATFORM) - - - -qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro - cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) - -microkde/Makefile$(PLATFORM): microkde/microkdeE.pro - cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) - -libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro - cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) - - -libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro - cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) - -kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro - cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) - -korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro - cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) - -libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro - cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) - -libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro - cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) - -kabc/Makefile$(PLATFORM): kabc/kabcE.pro - cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) - -kabc/converter/opie/Makefile$(PLATFORM): kabc/converter/opie/opieconverterE.pro - cd kabc/converter/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieconverterE.pro -o Makefile$(PLATFORM) - -kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro - cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) - -kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/kabc_fileE.pro - cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_fileE.pro -o Makefile$(PLATFORM) - -kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/kabc_dirE.pro - cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_dirE.pro -o Makefile$(PLATFORM) - -kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/kabc_ldapE.pro - cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_ldapE.pro -o Makefile$(PLATFORM) - -kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/kabc_opieE.pro - cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" kabc_opieE.pro -o Makefile$(PLATFORM) - - -kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro - cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) - - -kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro - cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) -kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro - cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) -kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro - cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) +############################################################################# +# Makefile for building: kopi-desktop +# Generated by qmake (1.07a) (Qt 3.3.2) on: Wed Jul 7 13:43:59 2004 +# Project: kopi-desktop.pro +# Template: subdirs +# Command: $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro +############################################################################# + +MAKEFILE = Makefile +QMAKE = qmake +DEL_FILE = rm -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p +INSTALL_FILE= +INSTALL_DIR = +SUBTARGETS = \ + sub-libical \ + sub-libkcal \ + sub-microkde \ + sub-libkdepim \ + sub-kabc \ + sub-korganizer \ + sub-kaddressbook \ + sub-kabc-plugins-file \ + sub-kabc-plugins-dir + +first: all + +all: Makefile $(SUBTARGETS) + +libical/$(MAKEFILE): + @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" + cd libical && $(QMAKE) libical.pro "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -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 "CONFIG+=thread" "CONFIG+=debug" -o $(MAKEFILE) +sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE + cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) + +Makefile: kopi-desktop.pro /usr/local/qtgcc/mkspecs/default/qmake.conf + $(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro +qmake: qmake_all + @$(QMAKE) "CONFIG+=thread" "CONFIG+=debug" -o Makefile kopi-desktop.pro + +all: $(SUBTARGETS) +qmake_all: libical/$(MAKEFILE) libkcal/$(MAKEFILE) microkde/$(MAKEFILE) libkdepim/$(MAKEFILE) kabc/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) + ( [ -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 +clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE + ( [ -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 +uninstall_subdirs: qmake_all FORCE + ( [ -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 +install_subdirs: qmake_all FORCE + ( [ -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 +distclean: qmake_all FORCE + ( [ -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 + +install: install_subdirs + +uninstall: uninstall_subdirs + +FORCE: diff --git a/kabc/kabc.pro b/kabc/kabc.pro index ea4bbb7..4a8d73a 100644 --- a/kabc/kabc.pro +++ b/kabc/kabc.pro @@ -1,214 +1,214 @@ TEMPLATE = lib CONFIG += qt warn_on #release debug DESTDIR=../bin TARGET = microkabc include( ../variables.pri ) INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../qtcompat ../microkde/kdeui #LIBS += -lmicrokde -lldap LIBS += -L$(QPEDIR)/lib DEFINES += KAB_EMBEDDED DESKTOP_VERSION unix : { OBJECTS_DIR = obj/unix MOC_DIR = moc/unix } win32: { DEFINES += _WIN32_ OBJECTS_DIR = obj/win MOC_DIR = moc/win } INTERFACES = \ HEADERS = \ resource.h \ stdaddressbook.h \ agent.h \ geo.h \ key.h \ field.h \ plugin.h \ address.h \ addresseelist.h \ formatfactory.h \ formatplugin.h \ phonenumber.h \ distributionlist.h \ distributionlistdialog.h \ distributionlisteditor.h \ vcardformatplugin.h \ -formats/binaryformat.h \ formats/vcardformatplugin2.h \ picture.h \ secrecy.h \ sound.h \ addressbook.h \ timezone.h \ addressee.h \ addresseedialog.h \ vcardconverter.h \ vcard21parser.h \ vcardformatimpl.h \ plugins/file/resourcefile.h \ plugins/file/resourcefileconfig.h \ plugins/dir/resourcedir.h \ plugins/dir/resourcedirconfig.h \ vcardparser/vcardline.h \ vcardparser/vcard.h \ vcardparser/vcardtool.h \ vcardparser/vcardparser.h \ vcard/include/VCardAdrParam.h \ vcard/include/VCardAdrValue.h \ vcard/include/VCardAgentParam.h \ vcard/include/VCardContentLine.h \ vcard/include/VCardDateParam.h \ vcard/include/VCardDateValue.h \ vcard/include/VCardEmailParam.h \ vcard/include/VCardGeoValue.h \ vcard/include/VCardGroup.h \ vcard/include/VCardImageParam.h \ vcard/include/VCardImageValue.h \ vcard/include/VCardLangValue.h \ vcard/include/VCardNValue.h \ vcard/include/VCardParam.h \ vcard/include/VCardPhoneNumberValue.h \ vcard/include/VCardSourceParam.h \ vcard/include/VCardTelParam.h \ vcard/include/VCardTextParam.h \ vcard/include/VCardTextNSParam.h \ vcard/include/VCardTextValue.h \ vcard/include/VCardTextBinParam.h \ vcard/include/VCardURIValue.h \ vcard/include/VCardVCard.h \ vcard/include/VCardEntity.h \ vcard/include/VCardValue.h \ vcard/include/VCardSoundValue.h \ vcard/include/VCardAgentValue.h \ vcard/include/VCardTelValue.h \ vcard/include/VCardTextBinValue.h \ vcard/include/VCardOrgValue.h \ vcard/include/VCardUTCValue.h \ vcard/include/VCardClassValue.h \ vcard/include/VCardFloatValue.h \ vcard/include/VCardTextListValue.h \ vcard/include/generated/AdrParam-generated.h \ vcard/include/generated/AdrValue-generated.h \ vcard/include/generated/AgentParam-generated.h \ vcard/include/generated/ContentLine-generated.h \ vcard/include/generated/DateParam-generated.h \ vcard/include/generated/DateValue-generated.h \ vcard/include/generated/EmailParam-generated.h \ vcard/include/generated/GeoValue-generated.h \ vcard/include/generated/Group-generated.h \ vcard/include/generated/ImageParam-generated.h \ vcard/include/generated/ImageValue-generated.h \ vcard/include/generated/LangValue-generated.h \ vcard/include/generated/NValue-generated.h \ vcard/include/generated/Param-generated.h \ vcard/include/generated/PhoneNumberValue-generated.h \ vcard/include/generated/SourceParam-generated.h \ vcard/include/generated/TelParam-generated.h \ vcard/include/generated/TextParam-generated.h \ vcard/include/generated/TextNSParam-generated.h \ vcard/include/generated/TextValue-generated.h \ vcard/include/generated/TextBinParam-generated.h \ vcard/include/generated/URIValue-generated.h \ vcard/include/generated/VCard-generated.h \ vcard/include/generated/VCardEntity-generated.h \ vcard/include/generated/Value-generated.h \ vcard/include/generated/SoundValue-generated.h \ vcard/include/generated/AgentValue-generated.h \ vcard/include/generated/TelValue-generated.h \ vcard/include/generated/TextBinValue-generated.h \ vcard/include/generated/OrgValue-generated.h \ vcard/include/generated/UTCValue-generated.h \ vcard/include/generated/ClassValue-generated.h \ vcard/include/generated/FloatValue-generated.h \ vcard/include/generated/TextListValue-generated.h # plugins/ldap/resourceldap.h \ # plugins/ldap/resourceldapconfig.h \ +#formats/binary/binaryformat.h \ SOURCES = \ distributionlist.cpp \ distributionlistdialog.cpp \ distributionlisteditor.cpp \ vcardformatplugin.cpp \ -formats/binaryformat.cpp \ formats/vcardformatplugin2.cpp \ formatfactory.cpp \ resource.cpp \ stdaddressbook.cpp \ plugin.cpp \ agent.cpp \ geo.cpp \ key.cpp \ field.cpp \ address.cpp \ phonenumber.cpp \ picture.cpp \ secrecy.cpp \ sound.cpp \ addressbook.cpp \ timezone.cpp \ addressee.cpp \ addresseelist.cpp \ addresseedialog.cpp \ vcardconverter.cpp \ vcard21parser.cpp \ vcardformatimpl.cpp \ plugins/file/resourcefile.cpp \ plugins/file/resourcefileconfig.cpp \ plugins/dir/resourcedir.cpp \ plugins/dir/resourcedirconfig.cpp \ vcardparser/vcardline.cpp \ vcardparser/vcard.cpp \ vcardparser/vcardtool.cpp \ vcardparser/vcardparser.cpp \ vcard/AdrParam.cpp \ vcard/AdrValue.cpp \ vcard/AgentParam.cpp \ vcard/ContentLine.cpp \ vcard/DateParam.cpp \ vcard/DateValue.cpp \ vcard/EmailParam.cpp \ vcard/Entity.cpp \ vcard/Enum.cpp \ vcard/GeoValue.cpp \ vcard/ImageParam.cpp \ vcard/ImageValue.cpp \ vcard/LangValue.cpp \ vcard/NValue.cpp \ vcard/Param.cpp \ vcard/PhoneNumberValue.cpp \ vcard/RToken.cpp \ vcard/SourceParam.cpp \ vcard/TelParam.cpp \ vcard/TextParam.cpp \ vcard/TextValue.cpp \ vcard/TextBinParam.cpp \ vcard/URIValue.cpp \ vcard/VCardv.cpp \ vcard/VCardEntity.cpp \ vcard/Value.cpp \ vcard/SoundValue.cpp \ vcard/AgentValue.cpp \ vcard/TelValue.cpp \ vcard/TextBinValue.cpp \ vcard/OrgValue.cpp \ vcard/UTCValue.cpp \ vcard/ClassValue.cpp \ vcard/FloatValue.cpp \ vcard/TextListValue.cpp # plugins/ldap/resourceldap.cpp \ # plugins/ldap/resourceldapconfig.cpp \ +#formats/binary/binaryformat.cpp \ diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro new file mode 100644 index 0000000..3db201f --- a/dev/null +++ b/kabc/plugins/dir/dir.pro @@ -0,0 +1,29 @@ +TEMPLATE = lib +CONFIG += qt warn_on release +#release debug + +TARGET = microkabc_dir +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat +DESTDIR = ../../../bin +#LIBS += -lmicrokde -lmicrokabc +#LIBS += -L$(QPEDIR)/lib + +INTERFACES = \ + +HEADERS = \ + resourcedir.h \ + resourcedirconfig.h + +SOURCES = \ + resourcedir.cpp \ + resourcedirconfig.cpp + +unix : { +OBJECTS_DIR = obj/unix +MOC_DIR = moc/unix +} +win32: { +DEFINES += _WIN32_ +OBJECTS_DIR = obj/win +MOC_DIR = moc/win +}
\ No newline at end of file diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index be19821..6ea2f4b 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -215,99 +215,101 @@ bool ResourceDir::save( Ticket *ticket ) continue; } mFormat->save( *it, &file ); // mark as unchanged (*it).setChanged( false ); file.close(); } delete ticket; unlock( mPath ); return ok; } bool ResourceDir::lock( const QString &path ) { kdDebug(5700) << "ResourceDir::lock()" << endl; QString p = path; //US change the implementation how the lockfilename is getting created //US p.replace( QRegExp("/"), "_" ); //US QString lockName = locateLocal( "data", "kabc/lock/" + p + ".lock" ); KURL url(p); QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); kdDebug(5700) << "-- lock name: " << lockName << endl; if ( QFile::exists( lockName ) ) return false; QString lockUniqueName; lockUniqueName = p + KApplication::randomString( 8 ); url = lockUniqueName; //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; // Create unique file QFile file( mLockUniqueName ); file.open( IO_WriteOnly ); file.close(); // Create lock file - int result = ::link( QFile::encodeName( mLockUniqueName ), + int result = 0; +#ifndef _WIN32_ + result = ::link( QFile::encodeName( mLockUniqueName ), QFile::encodeName( lockName ) ); - +#endif if ( result == 0 ) { addressBook()->emitAddressBookLocked(); return true; } // TODO: check stat return false; } void ResourceDir::unlock( const QString &path ) { QString p = path; //US change the implementation how the lockfilename is getting created //US p.replace( QRegExp( "/" ), "_" ); //US QString lockName = locate( "data", "kabc/lock/" + p + ".lock" ); KURL url(p); QString lockName = locate( "data", "kabc/lock/" + url.fileName() + ".lock" ); ::unlink( QFile::encodeName( lockName ) ); QFile::remove( mLockUniqueName ); addressBook()->emitAddressBookUnlocked(); } void ResourceDir::setPath( const QString &path ) { /*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.stopScan(); mDirWatch.removeDir( mPath ); */ mPath = path; /*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.addDir( mPath, true ); mDirWatch.startScan(); */ //US simulate KDirWatch event pathChanged(); } QString ResourceDir::path() const { return mPath; } void ResourceDir::setFormat( const QString &format ) diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro new file mode 100644 index 0000000..a5ade93 --- a/dev/null +++ b/kabc/plugins/file/file.pro @@ -0,0 +1,30 @@ +TEMPLATE = lib +CONFIG += qt warn_on release +#release debug + +TARGET = microkabc_file +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat + +DESTDIR = ../../../bin +#LIBS += -lmicrokde -lmicrokabc +#LIBS += -L$(QPEDIR)/lib + +INTERFACES = \ + +HEADERS = \ + resourcefile.h \ + resourcefileconfig.h + +SOURCES = \ + resourcefile.cpp \ + resourcefileconfig.cpp + +unix : { +OBJECTS_DIR = obj/unix +MOC_DIR = moc/unix +} +win32: { +DEFINES += _WIN32_ +OBJECTS_DIR = obj/win +MOC_DIR = moc/win +}
\ No newline at end of file diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 3920f69..4b4c935 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -241,99 +241,101 @@ bool ResourceFile::save( Ticket *ticket ) } else { } if ( !ok ) addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); delete ticket; unlock( mFileName ); return ok; qDebug("ResourceFile::save has to be changed"); return true; } bool ResourceFile::lock( const QString &fileName ) { QString fn = fileName; //US change the implementation how the lockfilename is getting created //US fn.replace( QRegExp("/"), "_" ); //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); KURL url(fn); QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); if (QFile::exists( lockName )) return false; QString lockUniqueName; lockUniqueName = fn + KApplication::randomString( 8 ); url = lockUniqueName; //US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; // Create unique file QFile file( mLockUniqueName ); file.open( IO_WriteOnly ); file.close(); // Create lock file - int result = ::link( QFile::encodeName( mLockUniqueName ), + int result = 0; +#ifndef _WIN32_ + result = ::link( QFile::encodeName( mLockUniqueName ), QFile::encodeName( lockName ) ); - +#endif if ( result == 0 ) { addressBook()->emitAddressBookLocked(); return true; } // TODO: check stat return false; } void ResourceFile::unlock( const QString &fileName ) { QString fn = fileName; //US change the implementation how the lockfilename is getting created //US fn.replace( QRegExp( "/" ), "_" ); //US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); //US QString lockName = fn + ".lock"; KURL url(fn); QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); QFile::remove( lockName ); QFile::remove( mLockUniqueName ); addressBook()->emitAddressBookUnlocked(); } void ResourceFile::setFileName( const QString &fileName ) { /*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.stopScan(); mDirWatch.removeFile( mFileName ); */ mFileName = fileName; /*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.addFile( mFileName ); mDirWatch.startScan(); */ //US simulate KDirWatch event fileChanged(); } QString ResourceFile::fileName() const { return mFileName; } void ResourceFile::setFormat( const QString &format ) diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp index f84b2ba..eb5bdd9 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.cpp +++ b/kaddressbook/kcmconfigs/addresseewidget.cpp @@ -1,76 +1,77 @@ /* This file is part of KAddressBook. Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 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. */ #include <qgroupbox.h> #include <qlabel.h> #include <qlayout.h> #include <qlistbox.h> #include <qpushbutton.h> +#include <qapplication.h> #include <kbuttonbox.h> #include <kcombobox.h> #include <kconfig.h> #include <kdialog.h> #include <klocale.h> #include <kglobal.h> #include <klineedit.h> #include <kstandarddirs.h> #include "addresseewidget.h" NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, const char *name ) : QWidget( parent, name ) { if (KGlobal::getOrientation() == KGlobal::Portrait) { QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); QLabel *label = new QLabel( i18n( title ), this ); layout->addWidget( label, 0, 1 ); mBox = new QListBox( this ); mBox->setMaximumSize(70, 70); layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); KButtonBox *bbox = new KButtonBox( this, Qt::Vertical ); mAddButton = bbox->addButton( i18n( "Add" ), this, SLOT( add() ) ); mRemoveButton = bbox->addButton( i18n( "Rem" ), this, SLOT( remove() ) ); bbox->layout(); layout->addMultiCellWidget( bbox, 0, 1, 2,2); mEdit = new KLineEdit( this ); layout->addWidget( mEdit, 1, 1 ); //mEdit->setMinimumWidth(50); // layout->addWidget( group ); } else { QHBoxLayout *layout = new QHBoxLayout( this ); QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index dce6a88..cf1fd3e 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp @@ -1,109 +1,110 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #include <stdlib.h> #else #include <qapplication.h> #include <qwindowsstyle.h> #include <qplatinumstyle.h> #include <qmainwindow.h> #endif #include <kstandarddirs.h> #include <kglobal.h> #include <stdio.h> #include <qdir.h> #include "kaddressbookmain.h" int main( int argc, char **argv ) { #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); #else QApplication a( argc, argv ); QApplication::setStyle( new QPlatinumStyle ()); #endif bool exitHelp = false; if ( argc > 1 ) { QString command = argv[1]; if ( command == "-help" ){ printf("KA/E command line commands:\n"); printf(" no command: Start KA/E in usual way\n"); printf(" -help: This output\n"); printf(" KA/E is exiting now. Bye!\n"); exitHelp = true; } } if ( ! exitHelp ) { KGlobal::setAppName( "kaddressbook" ); #ifndef DESKTOP_VERSION if ( QApplication::desktop()->width() > 320 ) KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); else KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); #else QString fileName ; - fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/"; + fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); + QApplication::addLibraryPath ( qApp->applicationDirPath () ); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); KAddressBookMain m ; //US MainWindow m; //US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); #ifndef DESKTOP_VERSION a.showMainWidget( &m ); #else - a.setMainWidget(m ); - m->show(); + a.setMainWidget( &m ); + m.show(); #endif a.exec(); } qDebug("KA: Bye! "); } /* #include <stdlib.h> #include <qstring.h> #include <kabc/stdaddressbook.h> #include <kaboutdata.h> #include <kcmdlineargs.h> #include <kcrash.h> #include <kdebug.h> #include <klocale.h> #include <kstartupinfo.h> #include <kuniqueapplication.h> #include <kwin.h> #include "kaddressbookmain.h" #include "kabcore.h" extern "C" { void crashHandler( int ) { KABC::StdAddressBook::handleCrash(); ::exit( 0 ); } } class KAddressBookApp : public KUniqueApplication { public: KAddressBookApp() : mMainWin( 0 ) {} ~KAddressBookApp() {} int newInstance(); private: KAddressBookMain *mMainWin; }; int KAddressBookApp::newInstance() { diff --git a/kopi-desktop.pro b/kopi-desktop.pro index 1a5fabd..b255756 100644 --- a/kopi-desktop.pro +++ b/kopi-desktop.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -SUBDIRS = libical libkcal microkde libkdepim kabc korganizer kaddressbook +SUBDIRS = libical libkcal microkde libkdepim kabc korganizer kaddressbook kabc/plugins/file kabc/plugins/dir #kalarmd diff --git a/kopiemail.control b/kopiemail.control index 3d563f0..7a93a1b 100644 --- a/kopiemail.control +++ b/kopiemail.control @@ -1,14 +1,14 @@ Files: bin/ompi apps/Pim/kmicromail.desktop pics/kdepim/kmicromail/* lib/libssl* lib/libcrypto.* lib/libkmicro* Priority: optional Section: qpe/pim Maintainer: Lutz Rogowski <lutz@pi-sync.net> Architecture: arm -Version: 1.9.2a +Version: 1.9.2b License: GPL Depends: lib/libmicrokde.so Description: KOrganizer/Pi and Kaddressbook/Pi The embedded version of KOrganizer/Platform-independend, the KDE calendar and scheduling program optimized for 640x480 and 320x240 resolution on Zaurus PDA diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp index c07d50f..c091e05 100644 --- a/microkde/kdecore/klibloader.cpp +++ b/microkde/kdecore/klibloader.cpp @@ -1,98 +1,95 @@ /* This file is part of the KDE libraries Copyright (C) 1999 Torben Weis <weis@kde.org> Copyright (C) 2000 Michael Matz <matz@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //US #include <config.h> #include <qclipboard.h> #include <qfile.h> #include <qtimer.h> #include <qobjectdict.h> #include <qwidgetlist.h> #include <qwidget.h> #include "kapplication.h" #include "klibloader.h" #include "kstandarddirs.h" #include "kdebug.h" #include "klocale.h" /*US #ifndef NDEBUG #include "ltdl.h" #endif */ //US do everything through qlibrary #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #include <qtopia/qlibrary.h> +#else +#include <qlibrary.h> #endif -/*US -#ifdef Q_WS_X11 -#include <X11/Xlib.h> -#include <X11/Xatom.h> -#endif -*/ + template class QAsciiDict<KLibrary>; #include <stdlib.h> //getenv /*US #if HAVE_DLFCN_H # include <dlfcn.h> #endif #ifdef RTLD_GLOBAL # define LT_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_GLOBAL DL_GLOBAL # endif #endif #ifndef LT_GLOBAL # define LT_GLOBAL 0 #endif */ /*US extern "C" { extern int lt_dlopen_flag; } */ KLibFactory::KLibFactory( QObject* parent, const char* name ) : QObject( parent, name ) { } KLibFactory::~KLibFactory() { // kdDebug(150) << "Deleting KLibFactory " << this << endl; } QObject* KLibFactory::create( QObject* parent, const char* name, const char* classname, const QStringList &args ) { QObject* obj = createObject( parent, name, classname, args ); if ( obj ) emit objectCreated( obj ); return obj; } QObject* KLibFactory::createObject( QObject*, const char*, const char*, const QStringList &) { @@ -147,97 +144,96 @@ QString KLibrary::name() const QString KLibrary::fileName() const { return m_filename; } KLibFactory* KLibrary::factory() { if ( m_factory ) return m_factory; QCString symname; symname.sprintf("init_%s", name().latin1() ); void* sym = symbol( symname ); if ( !sym ) { qDebug("KLibrary: The library %s does not offer an %s function", name().latin1(), symname.data()); #ifndef NDEBUG //US qDebug("KLibrary: errorcode: %s", lt_dlerror()); #endif kdWarning(150) << "KLibrary: The library " << name().latin1() << " does not offer an init_" << name().latin1() << " function" << endl; return 0; } typedef KLibFactory* (*t_func)(); t_func func = (t_func)sym; m_factory = func(); if( !m_factory ) { kdWarning(150) << "KLibrary: The library " << name() << " does not offer a KDE compatible factory" << endl; return 0; } connect( m_factory, SIGNAL( objectCreated( QObject * ) ), this, SLOT( slotObjectCreated( QObject * ) ) ); return m_factory; } void* KLibrary::symbol( const char* symname ) const { //US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname ); void* sym = m_handle->resolve( symname ); if ( !sym ) { //US kdWarning(150) << "KLibrary: " << lt_dlerror() << endl; - kdWarning(150) << "KLibrary: " << m_libname << ", symbol:" << symname << " not found " << endl; return 0; } return sym; } bool KLibrary::hasSymbol( const char* symname ) const { //US void* sym = lt_dlsym( (lt_dlhandle) m_handle, symname ); void* sym = m_handle->resolve( symname ); return (sym != 0L ); } void KLibrary::unload() const { if (KLibLoader::s_self) KLibLoader::s_self->unloadLibrary(QFile::encodeName(name())); } void KLibrary::slotObjectCreated( QObject *obj ) { if ( !obj ) return; if ( m_timer && m_timer->isActive() ) m_timer->stop(); if ( m_objs.containsRef( obj ) ) return; // we know this object already connect( obj, SIGNAL( destroyed() ), this, SLOT( slotObjectDestroyed() ) ); m_objs.append( obj ); } void KLibrary::slotObjectDestroyed() { m_objs.removeRef( sender() ); if ( m_objs.count() == 0 ) { // kdDebug(150) << "KLibrary: shutdown timer for " << name() << " started!" // << endl; if ( !m_timer ) { m_timer = new QTimer( this, "klibrary_shutdown_timer" ); @@ -432,98 +428,101 @@ KLibrary* KLibLoader::globalLibrary( const char *name ) KLibrary *tmp; /*US int olt_dlopen_flag = lt_dlopen_flag; lt_dlopen_flag |= LT_GLOBAL; kdDebug(150) << "Loading the next library global with flag " << lt_dlopen_flag << "." << endl; */ tmp = library(name); /*US lt_dlopen_flag = olt_dlopen_flag; */ return tmp; } KLibrary* KLibLoader::library( const char *name ) { if (!name) return 0; KLibWrapPrivate* wrap = m_libs[name]; if (wrap) { /* Nothing to do to load the library. */ wrap->ref_count++; return wrap->lib; } /* Test if this library was loaded at some time, but got unloaded meanwhile, whithout being dlclose()'ed. */ QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); for (; it.current(); ++it) { if (it.current()->name == name) wrap = it.current(); } if (wrap) { d->pending_close.removeRef(wrap); if (!wrap->lib) { /* This lib only was in loaded_stack, but not in m_libs. */ wrap->lib = new KLibrary( name, wrap->filename, wrap->handle ); } wrap->ref_count++; } else { QString libfile = findLibrary( name ); if ( libfile.isEmpty() ) return 0; - +#ifdef DESKTOP_VERSION + QLibrary *qlib = new QLibrary( libfile.latin1() ); +#else QLibrary *qlib = new QLibrary( libfile.latin1(), QLibrary::Immediately ); +#endif //US lt_dlhandle handle = lt_dlopen( libfile.latin1() ); //US if ( !handle ) if ( !qlib ) { //US const char* errmsg = lt_dlerror(); char* errmsg; sprintf(errmsg, "KLibLoader::library could not load library: %s", libfile.latin1()); qDebug(errmsg); if(errmsg) d->errorMessage = QString::fromLatin1(errmsg); else d->errorMessage = QString::null; kdWarning(150) << "library=" << name << ": file=" << libfile << ": " << d->errorMessage << endl; return 0; } else d->errorMessage = QString::null; KLibrary *lib = new KLibrary( name, libfile, qlib ); wrap = new KLibWrapPrivate(lib, qlib); d->loaded_stack.prepend(wrap); } m_libs.insert( name, wrap ); connect( wrap->lib, SIGNAL( destroyed() ), this, SLOT( slotLibraryDestroyed() ) ); return wrap->lib; } QString KLibLoader::lastErrorMessage() const { return d->errorMessage; } void KLibLoader::unloadLibrary( const char *libname ) { KLibWrapPrivate *wrap = m_libs[ libname ]; if (!wrap) return; if (--wrap->ref_count) return; // kdDebug(150) << "closing library " << libname << endl; m_libs.remove( libname ); @@ -554,94 +553,96 @@ void KLibLoader::slotLibraryDestroyed() wrap->lib = 0; /* the KLibrary object is already away */ m_libs.remove( it.currentKey() ); close_pending( wrap ); return; } } void KLibLoader::close_pending(KLibWrapPrivate *wrap) { if (wrap && !d->pending_close.containsRef( wrap )) d->pending_close.append( wrap ); /* First delete all KLibrary objects in pending_close, but _don't_ unload the DSO behind it. */ QPtrListIterator<KLibWrapPrivate> it(d->pending_close); for (; it.current(); ++it) { wrap = it.current(); if (wrap->lib) { disconnect( wrap->lib, SIGNAL( destroyed() ), this, SLOT( slotLibraryDestroyed() ) ); delete wrap->lib; wrap->lib = 0; } } if (d->unload_mode == KLibLoaderPrivate::DONT_UNLOAD) return; bool deleted_one = false; while ((wrap = d->loaded_stack.first())) { /* Let's first see, if we want to try to unload this lib. If the env. var KDE_DOUNLOAD is set, we try to unload every lib. If not, we look at the lib itself, and unload it only, if it exports the symbol __kde_do_unload. */ if (d->unload_mode != KLibLoaderPrivate::UNLOAD && wrap->unload_mode != KLibWrapPrivate::UNLOAD) break; /* Now ensure, that the libs are only unloaded in the reverse direction they were loaded. */ if (!d->pending_close.containsRef( wrap )) { if (!deleted_one) /* Only diagnose, if we really haven't deleted anything. */ // kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl; break; } // kdDebug(150) << "try to dlclose " << wrap->name << ": yes, done." << endl; +#if 0 #ifndef Q_WS_QWS if ( !deleted_one ) { /* Only do the hack once in this loop. WABA: *HACK* We need to make sure to clear the clipboard before unloading a DSO because the DSO could have defined an object derived from QMimeSource and placed that on the clipboard. */ /*kapp->clipboard()->clear();*/ /* Well.. let's do something more subtle... convert the clipboard context to text. That should be safe as it only uses objects defined by Qt. */ QWidgetList *widgetlist = QApplication::topLevelWidgets(); QWidget *co = widgetlist->first(); while (co) { if (qstrcmp(co->name(), "internal clipboard owner") == 0) { if (XGetSelectionOwner(co->x11Display(), XA_PRIMARY) == co->winId()) kapp->clipboard()->setText(kapp->clipboard()->text()); break; } co = widgetlist->next(); } delete widgetlist; } #else // FIXME(E): Implement in Qt Embedded #endif +#endif // 0 deleted_one = true; //US lt_dlclose(wrap->handle); wrap->handle->unload(); d->pending_close.removeRef(wrap); /* loaded_stack is AutoDelete, so wrap is freed */ d->loaded_stack.remove(); } } void KLibLoader::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } void KLibFactory::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } //US #include "klibloader.moc" diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp index 1a1e027..7f51d78 100644 --- a/microkde/kdecore/kstandarddirs.cpp +++ b/microkde/kdecore/kstandarddirs.cpp @@ -1,94 +1,93 @@ /* This file is part of the KDE libraries Copyright (C) 1999 Sirtaj Singh Kang <taj@kde.org> Copyright (C) 1999 Stephan Kulow <coolo@kde.org> Copyright (C) 1999 Waldo Bastian <bastian@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* * Author: Stephan Kulow <coolo@kde.org> and Sirtaj Singh Kang <taj@kde.org> * Version: $Id$ * Generated: Thu Mar 5 16:05:28 EST 1998 */ //US #include "config.h" #include <stdlib.h> #include <assert.h> //US#include <errno.h> //US #ifdef HAVE_SYS_STAT_H //US #include <sys/stat.h> //US #endif //US#include <sys/types.h> //US#include <dirent.h> //US#include <pwd.h> #include <qregexp.h> #include <qasciidict.h> #include <qdict.h> #include <qdir.h> #include <qfileinfo.h> #include <qstring.h> #include <qstringlist.h> -#include <qpe/qpeapplication.h> #include "kstandarddirs.h" #include "kconfig.h" #include "kdebug.h" //US #include "kinstance.h" #include "kshell.h" //US#include <sys/param.h> //US#include <unistd.h> //US QString KStandardDirs::mAppDir = QString::null; template class QDict<QStringList>; #if 0 #include <qtextedit.h> void ddd( QString op ) { static QTextEdit * dot = 0; if ( ! dot ) dot = new QTextEdit(); dot->show(); dot->append( op ); } #endif class KStandardDirs::KStandardDirsPrivate { public: KStandardDirsPrivate() : restrictionsActive(false), dataRestrictionActive(false) { } bool restrictionsActive; bool dataRestrictionActive; QAsciiDict<bool> restrictions; QStringList xdgdata_prefixes; QStringList xdgconf_prefixes; }; static const char* const types[] = {"html", "icon", "apps", "sound", "data", "locale", "services", "mime", "servicetypes", "config", "exe", "wallpaper", "lib", "pixmap", "templates", @@ -1180,97 +1179,97 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode) if (dirObj.mkdir(base) != true) { qDebug("KStandardDirs::makeDir could not create: %s" , base.latin1()); return false; } } i = pos + 1; } return true; } static QString readEnvPath(const char *env) { #ifdef _WIN32_ return ""; #else QCString c_path = getenv(env); if (c_path.isEmpty()) return QString::null; return QFile::decodeName(c_path); #endif } void KStandardDirs::addKDEDefaults() { //qDebug("ERROR: KStandardDirs::addKDEDefaults() called "); //return; QStringList kdedirList; // begin KDEDIRS QString kdedirs = readEnvPath("MICROKDEDIRS"); if (!kdedirs.isEmpty()) { tokenize(kdedirList, kdedirs, ":"); } else { QString kdedir = readEnvPath("MICROKDEDIR"); if (!kdedir.isEmpty()) { kdedir = KShell::tildeExpand(kdedir); kdedirList.append(kdedir); } } //US kdedirList.append(KDEDIR); //US for embedded, add qtopia dir as kdedir - kdedirList.append(QPEApplication::qpeDir()); + kdedirList.append(readEnvPath("QPEDIR" )); #ifdef __KDE_EXECPREFIX QString execPrefix(__KDE_EXECPREFIX); if (execPrefix!="NONE") kdedirList.append(execPrefix); #endif QString localKdeDir; //US if (getuid()) if (true) { localKdeDir = readEnvPath("MICROKDEHOME"); if (!localKdeDir.isEmpty()) { if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; } else { localKdeDir = QDir::homeDirPath() + "/kdepim/"; } } else { // We treat root different to prevent root messing up the // file permissions in the users home directory. localKdeDir = readEnvPath("MICROKDEROOTHOME"); if (!localKdeDir.isEmpty()) { if (localKdeDir.at(localKdeDir.length()-1) != '/') localKdeDir += '/'; } else { //US struct passwd *pw = getpwuid(0); //US localKdeDir = QFile::decodeName((pw && pw->pw_dir) ? pw->pw_dir : "/root") + "/.microkde/"; qDebug("KStandardDirs::addKDEDefaults: 1 has to be fixed"); } } //US localKdeDir = appDir(); //US // qDebug("KStandardDirs::addKDEDefaults: localKdeDir=%s", localKdeDir.latin1()); if (localKdeDir != "-/") { diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index 92cb8d2..79b0f9d 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp @@ -979,97 +979,97 @@ KToolBar::IconText KToolBar::iconText() const return d->m_iconText; } void KToolBar::setIconSize(int size) { setIconSize( size, true ); } void KToolBar::setIconSize(int size, bool update) { bool doUpdate=false; if ( size != d->m_iconSize ) { d->m_iconSize = size; doUpdate=true; } if (update == false) return; if (doUpdate) emit modechange(); // tell buttons what happened // ugly hack to force a QMainWindow::triggerLayout( TRUE ) if ( mainWindow() ) { QMainWindow *mw = mainWindow(); mw->setUpdatesEnabled( FALSE ); mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setToolBarsMovable( !mw->toolBarsMovable() ); mw->setUpdatesEnabled( TRUE ); } } int KToolBar::iconSize() const { /*US if ( !d->m_iconSize ) // default value? { if (!::qstrcmp(QObject::name(), "mainToolBar")) return KGlobal::iconLoader()->currentSize(KIcon::MainToolbar); else return KGlobal::iconLoader()->currentSize(KIcon::Toolbar); } return d->m_iconSize; */ int ret = 18; - if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) + if ( QApplication::desktop()->width() > 320 ) ret = 30; return ret; } void KToolBar::setEnableContextMenu(bool enable ) { d->m_enableContext = enable; } bool KToolBar::contextMenuEnabled() const { return d->m_enableContext; } void KToolBar::setItemNoStyle(int id, bool no_style ) { Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return; //US KToolBarButton * button = dynamic_cast<KToolBarButton *>( *it ); KToolBarButton * button = (KToolBarButton *)( *it ); if (button) button->setNoStyle( no_style ); } void KToolBar::setFlat (bool flag) { if ( !mainWindow() ) return; if ( flag ) //US mainWindow()->moveDockWindow( this, DockMinimized ); mainWindow()->moveToolBar( this, QMainWindow::Minimized ); else //US mainWindow()->moveDockWindow( this, DockTop ); mainWindow()->moveToolBar( this, QMainWindow::Top ); // And remember to save the new look later /*US if ( mainWindow()->inherits( "KMainWindow" ) ) static_cast<KMainWindow *>(mainWindow())->setSettingsDirty(); */ } int KToolBar::count() const diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 827ec38..2253de4 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp @@ -1,78 +1,79 @@ /* This file is part of libkresources. Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org> Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <kdebug.h> #include <klocale.h> #include <ksimpleconfig.h> #include <kstandarddirs.h> #include <kstaticdeleter.h> +//#ifndef DESKTOP_VERSION #include <klibloader.h> - +//#endif #include <qfile.h> #include "resource.h" #include "factory.h" using namespace KRES; QDict<Factory> *Factory::mSelves = 0; static KStaticDeleter< QDict<Factory> > staticDeleter; Factory *Factory::self( const QString& resourceFamily ) { Factory *factory = 0; if ( !mSelves ) { mSelves = staticDeleter.setObject( new QDict<Factory> ); } factory = mSelves->find( resourceFamily ); if ( !factory ) { factory = new Factory( resourceFamily ); mSelves->insert( resourceFamily, factory ); } return factory; } Factory::Factory( const QString& resourceFamily ) : mResourceFamily( resourceFamily ) { //US so far we have three types available for resourceFamily "contact" // and that are "file", "dir", "ldap" /*US KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" ) .arg( resourceFamily ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { QVariant type = (*it)->property( "X-KDE-ResourceType" ); if ( !type.toString().isEmpty() ) mTypeMap.insert( type.toString(), *it ); } */ //US new diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 1e9b022..05833a9 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -53,118 +53,116 @@ KDGanttMinimizeSplitter.h \ krestrictedline.h \ krun.h \ ksimpleconfig.h \ kstaticdeleter.h \ ksystemtray.h \ ktempfile.h \ ktextedit.h \ kunload.h \ kurl.h \ kdeui/kguiitem.h \ kdeui/kcmodule.h \ kdeui/kbuttonbox.h \ kdeui/klistbox.h \ kdeui/klistview.h \ kdeui/kjanuswidget.h \ kdeui/kseparator.h \ kdeui/knuminput.h \ kdeui/knumvalidator.h \ kdeui/ksqueezedtextlabel.h \ kio/job.h \ kio/kfile/kurlrequester.h \ kresources/resource.h \ kresources/factory.h \ kresources/managerimpl.h \ kresources/manager.h \ kresources/selectdialog.h \ kresources/configpage.h \ kresources/configwidget.h \ kresources/configdialog.h \ kresources/kcmkresources.h \ kdecore/kmdcodec.h \ kdecore/kconfigbase.h \ kdecore/klocale.h \ kdecore/kcatalogue.h \ kdecore/ksharedptr.h \ kdecore/kshell.h \ kdecore/kstandarddirs.h \ kdecore/kstringhandler.h \ kdecore/kshortcut.h \ kutils/kcmultidialog.h \ kdeui/kxmlguiclient.h \ kdeui/kstdaction.h \ kdeui/kmainwindow.h \ kdeui/ktoolbar.h \ kdeui/ktoolbarbutton.h \ kdeui/ktoolbarhandler.h \ kdeui/kaction.h \ kdeui/kactionclasses.h \ - kdeui/kactioncollection.h + kdeui/kactioncollection.h \ + kdecore/klibloader.h # kdecore/klibloader.h \ SOURCES = \ KDGanttMinimizeSplitter.cpp \ kapplication.cpp \ kcalendarsystem.cpp \ kcalendarsystemgregorian.cpp \ kcolorbutton.cpp \ kcolordialog.cpp \ kconfig.cpp \ kdatetbl.cpp \ kdialog.cpp \ kdialogbase.cpp \ keditlistbox.cpp \ kemailsettings.cpp \ kfontdialog.cpp \ kfiledialog.cpp \ kglobal.cpp \ kglobalsettings.cpp \ kiconloader.cpp \ kmessagebox.cpp \ ktextedit.cpp \ kprocess.cpp \ krun.cpp \ ksystemtray.cpp \ ktempfile.cpp \ kurl.cpp \ kdecore/kcatalogue.cpp \ kdecore/klocale.cpp \ kdecore/kmdcodec.cpp \ kdecore/kshell.cpp \ kdecore/kstandarddirs.cpp \ kdecore/kstringhandler.cpp \ kdeui/kbuttonbox.cpp \ kdeui/kcmodule.cpp \ kdeui/kguiitem.cpp \ kdeui/kjanuswidget.cpp \ kdeui/klistbox.cpp \ kdeui/klistview.cpp \ kdeui/knuminput.cpp \ kdeui/knumvalidator.cpp \ kdeui/kseparator.cpp \ kdeui/ksqueezedtextlabel.cpp \ kio/kfile/kurlrequester.cpp \ kresources/configpage.cpp \ kresources/configdialog.cpp \ kresources/configwidget.cpp \ kresources/factory.cpp \ kresources/kcmkresources.cpp \ kresources/managerimpl.cpp \ kresources/resource.cpp \ kresources/selectdialog.cpp \ kutils/kcmultidialog.cpp \ kdeui/kaction.cpp \ kdeui/kactionclasses.cpp \ kdeui/kactioncollection.cpp \ kdeui/kmainwindow.cpp \ kdeui/ktoolbar.cpp \ kdeui/ktoolbarbutton.cpp \ kdeui/ktoolbarhandler.cpp \ kdeui/kstdaction.cpp \ - kdeui/kxmlguiclient.cpp - - - -# kdecore/klibloader.cpp \
\ No newline at end of file + kdeui/kxmlguiclient.cpp \ + kdecore/klibloader.cpp
\ No newline at end of file |