author | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-11-03 16:52:18 (UTC) |
commit | d34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff) | |
tree | b57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe | |
parent | ce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff) | |
download | opie-d34dc773591a2d467c68875a68a671d6a809f861.zip opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2 |
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms
should work.
Please see $OPIEDIR/development/macosx for details
85 files changed, 2262 insertions, 144 deletions
@@ -1,118 +1,121 @@ | |||
1 | ifndef QTDIR | 1 | ifndef QTDIR |
2 | $(error QTDIR not set) | 2 | $(error QTDIR not set) |
3 | endif | 3 | endif |
4 | 4 | ||
5 | prefix=/opt/QtPalmtop | 5 | prefix=/opt/QtPalmtop |
6 | 6 | ||
7 | ifeq ($(OPIEDIR),) | 7 | ifeq ($(OPIEDIR),) |
8 | export OPIEDIR:=$(TOPDIR) | 8 | export OPIEDIR:=$(TOPDIR) |
9 | endif | 9 | endif |
10 | ifeq ($(IPK_DIR),) | 10 | ifeq ($(IPK_DIR),) |
11 | export IPK_DIR:=$(OPIEDIR) | 11 | export IPK_DIR:=$(OPIEDIR) |
12 | endif | 12 | endif |
13 | 13 | ||
14 | ifneq ($(wildcard $(TOPDIR)/.config),) | 14 | ifneq ($(wildcard $(TOPDIR)/.config),) |
15 | include $(TOPDIR)/.config | 15 | include $(TOPDIR)/.config |
16 | endif | 16 | endif |
17 | 17 | ||
18 | ifdef CONFIG_TARGET_X86 | 18 | ifdef CONFIG_TARGET_X86 |
19 | PLATFORM=x86-linux | 19 | PLATFORM=x86-linux |
20 | endif | 20 | endif |
21 | ifdef CONFIG_TARGET_SHARP | 21 | ifdef CONFIG_TARGET_SHARP |
22 | PLATFORM=sharp-linux | 22 | PLATFORM=sharp-linux |
23 | endif | 23 | endif |
24 | ifdef CONFIG_TARGET_IPAQ | 24 | ifdef CONFIG_TARGET_IPAQ |
25 | PLATFORM=ipaq-linux | 25 | PLATFORM=ipaq-linux |
26 | endif | 26 | endif |
27 | ifdef CONFIG_TARGET_RAMSES | 27 | ifdef CONFIG_TARGET_RAMSES |
28 | PLATFORM=ramses-linux | 28 | PLATFORM=ramses-linux |
29 | endif | 29 | endif |
30 | ifdef CONFIG_TARGET_SIMPAD | 30 | ifdef CONFIG_TARGET_SIMPAD |
31 | PLATFORM=simpad-linux | 31 | PLATFORM=simpad-linux |
32 | endif | 32 | endif |
33 | 33 | ||
34 | ifdef CONFIG_TARGET_YOPY | 34 | ifdef CONFIG_TARGET_YOPY |
35 | PLATFORM=yopy-linux | 35 | PLATFORM=yopy-linux |
36 | endif | 36 | endif |
37 | ifdef CONFIG_TARGET_MACOSX | ||
38 | PLATFORM=macx-darwin | ||
39 | endif | ||
37 | 40 | ||
38 | export QMAKE:=$(OPIEDIR)/qmake/qmake | 41 | export QMAKE:=$(OPIEDIR)/qmake/qmake |
39 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs | 42 | export QMAKESPECSDIR=$(OPIEDIR)/mkspecs |
40 | 43 | ||
41 | ifeq ($(QPE_VERSION),) | 44 | ifeq ($(QPE_VERSION),) |
42 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) | 45 | VERSION_MAJ:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
43 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) | 46 | VERSION_MIN:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$(OPIEDIR)/library/version.h)) |
44 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) | 47 | VERSION_PAT:=$(shell echo $$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$(OPIEDIR)/library/version.h)) |
45 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) | 48 | QPE_VERSION:=$(VERSION_MAJ).$(VERSION_MIN).$(VERSION_PAT) |
46 | 49 | ||
47 | ifeq ($(QPE_VERSION),..) | 50 | ifeq ($(QPE_VERSION),..) |
48 | QPE_VERSION=0.9.3 | 51 | QPE_VERSION=0.9.3 |
49 | endif | 52 | endif |
50 | endif | 53 | endif |
51 | export QPE_VERSION | 54 | export QPE_VERSION |
52 | 55 | ||
53 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) | 56 | SUB_VERSION=$(shell echo $$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$(OPIEDIR)/library/version.h)) |
54 | ifeq ($(VERSION_CVS),) | 57 | ifeq ($(VERSION_CVS),) |
55 | VERSION_CVS:=$(shell date +%Y%m%d) | 58 | VERSION_CVS:=$(shell date +%Y%m%d) |
56 | endif | 59 | endif |
57 | ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) | 60 | ifneq ($(filter %snapshot",$(shell cat $(OPIEDIR)/library/version.h|grep QPE_VERSION)),) |
58 | SUB_VERSION:=$(VERSION_CVS) | 61 | SUB_VERSION:=$(VERSION_CVS) |
59 | endif | 62 | endif |
60 | export SUB_VERSION | 63 | export SUB_VERSION |
61 | 64 | ||
62 | ifneq ($(strip $(SUB_VERSION)),) | 65 | ifneq ($(strip $(SUB_VERSION)),) |
63 | EXTRAVERSION=-$(SUB_VERSION) | 66 | EXTRAVERSION=-$(SUB_VERSION) |
64 | endif | 67 | endif |
65 | 68 | ||
66 | ifeq ($(QTE_REVISION),) | 69 | ifeq ($(QTE_REVISION),) |
67 | QTE_REVISION=5 | 70 | QTE_REVISION=5 |
68 | endif | 71 | endif |
69 | export QTE_REVISION | 72 | export QTE_REVISION |
70 | 73 | ||
71 | export DEB_VERSION=2.0 | 74 | export DEB_VERSION=2.0 |
72 | 75 | ||
73 | ifeq ($(QTE_BASEVERSION),) | 76 | ifeq ($(QTE_BASEVERSION),) |
74 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) | 77 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
75 | QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') | 78 | QTE_BASEVERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION'|grep -v STR|sed -e 's/\#define QT_VERSION\t*//; s/.*\([0-9]\)\([0-9]\)\([0-9]\).*/\1.\2.\3/;') |
76 | else | 79 | else |
77 | QTE_BASEVERSION=2.3.5 | 80 | QTE_BASEVERSION=2.3.5 |
78 | endif | 81 | endif |
79 | endif | 82 | endif |
80 | export QTE_BASEVERSION | 83 | export QTE_BASEVERSION |
81 | 84 | ||
82 | ifeq ($(QTE_VERSION),) | 85 | ifeq ($(QTE_VERSION),) |
83 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) | 86 | ifneq ($(shell ls $(QTDIR)/include/qglobal.h 2>/dev/null),) |
84 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') | 87 | QTE_VERSION:=$(shell cat $(QTDIR)/include/qglobal.h|grep '^\#define QT_VERSION_STR'|sed -e 's/\#define QT_VERSION_STR\t*//;' -e 's/.*"\([^"]*\)".*/\1/;') |
85 | else | 88 | else |
86 | QTE_VERSION=2.3.5 | 89 | QTE_VERSION=2.3.5 |
87 | endif | 90 | endif |
88 | endif | 91 | endif |
89 | export QTE_VERSION | 92 | export QTE_VERSION |
90 | 93 | ||
91 | export PATH:=$(OPIEDIR)/scripts:$(PATH) | 94 | export PATH:=$(OPIEDIR)/scripts:$(PATH) |
92 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) | 95 | export QMAKESPEC=$(QMAKESPECSDIR)/$(patsubst "%",%,$(CONFIG_SPECFILE)) |
93 | 96 | ||
94 | ifdef CONFIG_OPTIMIZATIONS | 97 | ifdef CONFIG_OPTIMIZATIONS |
95 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) | 98 | export CFLAGS_RELEASE=$(patsubst "%,%,$(CONFIG_OPTIMIZATIONS)) |
96 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) | 99 | export CFLAGS_RELEASE:=$(patsubst %",%,$(CFLAGS_RELEASE)) |
97 | endif | 100 | endif |
98 | 101 | ||
99 | ifeq ($(STRIP),) | 102 | ifeq ($(STRIP),) |
100 | ifneq ($(CONFIG_TARGET_X86),) | 103 | ifneq ($(CONFIG_TARGET_X86),) |
101 | STRIP=strip | 104 | STRIP=strip |
102 | endif | 105 | endif |
103 | ifneq ($(CONFIG_TARGET_IPAQ),) | 106 | ifneq ($(CONFIG_TARGET_IPAQ),) |
104 | STRIP=arm-linux-strip | 107 | STRIP=arm-linux-strip |
105 | endif | 108 | endif |
106 | ifneq ($(CONFIG_TARGET_SHARP),) | 109 | ifneq ($(CONFIG_TARGET_SHARP),) |
107 | STRIP=arm-linux-strip | 110 | STRIP=arm-linux-strip |
108 | endif | 111 | endif |
109 | ifneq ($(CONFIG_TARGET_RAMSES),) | 112 | ifneq ($(CONFIG_TARGET_RAMSES),) |
110 | STRIP=arm-linux-strip | 113 | STRIP=arm-linux-strip |
111 | endif | 114 | endif |
112 | ifneq ($(CONFIG_TARGET_SIMPAD),) | 115 | ifneq ($(CONFIG_TARGET_SIMPAD),) |
113 | STRIP=arm-linux-strip | 116 | STRIP=arm-linux-strip |
114 | endif | 117 | endif |
115 | ifneq ($(CONFIG_TARGET_YOPY),) | 118 | ifneq ($(CONFIG_TARGET_YOPY),) |
116 | STRIP=arm-linux-strip | 119 | STRIP=arm-linux-strip |
117 | endif | 120 | endif |
118 | endif | 121 | endif |
@@ -1,190 +1,194 @@ | |||
1 | mainmenu "Opie Configuration" | 1 | mainmenu "Opie Configuration" |
2 | 2 | ||
3 | menu "Build Parameters" | 3 | menu "Build Parameters" |
4 | 4 | ||
5 | choice | 5 | choice |
6 | prompt "Target Machine" | 6 | prompt "Target Machine" |
7 | default TARGET_X86 | 7 | default TARGET_X86 |
8 | help | 8 | help |
9 | Please select the architecture of the machine you will be | 9 | Please select the architecture of the machine you will be |
10 | building the OpenZaurus buildroot for. | 10 | building the OpenZaurus buildroot for. |
11 | 11 | ||
12 | config TARGET_X86 | 12 | config TARGET_X86 |
13 | boolean "Intel X86" | 13 | boolean "Intel X86" |
14 | 14 | ||
15 | config TARGET_MACOSX | ||
16 | boolean "Mac OS X (DARWIN)" | ||
17 | |||
15 | config TARGET_SHARP | 18 | config TARGET_SHARP |
16 | boolean "Sharp Zaurus" | 19 | boolean "Sharp Zaurus" |
17 | 20 | ||
18 | config TARGET_IPAQ | 21 | config TARGET_IPAQ |
19 | boolean "iPAQ" | 22 | boolean "iPAQ" |
20 | 23 | ||
21 | config TARGET_RAMSES | 24 | config TARGET_RAMSES |
22 | boolean "Ramses" | 25 | boolean "Ramses" |
23 | 26 | ||
24 | config TARGET_SIMPAD | 27 | config TARGET_SIMPAD |
25 | boolean "SIMpad" | 28 | boolean "SIMpad" |
26 | 29 | ||
27 | config TARGET_YOPY | 30 | config TARGET_YOPY |
28 | boolean "Yopy 3500/3700" | 31 | boolean "Yopy 3500/3700" |
29 | 32 | ||
30 | endchoice | 33 | endchoice |
31 | 34 | ||
32 | config OPTIMIZE | 35 | config OPTIMIZE |
33 | boolean "Use optimizations" | 36 | boolean "Use optimizations" |
34 | default "y" if ! TARGET_X86 | 37 | default "y" if ! TARGET_X86 |
35 | 38 | ||
36 | config DEBUG | 39 | config DEBUG |
37 | boolean "Enable debug builds" | 40 | boolean "Enable debug builds" |
38 | default n | 41 | default n |
39 | config RELEASE | 42 | config RELEASE |
40 | bool | 43 | bool |
41 | default y | 44 | default y |
42 | depends !DEBUG | 45 | depends !DEBUG |
43 | 46 | ||
44 | config QUICK_LAUNCH | 47 | config QUICK_LAUNCH |
45 | boolean "Enable Quick Launch" | 48 | boolean "Enable Quick Launch" |
46 | default n | 49 | default n |
47 | 50 | ||
48 | config OPIE_NO_OVERRIDE_QT | 51 | config OPIE_NO_OVERRIDE_QT |
49 | boolean "Build Opie against an unpatched version of Qt" | 52 | boolean "Build Opie against an unpatched version of Qt" |
50 | default n | 53 | default n |
51 | 54 | ||
52 | config SPECFILE | 55 | config SPECFILE |
53 | string | 56 | string |
54 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) | 57 | default "qws/linux-generic-g++" if TARGET_X86 && (! X11) |
55 | default "linux-g++" if TARGET_X86 && X11 | 58 | default "linux-g++" if TARGET_X86 && X11 |
56 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) | 59 | default "qws/linux-sharp-g++" if TARGET_SHARP && (! X11) |
57 | default "linux-g++" if TARGET_SHARP && X11 | 60 | default "linux-g++" if TARGET_SHARP && X11 |
58 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) | 61 | default "qws/linux-ipaq-g++" if TARGET_IPAQ && (! X11) |
59 | default "linux-g++" if TARGET_IPAQ && X11 | 62 | default "linux-g++" if TARGET_IPAQ && X11 |
60 | default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) | 63 | default "qws/linux-ramses-g++" if TARGET_RAMSES && (! X11) |
61 | default "linux-g++" if TARGET_RAMSES && X11 | 64 | default "linux-g++" if TARGET_RAMSES && X11 |
62 | default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) | 65 | default "qws/linux-simpad-g++" if TARGET_SIMPAD && (! X11) |
63 | default "linux-g++" if TARGET_SIMPAD && X11 | 66 | default "linux-g++" if TARGET_SIMPAD && X11 |
64 | default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) | 67 | default "qws/linux-yopy-g++" if TARGET_YOPY && (! X11) |
68 | default "qws/macx-generic-g++" if TARGET_MACOSX && (! X11) | ||
65 | 69 | ||
66 | config CUSTOMFILE | 70 | config CUSTOMFILE |
67 | string | 71 | string |
68 | default "custom-ipaq.h" if TARGET_IPAQ | 72 | default "custom-ipaq.h" if TARGET_IPAQ |
69 | default "custom-sharp.h" if TARGET_SHARP | 73 | default "custom-sharp.h" if TARGET_SHARP |
70 | default "custom-ramses.h" if TARGET_RAMSES | 74 | default "custom-ramses.h" if TARGET_RAMSES |
71 | default "custom-ipaq.h" if TARGET_SIMPAD | 75 | default "custom-ipaq.h" if TARGET_SIMPAD |
72 | default "custom-yopy.h" if TARGET_YOPY | 76 | default "custom-yopy.h" if TARGET_YOPY |
73 | 77 | ||
74 | config OPTIMIZATIONS | 78 | config OPTIMIZATIONS |
75 | string "Optimization flags" | 79 | string "Optimization flags" |
76 | depends OPTIMIZE | 80 | depends OPTIMIZE |
77 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ | 81 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ |
78 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY | 82 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY |
79 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP | 83 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP |
80 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES | 84 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES |
81 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD | 85 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD |
82 | 86 | ||
83 | config EXPERIMENTAL | 87 | config EXPERIMENTAL |
84 | bool "Prompt for development and/or incomplete items" | 88 | bool "Prompt for development and/or incomplete items" |
85 | default y | 89 | default y |
86 | 90 | ||
87 | endmenu | 91 | endmenu |
88 | 92 | ||
89 | menu "Base" | 93 | menu "Base" |
90 | choice | 94 | choice |
91 | prompt "Qpe Library Selection" | 95 | prompt "Qpe Library Selection" |
92 | default LIBQPE | 96 | default LIBQPE |
93 | source library/config.in | 97 | source library/config.in |
94 | source x11/config.in | 98 | source x11/config.in |
95 | endchoice | 99 | endchoice |
96 | source libopie/config.in | 100 | source libopie/config.in |
97 | source core/opie-login/config.in | 101 | source core/opie-login/config.in |
98 | source core/opiealarm/config.in | 102 | source core/opiealarm/config.in |
99 | source core/launcher/config.in | 103 | source core/launcher/config.in |
100 | source core/qws/config.in | 104 | source core/qws/config.in |
101 | endmenu | 105 | endmenu |
102 | 106 | ||
103 | comment "" | 107 | comment "" |
104 | 108 | ||
105 | menu "Applets" | 109 | menu "Applets" |
106 | source core/applets/config.in | 110 | source core/applets/config.in |
107 | source noncore/applets/config.in | 111 | source noncore/applets/config.in |
108 | endmenu | 112 | endmenu |
109 | 113 | ||
110 | menu "Apps" | 114 | menu "Apps" |
111 | source core/apps/config.in | 115 | source core/apps/config.in |
112 | source noncore/apps/config.in | 116 | source noncore/apps/config.in |
113 | endmenu | 117 | endmenu |
114 | 118 | ||
115 | menu "Communications and Networking" | 119 | menu "Communications and Networking" |
116 | source noncore/comm/config.in | 120 | source noncore/comm/config.in |
117 | source noncore/mail/config.in | 121 | source noncore/mail/config.in |
118 | source noncore/net/config.in | 122 | source noncore/net/config.in |
119 | endmenu | 123 | endmenu |
120 | 124 | ||
121 | menu "Games" | 125 | menu "Games" |
122 | source noncore/games/config.in | 126 | source noncore/games/config.in |
123 | endmenu | 127 | endmenu |
124 | 128 | ||
125 | menu "Graphics and Multimedia" | 129 | menu "Graphics and Multimedia" |
126 | source freetype/config.in | 130 | source freetype/config.in |
127 | source noncore/graphics/config.in | 131 | source noncore/graphics/config.in |
128 | source core/multimedia/config.in | 132 | source core/multimedia/config.in |
129 | source noncore/multimedia/config.in | 133 | source noncore/multimedia/config.in |
130 | endmenu | 134 | endmenu |
131 | 135 | ||
132 | menu "Input methods" | 136 | menu "Input methods" |
133 | source inputmethods/config.in | 137 | source inputmethods/config.in |
134 | endmenu | 138 | endmenu |
135 | 139 | ||
136 | menu "Pim" | 140 | menu "Pim" |
137 | source core/pim/config.in | 141 | source core/pim/config.in |
138 | menu "Today Plugins" | 142 | menu "Today Plugins" |
139 | source noncore/todayplugins/config.in | 143 | source noncore/todayplugins/config.in |
140 | source core/pim/today/plugins/config.in | 144 | source core/pim/today/plugins/config.in |
141 | endmenu | 145 | endmenu |
142 | endmenu | 146 | endmenu |
143 | 147 | ||
144 | menu "Settings" | 148 | menu "Settings" |
145 | source core/settings/config.in | 149 | source core/settings/config.in |
146 | source noncore/settings/config.in | 150 | source noncore/settings/config.in |
147 | endmenu | 151 | endmenu |
148 | 152 | ||
149 | menu "Theming" | 153 | menu "Theming" |
150 | source noncore/decorations/config.in | 154 | source noncore/decorations/config.in |
151 | source noncore/styles/config.in | 155 | source noncore/styles/config.in |
152 | endmenu | 156 | endmenu |
153 | 157 | ||
154 | menu "Tools" | 158 | menu "Tools" |
155 | source noncore/tools/config.in | 159 | source noncore/tools/config.in |
156 | endmenu | 160 | endmenu |
157 | 161 | ||
158 | menu "Development" | 162 | menu "Development" |
159 | source development/keyview/config.in | 163 | source development/keyview/config.in |
160 | #source development/debugviewer/config.in | 164 | #source development/debugviewer/config.in |
161 | endmenu | 165 | endmenu |
162 | 166 | ||
163 | menu "Examples" | 167 | menu "Examples" |
164 | config EXAMPLES | 168 | config EXAMPLES |
165 | boolean "Compile Example Application" | 169 | boolean "Compile Example Application" |
166 | source examples/config.in | 170 | source examples/config.in |
167 | endmenu | 171 | endmenu |
168 | 172 | ||
169 | comment "" | 173 | comment "" |
170 | depends on EXPERIMENTAL | 174 | depends on EXPERIMENTAL |
171 | menu "Experimental" | 175 | menu "Experimental" |
172 | depends on EXPERIMENTAL | 176 | depends on EXPERIMENTAL |
173 | source libopie2/config.in | 177 | source libopie2/config.in |
174 | 178 | ||
175 | config SQL_PIM_BACKEND | 179 | config SQL_PIM_BACKEND |
176 | bool "Add SQL-Backend support (experimental)" | 180 | bool "Add SQL-Backend support (experimental)" |
177 | default n | 181 | default n |
178 | help | 182 | help |
179 | This adds the SQL-Support, using SQLite. Which database is used | 183 | This adds the SQL-Support, using SQLite. Which database is used |
180 | by the backends is defined by the file "pimaccess.conf" in the | 184 | by the backends is defined by the file "pimaccess.conf" in the |
181 | directory "Settings". | 185 | directory "Settings". |
182 | There currently do exist to groups "[contact]" and "[todo]". You can | 186 | There currently do exist to groups "[contact]" and "[todo]". You can |
183 | select the used backend by the variable "usebackend=<type>", where | 187 | select the used backend by the variable "usebackend=<type>", where |
184 | <type> is "sql" or "xml". "xml" is the default ! | 188 | <type> is "sql" or "xml". "xml" is the default ! |
185 | Important: The SQLite-library "libsqlite.so" must be installed ! | 189 | Important: The SQLite-library "libsqlite.so" must be installed ! |
186 | depends ( LIBOPIE2DB ) | 190 | depends ( LIBOPIE2DB ) |
187 | 191 | ||
188 | comment "SQL-Support needs libopie2db!" | 192 | comment "SQL-Support needs libopie2db!" |
189 | depends !( LIBOPIE2DB ) | 193 | depends !( LIBOPIE2DB ) |
190 | endmenu | 194 | endmenu |
diff --git a/core/applets/batteryapplet/batteryapplet.pro b/core/applets/batteryapplet/batteryapplet.pro index c68ceb7..1bc208b 100644 --- a/core/applets/batteryapplet/batteryapplet.pro +++ b/core/applets/batteryapplet/batteryapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= battery.h batterystatus.h batteryappletimpl.h | 3 | HEADERS= battery.h batterystatus.h batteryappletimpl.h |
4 | SOURCES= battery.cpp batterystatus.cpp batteryappletimpl.cpp | 4 | SOURCES= battery.cpp batterystatus.cpp batteryappletimpl.cpp |
5 | TARGET = batteryapplet | 5 | TARGET = batteryapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include .. | 8 | DEPENDPATH += ../$(OPIEDIR)/include .. |
9 | LIBS += -lqpe -lopie | 9 | LIBS += -lqpe -lopie |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libbatteryapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libbatteryapplet.ts \ |
13 | ../../../i18n/nl/libbatteryapplet.ts \ | 13 | ../../../i18n/nl/libbatteryapplet.ts \ |
14 | ../../../i18n/da/libbatteryapplet.ts \ | 14 | ../../../i18n/da/libbatteryapplet.ts \ |
15 | ../../../i18n/xx/libbatteryapplet.ts \ | 15 | ../../../i18n/xx/libbatteryapplet.ts \ |
16 | ../../../i18n/en/libbatteryapplet.ts \ | 16 | ../../../i18n/en/libbatteryapplet.ts \ |
17 | ../../../i18n/es/libbatteryapplet.ts \ | 17 | ../../../i18n/es/libbatteryapplet.ts \ |
18 | ../../../i18n/fr/libbatteryapplet.ts \ | 18 | ../../../i18n/fr/libbatteryapplet.ts \ |
19 | ../../../i18n/hu/libbatteryapplet.ts \ | 19 | ../../../i18n/hu/libbatteryapplet.ts \ |
20 | ../../../i18n/ja/libbatteryapplet.ts \ | 20 | ../../../i18n/ja/libbatteryapplet.ts \ |
21 | ../../../i18n/ko/libbatteryapplet.ts \ | 21 | ../../../i18n/ko/libbatteryapplet.ts \ |
22 | ../../../i18n/no/libbatteryapplet.ts \ | 22 | ../../../i18n/no/libbatteryapplet.ts \ |
23 | ../../../i18n/pl/libbatteryapplet.ts \ | 23 | ../../../i18n/pl/libbatteryapplet.ts \ |
24 | ../../../i18n/pt/libbatteryapplet.ts \ | 24 | ../../../i18n/pt/libbatteryapplet.ts \ |
25 | ../../../i18n/pt_BR/libbatteryapplet.ts \ | 25 | ../../../i18n/pt_BR/libbatteryapplet.ts \ |
26 | ../../../i18n/sl/libbatteryapplet.ts \ | 26 | ../../../i18n/sl/libbatteryapplet.ts \ |
27 | ../../../i18n/zh_CN/libbatteryapplet.ts \ | 27 | ../../../i18n/zh_CN/libbatteryapplet.ts \ |
28 | ../../../i18n/zh_TW/libbatteryapplet.ts | 28 | ../../../i18n/zh_TW/libbatteryapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/cardmon/cardmon.pro b/core/applets/cardmon/cardmon.pro index 3907aa4..75facde 100644 --- a/core/applets/cardmon/cardmon.pro +++ b/core/applets/cardmon/cardmon.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS =cardmon.h cardmonimpl.h | 3 | HEADERS =cardmon.h cardmonimpl.h |
4 | SOURCES =cardmon.cpp cardmonimpl.cpp | 4 | SOURCES =cardmon.cpp cardmonimpl.cpp |
5 | TARGET = cardmonapplet | 5 | TARGET = cardmonapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include ../launcher | 8 | DEPENDPATH += $(OPIEDIR)/include ../launcher |
9 | LIBS += -lqpe -lopie | 9 | LIBS += -lqpe -lopie |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libcardmonapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libcardmonapplet.ts \ |
13 | ../../../i18n/nl/libcardmonapplet.ts \ | 13 | ../../../i18n/nl/libcardmonapplet.ts \ |
14 | ../../../i18n/da/libcardmonapplet.ts \ | 14 | ../../../i18n/da/libcardmonapplet.ts \ |
15 | ../../../i18n/xx/libcardmonapplet.ts \ | 15 | ../../../i18n/xx/libcardmonapplet.ts \ |
16 | ../../../i18n/en/libcardmonapplet.ts \ | 16 | ../../../i18n/en/libcardmonapplet.ts \ |
17 | ../../../i18n/es/libcardmonapplet.ts \ | 17 | ../../../i18n/es/libcardmonapplet.ts \ |
18 | ../../../i18n/fr/libcardmonapplet.ts \ | 18 | ../../../i18n/fr/libcardmonapplet.ts \ |
19 | ../../../i18n/hu/libcardmonapplet.ts \ | 19 | ../../../i18n/hu/libcardmonapplet.ts \ |
20 | ../../../i18n/ja/libcardmonapplet.ts \ | 20 | ../../../i18n/ja/libcardmonapplet.ts \ |
21 | ../../../i18n/ko/libcardmonapplet.ts \ | 21 | ../../../i18n/ko/libcardmonapplet.ts \ |
22 | ../../../i18n/no/libcardmonapplet.ts \ | 22 | ../../../i18n/no/libcardmonapplet.ts \ |
23 | ../../../i18n/pl/libcardmonapplet.ts \ | 23 | ../../../i18n/pl/libcardmonapplet.ts \ |
24 | ../../../i18n/pt/libcardmonapplet.ts \ | 24 | ../../../i18n/pt/libcardmonapplet.ts \ |
25 | ../../../i18n/pt_BR/libcardmonapplet.ts \ | 25 | ../../../i18n/pt_BR/libcardmonapplet.ts \ |
26 | ../../../i18n/sl/libcardmonapplet.ts \ | 26 | ../../../i18n/sl/libcardmonapplet.ts \ |
27 | ../../../i18n/zh_CN/libcardmonapplet.ts \ | 27 | ../../../i18n/zh_CN/libcardmonapplet.ts \ |
28 | ../../../i18n/zh_TW/libcardmonapplet.ts | 28 | ../../../i18n/zh_TW/libcardmonapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/clipboardapplet/clipboardapplet.pro b/core/applets/clipboardapplet/clipboardapplet.pro index 1e9cc4f..358d658 100644 --- a/core/applets/clipboardapplet/clipboardapplet.pro +++ b/core/applets/clipboardapplet/clipboardapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= clipboard.h clipboardappletimpl.h | 3 | HEADERS= clipboard.h clipboardappletimpl.h |
4 | SOURCES= clipboard.cpp clipboardappletimpl.cpp | 4 | SOURCES= clipboard.cpp clipboardappletimpl.cpp |
5 | TARGET = clipboardapplet | 5 | TARGET = clipboardapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libclipboardapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libclipboardapplet.ts \ |
13 | ../../../i18n/nl/libclipboardapplet.ts \ | 13 | ../../../i18n/nl/libclipboardapplet.ts \ |
14 | ../../../i18n/da/libclipboardapplet.ts \ | 14 | ../../../i18n/da/libclipboardapplet.ts \ |
15 | ../../../i18n/xx/libclipboardapplet.ts \ | 15 | ../../../i18n/xx/libclipboardapplet.ts \ |
16 | ../../../i18n/en/libclipboardapplet.ts \ | 16 | ../../../i18n/en/libclipboardapplet.ts \ |
17 | ../../../i18n/es/libclipboardapplet.ts \ | 17 | ../../../i18n/es/libclipboardapplet.ts \ |
18 | ../../../i18n/fr/libclipboardapplet.ts \ | 18 | ../../../i18n/fr/libclipboardapplet.ts \ |
19 | ../../../i18n/hu/libclipboardapplet.ts \ | 19 | ../../../i18n/hu/libclipboardapplet.ts \ |
20 | ../../../i18n/ja/libclipboardapplet.ts \ | 20 | ../../../i18n/ja/libclipboardapplet.ts \ |
21 | ../../../i18n/ko/libclipboardapplet.ts \ | 21 | ../../../i18n/ko/libclipboardapplet.ts \ |
22 | ../../../i18n/no/libclipboardapplet.ts \ | 22 | ../../../i18n/no/libclipboardapplet.ts \ |
23 | ../../../i18n/pl/libclipboardapplet.ts \ | 23 | ../../../i18n/pl/libclipboardapplet.ts \ |
24 | ../../../i18n/pt/libclipboardapplet.ts \ | 24 | ../../../i18n/pt/libclipboardapplet.ts \ |
25 | ../../../i18n/pt_BR/libclipboardapplet.ts \ | 25 | ../../../i18n/pt_BR/libclipboardapplet.ts \ |
26 | ../../../i18n/sl/libclipboardapplet.ts \ | 26 | ../../../i18n/sl/libclipboardapplet.ts \ |
27 | ../../../i18n/zh_CN/libclipboardapplet.ts \ | 27 | ../../../i18n/zh_CN/libclipboardapplet.ts \ |
28 | ../../../i18n/zh_TW/libclipboardapplet.ts | 28 | ../../../i18n/zh_TW/libclipboardapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/clockapplet/clockapplet.pro b/core/applets/clockapplet/clockapplet.pro index 22c7b55..88092f5 100644 --- a/core/applets/clockapplet/clockapplet.pro +++ b/core/applets/clockapplet/clockapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= clock.h clockappletimpl.h | 3 | HEADERS= clock.h clockappletimpl.h |
4 | SOURCES= clock.cpp clockappletimpl.cpp | 4 | SOURCES= clock.cpp clockappletimpl.cpp |
5 | TARGET = clockapplet | 5 | TARGET = clockapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include .. | 8 | DEPENDPATH += ../$(OPIEDIR)/include .. |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libclockapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libclockapplet.ts \ |
13 | ../../../i18n/nl/libclockapplet.ts \ | 13 | ../../../i18n/nl/libclockapplet.ts \ |
14 | ../../../i18n/da/libclockapplet.ts \ | 14 | ../../../i18n/da/libclockapplet.ts \ |
15 | ../../../i18n/xx/libclockapplet.ts \ | 15 | ../../../i18n/xx/libclockapplet.ts \ |
16 | ../../../i18n/en/libclockapplet.ts \ | 16 | ../../../i18n/en/libclockapplet.ts \ |
17 | ../../../i18n/es/libclockapplet.ts \ | 17 | ../../../i18n/es/libclockapplet.ts \ |
18 | ../../../i18n/fr/libclockapplet.ts \ | 18 | ../../../i18n/fr/libclockapplet.ts \ |
19 | ../../../i18n/hu/libclockapplet.ts \ | 19 | ../../../i18n/hu/libclockapplet.ts \ |
20 | ../../../i18n/ja/libclockapplet.ts \ | 20 | ../../../i18n/ja/libclockapplet.ts \ |
21 | ../../../i18n/ko/libclockapplet.ts \ | 21 | ../../../i18n/ko/libclockapplet.ts \ |
22 | ../../../i18n/no/libclockapplet.ts \ | 22 | ../../../i18n/no/libclockapplet.ts \ |
23 | ../../../i18n/pl/libclockapplet.ts \ | 23 | ../../../i18n/pl/libclockapplet.ts \ |
24 | ../../../i18n/pt/libclockapplet.ts \ | 24 | ../../../i18n/pt/libclockapplet.ts \ |
25 | ../../../i18n/pt_BR/libclockapplet.ts \ | 25 | ../../../i18n/pt_BR/libclockapplet.ts \ |
26 | ../../../i18n/sl/libclockapplet.ts \ | 26 | ../../../i18n/sl/libclockapplet.ts \ |
27 | ../../../i18n/zh_CN/libclockapplet.ts \ | 27 | ../../../i18n/zh_CN/libclockapplet.ts \ |
28 | ../../../i18n/zh_TW/libclockapplet.ts | 28 | ../../../i18n/zh_TW/libclockapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/homeapplet/homeapplet.pro b/core/applets/homeapplet/homeapplet.pro index ac7956b..854050f 100644 --- a/core/applets/homeapplet/homeapplet.pro +++ b/core/applets/homeapplet/homeapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = home.h | 3 | HEADERS = home.h |
4 | SOURCES = home.cpp | 4 | SOURCES = home.cpp |
5 | TARGET = homeapplet | 5 | TARGET = homeapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libhomeapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libhomeapplet.ts \ |
13 | ../../../i18n/nl/libhomeapplet.ts \ | 13 | ../../../i18n/nl/libhomeapplet.ts \ |
14 | ../../../i18n/da/libhomeapplet.ts \ | 14 | ../../../i18n/da/libhomeapplet.ts \ |
15 | ../../../i18n/xx/libhomeapplet.ts \ | 15 | ../../../i18n/xx/libhomeapplet.ts \ |
16 | ../../../i18n/en/libhomeapplet.ts \ | 16 | ../../../i18n/en/libhomeapplet.ts \ |
17 | ../../../i18n/es/libhomeapplet.ts \ | 17 | ../../../i18n/es/libhomeapplet.ts \ |
18 | ../../../i18n/fr/libhomeapplet.ts \ | 18 | ../../../i18n/fr/libhomeapplet.ts \ |
19 | ../../../i18n/hu/libhomeapplet.ts \ | 19 | ../../../i18n/hu/libhomeapplet.ts \ |
20 | ../../../i18n/ja/libhomeapplet.ts \ | 20 | ../../../i18n/ja/libhomeapplet.ts \ |
21 | ../../../i18n/ko/libhomeapplet.ts \ | 21 | ../../../i18n/ko/libhomeapplet.ts \ |
22 | ../../../i18n/no/libhomeapplet.ts \ | 22 | ../../../i18n/no/libhomeapplet.ts \ |
23 | ../../../i18n/pl/libhomeapplet.ts \ | 23 | ../../../i18n/pl/libhomeapplet.ts \ |
24 | ../../../i18n/pt/libhomeapplet.ts \ | 24 | ../../../i18n/pt/libhomeapplet.ts \ |
25 | ../../../i18n/pt_BR/libhomeapplet.ts \ | 25 | ../../../i18n/pt_BR/libhomeapplet.ts \ |
26 | ../../../i18n/sl/libhomeapplet.ts \ | 26 | ../../../i18n/sl/libhomeapplet.ts \ |
27 | ../../../i18n/zh_CN/libhomeapplet.ts \ | 27 | ../../../i18n/zh_CN/libhomeapplet.ts \ |
28 | ../../../i18n/zh_TW/libhomeapplet.ts | 28 | ../../../i18n/zh_TW/libhomeapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/irdaapplet/irdaapplet.pro b/core/applets/irdaapplet/irdaapplet.pro index 56632ed..be16bad 100644 --- a/core/applets/irdaapplet/irdaapplet.pro +++ b/core/applets/irdaapplet/irdaapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = irda.h irdaappletimpl.h | 3 | HEADERS = irda.h irdaappletimpl.h |
4 | SOURCES = irda.cpp irdaappletimpl.cpp | 4 | SOURCES = irda.cpp irdaappletimpl.cpp |
5 | TARGET = irdaapplet | 5 | TARGET = irdaapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts \ |
13 | ../../../i18n/nl/libirdaapplet.ts \ | 13 | ../../../i18n/nl/libirdaapplet.ts \ |
14 | ../../../i18n/da/libirdaapplet.ts \ | 14 | ../../../i18n/da/libirdaapplet.ts \ |
15 | ../../../i18n/xx/libirdaapplet.ts \ | 15 | ../../../i18n/xx/libirdaapplet.ts \ |
16 | ../../../i18n/en/libirdaapplet.ts \ | 16 | ../../../i18n/en/libirdaapplet.ts \ |
17 | ../../../i18n/es/libirdaapplet.ts \ | 17 | ../../../i18n/es/libirdaapplet.ts \ |
18 | ../../../i18n/fr/libirdaapplet.ts \ | 18 | ../../../i18n/fr/libirdaapplet.ts \ |
19 | ../../../i18n/hu/libirdaapplet.ts \ | 19 | ../../../i18n/hu/libirdaapplet.ts \ |
20 | ../../../i18n/ja/libirdaapplet.ts \ | 20 | ../../../i18n/ja/libirdaapplet.ts \ |
21 | ../../../i18n/ko/libirdaapplet.ts \ | 21 | ../../../i18n/ko/libirdaapplet.ts \ |
22 | ../../../i18n/no/libirdaapplet.ts \ | 22 | ../../../i18n/no/libirdaapplet.ts \ |
23 | ../../../i18n/pl/libirdaapplet.ts \ | 23 | ../../../i18n/pl/libirdaapplet.ts \ |
24 | ../../../i18n/pt/libirdaapplet.ts \ | 24 | ../../../i18n/pt/libirdaapplet.ts \ |
25 | ../../../i18n/pt_BR/libirdaapplet.ts \ | 25 | ../../../i18n/pt_BR/libirdaapplet.ts \ |
26 | ../../../i18n/sl/libirdaapplet.ts \ | 26 | ../../../i18n/sl/libirdaapplet.ts \ |
27 | ../../../i18n/zh_CN/libirdaapplet.ts \ | 27 | ../../../i18n/zh_CN/libirdaapplet.ts \ |
28 | ../../../i18n/zh_TW/libirdaapplet.ts | 28 | ../../../i18n/zh_TW/libirdaapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/logoutapplet/logoutapplet.pro b/core/applets/logoutapplet/logoutapplet.pro index a019303..7826bb3 100644 --- a/core/applets/logoutapplet/logoutapplet.pro +++ b/core/applets/logoutapplet/logoutapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = logout.h | 3 | HEADERS = logout.h |
4 | SOURCES = logout.cpp | 4 | SOURCES = logout.cpp |
5 | TARGET = logoutapplet | 5 | TARGET = logoutapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/liblogoutapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/liblogoutapplet.ts \ |
13 | ../../../i18n/nl/liblogoutapplet.ts \ | 13 | ../../../i18n/nl/liblogoutapplet.ts \ |
14 | ../../../i18n/da/liblogoutapplet.ts \ | 14 | ../../../i18n/da/liblogoutapplet.ts \ |
15 | ../../../i18n/xx/liblogoutapplet.ts \ | 15 | ../../../i18n/xx/liblogoutapplet.ts \ |
16 | ../../../i18n/en/liblogoutapplet.ts \ | 16 | ../../../i18n/en/liblogoutapplet.ts \ |
17 | ../../../i18n/es/liblogoutapplet.ts \ | 17 | ../../../i18n/es/liblogoutapplet.ts \ |
18 | ../../../i18n/fr/liblogoutapplet.ts \ | 18 | ../../../i18n/fr/liblogoutapplet.ts \ |
19 | ../../../i18n/hu/liblogoutapplet.ts \ | 19 | ../../../i18n/hu/liblogoutapplet.ts \ |
20 | ../../../i18n/ja/liblogoutapplet.ts \ | 20 | ../../../i18n/ja/liblogoutapplet.ts \ |
21 | ../../../i18n/ko/liblogoutapplet.ts \ | 21 | ../../../i18n/ko/liblogoutapplet.ts \ |
22 | ../../../i18n/no/liblogoutapplet.ts \ | 22 | ../../../i18n/no/liblogoutapplet.ts \ |
23 | ../../../i18n/pl/liblogoutapplet.ts \ | 23 | ../../../i18n/pl/liblogoutapplet.ts \ |
24 | ../../../i18n/pt/liblogoutapplet.ts \ | 24 | ../../../i18n/pt/liblogoutapplet.ts \ |
25 | ../../../i18n/pt_BR/liblogoutapplet.ts \ | 25 | ../../../i18n/pt_BR/liblogoutapplet.ts \ |
26 | ../../../i18n/sl/liblogoutapplet.ts \ | 26 | ../../../i18n/sl/liblogoutapplet.ts \ |
27 | ../../../i18n/zh_CN/liblogoutapplet.ts \ | 27 | ../../../i18n/zh_CN/liblogoutapplet.ts \ |
28 | ../../../i18n/zh_TW/liblogoutapplet.ts | 28 | ../../../i18n/zh_TW/liblogoutapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/restartapplet/restartapplet.pro b/core/applets/restartapplet/restartapplet.pro index bd27b0a..368a0ea 100644 --- a/core/applets/restartapplet/restartapplet.pro +++ b/core/applets/restartapplet/restartapplet.pro | |||
@@ -1,17 +1,17 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = restart.h restartappletimpl.h | 3 | HEADERS = restart.h restartappletimpl.h |
4 | SOURCES = restart.cpp restartappletimpl.cpp | 4 | SOURCES = restart.cpp restartappletimpl.cpp |
5 | TARGET = restartapplet | 5 | TARGET = restartapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | MOC_DIR=opieobj | 11 | MOC_DIR=opieobj |
12 | OBJECTS_DIR=opieobj | 12 | OBJECTS_DIR=opieobj |
13 | 13 | ||
14 | 14 | ||
15 | 15 | ||
16 | include ( $(OPIEDIR)/include.pro ) | 16 | include ( $(OPIEDIR)/include.pro ) |
17 | target.path = $$prefix/plugins/applets | 17 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/restartapplet2/restartapplet.pro b/core/applets/restartapplet2/restartapplet.pro index 85a3b66..12a7922 100644 --- a/core/applets/restartapplet2/restartapplet.pro +++ b/core/applets/restartapplet2/restartapplet.pro | |||
@@ -1,17 +1,17 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = restart.h | 3 | HEADERS = restart.h |
4 | SOURCES = restart.cpp | 4 | SOURCES = restart.cpp |
5 | TARGET = restartapplet | 5 | TARGET = restartapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | MOC_DIR=opieobj | 11 | MOC_DIR=opieobj |
12 | OBJECTS_DIR=opieobj | 12 | OBJECTS_DIR=opieobj |
13 | 13 | ||
14 | 14 | ||
15 | 15 | ||
16 | include ( $(OPIEDIR)/include.pro ) | 16 | include ( $(OPIEDIR)/include.pro ) |
17 | target.path = $$prefix/plugins/applets | 17 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/rotateapplet/rotateapplet.pro b/core/applets/rotateapplet/rotateapplet.pro index 9b39dba..2c8de8d 100644 --- a/core/applets/rotateapplet/rotateapplet.pro +++ b/core/applets/rotateapplet/rotateapplet.pro | |||
@@ -1,31 +1,31 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugn warn_on release |
3 | HEADERS = rotate.h | 3 | HEADERS = rotate.h |
4 | SOURCES = rotate.cpp | 4 | SOURCES = rotate.cpp |
5 | TARGET = rotateapplet | 5 | TARGET = rotateapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/librotateapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/librotateapplet.ts \ |
13 | ../../../i18n/nl/librotateapplet.ts \ | 13 | ../../../i18n/nl/librotateapplet.ts \ |
14 | ../../../i18n/da/librotateapplet.ts \ | 14 | ../../../i18n/da/librotateapplet.ts \ |
15 | ../../../i18n/xx/librotateapplet.ts \ | 15 | ../../../i18n/xx/librotateapplet.ts \ |
16 | ../../../i18n/en/librotateapplet.ts \ | 16 | ../../../i18n/en/librotateapplet.ts \ |
17 | ../../../i18n/es/librotateapplet.ts \ | 17 | ../../../i18n/es/librotateapplet.ts \ |
18 | ../../../i18n/fr/librotateapplet.ts \ | 18 | ../../../i18n/fr/librotateapplet.ts \ |
19 | ../../../i18n/hu/librotateapplet.ts \ | 19 | ../../../i18n/hu/librotateapplet.ts \ |
20 | ../../../i18n/ja/librotateapplet.ts \ | 20 | ../../../i18n/ja/librotateapplet.ts \ |
21 | ../../../i18n/ko/librotateapplet.ts \ | 21 | ../../../i18n/ko/librotateapplet.ts \ |
22 | ../../../i18n/no/librotateapplet.ts \ | 22 | ../../../i18n/no/librotateapplet.ts \ |
23 | ../../../i18n/pl/librotateapplet.ts \ | 23 | ../../../i18n/pl/librotateapplet.ts \ |
24 | ../../../i18n/pt/librotateapplet.ts \ | 24 | ../../../i18n/pt/librotateapplet.ts \ |
25 | ../../../i18n/pt_BR/librotateapplet.ts \ | 25 | ../../../i18n/pt_BR/librotateapplet.ts \ |
26 | ../../../i18n/sl/librotateapplet.ts \ | 26 | ../../../i18n/sl/librotateapplet.ts \ |
27 | ../../../i18n/zh_CN/librotateapplet.ts \ | 27 | ../../../i18n/zh_CN/librotateapplet.ts \ |
28 | ../../../i18n/zh_TW/librotateapplet.ts | 28 | ../../../i18n/zh_TW/librotateapplet.ts |
29 | 29 | ||
30 | include ( $(OPIEDIR)/include.pro ) | 30 | include ( $(OPIEDIR)/include.pro ) |
31 | target.path = $$prefix/plugins/applets | 31 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/screenshotapplet/screenshotapplet.pro b/core/applets/screenshotapplet/screenshotapplet.pro index fe7b299..a86eff2 100644 --- a/core/applets/screenshotapplet/screenshotapplet.pro +++ b/core/applets/screenshotapplet/screenshotapplet.pro | |||
@@ -1,35 +1,35 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h | 3 | HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h |
4 | SOURCES = screenshot.cpp inputDialog.cpp screenshotappletimpl.cpp | 4 | SOURCES = screenshot.cpp inputDialog.cpp screenshotappletimpl.cpp |
5 | TARGET = screenshotapplet | 5 | TARGET = screenshotapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | MOC_DIR=opieobj | 11 | MOC_DIR=opieobj |
12 | OBJECTS_DIR=opieobj | 12 | OBJECTS_DIR=opieobj |
13 | 13 | ||
14 | TRANSLATIONS = ../../../i18n/de/libscreenshotapplet.ts \ | 14 | TRANSLATIONS = ../../../i18n/de/libscreenshotapplet.ts \ |
15 | ../../../i18n/nl/libscreenshotapplet.ts \ | 15 | ../../../i18n/nl/libscreenshotapplet.ts \ |
16 | ../../../i18n/da/libscreenshotapplet.ts \ | 16 | ../../../i18n/da/libscreenshotapplet.ts \ |
17 | ../../../i18n/xx/libscreenshotapplet.ts \ | 17 | ../../../i18n/xx/libscreenshotapplet.ts \ |
18 | ../../../i18n/en/libscreenshotapplet.ts \ | 18 | ../../../i18n/en/libscreenshotapplet.ts \ |
19 | ../../../i18n/es/libscreenshotapplet.ts \ | 19 | ../../../i18n/es/libscreenshotapplet.ts \ |
20 | ../../../i18n/fr/libscreenshotapplet.ts \ | 20 | ../../../i18n/fr/libscreenshotapplet.ts \ |
21 | ../../../i18n/hu/libscreenshotapplet.ts \ | 21 | ../../../i18n/hu/libscreenshotapplet.ts \ |
22 | ../../../i18n/ja/libscreenshotapplet.ts \ | 22 | ../../../i18n/ja/libscreenshotapplet.ts \ |
23 | ../../../i18n/ko/libscreenshotapplet.ts \ | 23 | ../../../i18n/ko/libscreenshotapplet.ts \ |
24 | ../../../i18n/no/libscreenshotapplet.ts \ | 24 | ../../../i18n/no/libscreenshotapplet.ts \ |
25 | ../../../i18n/pl/libscreenshotapplet.ts \ | 25 | ../../../i18n/pl/libscreenshotapplet.ts \ |
26 | ../../../i18n/pt/libscreenshotapplet.ts \ | 26 | ../../../i18n/pt/libscreenshotapplet.ts \ |
27 | ../../../i18n/pt_BR/libscreenshotapplet.ts \ | 27 | ../../../i18n/pt_BR/libscreenshotapplet.ts \ |
28 | ../../../i18n/sl/libscreenshotapplet.ts \ | 28 | ../../../i18n/sl/libscreenshotapplet.ts \ |
29 | ../../../i18n/zh_CN/libscreenshotapplet.ts \ | 29 | ../../../i18n/zh_CN/libscreenshotapplet.ts \ |
30 | ../../../i18n/zh_TW/libscreenshotapplet.ts | 30 | ../../../i18n/zh_TW/libscreenshotapplet.ts |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | include ( $(OPIEDIR)/include.pro ) | 34 | include ( $(OPIEDIR)/include.pro ) |
35 | target.path = $$prefix/plugins/applets | 35 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/suspendapplet/suspendapplet.pro b/core/applets/suspendapplet/suspendapplet.pro index 7635d32..f58de63 100644 --- a/core/applets/suspendapplet/suspendapplet.pro +++ b/core/applets/suspendapplet/suspendapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = suspend.h | 3 | HEADERS = suspend.h |
4 | SOURCES = suspend.cpp | 4 | SOURCES = suspend.cpp |
5 | TARGET = suspendapplet | 5 | TARGET = suspendapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libsuspendapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libsuspendapplet.ts \ |
13 | ../../../i18n/nl/libsuspendapplet.ts \ | 13 | ../../../i18n/nl/libsuspendapplet.ts \ |
14 | ../../../i18n/da/libsuspendapplet.ts \ | 14 | ../../../i18n/da/libsuspendapplet.ts \ |
15 | ../../../i18n/xx/libsuspendapplet.ts \ | 15 | ../../../i18n/xx/libsuspendapplet.ts \ |
16 | ../../../i18n/en/libsuspendapplet.ts \ | 16 | ../../../i18n/en/libsuspendapplet.ts \ |
17 | ../../../i18n/es/libsuspendapplet.ts \ | 17 | ../../../i18n/es/libsuspendapplet.ts \ |
18 | ../../../i18n/fr/libsuspendapplet.ts \ | 18 | ../../../i18n/fr/libsuspendapplet.ts \ |
19 | ../../../i18n/hu/libsuspendapplet.ts \ | 19 | ../../../i18n/hu/libsuspendapplet.ts \ |
20 | ../../../i18n/ja/libsuspendapplet.ts \ | 20 | ../../../i18n/ja/libsuspendapplet.ts \ |
21 | ../../../i18n/ko/libsuspendapplet.ts \ | 21 | ../../../i18n/ko/libsuspendapplet.ts \ |
22 | ../../../i18n/no/libsuspendapplet.ts \ | 22 | ../../../i18n/no/libsuspendapplet.ts \ |
23 | ../../../i18n/pl/libsuspendapplet.ts \ | 23 | ../../../i18n/pl/libsuspendapplet.ts \ |
24 | ../../../i18n/pt/libsuspendapplet.ts \ | 24 | ../../../i18n/pt/libsuspendapplet.ts \ |
25 | ../../../i18n/pt_BR/libsuspendapplet.ts \ | 25 | ../../../i18n/pt_BR/libsuspendapplet.ts \ |
26 | ../../../i18n/sl/libsuspendapplet.ts \ | 26 | ../../../i18n/sl/libsuspendapplet.ts \ |
27 | ../../../i18n/zh_CN/libsuspendapplet.ts \ | 27 | ../../../i18n/zh_CN/libsuspendapplet.ts \ |
28 | ../../../i18n/zh_TW/libsuspendapplet.ts | 28 | ../../../i18n/zh_TW/libsuspendapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/vmemo/vmemo.pro b/core/applets/vmemo/vmemo.pro index 8cf1f07..43cb767 100644 --- a/core/applets/vmemo/vmemo.pro +++ b/core/applets/vmemo/vmemo.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = vmemo.h vmemoimpl.h adpcm.h | 3 | HEADERS = vmemo.h vmemoimpl.h adpcm.h |
4 | SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c | 4 | SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c |
5 | TARGET = vmemoapplet | 5 | TARGET = vmemoapplet |
6 | DESTDIR =$(OPIEDIR)/plugins/applets | 6 | DESTDIR =$(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libvmemoapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libvmemoapplet.ts \ |
13 | ../../../i18n/nl/libvmemoapplet.ts \ | 13 | ../../../i18n/nl/libvmemoapplet.ts \ |
14 | ../../../i18n/da/libvmemoapplet.ts \ | 14 | ../../../i18n/da/libvmemoapplet.ts \ |
15 | ../../../i18n/xx/libvmemoapplet.ts \ | 15 | ../../../i18n/xx/libvmemoapplet.ts \ |
16 | ../../../i18n/en/libvmemoapplet.ts \ | 16 | ../../../i18n/en/libvmemoapplet.ts \ |
17 | ../../../i18n/es/libvmemoapplet.ts \ | 17 | ../../../i18n/es/libvmemoapplet.ts \ |
18 | ../../../i18n/fr/libvmemoapplet.ts \ | 18 | ../../../i18n/fr/libvmemoapplet.ts \ |
19 | ../../../i18n/hu/libvmemoapplet.ts \ | 19 | ../../../i18n/hu/libvmemoapplet.ts \ |
20 | ../../../i18n/ja/libvmemoapplet.ts \ | 20 | ../../../i18n/ja/libvmemoapplet.ts \ |
21 | ../../../i18n/ko/libvmemoapplet.ts \ | 21 | ../../../i18n/ko/libvmemoapplet.ts \ |
22 | ../../../i18n/no/libvmemoapplet.ts \ | 22 | ../../../i18n/no/libvmemoapplet.ts \ |
23 | ../../../i18n/pl/libvmemoapplet.ts \ | 23 | ../../../i18n/pl/libvmemoapplet.ts \ |
24 | ../../../i18n/pt/libvmemoapplet.ts \ | 24 | ../../../i18n/pt/libvmemoapplet.ts \ |
25 | ../../../i18n/pt_BR/libvmemoapplet.ts \ | 25 | ../../../i18n/pt_BR/libvmemoapplet.ts \ |
26 | ../../../i18n/sl/libvmemoapplet.ts \ | 26 | ../../../i18n/sl/libvmemoapplet.ts \ |
27 | ../../../i18n/zh_CN/libvmemoapplet.ts \ | 27 | ../../../i18n/zh_CN/libvmemoapplet.ts \ |
28 | ../../../i18n/zh_TW/libvmemoapplet.ts | 28 | ../../../i18n/zh_TW/libvmemoapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro index d30567c..68d9eff 100644 --- a/core/applets/volumeapplet/volumeapplet.pro +++ b/core/applets/volumeapplet/volumeapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= volume.h volumeappletimpl.h oledbox.h | 3 | HEADERS= volume.h volumeappletimpl.h oledbox.h |
4 | SOURCES= volume.cpp volumeappletimpl.cpp oledbox.cpp | 4 | SOURCES= volume.cpp volumeappletimpl.cpp oledbox.cpp |
5 | TARGET = volumeapplet | 5 | TARGET = volumeapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include | 8 | DEPENDPATH += ../$(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libvolumeapplet.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libvolumeapplet.ts \ |
13 | ../../../i18n/nl/libvolumeapplet.ts \ | 13 | ../../../i18n/nl/libvolumeapplet.ts \ |
14 | ../../../i18n/da/libvolumeapplet.ts \ | 14 | ../../../i18n/da/libvolumeapplet.ts \ |
15 | ../../../i18n/xx/libvolumeapplet.ts \ | 15 | ../../../i18n/xx/libvolumeapplet.ts \ |
16 | ../../../i18n/en/libvolumeapplet.ts \ | 16 | ../../../i18n/en/libvolumeapplet.ts \ |
17 | ../../../i18n/es/libvolumeapplet.ts \ | 17 | ../../../i18n/es/libvolumeapplet.ts \ |
18 | ../../../i18n/fr/libvolumeapplet.ts \ | 18 | ../../../i18n/fr/libvolumeapplet.ts \ |
19 | ../../../i18n/hu/libvolumeapplet.ts \ | 19 | ../../../i18n/hu/libvolumeapplet.ts \ |
20 | ../../../i18n/ja/libvolumeapplet.ts \ | 20 | ../../../i18n/ja/libvolumeapplet.ts \ |
21 | ../../../i18n/ko/libvolumeapplet.ts \ | 21 | ../../../i18n/ko/libvolumeapplet.ts \ |
22 | ../../../i18n/no/libvolumeapplet.ts \ | 22 | ../../../i18n/no/libvolumeapplet.ts \ |
23 | ../../../i18n/pl/libvolumeapplet.ts \ | 23 | ../../../i18n/pl/libvolumeapplet.ts \ |
24 | ../../../i18n/pt/libvolumeapplet.ts \ | 24 | ../../../i18n/pt/libvolumeapplet.ts \ |
25 | ../../../i18n/pt_BR/libvolumeapplet.ts \ | 25 | ../../../i18n/pt_BR/libvolumeapplet.ts \ |
26 | ../../../i18n/sl/libvolumeapplet.ts \ | 26 | ../../../i18n/sl/libvolumeapplet.ts \ |
27 | ../../../i18n/zh_CN/libvolumeapplet.ts \ | 27 | ../../../i18n/zh_CN/libvolumeapplet.ts \ |
28 | ../../../i18n/zh_TW/libvolumeapplet.ts | 28 | ../../../i18n/zh_TW/libvolumeapplet.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/applets | 33 | target.path = $$prefix/plugins/applets |
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index d6f93da..0ac043b 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp | |||
@@ -421,257 +421,261 @@ void AppLauncher::sigStopped(int sigPid, int sigStatus) | |||
421 | #else | 421 | #else |
422 | void AppLauncher::sigStopped(int sigPid, int sigStatus) | 422 | void AppLauncher::sigStopped(int sigPid, int sigStatus) |
423 | { | 423 | { |
424 | qDebug("Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)"); | 424 | qDebug("Unhandled signal : AppLauncher::sigStopped(int sigPid, int sigStatus)"); |
425 | } | 425 | } |
426 | #endif // Q_OS_WIN32 | 426 | #endif // Q_OS_WIN32 |
427 | 427 | ||
428 | bool AppLauncher::isRunning(const QString &app) | 428 | bool AppLauncher::isRunning(const QString &app) |
429 | { | 429 | { |
430 | for (QMap<int,QString>::ConstIterator it = runningApps.begin(); it != runningApps.end(); ++it) { | 430 | for (QMap<int,QString>::ConstIterator it = runningApps.begin(); it != runningApps.end(); ++it) { |
431 | if ( *it == app ) { | 431 | if ( *it == app ) { |
432 | #ifdef Q_OS_UNIX | 432 | #ifdef Q_OS_UNIX |
433 | pid_t t = ::__getpgid( it.key() ); | 433 | pid_t t = ::__getpgid( it.key() ); |
434 | if ( t == -1 ) { | 434 | if ( t == -1 ) { |
435 | qDebug("appLauncher bug, %s believed running, but pid %d is not existing", app.data(), it.key() ); | 435 | qDebug("appLauncher bug, %s believed running, but pid %d is not existing", app.data(), it.key() ); |
436 | runningApps.remove( it.key() ); | 436 | runningApps.remove( it.key() ); |
437 | return FALSE; | 437 | return FALSE; |
438 | } | 438 | } |
439 | #endif | 439 | #endif |
440 | return TRUE; | 440 | return TRUE; |
441 | } | 441 | } |
442 | } | 442 | } |
443 | 443 | ||
444 | return FALSE; | 444 | return FALSE; |
445 | } | 445 | } |
446 | 446 | ||
447 | bool AppLauncher::executeBuiltin(const QString &c, const QString &document) | 447 | bool AppLauncher::executeBuiltin(const QString &c, const QString &document) |
448 | { | 448 | { |
449 | Global::Command* builtin = Opie::Global::builtinCommands(); | 449 | Global::Command* builtin = Opie::Global::builtinCommands(); |
450 | QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning(); | 450 | QGuardedPtr<QWidget> *running = Opie::Global::builtinRunning(); |
451 | 451 | ||
452 | // Attempt to execute the app using a builtin class for the app | 452 | // Attempt to execute the app using a builtin class for the app |
453 | if (builtin) { | 453 | if (builtin) { |
454 | for (int i = 0; builtin[i].file; i++) { | 454 | for (int i = 0; builtin[i].file; i++) { |
455 | if ( builtin[i].file == c ) { | 455 | if ( builtin[i].file == c ) { |
456 | if ( running[i] ) { | 456 | if ( running[i] ) { |
457 | if ( !document.isNull() && builtin[i].documentary ) | 457 | if ( !document.isNull() && builtin[i].documentary ) |
458 | Global::setDocument(running[i], document); | 458 | Global::setDocument(running[i], document); |
459 | running[i]->raise(); | 459 | running[i]->raise(); |
460 | running[i]->show(); | 460 | running[i]->show(); |
461 | running[i]->setActiveWindow(); | 461 | running[i]->setActiveWindow(); |
462 | } else { | 462 | } else { |
463 | running[i] = builtin[i].func( builtin[i].maximized ); | 463 | running[i] = builtin[i].func( builtin[i].maximized ); |
464 | } | 464 | } |
465 | #ifndef QT_NO_COP | 465 | #ifndef QT_NO_COP |
466 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 466 | QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
467 | e << c; // that was quick ;-) | 467 | e << c; // that was quick ;-) |
468 | #endif | 468 | #endif |
469 | return TRUE; | 469 | return TRUE; |
470 | } | 470 | } |
471 | } | 471 | } |
472 | } | 472 | } |
473 | 473 | ||
474 | // Convert the command line in to a list of arguments | 474 | // Convert the command line in to a list of arguments |
475 | QStringList list = QStringList::split(QRegExp(" *"),c); | 475 | QStringList list = QStringList::split(QRegExp(" *"),c); |
476 | QString ap=list[0]; | 476 | QString ap=list[0]; |
477 | 477 | ||
478 | if ( ap == "suspend" ) { // No tr | 478 | if ( ap == "suspend" ) { // No tr |
479 | QWSServer::processKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); | 479 | QWSServer::processKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); |
480 | return TRUE; | 480 | return TRUE; |
481 | } | 481 | } |
482 | 482 | ||
483 | return FALSE; | 483 | return FALSE; |
484 | } | 484 | } |
485 | 485 | ||
486 | bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise) | 486 | bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise) |
487 | { | 487 | { |
488 | qWarning("AppLauncher::execute"); | 488 | qWarning("AppLauncher::execute"); |
489 | // Convert the command line in to a list of arguments | 489 | // Convert the command line in to a list of arguments |
490 | QStringList list = QStringList::split(QRegExp(" *"),c); | 490 | QStringList list = QStringList::split(QRegExp(" *"),c); |
491 | if ( !docParam.isEmpty() ) | 491 | if ( !docParam.isEmpty() ) |
492 | list.append( docParam ); | 492 | list.append( docParam ); |
493 | 493 | ||
494 | QString appName = list[0]; | 494 | QString appName = list[0]; |
495 | if ( isRunning(appName) ) { | 495 | if ( isRunning(appName) ) { |
496 | QCString channel = "QPE/Application/"; | 496 | QCString channel = "QPE/Application/"; |
497 | channel += appName.latin1(); | 497 | channel += appName.latin1(); |
498 | 498 | ||
499 | // Need to lock it to avoid race conditions with QPEApplication::processQCopFile | 499 | // Need to lock it to avoid race conditions with QPEApplication::processQCopFile |
500 | QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName); | 500 | QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName); |
501 | if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { | 501 | if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { |
502 | #ifndef Q_OS_WIN32 | 502 | #ifndef Q_OS_WIN32 |
503 | flock(f.handle(), LOCK_EX); | 503 | flock(f.handle(), LOCK_EX); |
504 | #endif | 504 | #endif |
505 | 505 | ||
506 | QDataStream ds(&f); | 506 | QDataStream ds(&f); |
507 | QByteArray b; | 507 | QByteArray b; |
508 | QDataStream bstream(b, IO_WriteOnly); | 508 | QDataStream bstream(b, IO_WriteOnly); |
509 | if ( !f.size() ) { | 509 | if ( !f.size() ) { |
510 | ds << channel << QCString("raise()") << b; | 510 | ds << channel << QCString("raise()") << b; |
511 | if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) { | 511 | if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) { |
512 | int id = startTimer(RAISE_TIMEOUT_MS); | 512 | int id = startTimer(RAISE_TIMEOUT_MS); |
513 | waitingHeartbeat.insert( appName, id ); | 513 | waitingHeartbeat.insert( appName, id ); |
514 | } | 514 | } |
515 | } | 515 | } |
516 | if ( !docParam.isEmpty() ) { | 516 | if ( !docParam.isEmpty() ) { |
517 | bstream << docParam; | 517 | bstream << docParam; |
518 | ds << channel << QCString("setDocument(QString)") << b; | 518 | ds << channel << QCString("setDocument(QString)") << b; |
519 | } | 519 | } |
520 | 520 | ||
521 | f.flush(); | 521 | f.flush(); |
522 | #ifndef Q_OS_WIN32 | 522 | #ifndef Q_OS_WIN32 |
523 | flock(f.handle(), LOCK_UN); | 523 | flock(f.handle(), LOCK_UN); |
524 | #endif | 524 | #endif |
525 | f.close(); | 525 | f.close(); |
526 | } | 526 | } |
527 | if ( QCopChannel::isRegistered(channel) ) // avoid unnecessary warnings | 527 | if ( QCopChannel::isRegistered(channel) ) // avoid unnecessary warnings |
528 | QCopChannel::send(channel,"QPEProcessQCop()"); | 528 | QCopChannel::send(channel,"QPEProcessQCop()"); |
529 | 529 | ||
530 | return TRUE; | 530 | return TRUE; |
531 | } | 531 | } |
532 | 532 | ||
533 | #ifdef QT_NO_QWS_MULTIPROCESS | 533 | #ifdef QT_NO_QWS_MULTIPROCESS |
534 | QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c), | 534 | QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c), |
535 | tr("OK"), 0, 0, 0, 1 ); | 535 | tr("OK"), 0, 0, 0, 1 ); |
536 | #else | 536 | #else |
537 | 537 | ||
538 | QStrList slist; | 538 | QStrList slist; |
539 | unsigned j; | 539 | unsigned j; |
540 | for ( j = 0; j < list.count(); j++ ) | 540 | for ( j = 0; j < list.count(); j++ ) |
541 | slist.append( list[j].utf8() ); | 541 | slist.append( list[j].utf8() ); |
542 | 542 | ||
543 | const char **args = new const char *[slist.count() + 1]; | 543 | const char **args = new const char *[slist.count() + 1]; |
544 | for ( j = 0; j < slist.count(); j++ ) | 544 | for ( j = 0; j < slist.count(); j++ ) |
545 | args[j] = slist.at(j); | 545 | args[j] = slist.at(j); |
546 | args[j] = NULL; | 546 | args[j] = NULL; |
547 | 547 | ||
548 | #ifndef Q_OS_WIN32 | 548 | #ifndef Q_OS_WIN32 |
549 | #ifdef Q_OS_MACX | ||
550 | if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".dylib" ) ) { | ||
551 | #else | ||
549 | if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) { | 552 | if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) { |
553 | #endif /* Q_OS_MACX */ | ||
550 | qDebug( "Quick launching: %s", args[0] ); | 554 | qDebug( "Quick launching: %s", args[0] ); |
551 | if ( getuid() == 0 ) | 555 | if ( getuid() == 0 ) |
552 | setpriority( PRIO_PROCESS, qlPid, 0 ); | 556 | setpriority( PRIO_PROCESS, qlPid, 0 ); |
553 | QCString qlch("QPE/QuickLauncher-"); | 557 | QCString qlch("QPE/QuickLauncher-"); |
554 | qlch += QString::number(qlPid); | 558 | qlch += QString::number(qlPid); |
555 | QCopEnvelope env( qlch, "execute(QStrList)" ); | 559 | QCopEnvelope env( qlch, "execute(QStrList)" ); |
556 | env << slist; | 560 | env << slist; |
557 | runningApps[qlPid] = QString(args[0]); | 561 | runningApps[qlPid] = QString(args[0]); |
558 | emit launched(qlPid, QString(args[0])); | 562 | emit launched(qlPid, QString(args[0])); |
559 | QCopEnvelope e("QPE/System", "busy()"); | 563 | QCopEnvelope e("QPE/System", "busy()"); |
560 | qlPid = 0; | 564 | qlPid = 0; |
561 | qlReady = FALSE; | 565 | qlReady = FALSE; |
562 | QTimer::singleShot( getuid() == 0 ? 800 : 1500, this, SLOT(createQuickLauncher()) ); | 566 | QTimer::singleShot( getuid() == 0 ? 800 : 1500, this, SLOT(createQuickLauncher()) ); |
563 | } else { | 567 | } else { |
564 | int pid = ::vfork(); | 568 | int pid = ::vfork(); |
565 | if ( !pid ) { | 569 | if ( !pid ) { |
566 | for ( int fd = 3; fd < 100; fd++ ) | 570 | for ( int fd = 3; fd < 100; fd++ ) |
567 | ::close( fd ); | 571 | ::close( fd ); |
568 | ::setpgid( ::getpid(), ::getppid() ); | 572 | ::setpgid( ::getpid(), ::getppid() ); |
569 | // Try bindir first, so that foo/bar works too | 573 | // Try bindir first, so that foo/bar works too |
570 | ::execv( QPEApplication::qpeDir()+"bin/"+args[0], (char * const *)args ); | 574 | ::execv( QPEApplication::qpeDir()+"bin/"+args[0], (char * const *)args ); |
571 | ::execvp( args[0], (char * const *)args ); | 575 | ::execvp( args[0], (char * const *)args ); |
572 | _exit( -1 ); | 576 | _exit( -1 ); |
573 | } | 577 | } |
574 | 578 | ||
575 | runningApps[pid] = QString(args[0]); | 579 | runningApps[pid] = QString(args[0]); |
576 | emit launched(pid, QString(args[0])); | 580 | emit launched(pid, QString(args[0])); |
577 | QCopEnvelope e("QPE/System", "busy()"); | 581 | QCopEnvelope e("QPE/System", "busy()"); |
578 | } | 582 | } |
579 | #else | 583 | #else |
580 | QProcess *proc = new QProcess(this); | 584 | QProcess *proc = new QProcess(this); |
581 | if (proc){ | 585 | if (proc){ |
582 | for (int i=0; i < slist.count(); i++) | 586 | for (int i=0; i < slist.count(); i++) |
583 | proc->addArgument(args[i]); | 587 | proc->addArgument(args[i]); |
584 | connect(proc, SIGNAL(processExited()), this, SLOT(processExited())); | 588 | connect(proc, SIGNAL(processExited()), this, SLOT(processExited())); |
585 | if (!proc->start()){ | 589 | if (!proc->start()){ |
586 | qDebug("Unable to start application %s", args[0]); | 590 | qDebug("Unable to start application %s", args[0]); |
587 | }else{ | 591 | }else{ |
588 | PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier(); | 592 | PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier(); |
589 | if (procInfo){ | 593 | if (procInfo){ |
590 | DWORD pid = procInfo->dwProcessId; | 594 | DWORD pid = procInfo->dwProcessId; |
591 | runningApps[pid] = QString(args[0]); | 595 | runningApps[pid] = QString(args[0]); |
592 | runningAppsProc.append(proc); | 596 | runningAppsProc.append(proc); |
593 | emit launched(pid, QString(args[0])); | 597 | emit launched(pid, QString(args[0])); |
594 | QCopEnvelope e("QPE/System", "busy()"); | 598 | QCopEnvelope e("QPE/System", "busy()"); |
595 | }else{ | 599 | }else{ |
596 | qDebug("Unable to read process inforation #1 for %s", args[0]); | 600 | qDebug("Unable to read process inforation #1 for %s", args[0]); |
597 | } | 601 | } |
598 | } | 602 | } |
599 | }else{ | 603 | }else{ |
600 | qDebug("Unable to create process for application %s", args[0]); | 604 | qDebug("Unable to create process for application %s", args[0]); |
601 | return FALSE; | 605 | return FALSE; |
602 | } | 606 | } |
603 | #endif | 607 | #endif |
604 | #endif //QT_NO_QWS_MULTIPROCESS | 608 | #endif //QT_NO_QWS_MULTIPROCESS |
605 | 609 | ||
606 | delete [] args; | 610 | delete [] args; |
607 | return TRUE; | 611 | return TRUE; |
608 | } | 612 | } |
609 | 613 | ||
610 | void AppLauncher::kill( int pid ) | 614 | void AppLauncher::kill( int pid ) |
611 | { | 615 | { |
612 | #ifndef Q_OS_WIN32 | 616 | #ifndef Q_OS_WIN32 |
613 | ::kill( pid, SIGTERM ); | 617 | ::kill( pid, SIGTERM ); |
614 | #else | 618 | #else |
615 | for ( QProcess *proc = runningAppsProc.first(); proc; proc = runningAppsProc.next() ) { | 619 | for ( QProcess *proc = runningAppsProc.first(); proc; proc = runningAppsProc.next() ) { |
616 | if ( proc->processIdentifier() == pid ) { | 620 | if ( proc->processIdentifier() == pid ) { |
617 | proc->kill(); | 621 | proc->kill(); |
618 | break; | 622 | break; |
619 | } | 623 | } |
620 | } | 624 | } |
621 | #endif | 625 | #endif |
622 | } | 626 | } |
623 | 627 | ||
624 | int AppLauncher::pidForName( const QString &appName ) | 628 | int AppLauncher::pidForName( const QString &appName ) |
625 | { | 629 | { |
626 | int pid = -1; | 630 | int pid = -1; |
627 | 631 | ||
628 | QMap<int, QString>::Iterator it; | 632 | QMap<int, QString>::Iterator it; |
629 | for (it = runningApps.begin(); it!= runningApps.end(); ++it) { | 633 | for (it = runningApps.begin(); it!= runningApps.end(); ++it) { |
630 | if (*it == appName) { | 634 | if (*it == appName) { |
631 | pid = it.key(); | 635 | pid = it.key(); |
632 | break; | 636 | break; |
633 | } | 637 | } |
634 | } | 638 | } |
635 | 639 | ||
636 | return pid; | 640 | return pid; |
637 | } | 641 | } |
638 | 642 | ||
639 | void AppLauncher::createQuickLauncher() | 643 | void AppLauncher::createQuickLauncher() |
640 | { | 644 | { |
641 | static bool disabled = FALSE; | 645 | static bool disabled = FALSE; |
642 | if (disabled) | 646 | if (disabled) |
643 | return; | 647 | return; |
644 | 648 | ||
645 | qlReady = FALSE; | 649 | qlReady = FALSE; |
646 | qlPid = ::vfork(); | 650 | qlPid = ::vfork(); |
647 | if ( !qlPid ) { | 651 | if ( !qlPid ) { |
648 | char **args = new char *[2]; | 652 | char **args = new char *[2]; |
649 | args[0] = "quicklauncher"; | 653 | args[0] = "quicklauncher"; |
650 | args[1] = 0; | 654 | args[1] = 0; |
651 | for ( int fd = 3; fd < 100; fd++ ) | 655 | for ( int fd = 3; fd < 100; fd++ ) |
652 | ::close( fd ); | 656 | ::close( fd ); |
653 | ::setpgid( ::getpid(), ::getppid() ); | 657 | ::setpgid( ::getpid(), ::getppid() ); |
654 | // Try bindir first, so that foo/bar works too | 658 | // Try bindir first, so that foo/bar works too |
655 | setenv( "LD_BIND_NOW", "1", 1 ); | 659 | setenv( "LD_BIND_NOW", "1", 1 ); |
656 | ::execv( QPEApplication::qpeDir()+"bin/quicklauncher", args ); | 660 | ::execv( QPEApplication::qpeDir()+"bin/quicklauncher", args ); |
657 | ::execvp( "quicklauncher", args ); | 661 | ::execvp( "quicklauncher", args ); |
658 | delete []args; | 662 | delete []args; |
659 | disabled = TRUE; | 663 | disabled = TRUE; |
660 | _exit( -1 ); | 664 | _exit( -1 ); |
661 | } else if ( qlPid == -1 ) { | 665 | } else if ( qlPid == -1 ) { |
662 | qlPid = 0; | 666 | qlPid = 0; |
663 | } else { | 667 | } else { |
664 | if ( getuid() == 0 ) | 668 | if ( getuid() == 0 ) |
665 | setpriority( PRIO_PROCESS, qlPid, 19 ); | 669 | setpriority( PRIO_PROCESS, qlPid, 19 ); |
666 | } | 670 | } |
667 | } | 671 | } |
668 | 672 | ||
669 | // Used only by Win32 | 673 | // Used only by Win32 |
670 | void AppLauncher::processExited() | 674 | void AppLauncher::processExited() |
671 | { | 675 | { |
672 | #ifdef Q_OS_WIN32 | 676 | #ifdef Q_OS_WIN32 |
673 | qDebug("AppLauncher::processExited()"); | 677 | qDebug("AppLauncher::processExited()"); |
674 | bool found = FALSE; | 678 | bool found = FALSE; |
675 | QProcess *proc = (QProcess *) sender(); | 679 | QProcess *proc = (QProcess *) sender(); |
676 | if (!proc){ | 680 | if (!proc){ |
677 | qDebug("Interanl error NULL proc"); | 681 | qDebug("Interanl error NULL proc"); |
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 8f3e812..62e316c 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp | |||
@@ -102,257 +102,261 @@ InputMethods::InputMethods( QWidget *parent ) : | |||
102 | cfg.setGroup( "InputMethods" ); | 102 | cfg.setGroup( "InputMethods" ); |
103 | inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader | QWidget::WStyle_Tool; | 103 | inputWidgetStyle = QWidget::WStyle_Customize | QWidget::WStyle_StaysOnTop | QWidget::WGroupLeader | QWidget::WStyle_Tool; |
104 | inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : 0; | 104 | inputWidgetStyle |= cfg.readBoolEntry( "Float", false ) ? QWidget::WStyle_DialogBorder : 0; |
105 | inputWidgetWidth = cfg.readNumEntry( "Width", 100 ); | 105 | inputWidgetWidth = cfg.readNumEntry( "Width", 100 ); |
106 | 106 | ||
107 | setBackgroundMode( PaletteBackground ); | 107 | setBackgroundMode( PaletteBackground ); |
108 | QHBoxLayout *hbox = new QHBoxLayout( this ); | 108 | QHBoxLayout *hbox = new QHBoxLayout( this ); |
109 | 109 | ||
110 | kbdButton = new IMToolButton( this); | 110 | kbdButton = new IMToolButton( this); |
111 | kbdButton->setFocusPolicy(NoFocus); | 111 | kbdButton->setFocusPolicy(NoFocus); |
112 | kbdButton->setToggleButton( TRUE ); | 112 | kbdButton->setToggleButton( TRUE ); |
113 | if (parent->sizeHint().height() > 0) | 113 | if (parent->sizeHint().height() > 0) |
114 | kbdButton->setFixedHeight( parent->sizeHint().height() ); | 114 | kbdButton->setFixedHeight( parent->sizeHint().height() ); |
115 | kbdButton->setFixedWidth( 32 ); | 115 | kbdButton->setFixedWidth( 32 ); |
116 | kbdButton->setAutoRaise( TRUE ); | 116 | kbdButton->setAutoRaise( TRUE ); |
117 | kbdButton->setUsesBigPixmap( TRUE ); | 117 | kbdButton->setUsesBigPixmap( TRUE ); |
118 | hbox->addWidget( kbdButton ); | 118 | hbox->addWidget( kbdButton ); |
119 | connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) ); | 119 | connect( kbdButton, SIGNAL(toggled(bool)), this, SLOT(showKbd(bool)) ); |
120 | 120 | ||
121 | kbdChoice = new IMToolButton( this ); | 121 | kbdChoice = new IMToolButton( this ); |
122 | kbdChoice->setFocusPolicy(NoFocus); | 122 | kbdChoice->setFocusPolicy(NoFocus); |
123 | kbdChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); | 123 | kbdChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); |
124 | if (parent->sizeHint().height() > 0) | 124 | if (parent->sizeHint().height() > 0) |
125 | kbdChoice->setFixedHeight( parent->sizeHint().height() ); | 125 | kbdChoice->setFixedHeight( parent->sizeHint().height() ); |
126 | kbdChoice->setFixedWidth( 13 ); | 126 | kbdChoice->setFixedWidth( 13 ); |
127 | kbdChoice->setAutoRaise( TRUE ); | 127 | kbdChoice->setAutoRaise( TRUE ); |
128 | hbox->addWidget( kbdChoice ); | 128 | hbox->addWidget( kbdChoice ); |
129 | connect( kbdChoice, SIGNAL(clicked()), this, SLOT(chooseKbd()) ); | 129 | connect( kbdChoice, SIGNAL(clicked()), this, SLOT(chooseKbd()) ); |
130 | 130 | ||
131 | connect( (QPEApplication*)qApp, SIGNAL(clientMoused()), | 131 | connect( (QPEApplication*)qApp, SIGNAL(clientMoused()), |
132 | this, SLOT(resetStates()) ); | 132 | this, SLOT(resetStates()) ); |
133 | 133 | ||
134 | 134 | ||
135 | imButton = new QWidgetStack( this ); // later a widget stack | 135 | imButton = new QWidgetStack( this ); // later a widget stack |
136 | imButton->setFocusPolicy(NoFocus); | 136 | imButton->setFocusPolicy(NoFocus); |
137 | if (parent->sizeHint().height() > 0) | 137 | if (parent->sizeHint().height() > 0) |
138 | imButton->setFixedHeight( parent->sizeHint().height() ); | 138 | imButton->setFixedHeight( parent->sizeHint().height() ); |
139 | hbox->addWidget(imButton); | 139 | hbox->addWidget(imButton); |
140 | 140 | ||
141 | imChoice = new QToolButton( this ); | 141 | imChoice = new QToolButton( this ); |
142 | imChoice->setFocusPolicy(NoFocus); | 142 | imChoice->setFocusPolicy(NoFocus); |
143 | imChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); | 143 | imChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); |
144 | if (parent->sizeHint().height() > 0) | 144 | if (parent->sizeHint().height() > 0) |
145 | imChoice->setFixedHeight( parent->sizeHint().height() ); | 145 | imChoice->setFixedHeight( parent->sizeHint().height() ); |
146 | imChoice->setFixedWidth( 13 ); | 146 | imChoice->setFixedWidth( 13 ); |
147 | imChoice->setAutoRaise( TRUE ); | 147 | imChoice->setAutoRaise( TRUE ); |
148 | hbox->addWidget( imChoice ); | 148 | hbox->addWidget( imChoice ); |
149 | connect( imChoice, SIGNAL(clicked()), this, SLOT(chooseIm()) ); | 149 | connect( imChoice, SIGNAL(clicked()), this, SLOT(chooseIm()) ); |
150 | 150 | ||
151 | loadInputMethods(); | 151 | loadInputMethods(); |
152 | 152 | ||
153 | QCopChannel *channel = new QCopChannel( "QPE/IME", this ); | 153 | QCopChannel *channel = new QCopChannel( "QPE/IME", this ); |
154 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 154 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
155 | this, SLOT(qcopReceive(const QCString&, const QByteArray&)) ); | 155 | this, SLOT(qcopReceive(const QCString&, const QByteArray&)) ); |
156 | } | 156 | } |
157 | 157 | ||
158 | InputMethods::~InputMethods() | 158 | InputMethods::~InputMethods() |
159 | { | 159 | { |
160 | Config cfg("qpe"); | 160 | Config cfg("qpe"); |
161 | cfg.setGroup("InputMethod"); | 161 | cfg.setGroup("InputMethod"); |
162 | if (imethod) | 162 | if (imethod) |
163 | cfg.writeEntry("im", imethod->name() ); | 163 | cfg.writeEntry("im", imethod->name() ); |
164 | if (mkeyboard) | 164 | if (mkeyboard) |
165 | cfg.writeEntry("current", mkeyboard->name() ); | 165 | cfg.writeEntry("current", mkeyboard->name() ); |
166 | 166 | ||
167 | unloadInputMethods(); | 167 | unloadInputMethods(); |
168 | } | 168 | } |
169 | 169 | ||
170 | void InputMethods::hideInputMethod() | 170 | void InputMethods::hideInputMethod() |
171 | { | 171 | { |
172 | kbdButton->setOn( FALSE ); | 172 | kbdButton->setOn( FALSE ); |
173 | } | 173 | } |
174 | 174 | ||
175 | void InputMethods::showInputMethod() | 175 | void InputMethods::showInputMethod() |
176 | { | 176 | { |
177 | kbdButton->setOn( TRUE ); | 177 | kbdButton->setOn( TRUE ); |
178 | } | 178 | } |
179 | 179 | ||
180 | void InputMethods::showInputMethod(const QString& name) | 180 | void InputMethods::showInputMethod(const QString& name) |
181 | { | 181 | { |
182 | int i = 0; | 182 | int i = 0; |
183 | QValueList<InputMethod>::Iterator it; | 183 | QValueList<InputMethod>::Iterator it; |
184 | InputMethod *im = 0; | 184 | InputMethod *im = 0; |
185 | for ( it = inputMethodList.begin(); it != inputMethodList.end(); ++it, i++ ) { | 185 | for ( it = inputMethodList.begin(); it != inputMethodList.end(); ++it, i++ ) { |
186 | QString lname = (*it).libName.mid((*it).libName.findRev('/') + 1); | 186 | QString lname = (*it).libName.mid((*it).libName.findRev('/') + 1); |
187 | if ( (*it).name() == name || lname == name ) { | 187 | if ( (*it).name() == name || lname == name ) { |
188 | im = &(*it); | 188 | im = &(*it); |
189 | break; | 189 | break; |
190 | } | 190 | } |
191 | } | 191 | } |
192 | if ( im ) | 192 | if ( im ) |
193 | chooseKeyboard(im); | 193 | chooseKeyboard(im); |
194 | } | 194 | } |
195 | 195 | ||
196 | void InputMethods::resetStates() | 196 | void InputMethods::resetStates() |
197 | { | 197 | { |
198 | if ( mkeyboard && !mkeyboard->newIM ) | 198 | if ( mkeyboard && !mkeyboard->newIM ) |
199 | mkeyboard->interface->resetState(); | 199 | mkeyboard->interface->resetState(); |
200 | } | 200 | } |
201 | 201 | ||
202 | QRect InputMethods::inputRect() const | 202 | QRect InputMethods::inputRect() const |
203 | { | 203 | { |
204 | if ( !mkeyboard || !mkeyboard->widget || !mkeyboard->widget->isVisible() ) | 204 | if ( !mkeyboard || !mkeyboard->widget || !mkeyboard->widget->isVisible() ) |
205 | return QRect(); | 205 | return QRect(); |
206 | else | 206 | else |
207 | return mkeyboard->widget->geometry(); | 207 | return mkeyboard->widget->geometry(); |
208 | } | 208 | } |
209 | 209 | ||
210 | void InputMethods::unloadInputMethods() | 210 | void InputMethods::unloadInputMethods() |
211 | { | 211 | { |
212 | unloadMethod( inputMethodList ); | 212 | unloadMethod( inputMethodList ); |
213 | unloadMethod( inputModifierList ); | 213 | unloadMethod( inputModifierList ); |
214 | inputMethodList.clear(); | 214 | inputMethodList.clear(); |
215 | inputModifierList.clear(); | 215 | inputModifierList.clear(); |
216 | 216 | ||
217 | } | 217 | } |
218 | 218 | ||
219 | void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { | 219 | void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { |
220 | QValueList<InputMethod>::Iterator it; | 220 | QValueList<InputMethod>::Iterator it; |
221 | 221 | ||
222 | for (it = list.begin(); it != list.end(); ++it ) | 222 | for (it = list.begin(); it != list.end(); ++it ) |
223 | (*it).releaseInterface(); | 223 | (*it).releaseInterface(); |
224 | 224 | ||
225 | } | 225 | } |
226 | 226 | ||
227 | 227 | ||
228 | QStringList InputMethods::plugins()const { | 228 | QStringList InputMethods::plugins()const { |
229 | QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; | 229 | QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; |
230 | #ifdef Q_OS_MACX | ||
231 | QDir dir( path, "lib*.dylib" ); | ||
232 | #else | ||
230 | QDir dir( path, "lib*.so" ); | 233 | QDir dir( path, "lib*.so" ); |
234 | #endif /* Q_OS_MACX */ | ||
231 | return dir.entryList(); | 235 | return dir.entryList(); |
232 | } | 236 | } |
233 | 237 | ||
234 | void InputMethods::installTranslator( const QString& type ) { | 238 | void InputMethods::installTranslator( const QString& type ) { |
235 | QStringList langs = Global::languageList(); | 239 | QStringList langs = Global::languageList(); |
236 | QStringList::ConstIterator lit; | 240 | QStringList::ConstIterator lit; |
237 | for ( lit= langs.begin(); lit!=langs.end(); ++lit) { | 241 | for ( lit= langs.begin(); lit!=langs.end(); ++lit) { |
238 | QString lang = *lit; | 242 | QString lang = *lit; |
239 | QTranslator * trans = new QTranslator(qApp); | 243 | QTranslator * trans = new QTranslator(qApp); |
240 | 244 | ||
241 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 245 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; |
242 | 246 | ||
243 | if ( trans->load( tfn )) | 247 | if ( trans->load( tfn )) |
244 | qApp->installTranslator( trans ); | 248 | qApp->installTranslator( trans ); |
245 | else | 249 | else |
246 | delete trans; | 250 | delete trans; |
247 | } | 251 | } |
248 | } | 252 | } |
249 | 253 | ||
250 | void InputMethods::setPreferedHandlers() { | 254 | void InputMethods::setPreferedHandlers() { |
251 | Config cfg("qpe"); | 255 | Config cfg("qpe"); |
252 | cfg.setGroup("InputMethod"); | 256 | cfg.setGroup("InputMethod"); |
253 | QString current = cfg.readEntry("current"); | 257 | QString current = cfg.readEntry("current"); |
254 | QString im = cfg.readEntry("im"); | 258 | QString im = cfg.readEntry("im"); |
255 | 259 | ||
256 | QValueList<InputMethod>::Iterator it; | 260 | QValueList<InputMethod>::Iterator it; |
257 | if (!inputModifierList.isEmpty() && !im.isEmpty() ) { | 261 | if (!inputModifierList.isEmpty() && !im.isEmpty() ) { |
258 | for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it ) | 262 | for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it ) |
259 | if ( (*it).name() == im ) { | 263 | if ( (*it).name() == im ) { |
260 | imethod = &(*it); break; | 264 | imethod = &(*it); break; |
261 | } | 265 | } |
262 | 266 | ||
263 | } | 267 | } |
264 | if (!inputMethodList.isEmpty() && !current.isEmpty() ) { | 268 | if (!inputMethodList.isEmpty() && !current.isEmpty() ) { |
265 | for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) | 269 | for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) |
266 | if ( (*it).name() == current ) { | 270 | if ( (*it).name() == current ) { |
267 | qWarning("preferred keyboard is %s", current.latin1() ); | 271 | qWarning("preferred keyboard is %s", current.latin1() ); |
268 | mkeyboard = &(*it); | 272 | mkeyboard = &(*it); |
269 | kbdButton->setPixmap( *mkeyboard->icon() ); | 273 | kbdButton->setPixmap( *mkeyboard->icon() ); |
270 | break; | 274 | break; |
271 | } | 275 | } |
272 | } | 276 | } |
273 | 277 | ||
274 | } | 278 | } |
275 | 279 | ||
276 | void InputMethods::loadInputMethods() | 280 | void InputMethods::loadInputMethods() |
277 | { | 281 | { |
278 | #ifndef QT_NO_COMPONENT | 282 | #ifndef QT_NO_COMPONENT |
279 | hideInputMethod(); | 283 | hideInputMethod(); |
280 | mkeyboard = 0; | 284 | mkeyboard = 0; |
281 | 285 | ||
282 | unloadInputMethods(); | 286 | unloadInputMethods(); |
283 | 287 | ||
284 | QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; | 288 | QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; |
285 | QStringList list = plugins(); | 289 | QStringList list = plugins(); |
286 | QStringList::Iterator it; | 290 | QStringList::Iterator it; |
287 | for ( it = list.begin(); it != list.end(); ++it ) { | 291 | for ( it = list.begin(); it != list.end(); ++it ) { |
288 | InputMethodInterface *iface = 0; | 292 | InputMethodInterface *iface = 0; |
289 | ExtInputMethodInterface *eface = 0; | 293 | ExtInputMethodInterface *eface = 0; |
290 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 294 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
291 | 295 | ||
292 | if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) { | 296 | if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) { |
293 | InputMethod input; | 297 | InputMethod input; |
294 | input.newIM = FALSE; | 298 | input.newIM = FALSE; |
295 | input.library = lib; | 299 | input.library = lib; |
296 | input.libName = *it; | 300 | input.libName = *it; |
297 | input.interface = iface; | 301 | input.interface = iface; |
298 | input.widget = input.interface->inputMethod( 0, inputWidgetStyle ); | 302 | input.widget = input.interface->inputMethod( 0, inputWidgetStyle ); |
299 | input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) ); | 303 | input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) ); |
300 | inputMethodList.append( input ); | 304 | inputMethodList.append( input ); |
301 | } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) { | 305 | } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) { |
302 | InputMethod input; | 306 | InputMethod input; |
303 | input.newIM = TRUE; | 307 | input.newIM = TRUE; |
304 | input.library = lib; | 308 | input.library = lib; |
305 | input.libName = *it; | 309 | input.libName = *it; |
306 | input.extInterface = eface; | 310 | input.extInterface = eface; |
307 | input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); | 311 | input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); |
308 | // may be either a simple, or advanced. | 312 | // may be either a simple, or advanced. |
309 | if (input.widget) { | 313 | if (input.widget) { |
310 | //qDebug("its a keyboard"); | 314 | //qDebug("its a keyboard"); |
311 | inputMethodList.append( input ); | 315 | inputMethodList.append( input ); |
312 | } else { | 316 | } else { |
313 | //qDebug("its a real im"); | 317 | //qDebug("its a real im"); |
314 | input.widget = input.extInterface->statusWidget( 0, 0 ); | 318 | input.widget = input.extInterface->statusWidget( 0, 0 ); |
315 | if (input.widget) { | 319 | if (input.widget) { |
316 | //qDebug("blah"); | 320 | //qDebug("blah"); |
317 | inputModifierList.append( input ); | 321 | inputModifierList.append( input ); |
318 | imButton->addWidget(input.widget, inputModifierList.count()); | 322 | imButton->addWidget(input.widget, inputModifierList.count()); |
319 | } | 323 | } |
320 | } | 324 | } |
321 | }else{ | 325 | }else{ |
322 | delete lib; | 326 | delete lib; |
323 | lib = 0l; | 327 | lib = 0l; |
324 | } | 328 | } |
325 | installTranslator( (*it).left( (*it).find(".") ) ); | 329 | installTranslator( (*it).left( (*it).find(".") ) ); |
326 | } | 330 | } |
327 | qHeapSort( inputMethodList ); | 331 | qHeapSort( inputMethodList ); |
328 | #endif /* killed BUILT in cause they would not compile */ | 332 | #endif /* killed BUILT in cause they would not compile */ |
329 | 333 | ||
330 | QWSServer::setCurrentInputMethod( 0 ); | 334 | QWSServer::setCurrentInputMethod( 0 ); |
331 | 335 | ||
332 | /* set the prefered IM + handler */ | 336 | /* set the prefered IM + handler */ |
333 | setPreferedHandlers(); | 337 | setPreferedHandlers(); |
334 | if ( !inputModifierList.isEmpty() ) { | 338 | if ( !inputModifierList.isEmpty() ) { |
335 | if (!imethod) | 339 | if (!imethod) |
336 | imethod = &inputModifierList[0]; | 340 | imethod = &inputModifierList[0]; |
337 | imButton->raiseWidget(imethod->widget); | 341 | imButton->raiseWidget(imethod->widget); |
338 | QWSServer::setCurrentInputMethod( imethod->extInterface->inputMethod() ); | 342 | QWSServer::setCurrentInputMethod( imethod->extInterface->inputMethod() ); |
339 | } else { | 343 | } else { |
340 | imethod = 0; | 344 | imethod = 0; |
341 | } | 345 | } |
342 | 346 | ||
343 | // we need to update keyboards afterwards, as some of them may not be compatible with | 347 | // we need to update keyboards afterwards, as some of them may not be compatible with |
344 | // the current input method | 348 | // the current input method |
345 | updateKeyboards(imethod); | 349 | updateKeyboards(imethod); |
346 | 350 | ||
347 | if ( !inputModifierList.isEmpty() ) | 351 | if ( !inputModifierList.isEmpty() ) |
348 | imButton->show(); | 352 | imButton->show(); |
349 | else | 353 | else |
350 | imButton->hide(); | 354 | imButton->hide(); |
351 | 355 | ||
352 | if ( inputModifierList.count() > 1 ) | 356 | if ( inputModifierList.count() > 1 ) |
353 | imChoice->show(); | 357 | imChoice->show(); |
354 | else | 358 | else |
355 | imChoice->hide(); | 359 | imChoice->hide(); |
356 | } | 360 | } |
357 | 361 | ||
358 | void InputMethods::chooseKbd() | 362 | void InputMethods::chooseKbd() |
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp index 579c78c..63f8d05 100644 --- a/core/launcher/irserver.cpp +++ b/core/launcher/irserver.cpp | |||
@@ -1,73 +1,77 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | 21 | ||
22 | #include "irserver.h" | 22 | #include "irserver.h" |
23 | 23 | ||
24 | #include <qtopia/qlibrary.h> | 24 | #include <qtopia/qlibrary.h> |
25 | #include <qtopia/qpeapplication.h> | 25 | #include <qtopia/qpeapplication.h> |
26 | 26 | ||
27 | #include <qtranslator.h> | 27 | #include <qtranslator.h> |
28 | 28 | ||
29 | #include "obexinterface.h" | 29 | #include "obexinterface.h" |
30 | 30 | ||
31 | #include <qdir.h> | 31 | #include <qdir.h> |
32 | 32 | ||
33 | IrServer::IrServer( QObject *parent, const char *name ) | 33 | IrServer::IrServer( QObject *parent, const char *name ) |
34 | : QObject( parent, name ), obexIface(0) | 34 | : QObject( parent, name ), obexIface(0) |
35 | { | 35 | { |
36 | lib = 0; | 36 | lib = 0; |
37 | obexIface = 0; | 37 | obexIface = 0; |
38 | QString path = QPEApplication::qpeDir() + "/plugins/obex/"; | 38 | QString path = QPEApplication::qpeDir() + "/plugins/obex/"; |
39 | #ifdef Q_OS_MACX | ||
40 | QDir dir( path, "lib*.dylib" ); | ||
41 | #else | ||
39 | QDir dir( path, "lib*.so" ); | 42 | QDir dir( path, "lib*.so" ); |
43 | #endif /* Q_OS_MACX */ | ||
40 | QStringList list = dir.entryList(); | 44 | QStringList list = dir.entryList(); |
41 | QStringList::Iterator it; | 45 | QStringList::Iterator it; |
42 | for ( it = list.begin(); it != list.end(); ++it ) { | 46 | for ( it = list.begin(); it != list.end(); ++it ) { |
43 | QLibrary *trylib = new QLibrary( path + *it ); | 47 | QLibrary *trylib = new QLibrary( path + *it ); |
44 | //qDebug("trying lib %s", (path + (*it)).latin1() ); | 48 | //qDebug("trying lib %s", (path + (*it)).latin1() ); |
45 | if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { | 49 | if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { |
46 | lib = trylib; | 50 | lib = trylib; |
47 | //qDebug("found obex lib" ); | 51 | //qDebug("found obex lib" ); |
48 | QString lang = getenv( "LANG" ); | 52 | QString lang = getenv( "LANG" ); |
49 | QTranslator * trans = new QTranslator(qApp); | 53 | QTranslator * trans = new QTranslator(qApp); |
50 | QString type = (*it).left( (*it).find(".") ); | 54 | QString type = (*it).left( (*it).find(".") ); |
51 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 55 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; |
52 | //qDebug("tr fpr obex: %s", tfn.latin1() ); | 56 | //qDebug("tr fpr obex: %s", tfn.latin1() ); |
53 | if ( trans->load( tfn )) | 57 | if ( trans->load( tfn )) |
54 | qApp->installTranslator( trans ); | 58 | qApp->installTranslator( trans ); |
55 | else | 59 | else |
56 | delete trans; | 60 | delete trans; |
57 | 61 | ||
58 | break; | 62 | break; |
59 | } else { | 63 | } else { |
60 | delete lib; | 64 | delete lib; |
61 | } | 65 | } |
62 | } | 66 | } |
63 | if ( !lib ) | 67 | if ( !lib ) |
64 | qDebug("could not load IR plugin" ); | 68 | qDebug("could not load IR plugin" ); |
65 | } | 69 | } |
66 | 70 | ||
67 | IrServer::~IrServer() | 71 | IrServer::~IrServer() |
68 | { | 72 | { |
69 | if ( obexIface ) | 73 | if ( obexIface ) |
70 | obexIface->release(); | 74 | obexIface->release(); |
71 | delete lib; | 75 | delete lib; |
72 | } | 76 | } |
73 | 77 | ||
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 74965df..5416d33 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -151,204 +151,206 @@ void initEnvironment() | |||
151 | setenv( "TZ", tz, 1 ); | 151 | setenv( "TZ", tz, 1 ); |
152 | config.writeEntry( "Timezone", tz); | 152 | config.writeEntry( "Timezone", tz); |
153 | 153 | ||
154 | config.setGroup( "Language" ); | 154 | config.setGroup( "Language" ); |
155 | QString lang = config.readEntry( "Language", getenv("LANG") ).stripWhiteSpace(); | 155 | QString lang = config.readEntry( "Language", getenv("LANG") ).stripWhiteSpace(); |
156 | if( lang.isNull() || lang.isEmpty()) | 156 | if( lang.isNull() || lang.isEmpty()) |
157 | lang = "en_US"; | 157 | lang = "en_US"; |
158 | 158 | ||
159 | setenv( "LANG", lang, 1 ); | 159 | setenv( "LANG", lang, 1 ); |
160 | config.writeEntry("Language", lang); | 160 | config.writeEntry("Language", lang); |
161 | config.write(); | 161 | config.write(); |
162 | 162 | ||
163 | #if 0 | 163 | #if 0 |
164 | setenv( "QWS_SIZE", "240x320", 0 ); | 164 | setenv( "QWS_SIZE", "240x320", 0 ); |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | 167 | ||
168 | 168 | ||
169 | QString env(getenv("QWS_DISPLAY")); | 169 | QString env(getenv("QWS_DISPLAY")); |
170 | if (env.contains("Transformed")) { | 170 | if (env.contains("Transformed")) { |
171 | int rot; | 171 | int rot; |
172 | // transformed driver default rotation is controlled by the hardware. | 172 | // transformed driver default rotation is controlled by the hardware. |
173 | Config config("qpe"); | 173 | Config config("qpe"); |
174 | config.setGroup( "Rotation" ); | 174 | config.setGroup( "Rotation" ); |
175 | if ( ( rot = config.readNumEntry( "Rot", -1 ) ) == -1 ) | 175 | if ( ( rot = config.readNumEntry( "Rot", -1 ) ) == -1 ) |
176 | rot = ODevice::inst ( )-> rotation ( ) * 90; | 176 | rot = ODevice::inst ( )-> rotation ( ) * 90; |
177 | 177 | ||
178 | setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1); | 178 | setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1); |
179 | QPEApplication::defaultRotation ( ); /* to ensure deforient matches reality */ | 179 | QPEApplication::defaultRotation ( ); /* to ensure deforient matches reality */ |
180 | } | 180 | } |
181 | } | 181 | } |
182 | 182 | ||
183 | static void initKeyboard() | 183 | static void initKeyboard() |
184 | { | 184 | { |
185 | Config config("qpe"); | 185 | Config config("qpe"); |
186 | 186 | ||
187 | config.setGroup( "Keyboard" ); | 187 | config.setGroup( "Keyboard" ); |
188 | 188 | ||
189 | int ard = config.readNumEntry( "RepeatDelay" ); | 189 | int ard = config.readNumEntry( "RepeatDelay" ); |
190 | int arp = config.readNumEntry( "RepeatPeriod" ); | 190 | int arp = config.readNumEntry( "RepeatPeriod" ); |
191 | if ( ard > 0 && arp > 0 ) | 191 | if ( ard > 0 && arp > 0 ) |
192 | qwsSetKeyboardAutoRepeat( ard, arp ); | 192 | qwsSetKeyboardAutoRepeat( ard, arp ); |
193 | 193 | ||
194 | QString layout = config.readEntry( "Layout", "us101" ); | 194 | QString layout = config.readEntry( "Layout", "us101" ); |
195 | Server::setKeyboardLayout( layout ); | 195 | Server::setKeyboardLayout( layout ); |
196 | } | 196 | } |
197 | 197 | ||
198 | static bool firstUse() | 198 | static bool firstUse() |
199 | { | 199 | { |
200 | bool needFirstUse = FALSE; | 200 | bool needFirstUse = FALSE; |
201 | if ( QWSServer::mouseHandler() && | 201 | if ( QWSServer::mouseHandler() && |
202 | QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { | 202 | QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { |
203 | if ( !QFile::exists( "/etc/pointercal" ) ) | 203 | if ( !QFile::exists( "/etc/pointercal" ) ) |
204 | needFirstUse = TRUE; | 204 | needFirstUse = TRUE; |
205 | } | 205 | } |
206 | 206 | ||
207 | { | 207 | { |
208 | Config config( "qpe" ); | 208 | Config config( "qpe" ); |
209 | config.setGroup( "Startup" ); | 209 | config.setGroup( "Startup" ); |
210 | needFirstUse |= config.readBoolEntry( "FirstUse", TRUE ); | 210 | needFirstUse |= config.readBoolEntry( "FirstUse", TRUE ); |
211 | } | 211 | } |
212 | 212 | ||
213 | if ( !needFirstUse ) | 213 | if ( !needFirstUse ) |
214 | return FALSE; | 214 | return FALSE; |
215 | 215 | ||
216 | FirstUse *fu = new FirstUse(); | 216 | FirstUse *fu = new FirstUse(); |
217 | fu->exec(); | 217 | fu->exec(); |
218 | bool rs = fu->restartNeeded(); | 218 | bool rs = fu->restartNeeded(); |
219 | delete fu; | 219 | delete fu; |
220 | return rs; | 220 | return rs; |
221 | } | 221 | } |
222 | 222 | ||
223 | int initApplication( int argc, char ** argv ) | 223 | int initApplication( int argc, char ** argv ) |
224 | { | 224 | { |
225 | cleanup(); | 225 | cleanup(); |
226 | 226 | ||
227 | 227 | ||
228 | initEnvironment(); | 228 | initEnvironment(); |
229 | 229 | ||
230 | //Don't flicker at startup: | 230 | //Don't flicker at startup: |
231 | #ifdef QWS | 231 | #ifdef QWS |
232 | QWSServer::setDesktopBackground( QImage() ); | 232 | QWSServer::setDesktopBackground( QImage() ); |
233 | #endif | 233 | #endif |
234 | ServerApplication a( argc, argv, QApplication::GuiServer ); | 234 | ServerApplication a( argc, argv, QApplication::GuiServer ); |
235 | 235 | ||
236 | refreshTimeZoneConfig(); | 236 | refreshTimeZoneConfig(); |
237 | 237 | ||
238 | initKeyboard(); | 238 | initKeyboard(); |
239 | 239 | ||
240 | // Don't use first use under Windows | 240 | // Don't use first use under Windows |
241 | if ( firstUse() ) { | 241 | if ( firstUse() ) { |
242 | a.restart(); | 242 | a.restart(); |
243 | return 0; | 243 | return 0; |
244 | } | 244 | } |
245 | 245 | ||
246 | ODevice::inst ( )-> setSoftSuspend ( true ); | 246 | ODevice::inst ( )-> setSoftSuspend ( true ); |
247 | 247 | ||
248 | { | 248 | { |
249 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); | 249 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); |
250 | e << -3; // Forced on | 250 | e << -3; // Forced on |
251 | } | 251 | } |
252 | 252 | ||
253 | AlarmServer::initialize(); | 253 | AlarmServer::initialize(); |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | Server *s = new Server(); | 257 | Server *s = new Server(); |
258 | 258 | ||
259 | (void)new SysFileMonitor(s); | 259 | (void)new SysFileMonitor(s); |
260 | #ifdef QWS | 260 | #ifdef QWS |
261 | Network::createServer(s); | 261 | Network::createServer(s); |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | s->show(); | 264 | s->show(); |
265 | 265 | ||
266 | /* THE ARM rtc has problem holdings the time on reset */ | 266 | /* THE ARM rtc has problem holdings the time on reset */ |
267 | if ( QDate::currentDate ( ). year ( ) < 2000 ) { | 267 | if ( QDate::currentDate ( ). year ( ) < 2000 ) { |
268 | if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { | 268 | if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { |
269 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); | 269 | QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); |
270 | e << QString ( ); | 270 | e << QString ( ); |
271 | } | 271 | } |
272 | } | 272 | } |
273 | 273 | ||
274 | int rv = a.exec(); | 274 | int rv = a.exec(); |
275 | 275 | ||
276 | qDebug("exiting..."); | 276 | qDebug("exiting..."); |
277 | delete s; | 277 | delete s; |
278 | 278 | ||
279 | #ifndef Q_OS_MACX | ||
279 | ODevice::inst()->setSoftSuspend( false ); | 280 | ODevice::inst()->setSoftSuspend( false ); |
281 | #endif | ||
280 | 282 | ||
281 | return rv; | 283 | return rv; |
282 | } | 284 | } |
283 | 285 | ||
284 | static const char *pidfile_path = "/var/run/opie.pid"; | 286 | static const char *pidfile_path = "/var/run/opie.pid"; |
285 | 287 | ||
286 | void create_pidfile ( ) | 288 | void create_pidfile ( ) |
287 | { | 289 | { |
288 | FILE *f; | 290 | FILE *f; |
289 | 291 | ||
290 | if (( f = ::fopen ( pidfile_path, "w" ))) { | 292 | if (( f = ::fopen ( pidfile_path, "w" ))) { |
291 | ::fprintf ( f, "%d", getpid ( )); | 293 | ::fprintf ( f, "%d", getpid ( )); |
292 | ::fclose ( f ); | 294 | ::fclose ( f ); |
293 | } | 295 | } |
294 | } | 296 | } |
295 | 297 | ||
296 | void remove_pidfile ( ) | 298 | void remove_pidfile ( ) |
297 | { | 299 | { |
298 | ::unlink ( pidfile_path ); | 300 | ::unlink ( pidfile_path ); |
299 | } | 301 | } |
300 | 302 | ||
301 | void handle_sigterm ( int /* sig */ ) | 303 | void handle_sigterm ( int /* sig */ ) |
302 | { | 304 | { |
303 | if ( qApp ) | 305 | if ( qApp ) |
304 | qApp-> quit ( ); | 306 | qApp-> quit ( ); |
305 | } | 307 | } |
306 | 308 | ||
307 | #ifndef Q_OS_WIN32 | 309 | #ifndef Q_OS_WIN32 |
308 | int main( int argc, char ** argv ) | 310 | int main( int argc, char ** argv ) |
309 | { | 311 | { |
310 | 312 | ||
311 | ::signal ( SIGCHLD, SIG_IGN ); | 313 | ::signal ( SIGCHLD, SIG_IGN ); |
312 | 314 | ||
313 | ::signal ( SIGTERM, handle_sigterm ); | 315 | ::signal ( SIGTERM, handle_sigterm ); |
314 | ::signal ( SIGINT, handle_sigterm ); | 316 | ::signal ( SIGINT, handle_sigterm ); |
315 | 317 | ||
316 | ::setsid ( ); | 318 | ::setsid ( ); |
317 | ::setpgid ( 0, 0 ); | 319 | ::setpgid ( 0, 0 ); |
318 | 320 | ||
319 | ::atexit ( remove_pidfile ); | 321 | ::atexit ( remove_pidfile ); |
320 | create_pidfile ( ); | 322 | create_pidfile ( ); |
321 | 323 | ||
322 | int retVal = initApplication( argc, argv ); | 324 | int retVal = initApplication( argc, argv ); |
323 | 325 | ||
324 | // Have we been asked to restart? | 326 | // Have we been asked to restart? |
325 | if ( ServerApplication::doRestart ) { | 327 | if ( ServerApplication::doRestart ) { |
326 | for ( int fd = 3; fd < 100; fd++ ) | 328 | for ( int fd = 3; fd < 100; fd++ ) |
327 | close( fd ); | 329 | close( fd ); |
328 | 330 | ||
329 | execl( (QPEApplication::qpeDir()+"bin/qpe").latin1(), "qpe", 0 ); | 331 | execl( (QPEApplication::qpeDir()+"bin/qpe").latin1(), "qpe", 0 ); |
330 | } | 332 | } |
331 | 333 | ||
332 | // Kill them. Kill them all. | 334 | // Kill them. Kill them all. |
333 | ::kill ( 0, SIGTERM ); | 335 | ::kill ( 0, SIGTERM ); |
334 | ::sleep ( 1 ); | 336 | ::sleep ( 1 ); |
335 | ::kill ( 0, SIGKILL ); | 337 | ::kill ( 0, SIGKILL ); |
336 | 338 | ||
337 | return retVal; | 339 | return retVal; |
338 | } | 340 | } |
339 | #else | 341 | #else |
340 | 342 | ||
341 | int main( int argc, char ** argv ) | 343 | int main( int argc, char ** argv ) |
342 | { | 344 | { |
343 | int retVal = initApplication( argc, argv ); | 345 | int retVal = initApplication( argc, argv ); |
344 | 346 | ||
345 | if ( DesktopApplication::doRestart ) { | 347 | if ( DesktopApplication::doRestart ) { |
346 | qDebug("Trying to restart"); | 348 | qDebug("Trying to restart"); |
347 | execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); | 349 | execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); |
348 | } | 350 | } |
349 | 351 | ||
350 | return retVal; | 352 | return retVal; |
351 | } | 353 | } |
352 | 354 | ||
353 | #endif | 355 | #endif |
354 | 356 | ||
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp index 4f149a5..bf34368 100644 --- a/core/launcher/packageslave.cpp +++ b/core/launcher/packageslave.cpp | |||
@@ -1,97 +1,341 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "packageslave.h" | 21 | #include "packageslave.h" |
22 | #include <qtopia/qprocess.h> | ||
22 | 23 | ||
23 | #include <qpe/process.h> | 24 | #ifdef Q_WS_QWS |
24 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qtopia/qcopenvelope_qws.h> |
26 | #endif | ||
25 | 27 | ||
26 | #include <qdatastream.h> | 28 | #include <qdatastream.h> |
29 | #ifdef Q_WS_QWS | ||
27 | #include <qcopchannel_qws.h> | 30 | #include <qcopchannel_qws.h> |
31 | #endif | ||
28 | 32 | ||
33 | #include <qtextstream.h> | ||
34 | #include <qdir.h> | ||
35 | |||
36 | #include <stdlib.h> | ||
37 | #include <sys/stat.h> // mkdir() | ||
38 | |||
39 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | ||
29 | #include <unistd.h> | 40 | #include <unistd.h> |
41 | #include <sys/vfs.h> | ||
42 | #include <mntent.h> | ||
43 | #elif defined(Q_OS_WIN32) | ||
44 | #include <windows.h> | ||
45 | #include <winbase.h> | ||
46 | #elif defined(Q_OS_MACX) | ||
47 | #include <unistd.h> | ||
48 | #endif | ||
49 | |||
30 | 50 | ||
31 | PackageSlave::PackageSlave( QObject *parent, char* name ) | 51 | PackageHandler::PackageHandler( QObject *parent, char* name ) |
32 | : QObject( parent, name ), packageChannel( 0 ) | 52 | : QObject( parent, name ), packageChannel( 0 ), currentProcess( 0 ), mNoSpaceLeft( FALSE ) |
33 | { | 53 | { |
34 | // setup qcop channel | 54 | // setup qcop channel |
55 | #ifndef QT_NO_COP | ||
35 | packageChannel = new QCopChannel( "QPE/Package", this ); | 56 | packageChannel = new QCopChannel( "QPE/Package", this ); |
36 | connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), | 57 | connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), |
37 | this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); | 58 | this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); |
59 | #endif | ||
38 | } | 60 | } |
39 | 61 | ||
40 | void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) | 62 | void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data ) |
41 | { | 63 | { |
42 | QDataStream stream( data, IO_ReadOnly ); | 64 | QDataStream stream( data, IO_ReadOnly ); |
43 | 65 | ||
44 | if ( msg == "installPackage(QString)" ) { | 66 | if ( msg == "installPackage(QString)" ) { |
45 | QString file; | 67 | QString file; |
46 | stream >> file; | 68 | stream >> file; |
47 | installPackage( file ); | 69 | installPackage( file ); |
48 | } | 70 | } else if ( msg == "removePackage(QString)" ) { |
49 | else if ( msg == "removePackage(QString)" ) { | ||
50 | QString file; | 71 | QString file; |
51 | stream >> file; | 72 | stream >> file; |
52 | removePackage( file ); | 73 | removePackage( file ); |
74 | } else if ( msg == "addPackageFiles(QString,QString)" ) { | ||
75 | QString location, listfile; | ||
76 | stream >> location >> listfile; | ||
77 | addPackageFiles( location, listfile); | ||
78 | } else if ( msg == "addPackages(QString)" ) { | ||
79 | QString location; | ||
80 | stream >> location; | ||
81 | addPackages( location ); | ||
82 | } else if ( msg == "cleanupPackageFiles(QString)" ) { | ||
83 | QString listfile; | ||
84 | stream >> listfile; | ||
85 | cleanupPackageFiles( listfile ); | ||
86 | } else if ( msg == "cleanupPackages(QString)" ) { | ||
87 | QString location; | ||
88 | stream >> location; | ||
89 | cleanupPackages( location ); | ||
90 | } else if ( msg == "prepareInstall(QString,QString)" ) { | ||
91 | QString size, path; | ||
92 | stream >> size; | ||
93 | stream >> path; | ||
94 | prepareInstall( size, path ); | ||
53 | } | 95 | } |
54 | } | 96 | } |
55 | 97 | ||
56 | void PackageSlave::installPackage( const QString &package ) | 98 | void PackageHandler::installPackage( const QString &package ) |
57 | { | 99 | { |
58 | Process proc( QStringList() << "ipkg" << "install" << package ); | 100 | if ( mNoSpaceLeft ) { |
101 | mNoSpaceLeft = FALSE; | ||
102 | // Don't emit that for now, I still couldn't test it (Wener) | ||
103 | //sendReply( "installFailed(QString)", package ); | ||
104 | //return; | ||
105 | } | ||
106 | |||
107 | currentProcess = new QProcess( QStringList() << "ipkg" << "install" << package ); // No tr | ||
108 | connect( currentProcess, SIGNAL( processExited() ), SLOT( iProcessExited() ) ); | ||
109 | connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); | ||
110 | connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); | ||
111 | currentPackage = package; | ||
59 | 112 | ||
113 | currentProcessError=""; | ||
60 | sendReply( "installStarted(QString)", package ); | 114 | sendReply( "installStarted(QString)", package ); |
115 | currentProcess->start(); | ||
116 | } | ||
117 | |||
118 | void PackageHandler::removePackage( const QString &package ) | ||
119 | { | ||
120 | currentProcess = new QProcess( QStringList() << "ipkg" << "remove" << package ); // No tr | ||
121 | connect( currentProcess, SIGNAL( processExited() ), SLOT( rmProcessExited() ) ); | ||
122 | connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) ); | ||
123 | connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) ); | ||
124 | currentPackage = package; | ||
125 | |||
126 | currentProcessError=""; | ||
127 | sendReply( "removeStarted(QString)", package ); | ||
128 | currentProcess->start(); | ||
129 | } | ||
130 | |||
131 | void PackageHandler::sendReply( const QCString& msg, const QString& arg ) | ||
132 | { | ||
133 | #ifndef QT_NO_COP | ||
134 | QCopEnvelope e( "QPE/Desktop", msg ); | ||
135 | e << arg; | ||
136 | #endif | ||
137 | } | ||
138 | |||
139 | void PackageHandler::addPackageFiles( const QString &location, | ||
140 | const QString &listfile ) | ||
141 | { | ||
142 | QFile f(listfile); | ||
143 | #ifndef Q_OS_WIN32 | ||
144 | //make a copy so we can remove the symlinks later | ||
145 | mkdir( ("/usr/lib/ipkg/info/"+location).ascii(), 0777 ); | ||
146 | system(("cp " + f.name() + " /usr/lib/ipkg/info/"+location).ascii()); | ||
147 | #else | ||
148 | QDir d; | ||
149 | //#### revise | ||
150 | qDebug("Copy file at %s: %s", __FILE__, __LINE__ ); | ||
151 | d.mkdir(("/usr/lib/ipkg/info/" + location).ascii()); | ||
152 | system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii()); | ||
153 | #endif | ||
154 | |||
155 | |||
156 | if ( f.open(IO_ReadOnly) ) { | ||
157 | QTextStream ts(&f); | ||
158 | |||
159 | QString s; | ||
160 | while ( !ts.eof() ) { // until end of file... | ||
161 | s = ts.readLine(); // line of text excluding '\n' | ||
162 | // for s, do link/mkdir. | ||
163 | if ( s.right(1) == "/" ) { | ||
164 | qDebug("do mkdir for %s", s.ascii()); | ||
165 | #ifndef Q_OS_WIN32 | ||
166 | mkdir( s.ascii(), 0777 ); | ||
167 | //possible optimization: symlink directories | ||
168 | //that don't exist already. -- Risky. | ||
169 | #else | ||
170 | d.mkdir( s.ascii()); | ||
171 | #endif | ||
172 | |||
173 | } else { | ||
174 | #ifndef Q_OS_WIN32 | ||
175 | qDebug("do symlink for %s", s.ascii()); | ||
176 | symlink( (location + s).ascii(), s.ascii() ); | ||
177 | #else | ||
178 | qDebug("Copy file instead of a symlink for WIN32"); | ||
179 | if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE)) | ||
180 | qWarning("Unable to create symlinkfor %s", | ||
181 | (location + s).ascii()); | ||
182 | #endif | ||
183 | } | ||
184 | } | ||
185 | f.close(); | ||
186 | } | ||
187 | } | ||
61 | 188 | ||
62 | QString output; | 189 | void PackageHandler::addPackages( const QString &location ) |
63 | if ( proc.exec( "", output ) ) { | 190 | { |
64 | sendReply( "installDone(QString)", package ); | 191 | // get list of *.list in location/usr/lib/ipkg/info/*.list |
192 | QDir dir(location + "/usr/lib/ipkg/info", "*.list", // No tr | ||
193 | QDir::Name, QDir::Files); | ||
194 | if ( !dir.exists() ) | ||
195 | return; | ||
196 | |||
197 | QStringList packages = dir.entryList(); | ||
198 | for ( QStringList::Iterator it = packages.begin(); | ||
199 | it != packages.end(); ++it ) { | ||
200 | addPackageFiles( location, *it ); | ||
65 | } | 201 | } |
202 | } | ||
203 | |||
204 | |||
205 | void PackageHandler::cleanupPackageFiles( const QString &listfile ) | ||
206 | { | ||
207 | QFile f(listfile); | ||
208 | |||
209 | if ( f.open(IO_ReadOnly) ) { | ||
210 | QTextStream ts(&f); | ||
211 | |||
212 | QString s; | ||
213 | while ( !ts.eof() ) { // until end of file... | ||
214 | s = ts.readLine(); // line of text excluding '\n' | ||
215 | // for s, do link/mkdir. | ||
216 | if ( s.right(1) == "/" ) { | ||
217 | //should rmdir if empty, after all files have been removed | ||
218 | } else { | ||
219 | #ifndef Q_OS_WIN32 | ||
220 | qDebug("remove symlink for %s", s.ascii()); | ||
221 | //check if it is a symlink first (don't remove /etc/passwd...) | ||
222 | char buf[10]; //we don't care about the contents | ||
223 | if ( ::readlink( s.ascii(),buf, 10 >= 0 ) ) | ||
224 | ::unlink( s.ascii() ); | ||
225 | #else | ||
226 | // ### revise | ||
227 | qWarning("Unable to remove symlink %s:%s", __FILE__, __LINE__); | ||
228 | #endif | ||
229 | } | ||
230 | } | ||
231 | f.close(); | ||
232 | |||
233 | //remove the list file | ||
234 | ::unlink( listfile.ascii() ); | ||
235 | |||
236 | } | ||
237 | } | ||
238 | |||
239 | void PackageHandler::cleanupPackages( const QString &location ) | ||
240 | { | ||
241 | // get list of *.list in location/usr/lib/ipkg/info/*.list | ||
242 | QDir dir( "/usr/lib/ipkg/info/"+location, "*.list", // No tr | ||
243 | QDir::Name, QDir::Files); | ||
244 | if ( !dir.exists() ) | ||
245 | return; | ||
246 | |||
247 | QStringList packages = dir.entryList(); | ||
248 | for ( QStringList::Iterator it = packages.begin(); | ||
249 | it != packages.end(); ++it ) { | ||
250 | cleanupPackageFiles( *it ); | ||
251 | } | ||
252 | |||
253 | //remove the backup directory | ||
254 | //### | ||
255 | } | ||
256 | |||
257 | void PackageHandler::prepareInstall( const QString& size, const QString& path ) | ||
258 | { | ||
259 | // Check whether there will be enough space to install the next package. | ||
260 | bool ok; | ||
261 | unsigned int s = size.toUInt( &ok ); | ||
262 | |||
263 | if ( !ok ) | ||
264 | return; | ||
265 | |||
266 | // Shamelessly stolen from the sysinfo application (Werner) | ||
267 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | ||
268 | struct statfs fs; | ||
269 | if ( statfs( path.latin1(), &fs ) == 0 ) | ||
270 | if ( s > fs.f_bsize * fs.f_bavail ) { | ||
271 | //qDebug("############### Not enough space left ###############"); | ||
272 | mNoSpaceLeft = TRUE; | ||
273 | } | ||
274 | #endif | ||
275 | } | ||
276 | |||
277 | void PackageHandler::iProcessExited() | ||
278 | { | ||
279 | if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 ) | ||
280 | sendReply( "installDone(QString)", currentPackage ); | ||
66 | else { | 281 | else { |
67 | sendReply( "installFailed(QString)", package ); | 282 | #ifndef QT_NO_COP |
283 | QCopEnvelope e( "QPE/Desktop", "installFailed(QString,int,QString)" ); | ||
284 | e << currentPackage << currentProcess->exitStatus() | ||
285 | << currentProcessError; | ||
286 | #endif | ||
68 | } | 287 | } |
288 | |||
289 | delete currentProcess; | ||
290 | currentProcess = 0; | ||
291 | |||
292 | #ifndef QT_NO_COP | ||
69 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 293 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
70 | QString lf = QString::null; | 294 | QString lf = QString::null; |
71 | e << lf; | 295 | e << lf; |
72 | unlink( package ); | 296 | #endif |
297 | unlink( currentPackage ); | ||
73 | } | 298 | } |
74 | 299 | ||
75 | void PackageSlave::removePackage( const QString &package ) | 300 | void PackageHandler::rmProcessExited() |
76 | { | 301 | { |
77 | Process proc( QStringList() << "ipkg" << "remove" << package ); | 302 | if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 ) |
303 | sendReply( "removeDone(QString)", currentPackage ); | ||
304 | else | ||
305 | sendReply( "removeFailed(QString)", currentPackage ); | ||
78 | 306 | ||
79 | sendReply( "removeStarted(QString)", package ); | 307 | #ifndef QT_NO_COP |
80 | |||
81 | QString output; | ||
82 | if ( proc.exec( "", output ) ) { | ||
83 | sendReply( "removeDone(QString)", package ); | ||
84 | } | ||
85 | else { | ||
86 | sendReply( "removeFailed(QString)", package ); | ||
87 | } | ||
88 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); | 308 | QCopEnvelope e("QPE/System", "linkChanged(QString)"); |
89 | QString lf = QString::null; | 309 | QString lf = QString::null; |
90 | e << lf; | 310 | e << lf; |
311 | #endif | ||
91 | } | 312 | } |
92 | 313 | ||
93 | void PackageSlave::sendReply( const QCString& msg, const QString& arg ) | 314 | void PackageHandler::readyReadStdout() |
94 | { | 315 | { |
95 | QCopEnvelope e( "QPE/Desktop", msg ); | 316 | while ( currentProcess->canReadLineStdout() ) { |
96 | e << arg; | 317 | QString line = currentProcess->readLineStdout(); |
318 | currentProcessError.append("OUT:"+line); | ||
319 | if ( line.contains( "Unpacking" ) ) // No tr | ||
320 | sendReply( "installStep(QString)", "one" ); // No tr | ||
321 | else if ( line.contains( "Configuring" ) ) // No tr | ||
322 | sendReply( "installStep(QString)", "two" ); // No tr | ||
323 | } | ||
324 | } | ||
325 | |||
326 | void PackageHandler::readyReadStderr() | ||
327 | { | ||
328 | while ( currentProcess->canReadLineStderr() ) { | ||
329 | QString line = currentProcess->readLineStderr(); | ||
330 | currentProcessError.append("ERR:"+line); | ||
331 | } | ||
332 | } | ||
333 | |||
334 | void PackageHandler::redoPackages() | ||
335 | { | ||
336 | //get list of filesystems | ||
337 | |||
338 | //call cleanupPackages for the ones that have disappeared | ||
339 | |||
340 | //call addPackageFiles for the new ones | ||
97 | } | 341 | } |
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp index a07bf64..19a8c93 100644 --- a/core/launcher/qprocess_unix.cpp +++ b/core/launcher/qprocess_unix.cpp | |||
@@ -1,180 +1,183 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | //#include "qplatformdefs.h" | 21 | //#include "qplatformdefs.h" |
22 | 22 | ||
23 | // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. | 23 | // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. |
24 | #if defined(connect) | 24 | #if defined(connect) |
25 | #undef connect | 25 | #undef connect |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include "qprocess.h" | 28 | #include "qprocess.h" |
29 | 29 | ||
30 | #ifndef QT_NO_PROCESS | 30 | #ifndef QT_NO_PROCESS |
31 | 31 | ||
32 | #include "qapplication.h" | 32 | #include "qapplication.h" |
33 | #include "qqueue.h" | 33 | #include "qqueue.h" |
34 | #include "qlist.h" | 34 | #include "qlist.h" |
35 | #include "qsocketnotifier.h" | 35 | #include "qsocketnotifier.h" |
36 | #include "qtimer.h" | 36 | #include "qtimer.h" |
37 | #include "qregexp.h" | 37 | #include "qregexp.h" |
38 | 38 | ||
39 | #include "qcleanuphandler_p.h" | 39 | #include "qcleanuphandler_p.h" |
40 | 40 | ||
41 | #include <stdlib.h> | 41 | #include <stdlib.h> |
42 | 42 | ||
43 | // ### FOR Qt 2.3 compat | 43 | // ### FOR Qt 2.3 compat |
44 | #include <unistd.h> | 44 | #include <unistd.h> |
45 | #include <signal.h> | 45 | #include <signal.h> |
46 | #include <sys/socket.h> | 46 | #include <sys/socket.h> |
47 | #include <sys/ioctl.h> | 47 | #include <sys/ioctl.h> |
48 | #include <sys/wait.h> | 48 | #include <sys/wait.h> |
49 | #include <sys/fcntl.h> | 49 | #include <sys/fcntl.h> |
50 | 50 | ||
51 | #include <errno.h> | 51 | #include <errno.h> |
52 | 52 | ||
53 | #ifdef Q_OS_MACX | ||
54 | #include <sys/time.h> | ||
55 | #endif | ||
53 | #include <sys/resource.h> | 56 | #include <sys/resource.h> |
54 | 57 | ||
55 | #ifdef __MIPSEL__ | 58 | #ifdef __MIPSEL__ |
56 | # ifndef SOCK_DGRAM | 59 | # ifndef SOCK_DGRAM |
57 | # define SOCK_DGRAM 1 | 60 | # define SOCK_DGRAM 1 |
58 | # endif | 61 | # endif |
59 | # ifndef SOCK_STREAM | 62 | # ifndef SOCK_STREAM |
60 | # define SOCK_STREAM 2 | 63 | # define SOCK_STREAM 2 |
61 | # endif | 64 | # endif |
62 | #endif | 65 | #endif |
63 | 66 | ||
64 | //#define QT_QPROCESS_DEBUG | 67 | //#define QT_QPROCESS_DEBUG |
65 | 68 | ||
66 | 69 | ||
67 | #ifdef Q_C_CALLBACKS | 70 | #ifdef Q_C_CALLBACKS |
68 | extern "C" { | 71 | extern "C" { |
69 | #endif // Q_C_CALLBACKS | 72 | #endif // Q_C_CALLBACKS |
70 | 73 | ||
71 | #define QT_SIGNAL_RETTYPE void | 74 | #define QT_SIGNAL_RETTYPE void |
72 | #define QT_SIGNAL_ARGS int | 75 | #define QT_SIGNAL_ARGS int |
73 | #define QT_SIGNAL_IGNORE SIG_IGN | 76 | #define QT_SIGNAL_IGNORE SIG_IGN |
74 | 77 | ||
75 | QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); | 78 | QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); |
76 | QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); | 79 | QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); |
77 | 80 | ||
78 | #ifdef Q_C_CALLBACKS | 81 | #ifdef Q_C_CALLBACKS |
79 | } | 82 | } |
80 | #endif // Q_C_CALLBACKS | 83 | #endif // Q_C_CALLBACKS |
81 | 84 | ||
82 | 85 | ||
83 | class QProc; | 86 | class QProc; |
84 | class QProcessManager; | 87 | class QProcessManager; |
85 | class QProcessPrivate | 88 | class QProcessPrivate |
86 | { | 89 | { |
87 | public: | 90 | public: |
88 | QProcessPrivate(); | 91 | QProcessPrivate(); |
89 | ~QProcessPrivate(); | 92 | ~QProcessPrivate(); |
90 | 93 | ||
91 | void closeOpenSocketsForChild(); | 94 | void closeOpenSocketsForChild(); |
92 | void newProc( pid_t pid, QProcess *process ); | 95 | void newProc( pid_t pid, QProcess *process ); |
93 | 96 | ||
94 | QByteArray bufStdout; | 97 | QByteArray bufStdout; |
95 | QByteArray bufStderr; | 98 | QByteArray bufStderr; |
96 | 99 | ||
97 | QQueue<QByteArray> stdinBuf; | 100 | QQueue<QByteArray> stdinBuf; |
98 | 101 | ||
99 | QSocketNotifier *notifierStdin; | 102 | QSocketNotifier *notifierStdin; |
100 | QSocketNotifier *notifierStdout; | 103 | QSocketNotifier *notifierStdout; |
101 | QSocketNotifier *notifierStderr; | 104 | QSocketNotifier *notifierStderr; |
102 | 105 | ||
103 | ssize_t stdinBufRead; | 106 | ssize_t stdinBufRead; |
104 | QProc *proc; | 107 | QProc *proc; |
105 | 108 | ||
106 | bool exitValuesCalculated; | 109 | bool exitValuesCalculated; |
107 | bool socketReadCalled; | 110 | bool socketReadCalled; |
108 | 111 | ||
109 | static QProcessManager *procManager; | 112 | static QProcessManager *procManager; |
110 | }; | 113 | }; |
111 | 114 | ||
112 | 115 | ||
113 | /*********************************************************************** | 116 | /*********************************************************************** |
114 | * | 117 | * |
115 | * QProc | 118 | * QProc |
116 | * | 119 | * |
117 | **********************************************************************/ | 120 | **********************************************************************/ |
118 | /* | 121 | /* |
119 | The class QProcess does not necessarily map exactly to the running | 122 | The class QProcess does not necessarily map exactly to the running |
120 | child processes: if the process is finished, the QProcess class may still be | 123 | child processes: if the process is finished, the QProcess class may still be |
121 | there; furthermore a user can use QProcess to start more than one process. | 124 | there; furthermore a user can use QProcess to start more than one process. |
122 | 125 | ||
123 | The helper-class QProc has the semantics that one instance of this class maps | 126 | The helper-class QProc has the semantics that one instance of this class maps |
124 | directly to a running child process. | 127 | directly to a running child process. |
125 | */ | 128 | */ |
126 | class QProc | 129 | class QProc |
127 | { | 130 | { |
128 | public: | 131 | public: |
129 | QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc) | 132 | QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc) |
130 | { | 133 | { |
131 | #if defined(QT_QPROCESS_DEBUG) | 134 | #if defined(QT_QPROCESS_DEBUG) |
132 | qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process ); | 135 | qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process ); |
133 | #endif | 136 | #endif |
134 | socketStdin = 0; | 137 | socketStdin = 0; |
135 | socketStdout = 0; | 138 | socketStdout = 0; |
136 | socketStderr = 0; | 139 | socketStderr = 0; |
137 | } | 140 | } |
138 | ~QProc() | 141 | ~QProc() |
139 | { | 142 | { |
140 | #if defined(QT_QPROCESS_DEBUG) | 143 | #if defined(QT_QPROCESS_DEBUG) |
141 | qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process ); | 144 | qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process ); |
142 | #endif | 145 | #endif |
143 | if ( process != 0 ) { | 146 | if ( process != 0 ) { |
144 | if ( process->d->notifierStdin ) | 147 | if ( process->d->notifierStdin ) |
145 | process->d->notifierStdin->setEnabled( FALSE ); | 148 | process->d->notifierStdin->setEnabled( FALSE ); |
146 | if ( process->d->notifierStdout ) | 149 | if ( process->d->notifierStdout ) |
147 | process->d->notifierStdout->setEnabled( FALSE ); | 150 | process->d->notifierStdout->setEnabled( FALSE ); |
148 | if ( process->d->notifierStderr ) | 151 | if ( process->d->notifierStderr ) |
149 | process->d->notifierStderr->setEnabled( FALSE ); | 152 | process->d->notifierStderr->setEnabled( FALSE ); |
150 | process->d->proc = 0; | 153 | process->d->proc = 0; |
151 | } | 154 | } |
152 | if( socketStdin != 0 ) | 155 | if( socketStdin != 0 ) |
153 | ::close( socketStdin ); | 156 | ::close( socketStdin ); |
154 | // ### close these sockets even on parent exit or is it better only on | 157 | // ### close these sockets even on parent exit or is it better only on |
155 | // sigchld (but what do I have to do with them on exit then)? | 158 | // sigchld (but what do I have to do with them on exit then)? |
156 | if( socketStdout != 0 ) | 159 | if( socketStdout != 0 ) |
157 | ::close( socketStdout ); | 160 | ::close( socketStdout ); |
158 | if( socketStderr != 0 ) | 161 | if( socketStderr != 0 ) |
159 | ::close( socketStderr ); | 162 | ::close( socketStderr ); |
160 | } | 163 | } |
161 | 164 | ||
162 | pid_t pid; | 165 | pid_t pid; |
163 | int socketStdin; | 166 | int socketStdin; |
164 | int socketStdout; | 167 | int socketStdout; |
165 | int socketStderr; | 168 | int socketStderr; |
166 | QProcess *process; | 169 | QProcess *process; |
167 | }; | 170 | }; |
168 | 171 | ||
169 | /*********************************************************************** | 172 | /*********************************************************************** |
170 | * | 173 | * |
171 | * QProcessManager | 174 | * QProcessManager |
172 | * | 175 | * |
173 | **********************************************************************/ | 176 | **********************************************************************/ |
174 | class QProcessManager : public QObject | 177 | class QProcessManager : public QObject |
175 | { | 178 | { |
176 | Q_OBJECT | 179 | Q_OBJECT |
177 | 180 | ||
178 | public: | 181 | public: |
179 | QProcessManager(); | 182 | QProcessManager(); |
180 | ~QProcessManager(); | 183 | ~QProcessManager(); |
diff --git a/core/launcher/server.pro b/core/launcher/server.pro index 93baeb4..0513536 100644 --- a/core/launcher/server.pro +++ b/core/launcher/server.pro | |||
@@ -1,120 +1,125 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | 2 | ||
3 | CONFIG += qtopia warn_on release | 3 | CONFIG += qtopia warn_on release |
4 | 4 | ||
5 | DESTDIR = $$(OPIEDIR)/bin | 5 | DESTDIR = $$(OPIEDIR)/bin |
6 | 6 | ||
7 | HEADERS += server.h \ | 7 | HEADERS += server.h \ |
8 | serverinterface.h \ | 8 | serverinterface.h \ |
9 | launchertab.h \ | 9 | launchertab.h \ |
10 | documentlist.h \ | 10 | documentlist.h \ |
11 | appicons.h \ | 11 | appicons.h \ |
12 | taskbar.h \ | 12 | taskbar.h \ |
13 | runningappbar.h \ | 13 | runningappbar.h \ |
14 | applauncher.h \ | 14 | applauncher.h \ |
15 | stabmon.h \ | 15 | stabmon.h \ |
16 | inputmethods.h \ | 16 | inputmethods.h \ |
17 | systray.h \ | 17 | systray.h \ |
18 | wait.h \ | 18 | wait.h \ |
19 | shutdownimpl.h \ | 19 | shutdownimpl.h \ |
20 | launcher.h \ | 20 | launcher.h \ |
21 | launcherview.h \ | 21 | launcherview.h \ |
22 | $$(OPIEDIR)/core/apps/calibrate/calibrate.h \ | 22 | $$(OPIEDIR)/core/apps/calibrate/calibrate.h \ |
23 | startmenu.h \ | 23 | startmenu.h \ |
24 | transferserver.h \ | 24 | transferserver.h \ |
25 | qcopbridge.h \ | 25 | qcopbridge.h \ |
26 | packageslave.h \ | 26 | packageslave.h \ |
27 | irserver.h \ | 27 | irserver.h \ |
28 | firstuse.h \ | 28 | firstuse.h \ |
29 | $$(OPIEDIR)/rsync/buf.h \ | 29 | $$(OPIEDIR)/rsync/buf.h \ |
30 | $$(OPIEDIR)/rsync/checksum.h \ | 30 | $$(OPIEDIR)/rsync/checksum.h \ |
31 | $$(OPIEDIR)/rsync/command.h \ | 31 | $$(OPIEDIR)/rsync/command.h \ |
32 | $$(OPIEDIR)/rsync/emit.h \ | 32 | $$(OPIEDIR)/rsync/emit.h \ |
33 | $$(OPIEDIR)/rsync/job.h \ | 33 | $$(OPIEDIR)/rsync/job.h \ |
34 | $$(OPIEDIR)/rsync/netint.h \ | 34 | $$(OPIEDIR)/rsync/netint.h \ |
35 | $$(OPIEDIR)/rsync/protocol.h \ | 35 | $$(OPIEDIR)/rsync/protocol.h \ |
36 | $$(OPIEDIR)/rsync/prototab.h \ | 36 | $$(OPIEDIR)/rsync/prototab.h \ |
37 | $$(OPIEDIR)/rsync/rsync.h \ | 37 | $$(OPIEDIR)/rsync/rsync.h \ |
38 | $$(OPIEDIR)/rsync/search.h \ | 38 | $$(OPIEDIR)/rsync/search.h \ |
39 | $$(OPIEDIR)/rsync/stream.h \ | 39 | $$(OPIEDIR)/rsync/stream.h \ |
40 | $$(OPIEDIR)/rsync/sumset.h \ | 40 | $$(OPIEDIR)/rsync/sumset.h \ |
41 | $$(OPIEDIR)/rsync/trace.h \ | 41 | $$(OPIEDIR)/rsync/trace.h \ |
42 | $$(OPIEDIR)/rsync/types.h \ | 42 | $$(OPIEDIR)/rsync/types.h \ |
43 | $$(OPIEDIR)/rsync/util.h \ | 43 | $$(OPIEDIR)/rsync/util.h \ |
44 | $$(OPIEDIR)/rsync/whole.h \ | 44 | $$(OPIEDIR)/rsync/whole.h \ |
45 | $$(OPIEDIR)/rsync/config_rsync.h \ | 45 | $$(OPIEDIR)/rsync/config_rsync.h \ |
46 | $$(OPIEDIR)/rsync/qrsync.h \ | 46 | $$(OPIEDIR)/rsync/qrsync.h \ |
47 | syncdialog.h \ | 47 | syncdialog.h \ |
48 | serverapp.h \ | 48 | serverapp.h \ |
49 | launcherglobal.h \ | 49 | launcherglobal.h \ |
50 | qprocess.h \ | 50 | qprocess.h \ |
51 | screensaver.h | 51 | screensaver.h |
52 | 52 | ||
53 | SOURCES += server.cpp \ | 53 | SOURCES += server.cpp \ |
54 | serverinterface.cpp \ | 54 | serverinterface.cpp \ |
55 | launchertab.cpp \ | 55 | launchertab.cpp \ |
56 | documentlist.cpp \ | 56 | documentlist.cpp \ |
57 | appicons.cpp \ | 57 | appicons.cpp \ |
58 | taskbar.cpp \ | 58 | taskbar.cpp \ |
59 | runningappbar.cpp \ | 59 | runningappbar.cpp \ |
60 | applauncher.cpp \ | 60 | applauncher.cpp \ |
61 | stabmon.cpp \ | 61 | stabmon.cpp \ |
62 | inputmethods.cpp \ | 62 | inputmethods.cpp \ |
63 | systray.cpp \ | 63 | systray.cpp \ |
64 | wait.cpp \ | 64 | wait.cpp \ |
65 | shutdownimpl.cpp \ | 65 | shutdownimpl.cpp \ |
66 | launcher.cpp \ | 66 | launcher.cpp \ |
67 | launcherview.cpp \ | 67 | launcherview.cpp \ |
68 | $$(OPIEDIR)/core/apps/calibrate/calibrate.cpp \ | 68 | $$(OPIEDIR)/core/apps/calibrate/calibrate.cpp \ |
69 | transferserver.cpp \ | 69 | transferserver.cpp \ |
70 | packageslave.cpp \ | 70 | packageslave.cpp \ |
71 | irserver.cpp \ | 71 | irserver.cpp \ |
72 | qcopbridge.cpp \ | 72 | qcopbridge.cpp \ |
73 | startmenu.cpp \ | 73 | startmenu.cpp \ |
74 | main.cpp \ | 74 | main.cpp \ |
75 | firstuse.cpp \ | 75 | firstuse.cpp \ |
76 | $$(OPIEDIR)/rsync/base64.c \ | 76 | $$(OPIEDIR)/rsync/base64.c \ |
77 | $$(OPIEDIR)/rsync/buf.c \ | 77 | $$(OPIEDIR)/rsync/buf.c \ |
78 | $$(OPIEDIR)/rsync/checksum.c \ | 78 | $$(OPIEDIR)/rsync/checksum.c \ |
79 | $$(OPIEDIR)/rsync/command.c \ | 79 | $$(OPIEDIR)/rsync/command.c \ |
80 | $$(OPIEDIR)/rsync/delta.c \ | 80 | $$(OPIEDIR)/rsync/delta.c \ |
81 | $$(OPIEDIR)/rsync/emit.c \ | 81 | $$(OPIEDIR)/rsync/emit.c \ |
82 | $$(OPIEDIR)/rsync/hex.c \ | 82 | $$(OPIEDIR)/rsync/hex.c \ |
83 | $$(OPIEDIR)/rsync/job.c \ | 83 | $$(OPIEDIR)/rsync/job.c \ |
84 | $$(OPIEDIR)/rsync/mdfour.c \ | 84 | $$(OPIEDIR)/rsync/mdfour.c \ |
85 | $$(OPIEDIR)/rsync/mksum.c \ | 85 | $$(OPIEDIR)/rsync/mksum.c \ |
86 | $$(OPIEDIR)/rsync/msg.c \ | 86 | $$(OPIEDIR)/rsync/msg.c \ |
87 | $$(OPIEDIR)/rsync/netint.c \ | 87 | $$(OPIEDIR)/rsync/netint.c \ |
88 | $$(OPIEDIR)/rsync/patch.c \ | 88 | $$(OPIEDIR)/rsync/patch.c \ |
89 | $$(OPIEDIR)/rsync/prototab.c \ | 89 | $$(OPIEDIR)/rsync/prototab.c \ |
90 | $$(OPIEDIR)/rsync/readsums.c \ | 90 | $$(OPIEDIR)/rsync/readsums.c \ |
91 | $$(OPIEDIR)/rsync/scoop.c \ | 91 | $$(OPIEDIR)/rsync/scoop.c \ |
92 | $$(OPIEDIR)/rsync/search.c \ | 92 | $$(OPIEDIR)/rsync/search.c \ |
93 | $$(OPIEDIR)/rsync/stats.c \ | 93 | $$(OPIEDIR)/rsync/stats.c \ |
94 | $$(OPIEDIR)/rsync/stream.c \ | 94 | $$(OPIEDIR)/rsync/stream.c \ |
95 | $$(OPIEDIR)/rsync/sumset.c \ | 95 | $$(OPIEDIR)/rsync/sumset.c \ |
96 | $$(OPIEDIR)/rsync/trace.c \ | 96 | $$(OPIEDIR)/rsync/trace.c \ |
97 | $$(OPIEDIR)/rsync/tube.c \ | 97 | $$(OPIEDIR)/rsync/tube.c \ |
98 | $$(OPIEDIR)/rsync/util.c \ | 98 | $$(OPIEDIR)/rsync/util.c \ |
99 | $$(OPIEDIR)/rsync/version.c \ | 99 | $$(OPIEDIR)/rsync/version.c \ |
100 | $$(OPIEDIR)/rsync/whole.c \ | 100 | $$(OPIEDIR)/rsync/whole.c \ |
101 | $$(OPIEDIR)/rsync/qrsync.cpp \ | 101 | $$(OPIEDIR)/rsync/qrsync.cpp \ |
102 | syncdialog.cpp \ | 102 | syncdialog.cpp \ |
103 | serverapp.cpp \ | 103 | serverapp.cpp \ |
104 | launcherglobal.cpp \ | 104 | launcherglobal.cpp \ |
105 | qprocess.cpp \ | 105 | qprocess.cpp \ |
106 | qprocess_unix.cpp \ | 106 | qprocess_unix.cpp \ |
107 | screensaver.cpp | 107 | screensaver.cpp |
108 | 108 | ||
109 | 109 | ||
110 | INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate | 110 | INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate |
111 | DEPENDPATH+= $(OPIEDIR)/core/apps/calibrate | 111 | DEPENDPATH+= $(OPIEDIR)/core/apps/calibrate |
112 | 112 | ||
113 | INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync | 113 | INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync |
114 | DEPENDPATH+= $(OPIEDIR)/rsync | 114 | DEPENDPATH+= $(OPIEDIR)/rsync |
115 | 115 | ||
116 | TARGET = qpe | 116 | TARGET = qpe |
117 | 117 | ||
118 | LIBS+= -lcrypt -lqpe -lopie | 118 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) |
119 | contains( CONFTEST, y ){ | ||
120 | LIBS += -lqpe -lopie | ||
121 | }else{ | ||
122 | LIBS+= -lcrypt -lqpe -lopie | ||
123 | } | ||
119 | 124 | ||
120 | include ( $(OPIEDIR)/include.pro ) | 125 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 014418d..08ae885 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp | |||
@@ -131,203 +131,207 @@ void StartMenu::itemSelected( int id ) | |||
131 | } else if ( id >= 20 && id < 20+nother ) { | 131 | } else if ( id >= 20 && id < 20+nother ) { |
132 | other.at(id-20)->execute(); | 132 | other.at(id-20)->execute(); |
133 | }else { | 133 | }else { |
134 | MenuApplet *applet = m_applets.find ( id ); | 134 | MenuApplet *applet = m_applets.find ( id ); |
135 | if ( applet ) { | 135 | if ( applet ) { |
136 | qWarning("activated"); | 136 | qWarning("activated"); |
137 | applet-> iface-> activated(); | 137 | applet-> iface-> activated(); |
138 | } | 138 | } |
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | bool StartMenu::loadMenu( QPopupMenu *menu ) | 142 | bool StartMenu::loadMenu( QPopupMenu *menu ) |
143 | { | 143 | { |
144 | Config cfg("Taskbar"); | 144 | Config cfg("Taskbar"); |
145 | cfg.setGroup("Menu"); | 145 | cfg.setGroup("Menu"); |
146 | 146 | ||
147 | bool ltabs = cfg.readBoolEntry("LauncherTabs",TRUE); | 147 | bool ltabs = cfg.readBoolEntry("LauncherTabs",TRUE); |
148 | bool lot = cfg.readBoolEntry("LauncherOther",TRUE); | 148 | bool lot = cfg.readBoolEntry("LauncherOther",TRUE); |
149 | bool sepfirst = !ltabs && !lot; | 149 | bool sepfirst = !ltabs && !lot; |
150 | 150 | ||
151 | tabs.clear(); | 151 | tabs.clear(); |
152 | other.setAutoDelete(TRUE); | 152 | other.setAutoDelete(TRUE); |
153 | other.clear(); | 153 | other.clear(); |
154 | ntabs = 0; | 154 | ntabs = 0; |
155 | nother = 0; | 155 | nother = 0; |
156 | 156 | ||
157 | bool f=TRUE; | 157 | bool f=TRUE; |
158 | if ( ltabs || lot ) { | 158 | if ( ltabs || lot ) { |
159 | QDir dir( MimeType::appsFolderName(), QString::null, QDir::Name ); | 159 | QDir dir( MimeType::appsFolderName(), QString::null, QDir::Name ); |
160 | for (int i=0; i<(int)dir.count(); i++) { | 160 | for (int i=0; i<(int)dir.count(); i++) { |
161 | QString d = dir[i]; | 161 | QString d = dir[i]; |
162 | Config cfg(dir.path()+"/"+d+"/.directory",Config::File); | 162 | Config cfg(dir.path()+"/"+d+"/.directory",Config::File); |
163 | if ( cfg.isValid() ) { | 163 | if ( cfg.isValid() ) { |
164 | QString nm = cfg.readEntry("Name"); | 164 | QString nm = cfg.readEntry("Name"); |
165 | QString ic = cfg.readEntry("Icon"); | 165 | QString ic = cfg.readEntry("Icon"); |
166 | if ( !!nm && !!ic ) { | 166 | if ( !!nm && !!ic ) { |
167 | tabs.append(d); | 167 | tabs.append(d); |
168 | menu->insertItem( Resource::loadIconSet(ic), nm, ntabs++ ); | 168 | menu->insertItem( Resource::loadIconSet(ic), nm, ntabs++ ); |
169 | } | 169 | } |
170 | } else if ( lot && d.right(8)==".desktop") { | 170 | } else if ( lot && d.right(8)==".desktop") { |
171 | AppLnk* applnk = new AppLnk(dir.path()+"/"+d); | 171 | AppLnk* applnk = new AppLnk(dir.path()+"/"+d); |
172 | if ( applnk->isValid() ) { | 172 | if ( applnk->isValid() ) { |
173 | if ( applnk->type() == "Separator" ) { // No tr | 173 | if ( applnk->type() == "Separator" ) { // No tr |
174 | if ( lot ) { | 174 | if ( lot ) { |
175 | menu->insertSeparator(); | 175 | menu->insertSeparator(); |
176 | sepfirst = f && !ltabs; | 176 | sepfirst = f && !ltabs; |
177 | } | 177 | } |
178 | delete applnk; | 178 | delete applnk; |
179 | } else { | 179 | } else { |
180 | f = FALSE; | 180 | f = FALSE; |
181 | other.append(applnk); | 181 | other.append(applnk); |
182 | menu->insertItem( Resource::loadIconSet(applnk->icon()), | 182 | menu->insertItem( Resource::loadIconSet(applnk->icon()), |
183 | applnk->name(), 20+nother++ ); | 183 | applnk->name(), 20+nother++ ); |
184 | } | 184 | } |
185 | } else { | 185 | } else { |
186 | delete applnk; | 186 | delete applnk; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | } | 189 | } |
190 | 190 | ||
191 | if ( !menu->count() ) | 191 | if ( !menu->count() ) |
192 | sepfirst = TRUE; | 192 | sepfirst = TRUE; |
193 | } | 193 | } |
194 | 194 | ||
195 | launchMenu->setName(sepfirst ? "accessories" : "accessories_need_sep"); // No tr | 195 | launchMenu->setName(sepfirst ? "accessories" : "accessories_need_sep"); // No tr |
196 | 196 | ||
197 | return (nother || ntabs ); | 197 | return (nother || ntabs ); |
198 | } | 198 | } |
199 | 199 | ||
200 | 200 | ||
201 | void StartMenu::launch() | 201 | void StartMenu::launch() |
202 | { | 202 | { |
203 | int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); | 203 | int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); |
204 | 204 | ||
205 | if ( launchMenu->isVisible() ) | 205 | if ( launchMenu->isVisible() ) |
206 | launchMenu->hide(); | 206 | launchMenu->hide(); |
207 | else | 207 | else |
208 | launchMenu->popup( QPoint( 1, y ) ); | 208 | launchMenu->popup( QPoint( 1, y ) ); |
209 | } | 209 | } |
210 | 210 | ||
211 | 211 | ||
212 | 212 | ||
213 | 213 | ||
214 | static int compareAppletPositions(const void *a, const void *b) | 214 | static int compareAppletPositions(const void *a, const void *b) |
215 | { | 215 | { |
216 | const MenuApplet* aa = *(const MenuApplet**)a; | 216 | const MenuApplet* aa = *(const MenuApplet**)a; |
217 | const MenuApplet* ab = *(const MenuApplet**)b; | 217 | const MenuApplet* ab = *(const MenuApplet**)b; |
218 | int d = aa->iface->position() - ab->iface->position(); | 218 | int d = aa->iface->position() - ab->iface->position(); |
219 | if ( d ) return d; | 219 | if ( d ) return d; |
220 | return QString::compare(aa->library->library(),ab->library->library()); | 220 | return QString::compare(aa->library->library(),ab->library->library()); |
221 | } | 221 | } |
222 | 222 | ||
223 | void StartMenu::clearApplets() | 223 | void StartMenu::clearApplets() |
224 | { | 224 | { |
225 | if (launchMenu ) | 225 | if (launchMenu ) |
226 | launchMenu-> hide(); | 226 | launchMenu-> hide(); |
227 | 227 | ||
228 | for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { | 228 | for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { |
229 | MenuApplet *applet = it. current ( ); | 229 | MenuApplet *applet = it. current ( ); |
230 | if ( launchMenu ) { | 230 | if ( launchMenu ) { |
231 | launchMenu-> removeItem ( applet-> id ); | 231 | launchMenu-> removeItem ( applet-> id ); |
232 | delete applet-> popup; | 232 | delete applet-> popup; |
233 | } | 233 | } |
234 | 234 | ||
235 | applet-> iface-> release(); | 235 | applet-> iface-> release(); |
236 | applet-> library-> unload(); | 236 | applet-> library-> unload(); |
237 | delete applet-> library; | 237 | delete applet-> library; |
238 | } | 238 | } |
239 | m_applets.clear(); | 239 | m_applets.clear(); |
240 | } | 240 | } |
241 | 241 | ||
242 | 242 | ||
243 | 243 | ||
244 | 244 | ||
245 | void StartMenu::loadApplets() | 245 | void StartMenu::loadApplets() |
246 | { | 246 | { |
247 | Config cfg( "StartMenu" ); | 247 | Config cfg( "StartMenu" ); |
248 | cfg.setGroup( "Applets" ); | 248 | cfg.setGroup( "Applets" ); |
249 | 249 | ||
250 | // SafeMode causes too much problems, so we disable it for now -- | 250 | // SafeMode causes too much problems, so we disable it for now -- |
251 | // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 | 251 | // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 |
252 | // removed in the remerge PluginManager could handle it | 252 | // removed in the remerge PluginManager could handle it |
253 | // we don't currently use it -zecke | 253 | // we don't currently use it -zecke |
254 | 254 | ||
255 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); | 255 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); |
256 | 256 | ||
257 | QString lang = getenv( "LANG" ); | 257 | QString lang = getenv( "LANG" ); |
258 | QString path = QPEApplication::qpeDir() + "/plugins/applets"; | 258 | QString path = QPEApplication::qpeDir() + "/plugins/applets"; |
259 | #ifdef Q_OS_MACX | ||
260 | QDir dir( path, "lib*.dylib" ); | ||
261 | #else | ||
259 | QDir dir( path, "lib*.so" ); | 262 | QDir dir( path, "lib*.so" ); |
263 | #endif /* Q_OS_MACX */ | ||
260 | QStringList list = dir.entryList(); | 264 | QStringList list = dir.entryList(); |
261 | QStringList::Iterator it; | 265 | QStringList::Iterator it; |
262 | int napplets=0; | 266 | int napplets=0; |
263 | MenuApplet* *xapplets = new MenuApplet*[list.count()]; | 267 | MenuApplet* *xapplets = new MenuApplet*[list.count()]; |
264 | for ( it = list.begin(); it != list.end(); ++it ) { | 268 | for ( it = list.begin(); it != list.end(); ++it ) { |
265 | if ( exclude.find( *it ) != exclude.end() ) | 269 | if ( exclude.find( *it ) != exclude.end() ) |
266 | continue; | 270 | continue; |
267 | MenuAppletInterface *iface = 0; | 271 | MenuAppletInterface *iface = 0; |
268 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 272 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
269 | if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { | 273 | if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { |
270 | MenuApplet *applet = new MenuApplet; | 274 | MenuApplet *applet = new MenuApplet; |
271 | xapplets[napplets++] = applet; | 275 | xapplets[napplets++] = applet; |
272 | applet->library = lib; | 276 | applet->library = lib; |
273 | applet->iface = iface; | 277 | applet->iface = iface; |
274 | 278 | ||
275 | QTranslator *trans = new QTranslator(qApp); | 279 | QTranslator *trans = new QTranslator(qApp); |
276 | QString type = (*it).left( (*it).find(".") ); | 280 | QString type = (*it).left( (*it).find(".") ); |
277 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 281 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; |
278 | if ( trans->load( tfn )) | 282 | if ( trans->load( tfn )) |
279 | qApp->installTranslator( trans ); | 283 | qApp->installTranslator( trans ); |
280 | else | 284 | else |
281 | delete trans; | 285 | delete trans; |
282 | } else { | 286 | } else { |
283 | exclude += *it; | 287 | exclude += *it; |
284 | delete lib; | 288 | delete lib; |
285 | } | 289 | } |
286 | } | 290 | } |
287 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); | 291 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); |
288 | qsort(xapplets,napplets,sizeof(m_applets[0]),compareAppletPositions); | 292 | qsort(xapplets,napplets,sizeof(m_applets[0]),compareAppletPositions); |
289 | 293 | ||
290 | 294 | ||
291 | int foo = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0; | 295 | int foo = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0; |
292 | 296 | ||
293 | while (napplets--) { | 297 | while (napplets--) { |
294 | MenuApplet *applet = xapplets[napplets]; | 298 | MenuApplet *applet = xapplets[napplets]; |
295 | 299 | ||
296 | applet-> popup = applet-> iface-> popup ( this ); | 300 | applet-> popup = applet-> iface-> popup ( this ); |
297 | 301 | ||
298 | if ( applet-> popup ) | 302 | if ( applet-> popup ) |
299 | applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); | 303 | applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); |
300 | else | 304 | else |
301 | applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); | 305 | applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); |
302 | 306 | ||
303 | 307 | ||
304 | m_applets.insert ( applet-> id, new MenuApplet(*applet)); | 308 | m_applets.insert ( applet-> id, new MenuApplet(*applet)); |
305 | } | 309 | } |
306 | delete [] xapplets; | 310 | delete [] xapplets; |
307 | 311 | ||
308 | } | 312 | } |
309 | 313 | ||
310 | 314 | ||
311 | /* | 315 | /* |
312 | * Launcher calls loadMenu too often fix that | 316 | * Launcher calls loadMenu too often fix that |
313 | */ | 317 | */ |
314 | void StartMenu::addApplets(QPopupMenu* pop) { | 318 | void StartMenu::addApplets(QPopupMenu* pop) { |
315 | QIntDict<MenuApplet> dict; | 319 | QIntDict<MenuApplet> dict; |
316 | if( pop-> count ( )) | 320 | if( pop-> count ( )) |
317 | pop-> insertSeparator ( ); | 321 | pop-> insertSeparator ( ); |
318 | 322 | ||
319 | for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { | 323 | for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { |
320 | MenuApplet *applet = it. current ( ); | 324 | MenuApplet *applet = it. current ( ); |
321 | if ( applet-> popup ) | 325 | if ( applet-> popup ) |
322 | applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); | 326 | applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); |
323 | else | 327 | else |
324 | applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); | 328 | applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); |
325 | 329 | ||
326 | dict.insert( applet->id, new MenuApplet(*applet) ); | 330 | dict.insert( applet->id, new MenuApplet(*applet) ); |
327 | } | 331 | } |
328 | /* need to update the key */ | 332 | /* need to update the key */ |
329 | m_applets.setAutoDelete( true ); | 333 | m_applets.setAutoDelete( true ); |
330 | m_applets.clear(); | 334 | m_applets.clear(); |
331 | m_applets.setAutoDelete( false ); | 335 | m_applets.setAutoDelete( false ); |
332 | m_applets = dict; | 336 | m_applets = dict; |
333 | } | 337 | } |
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp index 6122770..691f6b8 100644 --- a/core/launcher/systray.cpp +++ b/core/launcher/systray.cpp | |||
@@ -1,149 +1,154 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qtopia/qpeapplication.h> | 21 | #include <qtopia/qpeapplication.h> |
22 | #include <qtopia/qlibrary.h> | 22 | #include <qtopia/qlibrary.h> |
23 | #include <qtopia/config.h> | 23 | #include <qtopia/config.h> |
24 | 24 | ||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qdir.h> | 26 | #include <qdir.h> |
27 | #include <qmessagebox.h> | 27 | #include <qmessagebox.h> |
28 | #include <qtranslator.h> | 28 | #include <qtranslator.h> |
29 | 29 | ||
30 | #include "systray.h" | 30 | #include "systray.h" |
31 | 31 | ||
32 | #include <stdlib.h> | 32 | #include <stdlib.h> |
33 | 33 | ||
34 | /* ### Single build floppies ### */ | 34 | /* ### Single build floppies ### */ |
35 | #if 0 | 35 | #if 0 |
36 | #ifdef QT_NO_COMPONENTS | 36 | #ifdef QT_NO_COMPONENTS |
37 | #include "../plugins/applets/clockapplet/clockappletimpl.h" | 37 | #include "../plugins/applets/clockapplet/clockappletimpl.h" |
38 | #endif | 38 | #endif |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) | 41 | SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) |
42 | { | 42 | { |
43 | //setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 43 | //setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
44 | loadApplets(); | 44 | loadApplets(); |
45 | } | 45 | } |
46 | 46 | ||
47 | SysTray::~SysTray() | 47 | SysTray::~SysTray() |
48 | { | 48 | { |
49 | clearApplets(); | 49 | clearApplets(); |
50 | } | 50 | } |
51 | 51 | ||
52 | static int compareAppletPositions(const void *a, const void *b) | 52 | static int compareAppletPositions(const void *a, const void *b) |
53 | { | 53 | { |
54 | const TaskbarApplet* aa = *(const TaskbarApplet**)a; | 54 | const TaskbarApplet* aa = *(const TaskbarApplet**)a; |
55 | const TaskbarApplet* ab = *(const TaskbarApplet**)b; | 55 | const TaskbarApplet* ab = *(const TaskbarApplet**)b; |
56 | int d = ab->iface->position() - aa->iface->position(); | 56 | int d = ab->iface->position() - aa->iface->position(); |
57 | if ( d ) return d; | 57 | if ( d ) return d; |
58 | return QString::compare(ab->name,aa->name); | 58 | return QString::compare(ab->name,aa->name); |
59 | } | 59 | } |
60 | 60 | ||
61 | void SysTray::loadApplets() | 61 | void SysTray::loadApplets() |
62 | { | 62 | { |
63 | hide(); | 63 | hide(); |
64 | clearApplets(); | 64 | clearApplets(); |
65 | addApplets(); | 65 | addApplets(); |
66 | } | 66 | } |
67 | 67 | ||
68 | void SysTray::clearApplets() | 68 | void SysTray::clearApplets() |
69 | { | 69 | { |
70 | #ifndef QT_NO_COMPONENTS | 70 | #ifndef QT_NO_COMPONENTS |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Note on clearing. SOme applets delete their | 73 | * Note on clearing. SOme applets delete their |
74 | * applets themselves some don't do it | 74 | * applets themselves some don't do it |
75 | * and on restart this can crash. If we delete it | 75 | * and on restart this can crash. If we delete it |
76 | * here we might end up in a double deletion. We could | 76 | * here we might end up in a double deletion. We could |
77 | * use QGuardedPtr but that would be one QOBject | 77 | * use QGuardedPtr but that would be one QOBject |
78 | * for every applet more but only useful for restart | 78 | * for every applet more but only useful for restart |
79 | */ | 79 | */ |
80 | QValueList<TaskbarApplet>::Iterator mit; | 80 | QValueList<TaskbarApplet>::Iterator mit; |
81 | for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { | 81 | for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { |
82 | (*mit).iface->release(); | 82 | (*mit).iface->release(); |
83 | (*mit).library->unload(); | 83 | (*mit).library->unload(); |
84 | delete (*mit).library; | 84 | delete (*mit).library; |
85 | } | 85 | } |
86 | 86 | ||
87 | #endif | 87 | #endif |
88 | appletList.clear(); | 88 | appletList.clear(); |
89 | if ( layout ) | 89 | if ( layout ) |
90 | delete layout; | 90 | delete layout; |
91 | layout = new QHBoxLayout( this, 0, 1 ); | 91 | layout = new QHBoxLayout( this, 0, 1 ); |
92 | layout->setAutoAdd(TRUE); | 92 | layout->setAutoAdd(TRUE); |
93 | } | 93 | } |
94 | 94 | ||
95 | void SysTray::addApplets() | 95 | void SysTray::addApplets() |
96 | { | 96 | { |
97 | hide(); | 97 | hide(); |
98 | #ifndef QT_NO_COMPONENTS | 98 | #ifndef QT_NO_COMPONENTS |
99 | Config cfg( "Taskbar" ); | 99 | Config cfg( "Taskbar" ); |
100 | cfg.setGroup( "Applets" ); | 100 | cfg.setGroup( "Applets" ); |
101 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); | 101 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); |
102 | 102 | ||
103 | QString lang = getenv( "LANG" ); | 103 | QString lang = getenv( "LANG" ); |
104 | QString path = QPEApplication::qpeDir() + "/plugins/applets"; | 104 | QString path = QPEApplication::qpeDir() + "/plugins/applets"; |
105 | #ifdef Q_OS_MACX | ||
106 | QDir dir( path, "lib*.dylib" ); | ||
107 | #else | ||
105 | QDir dir( path, "lib*.so" ); | 108 | QDir dir( path, "lib*.so" ); |
109 | #endif /* Q_OS_MACX */ | ||
106 | QStringList list = dir.entryList(); | 110 | QStringList list = dir.entryList(); |
107 | QStringList::Iterator it; | 111 | QStringList::Iterator it; |
108 | int napplets=0; | 112 | int napplets=0; |
109 | TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; | 113 | TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; |
110 | for ( it = list.begin(); it != list.end(); ++it ) { | 114 | for ( it = list.begin(); it != list.end(); ++it ) { |
111 | if ( exclude.find( *it ) != exclude.end() ) | 115 | if ( exclude.find( *it ) != exclude.end() ) |
112 | continue; | 116 | continue; |
117 | qWarning( "Found Applet: %s", (*it).latin1() ); | ||
113 | TaskbarAppletInterface *iface = 0; | 118 | TaskbarAppletInterface *iface = 0; |
114 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 119 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
115 | if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { | 120 | if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { |
116 | TaskbarApplet *applet = new TaskbarApplet; | 121 | TaskbarApplet *applet = new TaskbarApplet; |
117 | applets[napplets++] = applet; | 122 | applets[napplets++] = applet; |
118 | applet->library = lib; | 123 | applet->library = lib; |
119 | applet->iface = iface; | 124 | applet->iface = iface; |
120 | 125 | ||
121 | QTranslator *trans = new QTranslator(qApp); | 126 | QTranslator *trans = new QTranslator(qApp); |
122 | QString type = (*it).left( (*it).find(".") ); | 127 | QString type = (*it).left( (*it).find(".") ); |
123 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 128 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; |
124 | if ( trans->load( tfn )) | 129 | if ( trans->load( tfn )) |
125 | qApp->installTranslator( trans ); | 130 | qApp->installTranslator( trans ); |
126 | else | 131 | else |
127 | delete trans; | 132 | delete trans; |
128 | } else { | 133 | } else { |
129 | exclude += *it; | 134 | exclude += *it; |
130 | delete lib; | 135 | delete lib; |
131 | } | 136 | } |
132 | } | 137 | } |
133 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); | 138 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); |
134 | qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); | 139 | qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); |
135 | while (napplets--) { | 140 | while (napplets--) { |
136 | TaskbarApplet *applet = applets[napplets]; | 141 | TaskbarApplet *applet = applets[napplets]; |
137 | applet->applet = applet->iface->applet( this ); | 142 | applet->applet = applet->iface->applet( this ); |
138 | appletList.append(*applet); | 143 | appletList.append(*applet); |
139 | } | 144 | } |
140 | delete [] applets; | 145 | delete [] applets; |
141 | #else /* ## FIXME single app */ | 146 | #else /* ## FIXME single app */ |
142 | TaskbarApplet * const applet = new TaskbarApplet(); | 147 | TaskbarApplet * const applet = new TaskbarApplet(); |
143 | applet->iface = new ClockAppletImpl(); | 148 | applet->iface = new ClockAppletImpl(); |
144 | applet->applet = applet->iface->applet( this ); | 149 | applet->applet = applet->iface->applet( this ); |
145 | appletList.append( applet ); | 150 | appletList.append( applet ); |
146 | #endif | 151 | #endif |
147 | show(); | 152 | show(); |
148 | } | 153 | } |
149 | 154 | ||
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index c69df2d..439e110 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -1,160 +1,163 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | //#define _XOPEN_SOURCE | 20 | //#define _XOPEN_SOURCE |
21 | 21 | ||
22 | #include <qtopia/global.h> | 22 | #include <qtopia/global.h> |
23 | #include <qtopia/qpeapplication.h> | 23 | #include <qtopia/qpeapplication.h> |
24 | 24 | ||
25 | #ifndef Q_OS_WIN32 | 25 | #ifndef Q_OS_WIN32 |
26 | #include <pwd.h> | 26 | #include <pwd.h> |
27 | #include <sys/types.h> | 27 | #include <sys/types.h> |
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #include <time.h> | 30 | #include <time.h> |
31 | |||
32 | #ifndef Q_OS_MACX | ||
31 | #include <shadow.h> | 33 | #include <shadow.h> |
32 | #include <crypt.h> | 34 | #include <crypt.h> |
35 | #endif /* Q_OS_MACX */ | ||
33 | 36 | ||
34 | #else | 37 | #else |
35 | #include <stdlib.h> | 38 | #include <stdlib.h> |
36 | #include <time.h> | 39 | #include <time.h> |
37 | #endif | 40 | #endif |
38 | 41 | ||
39 | 42 | ||
40 | #if defined(_OS_LINUX_) | 43 | #if defined(_OS_LINUX_) |
41 | #include <shadow.h> | 44 | #include <shadow.h> |
42 | #endif | 45 | #endif |
43 | 46 | ||
44 | #include <qdir.h> | 47 | #include <qdir.h> |
45 | #include <qfile.h> | 48 | #include <qfile.h> |
46 | #include <qtextstream.h> | 49 | #include <qtextstream.h> |
47 | #include <qdatastream.h> | 50 | #include <qdatastream.h> |
48 | #include <qmessagebox.h> | 51 | #include <qmessagebox.h> |
49 | #include <qstringlist.h> | 52 | #include <qstringlist.h> |
50 | #include <qfileinfo.h> | 53 | #include <qfileinfo.h> |
51 | #include <qregexp.h> | 54 | #include <qregexp.h> |
52 | //#include <qtopia/qcopchannel_qws.h> | 55 | //#include <qtopia/qcopchannel_qws.h> |
53 | #include <qtopia/process.h> | 56 | #include <qtopia/process.h> |
54 | #include <qtopia/global.h> | 57 | #include <qtopia/global.h> |
55 | #include <qtopia/config.h> | 58 | #include <qtopia/config.h> |
56 | #include <qtopia/private/contact.h> | 59 | #include <qtopia/private/contact.h> |
57 | #include <qtopia/quuid.h> | 60 | #include <qtopia/quuid.h> |
58 | #include <qtopia/version.h> | 61 | #include <qtopia/version.h> |
59 | #ifdef Q_WS_QWS | 62 | #ifdef Q_WS_QWS |
60 | #include <qtopia/qcopenvelope_qws.h> | 63 | #include <qtopia/qcopenvelope_qws.h> |
61 | #endif | 64 | #endif |
62 | 65 | ||
63 | #include "launcherglobal.h" | 66 | #include "launcherglobal.h" |
64 | 67 | ||
65 | #include "transferserver.h" | 68 | #include "transferserver.h" |
66 | #include <qtopia/qprocess.h> | 69 | #include <qtopia/qprocess.h> |
67 | 70 | ||
68 | const int block_size = 51200; | 71 | const int block_size = 51200; |
69 | 72 | ||
70 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, | 73 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent, |
71 | const char* name) | 74 | const char* name) |
72 | : QServerSocket( port, 1, parent, name ) | 75 | : QServerSocket( port, 1, parent, name ) |
73 | { | 76 | { |
74 | connections.setAutoDelete( TRUE ); | 77 | connections.setAutoDelete( TRUE ); |
75 | if ( !ok() ) | 78 | if ( !ok() ) |
76 | qWarning( "Failed to bind to port %d", port ); | 79 | qWarning( "Failed to bind to port %d", port ); |
77 | } | 80 | } |
78 | 81 | ||
79 | void TransferServer::authorizeConnections() | 82 | void TransferServer::authorizeConnections() |
80 | { | 83 | { |
81 | QListIterator<ServerPI> it(connections); | 84 | QListIterator<ServerPI> it(connections); |
82 | while ( it.current() ) { | 85 | while ( it.current() ) { |
83 | if ( !it.current()->verifyAuthorised() ) { | 86 | if ( !it.current()->verifyAuthorised() ) { |
84 | disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); | 87 | disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); |
85 | connections.removeRef( it.current() ); | 88 | connections.removeRef( it.current() ); |
86 | } else | 89 | } else |
87 | ++it; | 90 | ++it; |
88 | } | 91 | } |
89 | } | 92 | } |
90 | 93 | ||
91 | void TransferServer::closed(ServerPI *item) | 94 | void TransferServer::closed(ServerPI *item) |
92 | { | 95 | { |
93 | connections.removeRef(item); | 96 | connections.removeRef(item); |
94 | } | 97 | } |
95 | 98 | ||
96 | TransferServer::~TransferServer() | 99 | TransferServer::~TransferServer() |
97 | { | 100 | { |
98 | } | 101 | } |
99 | 102 | ||
100 | void TransferServer::newConnection( int socket ) | 103 | void TransferServer::newConnection( int socket ) |
101 | { | 104 | { |
102 | ServerPI *ptr = new ServerPI( socket, this ); | 105 | ServerPI *ptr = new ServerPI( socket, this ); |
103 | connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); | 106 | connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); |
104 | connections.append( ptr ); | 107 | connections.append( ptr ); |
105 | } | 108 | } |
106 | 109 | ||
107 | QString SyncAuthentication::serverId() | 110 | QString SyncAuthentication::serverId() |
108 | { | 111 | { |
109 | Config cfg("Security"); | 112 | Config cfg("Security"); |
110 | cfg.setGroup("Sync"); | 113 | cfg.setGroup("Sync"); |
111 | QString r = cfg.readEntry("serverid"); | 114 | QString r = cfg.readEntry("serverid"); |
112 | 115 | ||
113 | if ( r.isEmpty() ) { | 116 | if ( r.isEmpty() ) { |
114 | r = Opie::Global::uuid(); | 117 | r = Opie::Global::uuid(); |
115 | cfg.writeEntry("serverid", r ); | 118 | cfg.writeEntry("serverid", r ); |
116 | } | 119 | } |
117 | return r; | 120 | return r; |
118 | } | 121 | } |
119 | 122 | ||
120 | QString SyncAuthentication::ownerName() | 123 | QString SyncAuthentication::ownerName() |
121 | { | 124 | { |
122 | QString vfilename = Global::applicationFileName("addressbook", | 125 | QString vfilename = Global::applicationFileName("addressbook", |
123 | "businesscard.vcf"); | 126 | "businesscard.vcf"); |
124 | if (QFile::exists(vfilename)) { | 127 | if (QFile::exists(vfilename)) { |
125 | Contact c; | 128 | Contact c; |
126 | c = Contact::readVCard( vfilename )[0]; | 129 | c = Contact::readVCard( vfilename )[0]; |
127 | return c.fullName(); | 130 | return c.fullName(); |
128 | } | 131 | } |
129 | 132 | ||
130 | return QString::null; | 133 | return QString::null; |
131 | } | 134 | } |
132 | 135 | ||
133 | QString SyncAuthentication::loginName() | 136 | QString SyncAuthentication::loginName() |
134 | { | 137 | { |
135 | struct passwd *pw = 0L; | 138 | struct passwd *pw = 0L; |
136 | #ifndef Q_OS_WIN32 | 139 | #ifndef Q_OS_WIN32 |
137 | pw = getpwuid( geteuid() ); | 140 | pw = getpwuid( geteuid() ); |
138 | return QString::fromLocal8Bit( pw->pw_name ); | 141 | return QString::fromLocal8Bit( pw->pw_name ); |
139 | #else | 142 | #else |
140 | //### revise | 143 | //### revise |
141 | return QString(); | 144 | return QString(); |
142 | #endif | 145 | #endif |
143 | } | 146 | } |
144 | 147 | ||
145 | int SyncAuthentication::isAuthorized(QHostAddress peeraddress) | 148 | int SyncAuthentication::isAuthorized(QHostAddress peeraddress) |
146 | { | 149 | { |
147 | Config cfg("Security"); | 150 | Config cfg("Security"); |
148 | cfg.setGroup("Sync"); | 151 | cfg.setGroup("Sync"); |
149 | // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); | 152 | // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); |
150 | uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); | 153 | uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); |
151 | 154 | ||
152 | // QHostAddress allowed; | 155 | // QHostAddress allowed; |
153 | // allowed.setAddress(allowedstr); | 156 | // allowed.setAddress(allowedstr); |
154 | // uint auth_peer = allowed.ip4Addr(); | 157 | // uint auth_peer = allowed.ip4Addr(); |
155 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); | 158 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); |
156 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined | 159 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined |
157 | ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); | 160 | ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); |
158 | 161 | ||
159 | return (peeraddress.ip4Addr() & mask) == auth_peer; | 162 | return (peeraddress.ip4Addr() & mask) == auth_peer; |
160 | } | 163 | } |
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.pro b/core/multimedia/opieplayer/wavplugin/wavplugin.pro index 0366542..db41ad4 100644 --- a/core/multimedia/opieplayer/wavplugin/wavplugin.pro +++ b/core/multimedia/opieplayer/wavplugin/wavplugin.pro | |||
@@ -1,32 +1,32 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = wavplugin.h wavpluginimpl.h | 3 | HEADERS = wavplugin.h wavpluginimpl.h |
4 | SOURCES = wavplugin.cpp wavpluginimpl.cpp | 4 | SOURCES = wavplugin.cpp wavpluginimpl.cpp |
5 | TARGET = wavplugin | 5 | TARGET = wavplugin |
6 | DESTDIR = $(OPIEDIR)/plugins/codecs | 6 | DESTDIR = $(OPIEDIR)/plugins/codecs |
7 | INCLUDEPATH += $(OPIEDIR)/include .. | 7 | INCLUDEPATH += $(OPIEDIR)/include .. |
8 | DEPENDPATH += ../$(OPIEDIR)/include .. | 8 | DEPENDPATH += ../$(OPIEDIR)/include .. |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../../i18n/de/libwavplugin.ts \ | 12 | TRANSLATIONS = ../../../../i18n/de/libwavplugin.ts \ |
13 | ../../../../i18n/nl/libwavplugin.ts \ | 13 | ../../../../i18n/nl/libwavplugin.ts \ |
14 | ../../../../i18n/da/libwavplugin.ts \ | 14 | ../../../../i18n/da/libwavplugin.ts \ |
15 | ../../../../i18n/xx/libwavplugin.ts \ | 15 | ../../../../i18n/xx/libwavplugin.ts \ |
16 | ../../../../i18n/en/libwavplugin.ts \ | 16 | ../../../../i18n/en/libwavplugin.ts \ |
17 | ../../../../i18n/es/libwavplugin.ts \ | 17 | ../../../../i18n/es/libwavplugin.ts \ |
18 | ../../../../i18n/fr/libwavplugin.ts \ | 18 | ../../../../i18n/fr/libwavplugin.ts \ |
19 | ../../../../i18n/hu/libwavplugin.ts \ | 19 | ../../../../i18n/hu/libwavplugin.ts \ |
20 | ../../../../i18n/ja/libwavplugin.ts \ | 20 | ../../../../i18n/ja/libwavplugin.ts \ |
21 | ../../../../i18n/ko/libwavplugin.ts \ | 21 | ../../../../i18n/ko/libwavplugin.ts \ |
22 | ../../../../i18n/no/libwavplugin.ts \ | 22 | ../../../../i18n/no/libwavplugin.ts \ |
23 | ../../../../i18n/pl/libwavplugin.ts \ | 23 | ../../../../i18n/pl/libwavplugin.ts \ |
24 | ../../../../i18n/pt/libwavplugin.ts \ | 24 | ../../../../i18n/pt/libwavplugin.ts \ |
25 | ../../../../i18n/pt_BR/libwavplugin.ts \ | 25 | ../../../../i18n/pt_BR/libwavplugin.ts \ |
26 | ../../../../i18n/sl/libwavplugin.ts \ | 26 | ../../../../i18n/sl/libwavplugin.ts \ |
27 | ../../../../i18n/zh_CN/libwavplugin.ts \ | 27 | ../../../../i18n/zh_CN/libwavplugin.ts \ |
28 | ../../../../i18n/zh_TW/libwavplugin.ts | 28 | ../../../../i18n/zh_TW/libwavplugin.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/addressbook/addressbook.pro b/core/pim/today/plugins/addressbook/addressbook.pro index 4ebbc9e..54aaff2 100644 --- a/core/pim/today/plugins/addressbook/addressbook.pro +++ b/core/pim/today/plugins/addressbook/addressbook.pro | |||
@@ -1,43 +1,43 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ | 6 | HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ |
7 | addresspluginwidget.h | 7 | addresspluginwidget.h |
8 | SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ | 8 | SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ |
9 | addresspluginwidget.cpp | 9 | addresspluginwidget.cpp |
10 | 10 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 11 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 12 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 13 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 14 | ../ ../library |
15 | 15 | ||
16 | LIBS+= -lqpe -lopie | 16 | LIBS+= -lqpe -lopie |
17 | 17 | ||
18 | DESTDIR = $(OPIEDIR)/plugins/today | 18 | DESTDIR = $(OPIEDIR)/plugins/today |
19 | TARGET = todayaddressbookplugin | 19 | TARGET = todayaddressbookplugin |
20 | 20 | ||
21 | TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \ | 21 | TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \ |
22 | ../../../../../i18n/nl/libtodayaddressbookplugin.ts \ | 22 | ../../../../../i18n/nl/libtodayaddressbookplugin.ts \ |
23 | ../../../../../i18n/xx/libtodayaddressbookplugin.ts \ | 23 | ../../../../../i18n/xx/libtodayaddressbookplugin.ts \ |
24 | ../../../../../i18n/en/libtodayaddressbookplugin.ts \ | 24 | ../../../../../i18n/en/libtodayaddressbookplugin.ts \ |
25 | ../../../../../i18n/es/libtodayaddressbookplugin.ts \ | 25 | ../../../../../i18n/es/libtodayaddressbookplugin.ts \ |
26 | ../../../../../i18n/fr/libtodayaddressbookplugin.ts \ | 26 | ../../../../../i18n/fr/libtodayaddressbookplugin.ts \ |
27 | ../../../../../i18n/hu/libtodayaddressbookplugin.ts \ | 27 | ../../../../../i18n/hu/libtodayaddressbookplugin.ts \ |
28 | ../../../../../i18n/ja/libtodayaddressbookplugin.ts \ | 28 | ../../../../../i18n/ja/libtodayaddressbookplugin.ts \ |
29 | ../../../../../i18n/ko/libtodayaddressbookplugin.ts \ | 29 | ../../../../../i18n/ko/libtodayaddressbookplugin.ts \ |
30 | ../../../../../i18n/no/libtodayaddressbookplugin.ts \ | 30 | ../../../../../i18n/no/libtodayaddressbookplugin.ts \ |
31 | ../../../../../i18n/pl/libtodayaddressbookplugin.ts \ | 31 | ../../../../../i18n/pl/libtodayaddressbookplugin.ts \ |
32 | ../../../../../i18n/pt/libtodayaddressbookplugin.ts \ | 32 | ../../../../../i18n/pt/libtodayaddressbookplugin.ts \ |
33 | ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \ | 33 | ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \ |
34 | ../../../../../i18n/sl/libtodayaddressbookplugin.ts \ | 34 | ../../../../../i18n/sl/libtodayaddressbookplugin.ts \ |
35 | ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \ | 35 | ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \ |
36 | ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \ | 36 | ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \ |
37 | ../../../../../i18n/it/libtodayaddressbookplugin.ts \ | 37 | ../../../../../i18n/it/libtodayaddressbookplugin.ts \ |
38 | ../../../../../i18n/da/libtodayaddressbookplugin.ts | 38 | ../../../../../i18n/da/libtodayaddressbookplugin.ts |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | include ( $(OPIEDIR)/include.pro ) | 43 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro index e0a1dcb..2139f63 100644 --- a/core/pim/today/plugins/datebook/datebook.pro +++ b/core/pim/today/plugins/datebook/datebook.pro | |||
@@ -1,39 +1,39 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | # Input | 4 | # Input |
5 | HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ | 5 | HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ |
6 | datebookevent.h datebookpluginwidget.h | 6 | datebookevent.h datebookpluginwidget.h |
7 | SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ | 7 | SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ |
8 | datebookevent.cpp datebookpluginwidget.cpp | 8 | datebookevent.cpp datebookpluginwidget.cpp |
9 | 9 | ||
10 | INCLUDEPATH += $(OPIEDIR)/include \ | 10 | INCLUDEPATH += $(OPIEDIR)/include \ |
11 | ../ ../library | 11 | ../ ../library |
12 | DEPENDPATH += $(OPIEDIR)/include \ | 12 | DEPENDPATH += $(OPIEDIR)/include \ |
13 | ../ ../library | 13 | ../ ../library |
14 | 14 | ||
15 | LIBS+= -lqpe -lopie | 15 | LIBS+= -lqpe -lopie |
16 | 16 | ||
17 | DESTDIR = $(OPIEDIR)/plugins/today | 17 | DESTDIR = $(OPIEDIR)/plugins/today |
18 | TARGET = todaydatebookplugin | 18 | TARGET = todaydatebookplugin |
19 | 19 | ||
20 | TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ | 20 | TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ |
21 | ../../../../../i18n/nl/libtodaydatebookplugin.ts \ | 21 | ../../../../../i18n/nl/libtodaydatebookplugin.ts \ |
22 | ../../../../../i18n/xx/libtodaydatebookplugin.ts \ | 22 | ../../../../../i18n/xx/libtodaydatebookplugin.ts \ |
23 | ../../../../../i18n/en/libtodaydatebookplugin.ts \ | 23 | ../../../../../i18n/en/libtodaydatebookplugin.ts \ |
24 | ../../../../../i18n/es/libtodaydatebookplugin.ts \ | 24 | ../../../../../i18n/es/libtodaydatebookplugin.ts \ |
25 | ../../../../../i18n/fr/libtodaydatebookplugin.ts \ | 25 | ../../../../../i18n/fr/libtodaydatebookplugin.ts \ |
26 | ../../../../../i18n/hu/libtodaydatebookplugin.ts \ | 26 | ../../../../../i18n/hu/libtodaydatebookplugin.ts \ |
27 | ../../../../../i18n/ja/libtodaydatebookplugin.ts \ | 27 | ../../../../../i18n/ja/libtodaydatebookplugin.ts \ |
28 | ../../../../../i18n/ko/libtodaydatebookplugin.ts \ | 28 | ../../../../../i18n/ko/libtodaydatebookplugin.ts \ |
29 | ../../../../../i18n/no/libtodaydatebookplugin.ts \ | 29 | ../../../../../i18n/no/libtodaydatebookplugin.ts \ |
30 | ../../../../../i18n/pl/libtodaydatebookplugin.ts \ | 30 | ../../../../../i18n/pl/libtodaydatebookplugin.ts \ |
31 | ../../../../../i18n/pt/libtodaydatebookplugin.ts \ | 31 | ../../../../../i18n/pt/libtodaydatebookplugin.ts \ |
32 | ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ | 32 | ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ |
33 | ../../../../../i18n/sl/libtodaydatebookplugin.ts \ | 33 | ../../../../../i18n/sl/libtodaydatebookplugin.ts \ |
34 | ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ | 34 | ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ |
35 | ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ | 35 | ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ |
36 | ../../../../../i18n/it/libtodaydatebookplugin.ts \ | 36 | ../../../../../i18n/it/libtodaydatebookplugin.ts \ |
37 | ../../../../../i18n/da/libtodaydatebookplugin.ts | 37 | ../../../../../i18n/da/libtodaydatebookplugin.ts |
38 | 38 | ||
39 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro index 70c484d..421b3a5 100644 --- a/core/pim/today/plugins/mail/mail.pro +++ b/core/pim/today/plugins/mail/mail.pro | |||
@@ -1,37 +1,37 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h | 6 | HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h |
7 | SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp | 7 | SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp |
8 | 8 | ||
9 | INCLUDEPATH += $(OPIEDIR)/include \ | 9 | INCLUDEPATH += $(OPIEDIR)/include \ |
10 | ../ ../library | 10 | ../ ../library |
11 | DEPENDPATH += $(OPIEDIR)/include \ | 11 | DEPENDPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 12 | ../ ../library |
13 | 13 | ||
14 | LIBS+= -lqpe -lopie | 14 | LIBS+= -lqpe -lopie |
15 | 15 | ||
16 | DESTDIR = $(OPIEDIR)/plugins/today | 16 | DESTDIR = $(OPIEDIR)/plugins/today |
17 | TARGET = todaymailplugin | 17 | TARGET = todaymailplugin |
18 | 18 | ||
19 | TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \ | 19 | TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \ |
20 | ../../../../../i18n/nl/libtodaymailplugin.ts \ | 20 | ../../../../../i18n/nl/libtodaymailplugin.ts \ |
21 | ../../../../../i18n/xx/libtodaymailplugin.ts \ | 21 | ../../../../../i18n/xx/libtodaymailplugin.ts \ |
22 | ../../../../../i18n/en/libtodaymailplugin.ts \ | 22 | ../../../../../i18n/en/libtodaymailplugin.ts \ |
23 | ../../../../../i18n/es/libtodaymailplugin.ts \ | 23 | ../../../../../i18n/es/libtodaymailplugin.ts \ |
24 | ../../../../../i18n/fr/libtodaymailplugin.ts \ | 24 | ../../../../../i18n/fr/libtodaymailplugin.ts \ |
25 | ../../../../../i18n/hu/libtodaymailplugin.ts \ | 25 | ../../../../../i18n/hu/libtodaymailplugin.ts \ |
26 | ../../../../../i18n/ja/libtodaymailplugin.ts \ | 26 | ../../../../../i18n/ja/libtodaymailplugin.ts \ |
27 | ../../../../../i18n/ko/libtodaymailplugin.ts \ | 27 | ../../../../../i18n/ko/libtodaymailplugin.ts \ |
28 | ../../../../../i18n/no/libtodaymailplugin.ts \ | 28 | ../../../../../i18n/no/libtodaymailplugin.ts \ |
29 | ../../../../../i18n/pl/libtodaymailplugin.ts \ | 29 | ../../../../../i18n/pl/libtodaymailplugin.ts \ |
30 | ../../../../../i18n/pt/libtodaymailplugin.ts \ | 30 | ../../../../../i18n/pt/libtodaymailplugin.ts \ |
31 | ../../../../../i18n/pt_BR/libtodaymailplugin.ts \ | 31 | ../../../../../i18n/pt_BR/libtodaymailplugin.ts \ |
32 | ../../../../../i18n/sl/libtodaymailplugin.ts \ | 32 | ../../../../../i18n/sl/libtodaymailplugin.ts \ |
33 | ../../../../../i18n/zh_CN/libtodaymailplugin.ts \ | 33 | ../../../../../i18n/zh_CN/libtodaymailplugin.ts \ |
34 | ../../../../../i18n/zh_TW/libtodaymailplugin.ts \ | 34 | ../../../../../i18n/zh_TW/libtodaymailplugin.ts \ |
35 | ../../../../../i18n/it/libtodaymailplugin.ts \ | 35 | ../../../../../i18n/it/libtodaymailplugin.ts \ |
36 | ../../../../../i18n/da/libtodaymailplugin.ts | 36 | ../../../../../i18n/da/libtodaymailplugin.ts |
37 | include ( $(OPIEDIR)/include.pro ) | 37 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro index 31a6a27..c8730bb 100644 --- a/core/pim/today/plugins/todolist/todolist.pro +++ b/core/pim/today/plugins/todolist/todolist.pro | |||
@@ -1,40 +1,40 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ | 6 | HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ |
7 | todopluginwidget.h | 7 | todopluginwidget.h |
8 | SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ | 8 | SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ |
9 | todopluginwidget.cpp | 9 | todopluginwidget.cpp |
10 | 10 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 11 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 12 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 13 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 14 | ../ ../library |
15 | 15 | ||
16 | LIBS+= -lqpe -lopie | 16 | LIBS+= -lqpe -lopie |
17 | 17 | ||
18 | DESTDIR = $(OPIEDIR)/plugins/today | 18 | DESTDIR = $(OPIEDIR)/plugins/today |
19 | TARGET = todaytodolistplugin | 19 | TARGET = todaytodolistplugin |
20 | 20 | ||
21 | TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ | 21 | TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ |
22 | ../../../../../i18n/nl/libtodaytodolistplugin.ts \ | 22 | ../../../../../i18n/nl/libtodaytodolistplugin.ts \ |
23 | ../../../../../i18n/xx/libtodaytodolistplugin.ts \ | 23 | ../../../../../i18n/xx/libtodaytodolistplugin.ts \ |
24 | ../../../../../i18n/en/libtodaytodolistplugin.ts \ | 24 | ../../../../../i18n/en/libtodaytodolistplugin.ts \ |
25 | ../../../../../i18n/es/libtodaytodolistplugin.ts \ | 25 | ../../../../../i18n/es/libtodaytodolistplugin.ts \ |
26 | ../../../../../i18n/fr/libtodaytodolistplugin.ts \ | 26 | ../../../../../i18n/fr/libtodaytodolistplugin.ts \ |
27 | ../../../../../i18n/hu/libtodaytodolistplugin.ts \ | 27 | ../../../../../i18n/hu/libtodaytodolistplugin.ts \ |
28 | ../../../../../i18n/ja/libtodaytodolistplugin.ts \ | 28 | ../../../../../i18n/ja/libtodaytodolistplugin.ts \ |
29 | ../../../../../i18n/ko/libtodaytodolistplugin.ts \ | 29 | ../../../../../i18n/ko/libtodaytodolistplugin.ts \ |
30 | ../../../../../i18n/no/libtodaytodolistplugin.ts \ | 30 | ../../../../../i18n/no/libtodaytodolistplugin.ts \ |
31 | ../../../../../i18n/pl/libtodaytodolistplugin.ts \ | 31 | ../../../../../i18n/pl/libtodaytodolistplugin.ts \ |
32 | ../../../../../i18n/pt/libtodaytodolistplugin.ts \ | 32 | ../../../../../i18n/pt/libtodaytodolistplugin.ts \ |
33 | ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ | 33 | ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ |
34 | ../../../../../i18n/sl/libtodaytodolistplugin.ts \ | 34 | ../../../../../i18n/sl/libtodaytodolistplugin.ts \ |
35 | ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ | 35 | ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ |
36 | ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ | 36 | ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ |
37 | ../../../../../i18n/it/libtodaytodolistplugin.ts \ | 37 | ../../../../../i18n/it/libtodaytodolistplugin.ts \ |
38 | ../../../../../i18n/da/libtodaytodolistplugin.ts | 38 | ../../../../../i18n/da/libtodaytodolistplugin.ts |
39 | 39 | ||
40 | include ( $(OPIEDIR)/include.pro ) | 40 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index f213943..cb18c1c 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -49,261 +49,268 @@ struct TodayPlugin { | |||
49 | static QValueList<TodayPlugin> pluginList; | 49 | static QValueList<TodayPlugin> pluginList; |
50 | 50 | ||
51 | Today::Today( QWidget* parent, const char* name, WFlags fl ) | 51 | Today::Today( QWidget* parent, const char* name, WFlags fl ) |
52 | : TodayBase( parent, name, fl ) { | 52 | : TodayBase( parent, name, fl ) { |
53 | 53 | ||
54 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); | 54 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); |
55 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); | 55 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); |
56 | 56 | ||
57 | #if defined(Q_WS_QWS) | 57 | #if defined(Q_WS_QWS) |
58 | #if !defined(QT_NO_COP) | 58 | #if !defined(QT_NO_COP) |
59 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); | 59 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); |
60 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), | 60 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), |
61 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); | 61 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); |
62 | #endif | 62 | #endif |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | setOwnerField(); | 65 | setOwnerField(); |
66 | m_refreshTimer = new QTimer( this ); | 66 | m_refreshTimer = new QTimer( this ); |
67 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 67 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
68 | m_refreshTimer->start( 15000 ); | 68 | m_refreshTimer->start( 15000 ); |
69 | //init(); | 69 | //init(); |
70 | loadPlugins(); | 70 | loadPlugins(); |
71 | showMaximized(); | 71 | showMaximized(); |
72 | } | 72 | } |
73 | 73 | ||
74 | /** | 74 | /** |
75 | * Qcop receive method. | 75 | * Qcop receive method. |
76 | */ | 76 | */ |
77 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 77 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
78 | QDataStream stream( data, IO_ReadOnly ); | 78 | QDataStream stream( data, IO_ReadOnly ); |
79 | if ( msg == "message(QString)" ) { | 79 | if ( msg == "message(QString)" ) { |
80 | QString message; | 80 | QString message; |
81 | stream >> message; | 81 | stream >> message; |
82 | setOwnerField( message ); | 82 | setOwnerField( message ); |
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | void Today::setRefreshTimer( int interval ) { | 86 | void Today::setRefreshTimer( int interval ) { |
87 | 87 | ||
88 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 88 | disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
89 | 89 | ||
90 | // 0 is "never" case | 90 | // 0 is "never" case |
91 | if ( !interval == 0 ) { | 91 | if ( !interval == 0 ) { |
92 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 92 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
93 | m_refreshTimer->changeInterval( interval ); | 93 | m_refreshTimer->changeInterval( interval ); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Initialises the owner field with the default value, the username | 99 | * Initialises the owner field with the default value, the username |
100 | */ | 100 | */ |
101 | void Today::setOwnerField() { | 101 | void Today::setOwnerField() { |
102 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); | 102 | QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); |
103 | if ( QFile::exists( file ) ) { | 103 | if ( QFile::exists( file ) ) { |
104 | Contact cont = Contact::readVCard( file )[0]; | 104 | Contact cont = Contact::readVCard( file )[0]; |
105 | QString returnString = cont.fullName(); | 105 | QString returnString = cont.fullName(); |
106 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); | 106 | OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); |
107 | } else { | 107 | } else { |
108 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); | 108 | OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Set the owner field with a given QString, for example per qcop. | 113 | * Set the owner field with a given QString, for example per qcop. |
114 | */ | 114 | */ |
115 | void Today::setOwnerField( QString &message ) { | 115 | void Today::setOwnerField( QString &message ) { |
116 | if ( !message.isEmpty() ) { | 116 | if ( !message.isEmpty() ) { |
117 | OwnerField->setText( "<b>" + message + "</b>" ); | 117 | OwnerField->setText( "<b>" + message + "</b>" ); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * Init stuff needed for today. Reads the config file. | 122 | * Init stuff needed for today. Reads the config file. |
123 | */ | 123 | */ |
124 | void Today::init() { | 124 | void Today::init() { |
125 | // read config | 125 | // read config |
126 | Config cfg( "today" ); | 126 | Config cfg( "today" ); |
127 | 127 | ||
128 | cfg.setGroup( "Plugins" ); | 128 | cfg.setGroup( "Plugins" ); |
129 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 129 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
130 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 130 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
131 | 131 | ||
132 | cfg.setGroup( "General" ); | 132 | cfg.setGroup( "General" ); |
133 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | 133 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); |
134 | m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); | 134 | m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); |
135 | setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); | 135 | setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); |
136 | 136 | ||
137 | // set the date in top label | 137 | // set the date in top label |
138 | QDate date = QDate::currentDate(); | 138 | QDate date = QDate::currentDate(); |
139 | DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); | 139 | DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); |
140 | 140 | ||
141 | if ( layout ) { | 141 | if ( layout ) { |
142 | delete layout; | 142 | delete layout; |
143 | } | 143 | } |
144 | 144 | ||
145 | if ( m_hideBanner ) { | 145 | if ( m_hideBanner ) { |
146 | Opiezilla->hide(); | 146 | Opiezilla->hide(); |
147 | TodayLabel->hide(); | 147 | TodayLabel->hide(); |
148 | } else { | 148 | } else { |
149 | Opiezilla->show(); | 149 | Opiezilla->show(); |
150 | TodayLabel->show(); | 150 | TodayLabel->show(); |
151 | } | 151 | } |
152 | 152 | ||
153 | layout = new QVBoxLayout( this ); | 153 | layout = new QVBoxLayout( this ); |
154 | layout->addWidget( Frame ); | 154 | layout->addWidget( Frame ); |
155 | layout->addWidget( OwnerField ); | 155 | layout->addWidget( OwnerField ); |
156 | } | 156 | } |
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Load the plugins | 159 | * Load the plugins |
160 | */ | 160 | */ |
161 | void Today::loadPlugins() { | 161 | void Today::loadPlugins() { |
162 | 162 | ||
163 | init(); | 163 | init(); |
164 | QValueList<TodayPlugin>::Iterator tit; | 164 | QValueList<TodayPlugin>::Iterator tit; |
165 | if ( !pluginList.isEmpty() ) { | 165 | if ( !pluginList.isEmpty() ) { |
166 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { | 166 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { |
167 | (*tit).guiBox->hide(); | 167 | (*tit).guiBox->hide(); |
168 | (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); | 168 | (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); |
169 | delete (*tit).guiBox; | 169 | delete (*tit).guiBox; |
170 | (*tit).library->unload(); | 170 | (*tit).library->unload(); |
171 | delete (*tit).library; | 171 | delete (*tit).library; |
172 | } | 172 | } |
173 | pluginList.clear(); | 173 | pluginList.clear(); |
174 | } | 174 | } |
175 | 175 | ||
176 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 176 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
177 | qWarning("Searching for Plugins in: %s", path.latin1()); | ||
178 | #ifdef Q_OS_MACX | ||
179 | QDir dir( path, "lib*.dylib" ); | ||
180 | #else | ||
177 | QDir dir( path, "lib*.so" ); | 181 | QDir dir( path, "lib*.so" ); |
182 | #endif | ||
178 | 183 | ||
179 | QStringList list = dir.entryList(); | 184 | QStringList list = dir.entryList(); |
180 | QStringList::Iterator it; | 185 | QStringList::Iterator it; |
181 | 186 | ||
187 | qWarning("Found: %d entries !", list.count() ); | ||
188 | |||
182 | QMap<QString, TodayPlugin> tempList; | 189 | QMap<QString, TodayPlugin> tempList; |
183 | 190 | ||
184 | for ( it = list.begin(); it != list.end(); ++it ) { | 191 | for ( it = list.begin(); it != list.end(); ++it ) { |
185 | QInterfacePtr<TodayPluginInterface> iface; | 192 | QInterfacePtr<TodayPluginInterface> iface; |
186 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 193 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
187 | 194 | ||
188 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 195 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
189 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 196 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
190 | qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); | 197 | qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); |
191 | qDebug( QString(*it) ); | 198 | qDebug( QString(*it) ); |
192 | 199 | ||
193 | TodayPlugin plugin; | 200 | TodayPlugin plugin; |
194 | plugin.library = lib; | 201 | plugin.library = lib; |
195 | plugin.iface = iface; | 202 | plugin.iface = iface; |
196 | plugin.name = QString(*it); | 203 | plugin.name = QString(*it); |
197 | 204 | ||
198 | QString type = (*it).left( (*it).find(".") ); | 205 | QString type = (*it).left( (*it).find(".") ); |
199 | 206 | ||
200 | // grr, sharp rom does not know Global::languageList(); | 207 | // grr, sharp rom does not know Global::languageList(); |
201 | // QStringList langs = Global::languageList(); | 208 | // QStringList langs = Global::languageList(); |
202 | QString tfn = QPEApplication::qpeDir() + "/i18n/"; | 209 | QString tfn = QPEApplication::qpeDir() + "/i18n/"; |
203 | QDir langDir = tfn; | 210 | QDir langDir = tfn; |
204 | QStringList langs = langDir.entryList("*", QDir::Dirs ); | 211 | QStringList langs = langDir.entryList("*", QDir::Dirs ); |
205 | 212 | ||
206 | for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { | 213 | for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { |
207 | QString lang = *lit; | 214 | QString lang = *lit; |
208 | qDebug( "Languages: " + lang ); | 215 | qDebug( "Languages: " + lang ); |
209 | QTranslator * trans = new QTranslator( qApp ); | 216 | QTranslator * trans = new QTranslator( qApp ); |
210 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; | 217 | QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; |
211 | if ( trans->load( tfn ) ) { | 218 | if ( trans->load( tfn ) ) { |
212 | qApp->installTranslator( trans ); | 219 | qApp->installTranslator( trans ); |
213 | } else { | 220 | } else { |
214 | delete trans; | 221 | delete trans; |
215 | } | 222 | } |
216 | } | 223 | } |
217 | 224 | ||
218 | // find out if plugins should be shown | 225 | // find out if plugins should be shown |
219 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { | 226 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { |
220 | plugin.active = true; | 227 | plugin.active = true; |
221 | } else { | 228 | } else { |
222 | plugin.active = false; | 229 | plugin.active = false; |
223 | } | 230 | } |
224 | 231 | ||
225 | plugin.guiPart = plugin.iface->guiPart(); | 232 | plugin.guiPart = plugin.iface->guiPart(); |
226 | plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); | 233 | plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); |
227 | 234 | ||
228 | // package the whole thing into a qwidget so it can be shown and hidden | 235 | // package the whole thing into a qwidget so it can be shown and hidden |
229 | plugin.guiBox = new QWidget( this ); | 236 | plugin.guiBox = new QWidget( this ); |
230 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); | 237 | QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); |
231 | QPixmap plugPix; | 238 | QPixmap plugPix; |
232 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); | 239 | plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); |
233 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); | 240 | OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); |
234 | plugIcon->setPixmap( plugPix ); | 241 | plugIcon->setPixmap( plugPix ); |
235 | QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); | 242 | QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); |
236 | plugIcon->setName( plugin.guiPart->appName() ); | 243 | plugIcon->setName( plugin.guiPart->appName() ); |
237 | connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); | 244 | connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); |
238 | // a scrollview for each plugin | 245 | // a scrollview for each plugin |
239 | QScrollView* sv = new QScrollView( plugin.guiBox ); | 246 | QScrollView* sv = new QScrollView( plugin.guiBox ); |
240 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); | 247 | QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); |
241 | // not sure if that is good .-) | 248 | // not sure if that is good .-) |
242 | sv->setMinimumHeight( 12 ); | 249 | sv->setMinimumHeight( 12 ); |
243 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 250 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
244 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 251 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
245 | sv->setFrameShape( QFrame::NoFrame ); | 252 | sv->setFrameShape( QFrame::NoFrame ); |
246 | sv->addChild( plugWidget ); | 253 | sv->addChild( plugWidget ); |
247 | // make sure the icon is on the top alligned | 254 | // make sure the icon is on the top alligned |
248 | boxLayout->addWidget( plugIcon, 0, AlignTop ); | 255 | boxLayout->addWidget( plugIcon, 0, AlignTop ); |
249 | boxLayout->addWidget( sv, 0, AlignTop ); | 256 | boxLayout->addWidget( sv, 0, AlignTop ); |
250 | boxLayout->setStretchFactor( plugIcon, 1 ); | 257 | boxLayout->setStretchFactor( plugIcon, 1 ); |
251 | boxLayout->setStretchFactor( sv, 9 ); | 258 | boxLayout->setStretchFactor( sv, 9 ); |
252 | // "prebuffer" it in one more list, to get the sorting done | 259 | // "prebuffer" it in one more list, to get the sorting done |
253 | tempList.insert( plugin.name, plugin ); | 260 | tempList.insert( plugin.name, plugin ); |
254 | 261 | ||
255 | // on first start the list is off course empty | 262 | // on first start the list is off course empty |
256 | if ( m_allApplets.isEmpty() ) { | 263 | if ( m_allApplets.isEmpty() ) { |
257 | layout->addWidget( plugin.guiBox ); | 264 | layout->addWidget( plugin.guiBox ); |
258 | pluginList.append( plugin ); | 265 | pluginList.append( plugin ); |
259 | } | 266 | } |
260 | 267 | ||
261 | // if plugin is not yet in the list, add it to the layout too | 268 | // if plugin is not yet in the list, add it to the layout too |
262 | else if ( !m_allApplets.contains( plugin.name ) ) { | 269 | else if ( !m_allApplets.contains( plugin.name ) ) { |
263 | layout->addWidget( plugin.guiBox ); | 270 | layout->addWidget( plugin.guiBox ); |
264 | pluginList.append( plugin ); | 271 | pluginList.append( plugin ); |
265 | } | 272 | } |
266 | } else { | 273 | } else { |
267 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); | 274 | qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); |
268 | delete lib; | 275 | delete lib; |
269 | } | 276 | } |
270 | } | 277 | } |
271 | 278 | ||
272 | if ( !m_allApplets.isEmpty() ) { | 279 | if ( !m_allApplets.isEmpty() ) { |
273 | TodayPlugin tempPlugin; | 280 | TodayPlugin tempPlugin; |
274 | QStringList::Iterator stringit; | 281 | QStringList::Iterator stringit; |
275 | 282 | ||
276 | for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { | 283 | for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { |
277 | tempPlugin = ( tempList.find( *stringit ) ).data(); | 284 | tempPlugin = ( tempList.find( *stringit ) ).data(); |
278 | if ( !( (tempPlugin.name).isEmpty() ) ) { | 285 | if ( !( (tempPlugin.name).isEmpty() ) ) { |
279 | layout->addWidget( tempPlugin.guiBox ); | 286 | layout->addWidget( tempPlugin.guiBox ); |
280 | pluginList.append( tempPlugin ); | 287 | pluginList.append( tempPlugin ); |
281 | } | 288 | } |
282 | } | 289 | } |
283 | } | 290 | } |
284 | draw(); | 291 | draw(); |
285 | } | 292 | } |
286 | 293 | ||
287 | 294 | ||
288 | /** | 295 | /** |
289 | * Repaint method. Reread all fields. | 296 | * Repaint method. Reread all fields. |
290 | */ | 297 | */ |
291 | void Today::draw() { | 298 | void Today::draw() { |
292 | 299 | ||
293 | if ( pluginList.count() == 0 ) { | 300 | if ( pluginList.count() == 0 ) { |
294 | QLabel *noPlugins = new QLabel( this ); | 301 | QLabel *noPlugins = new QLabel( this ); |
295 | noPlugins->setText( tr( "No plugins found" ) ); | 302 | noPlugins->setText( tr( "No plugins found" ) ); |
296 | layout->addWidget( noPlugins ); | 303 | layout->addWidget( noPlugins ); |
297 | return; | 304 | return; |
298 | } | 305 | } |
299 | 306 | ||
300 | uint count = 0; | 307 | uint count = 0; |
301 | TodayPlugin plugin; | 308 | TodayPlugin plugin; |
302 | for ( uint i = 0; i < pluginList.count(); i++ ) { | 309 | for ( uint i = 0; i < pluginList.count(); i++ ) { |
303 | plugin = pluginList[i]; | 310 | plugin = pluginList[i]; |
304 | 311 | ||
305 | if ( plugin.active ) { | 312 | if ( plugin.active ) { |
306 | // qDebug( plugin.name + " is ACTIVE " ); | 313 | // qDebug( plugin.name + " is ACTIVE " ); |
307 | plugin.guiBox->show(); | 314 | plugin.guiBox->show(); |
308 | } else { | 315 | } else { |
309 | // qDebug( plugin.name + " is INACTIVE" ); | 316 | // qDebug( plugin.name + " is INACTIVE" ); |
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp index 0337a94..239c824 100644 --- a/core/qws/transferserver.cpp +++ b/core/qws/transferserver.cpp | |||
@@ -1,244 +1,263 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #define _XOPEN_SOURCE | 20 | #define _XOPEN_SOURCE |
21 | #include <pwd.h> | 21 | #include <pwd.h> |
22 | #include <sys/types.h> | 22 | #include <sys/types.h> |
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | #include <stdlib.h> | 24 | #include <stdlib.h> |
25 | #include <time.h> | 25 | #include <time.h> |
26 | |||
27 | #ifndef Q_OS_MACX | ||
26 | #include <shadow.h> | 28 | #include <shadow.h> |
29 | #endif /* Q_OS_MACX */ | ||
27 | 30 | ||
28 | /* we need the _OS_LINUX stuff first ! */ | 31 | /* we need the _OS_LINUX stuff first ! */ |
29 | #include <qglobal.h> | 32 | #include <qglobal.h> |
30 | 33 | ||
31 | #ifndef _OS_LINUX_ | 34 | #ifndef _OS_LINUX_ |
35 | // Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found | ||
36 | // anywhere ? Therfore I removed it completely.. | ||
37 | // I think it should be made permanentyl !? (eilers) | ||
38 | #warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)" | ||
39 | #if 0 | ||
32 | 40 | ||
33 | extern "C" | 41 | extern "C" |
34 | { | 42 | { |
35 | #include <uuid/uuid.h> | 43 | #include <uuid/uuid.h> |
36 | #define UUID_H_INCLUDED | 44 | #define UUID_H_INCLUDED |
37 | } | 45 | } |
38 | 46 | ||
47 | #endif | ||
48 | |||
39 | #endif // not defined linux | 49 | #endif // not defined linux |
40 | 50 | ||
41 | #if defined(_OS_LINUX_) | 51 | #if defined(_OS_LINUX_) |
42 | #include <shadow.h> | 52 | #include <shadow.h> |
53 | #elif defined(Q_OS_MACX) | ||
54 | #include <stdlib.h> | ||
43 | #endif | 55 | #endif |
44 | 56 | ||
45 | #include <qdir.h> | 57 | #include <qdir.h> |
46 | #include <qfile.h> | 58 | #include <qfile.h> |
47 | #include <qtextstream.h> | 59 | #include <qtextstream.h> |
48 | #include <qdatastream.h> | 60 | #include <qdatastream.h> |
49 | #include <qmessagebox.h> | 61 | #include <qmessagebox.h> |
50 | #include <qstringlist.h> | 62 | #include <qstringlist.h> |
51 | #include <qfileinfo.h> | 63 | #include <qfileinfo.h> |
52 | #include <qregexp.h> | 64 | #include <qregexp.h> |
53 | //#include <qpe/qcopchannel_qws.h> | 65 | //#include <qpe/qcopchannel_qws.h> |
54 | #include <qpe/process.h> | 66 | #include <qpe/process.h> |
55 | #include <qpe/global.h> | 67 | #include <qpe/global.h> |
56 | #include <qpe/config.h> | 68 | #include <qpe/config.h> |
57 | #include <qpe/contact.h> | 69 | #include <qpe/contact.h> |
58 | #include <qpe/quuid.h> | 70 | #include <qpe/quuid.h> |
59 | #include <qpe/version.h> | 71 | #include <qpe/version.h> |
60 | #include <qpe/qcopenvelope_qws.h> | 72 | #include <qpe/qcopenvelope_qws.h> |
61 | 73 | ||
62 | #include "transferserver.h" | 74 | #include "transferserver.h" |
63 | #include <opie/oprocess.h> | 75 | #include <opie/oprocess.h> |
64 | 76 | ||
65 | const int block_size = 51200; | 77 | const int block_size = 51200; |
66 | 78 | ||
67 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent , | 79 | TransferServer::TransferServer( Q_UINT16 port, QObject *parent , |
68 | const char* name ) | 80 | const char* name ) |
69 | : QServerSocket( port, 1, parent, name ) | 81 | : QServerSocket( port, 1, parent, name ) |
70 | { | 82 | { |
71 | if ( !ok() ) | 83 | if ( !ok() ) |
72 | qWarning( "Failed to bind to port %d", port ); | 84 | qWarning( "Failed to bind to port %d", port ); |
73 | } | 85 | } |
74 | 86 | ||
75 | TransferServer::~TransferServer() | 87 | TransferServer::~TransferServer() |
76 | { | 88 | { |
77 | } | 89 | } |
78 | 90 | ||
79 | void TransferServer::newConnection( int socket ) | 91 | void TransferServer::newConnection( int socket ) |
80 | { | 92 | { |
81 | (void) new ServerPI( socket, this ); | 93 | (void) new ServerPI( socket, this ); |
82 | } | 94 | } |
83 | 95 | ||
84 | /* | 96 | /* |
85 | * small class in anonymous namespace | 97 | * small class in anonymous namespace |
86 | * to generate a QUUid for us | 98 | * to generate a QUUid for us |
87 | */ | 99 | */ |
88 | namespace | 100 | namespace |
89 | { | 101 | { |
90 | struct UidGen | 102 | struct UidGen |
91 | { | 103 | { |
92 | QString uuid(); | 104 | QString uuid(); |
93 | }; | 105 | }; |
94 | #if !defined(_OS_LINUX_) | 106 | #if defined(Q_OS_MACX) |
95 | |||
96 | QString UidGen::uuid() | 107 | QString UidGen::uuid() |
97 | { | 108 | { |
98 | uuid_t uuid; | 109 | srandom( random() ); |
99 | uuid_generate( uuid ); | 110 | QString numStr = QString::number( random() ); |
100 | return QUUid( uuid ).toString(); | 111 | |
112 | return "{" + numStr + "}"; | ||
101 | } | 113 | } |
102 | #else | 114 | #elif defined(_OS_LINUX_) |
103 | /* | 115 | /* |
104 | * linux got a /proc/sys/kernel/random/uuid file | 116 | * linux got a /proc/sys/kernel/random/uuid file |
105 | * it'll generate the uuids for us | 117 | * it'll generate the uuids for us |
106 | */ | 118 | */ |
107 | QString UidGen::uuid() | 119 | QString UidGen::uuid() |
108 | { | 120 | { |
109 | QFile file( "/proc/sys/kernel/random/uuid" ); | 121 | QFile file( "/proc/sys/kernel/random/uuid" ); |
110 | if (!file.open(IO_ReadOnly ) ) | 122 | if (!file.open(IO_ReadOnly ) ) |
111 | return QString::null; | 123 | return QString::null; |
112 | 124 | ||
113 | QTextStream stream(&file); | 125 | QTextStream stream(&file); |
114 | 126 | ||
115 | return "{" + stream.read().stripWhiteSpace() + "}"; | 127 | return "{" + stream.read().stripWhiteSpace() + "}"; |
116 | } | 128 | } |
129 | #else | ||
130 | QString UidGen::uuid() | ||
131 | { | ||
132 | uuid_t uuid; | ||
133 | ::uuid_generate( uuid ); | ||
134 | return QUUid( uuid ).toString(); | ||
135 | } | ||
117 | #endif | 136 | #endif |
118 | } | 137 | } |
119 | 138 | ||
120 | QString SyncAuthentication::serverId() | 139 | QString SyncAuthentication::serverId() |
121 | { | 140 | { |
122 | Config cfg("Security"); | 141 | Config cfg("Security"); |
123 | cfg.setGroup("Sync"); | 142 | cfg.setGroup("Sync"); |
124 | QString r = cfg.readEntry("serverid"); | 143 | QString r = cfg.readEntry("serverid"); |
125 | if ( r.isEmpty() ) { | 144 | if ( r.isEmpty() ) { |
126 | UidGen gen; | 145 | UidGen gen; |
127 | r = gen.uuid(); | 146 | r = gen.uuid(); |
128 | cfg.writeEntry("serverid", r ); | 147 | cfg.writeEntry("serverid", r ); |
129 | } | 148 | } |
130 | return r; | 149 | return r; |
131 | } | 150 | } |
132 | 151 | ||
133 | QString SyncAuthentication::ownerName() | 152 | QString SyncAuthentication::ownerName() |
134 | { | 153 | { |
135 | QString vfilename = Global::applicationFileName("addressbook", | 154 | QString vfilename = Global::applicationFileName("addressbook", |
136 | "businesscard.vcf"); | 155 | "businesscard.vcf"); |
137 | if (QFile::exists(vfilename)) { | 156 | if (QFile::exists(vfilename)) { |
138 | Contact c; | 157 | Contact c; |
139 | c = Contact::readVCard( vfilename )[0]; | 158 | c = Contact::readVCard( vfilename )[0]; |
140 | return c.fullName(); | 159 | return c.fullName(); |
141 | } | 160 | } |
142 | 161 | ||
143 | return ""; | 162 | return ""; |
144 | } | 163 | } |
145 | 164 | ||
146 | QString SyncAuthentication::loginName() | 165 | QString SyncAuthentication::loginName() |
147 | { | 166 | { |
148 | struct passwd *pw; | 167 | struct passwd *pw; |
149 | pw = getpwuid( geteuid() ); | 168 | pw = getpwuid( geteuid() ); |
150 | return QString::fromLocal8Bit( pw->pw_name ); | 169 | return QString::fromLocal8Bit( pw->pw_name ); |
151 | } | 170 | } |
152 | 171 | ||
153 | int SyncAuthentication::isAuthorized(QHostAddress peeraddress) | 172 | int SyncAuthentication::isAuthorized(QHostAddress peeraddress) |
154 | { | 173 | { |
155 | Config cfg("Security"); | 174 | Config cfg("Security"); |
156 | cfg.setGroup("Sync"); | 175 | cfg.setGroup("Sync"); |
157 | // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); | 176 | // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); |
158 | uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); | 177 | uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); |
159 | 178 | ||
160 | // QHostAddress allowed; | 179 | // QHostAddress allowed; |
161 | // allowed.setAddress(allowedstr); | 180 | // allowed.setAddress(allowedstr); |
162 | // uint auth_peer = allowed.ip4Addr(); | 181 | // uint auth_peer = allowed.ip4Addr(); |
163 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); | 182 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); |
164 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined | 183 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined |
165 | ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); | 184 | ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); |
166 | return (peeraddress.ip4Addr() & mask) == auth_peer; | 185 | return (peeraddress.ip4Addr() & mask) == auth_peer; |
167 | } | 186 | } |
168 | 187 | ||
169 | bool SyncAuthentication::checkUser( const QString& user ) | 188 | bool SyncAuthentication::checkUser( const QString& user ) |
170 | { | 189 | { |
171 | if ( user.isEmpty() ) | 190 | if ( user.isEmpty() ) |
172 | return FALSE; | 191 | return FALSE; |
173 | QString euser = loginName(); | 192 | QString euser = loginName(); |
174 | return user == euser; | 193 | return user == euser; |
175 | } | 194 | } |
176 | 195 | ||
177 | bool SyncAuthentication::checkPassword( const QString& password ) | 196 | bool SyncAuthentication::checkPassword( const QString& password ) |
178 | { | 197 | { |
179 | #ifdef ALLOW_UNIX_USER_FTP | 198 | #ifdef ALLOW_UNIX_USER_FTP |
180 | // First, check system password... | 199 | // First, check system password... |
181 | 200 | ||
182 | struct passwd *pw = 0; | 201 | struct passwd *pw = 0; |
183 | struct spwd *spw = 0; | 202 | struct spwd *spw = 0; |
184 | 203 | ||
185 | pw = getpwuid( geteuid() ); | 204 | pw = getpwuid( geteuid() ); |
186 | spw = getspnam( pw->pw_name ); | 205 | spw = getspnam( pw->pw_name ); |
187 | 206 | ||
188 | QString cpwd = QString::fromLocal8Bit( pw->pw_passwd ); | 207 | QString cpwd = QString::fromLocal8Bit( pw->pw_passwd ); |
189 | if ( cpwd == "x" && spw ) | 208 | if ( cpwd == "x" && spw ) |
190 | cpwd = QString::fromLocal8Bit( spw->sp_pwdp ); | 209 | cpwd = QString::fromLocal8Bit( spw->sp_pwdp ); |
191 | 210 | ||
192 | // Note: some systems use more than crypt for passwords. | 211 | // Note: some systems use more than crypt for passwords. |
193 | QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) ); | 212 | QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) ); |
194 | if ( cpwd == cpassword ) | 213 | if ( cpwd == cpassword ) |
195 | return TRUE; | 214 | return TRUE; |
196 | #endif | 215 | #endif |
197 | 216 | ||
198 | static int lastdenial = 0; | 217 | static int lastdenial = 0; |
199 | static int denials = 0; | 218 | static int denials = 0; |
200 | int now = time(0); | 219 | int now = time(0); |
201 | 220 | ||
202 | // Detect old Qtopia Desktop (no password) | 221 | // Detect old Qtopia Desktop (no password) |
203 | if ( password.isEmpty() ) { | 222 | if ( password.isEmpty() ) { |
204 | if ( denials < 1 || now > lastdenial + 600 ) { | 223 | if ( denials < 1 || now > lastdenial + 600 ) { |
205 | QMessageBox::warning( 0, tr("Sync Connection"), | 224 | QMessageBox::warning( 0, tr("Sync Connection"), |
206 | tr("<p>An unauthorized system is requesting access to this device." | 225 | tr("<p>An unauthorized system is requesting access to this device." |
207 | "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " | 226 | "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " |
208 | "please upgrade."), | 227 | "please upgrade."), |
209 | tr("Deny") ); | 228 | tr("Deny") ); |
210 | denials++; | 229 | denials++; |
211 | lastdenial = now; | 230 | lastdenial = now; |
212 | } | 231 | } |
213 | return FALSE; | 232 | return FALSE; |
214 | } | 233 | } |
215 | 234 | ||
216 | // Second, check sync password... | 235 | // Second, check sync password... |
217 | QString pass = password.left(6); | 236 | QString pass = password.left(6); |
218 | /* old QtopiaDesktops are sending | 237 | /* old QtopiaDesktops are sending |
219 | * rootme newer versions got a Qtopia | 238 | * rootme newer versions got a Qtopia |
220 | * prefixed. Qtopia prefix will suceed | 239 | * prefixed. Qtopia prefix will suceed |
221 | * until the sync software syncs up | 240 | * until the sync software syncs up |
222 | * FIXME | 241 | * FIXME |
223 | */ | 242 | */ |
224 | if ( pass == "rootme" || pass == "Qtopia") { | 243 | if ( pass == "rootme" || pass == "Qtopia") { |
225 | 244 | ||
226 | QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) ); | 245 | QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) ); |
227 | Config cfg("Security"); | 246 | Config cfg("Security"); |
228 | cfg.setGroup("Sync"); | 247 | cfg.setGroup("Sync"); |
229 | QString pwds = cfg.readEntry("Passwords"); | 248 | QString pwds = cfg.readEntry("Passwords"); |
230 | if ( QStringList::split(QChar(' '), pwds).contains(cpassword) ) | 249 | if ( QStringList::split(QChar(' '), pwds).contains(cpassword) ) |
231 | return TRUE; | 250 | return TRUE; |
232 | 251 | ||
233 | // Unrecognized system. Be careful... | 252 | // Unrecognized system. Be careful... |
234 | 253 | ||
235 | if ( (denials > 2 && now < lastdenial + 600) | 254 | if ( (denials > 2 && now < lastdenial + 600) |
236 | || QMessageBox::warning(0, tr("Sync Connection"), | 255 | || QMessageBox::warning(0, tr("Sync Connection"), |
237 | tr("<p>An unrecognized system is requesting access to this device." | 256 | tr("<p>An unrecognized system is requesting access to this device." |
238 | "<p>If you have just initiated a Sync for the first time, this is normal."), | 257 | "<p>If you have just initiated a Sync for the first time, this is normal."), |
239 | tr("Allow"), tr("Deny"), 0, 1, 1 ) == 1 ) { | 258 | tr("Allow"), tr("Deny"), 0, 1, 1 ) == 1 ) { |
240 | denials++; | 259 | denials++; |
241 | lastdenial = now; | 260 | lastdenial = now; |
242 | return FALSE; | 261 | return FALSE; |
243 | } | 262 | } |
244 | else { | 263 | else { |
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 5a9fada..6fca621 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp | |||
@@ -1,159 +1,163 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | 3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "menusettings.h" | 29 | #include "menusettings.h" |
30 | 30 | ||
31 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 32 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/menuappletinterface.h> | 34 | #include <qpe/menuappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
36 | 36 | ||
37 | #include <qdir.h> | 37 | #include <qdir.h> |
38 | #include <qlistview.h> | 38 | #include <qlistview.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qheader.h> | 40 | #include <qheader.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qwhatsthis.h> | 43 | #include <qwhatsthis.h> |
44 | 44 | ||
45 | #include <stdlib.h> | 45 | #include <stdlib.h> |
46 | 46 | ||
47 | 47 | ||
48 | MenuSettings::MenuSettings ( QWidget *parent, const char *name ) | 48 | MenuSettings::MenuSettings ( QWidget *parent, const char *name ) |
49 | : QWidget ( parent, name ) | 49 | : QWidget ( parent, name ) |
50 | { | 50 | { |
51 | m_applets_changed = false; | 51 | m_applets_changed = false; |
52 | 52 | ||
53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
54 | 54 | ||
55 | QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); | 55 | QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); |
56 | lay-> addWidget ( l ); | 56 | lay-> addWidget ( l ); |
57 | 57 | ||
58 | m_list = new QListView ( this ); | 58 | m_list = new QListView ( this ); |
59 | m_list-> addColumn ( "foobar" ); | 59 | m_list-> addColumn ( "foobar" ); |
60 | m_list-> header ( )-> hide ( ); | 60 | m_list-> header ( )-> hide ( ); |
61 | 61 | ||
62 | lay-> addWidget ( m_list ); | 62 | lay-> addWidget ( m_list ); |
63 | 63 | ||
64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); | 64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); |
65 | lay-> addWidget ( m_menutabs ); | 65 | lay-> addWidget ( m_menutabs ); |
66 | 66 | ||
67 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); | 67 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); |
68 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); | 68 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); |
69 | 69 | ||
70 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 70 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
71 | 71 | ||
72 | init ( ); | 72 | init ( ); |
73 | } | 73 | } |
74 | 74 | ||
75 | void MenuSettings::init ( ) | 75 | void MenuSettings::init ( ) |
76 | { | 76 | { |
77 | Config cfg ( "StartMenu" ); | 77 | Config cfg ( "StartMenu" ); |
78 | cfg. setGroup ( "Applets" ); | 78 | cfg. setGroup ( "Applets" ); |
79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
80 | 80 | ||
81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
82 | #ifdef Q_OS_MACX | ||
83 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | ||
84 | #else | ||
82 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 85 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
86 | #endif /* Q_OS_MACX */ | ||
83 | 87 | ||
84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 88 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
85 | QString name; | 89 | QString name; |
86 | QPixmap icon; | 90 | QPixmap icon; |
87 | MenuAppletInterface *iface = 0; | 91 | MenuAppletInterface *iface = 0; |
88 | 92 | ||
89 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 93 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
90 | lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); | 94 | lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); |
91 | if ( iface ) { | 95 | if ( iface ) { |
92 | QString lang = getenv( "LANG" ); | 96 | QString lang = getenv( "LANG" ); |
93 | QTranslator *trans = new QTranslator ( qApp ); | 97 | QTranslator *trans = new QTranslator ( qApp ); |
94 | QString type = (*it). left ((*it). find (".")); | 98 | QString type = (*it). left ((*it). find (".")); |
95 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; | 99 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; |
96 | if ( trans-> load ( tfn )) | 100 | if ( trans-> load ( tfn )) |
97 | qApp-> installTranslator ( trans ); | 101 | qApp-> installTranslator ( trans ); |
98 | else | 102 | else |
99 | delete trans; | 103 | delete trans; |
100 | name = iface-> name ( ); | 104 | name = iface-> name ( ); |
101 | icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); | 105 | icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); |
102 | iface-> release ( ); | 106 | iface-> release ( ); |
103 | lib-> unload ( ); | 107 | lib-> unload ( ); |
104 | 108 | ||
105 | QCheckListItem *item; | 109 | QCheckListItem *item; |
106 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 110 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
107 | if ( !icon. isNull ( )) | 111 | if ( !icon. isNull ( )) |
108 | item-> setPixmap ( 0, icon ); | 112 | item-> setPixmap ( 0, icon ); |
109 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 113 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
110 | m_applets [*it] = item; | 114 | m_applets [*it] = item; |
111 | } else { | 115 | } else { |
112 | delete lib; | 116 | delete lib; |
113 | } | 117 | } |
114 | } | 118 | } |
115 | 119 | ||
116 | cfg. setGroup ( "Menu" ); | 120 | cfg. setGroup ( "Menu" ); |
117 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); | 121 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); |
118 | } | 122 | } |
119 | 123 | ||
120 | void MenuSettings::appletChanged() | 124 | void MenuSettings::appletChanged() |
121 | { | 125 | { |
122 | m_applets_changed = true; | 126 | m_applets_changed = true; |
123 | } | 127 | } |
124 | 128 | ||
125 | void MenuSettings::accept ( ) | 129 | void MenuSettings::accept ( ) |
126 | { | 130 | { |
127 | bool apps_changed = false; | 131 | bool apps_changed = false; |
128 | 132 | ||
129 | Config cfg ( "StartMenu" ); | 133 | Config cfg ( "StartMenu" ); |
130 | cfg. setGroup ( "Applets" ); | 134 | cfg. setGroup ( "Applets" ); |
131 | if ( m_applets_changed ) { | 135 | if ( m_applets_changed ) { |
132 | QStringList exclude; | 136 | QStringList exclude; |
133 | QMap <QString, QCheckListItem *>::Iterator it; | 137 | QMap <QString, QCheckListItem *>::Iterator it; |
134 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { | 138 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { |
135 | if ( !(*it)-> isOn ( )) | 139 | if ( !(*it)-> isOn ( )) |
136 | exclude << it. key ( ); | 140 | exclude << it. key ( ); |
137 | } | 141 | } |
138 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); | 142 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); |
139 | } | 143 | } |
140 | cfg. writeEntry ( "SafeMode", false ); | 144 | cfg. writeEntry ( "SafeMode", false ); |
141 | 145 | ||
142 | cfg. setGroup ( "Menu" ); | 146 | cfg. setGroup ( "Menu" ); |
143 | 147 | ||
144 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { | 148 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { |
145 | apps_changed = true; | 149 | apps_changed = true; |
146 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); | 150 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); |
147 | } | 151 | } |
148 | 152 | ||
149 | cfg. write ( ); | 153 | cfg. write ( ); |
150 | 154 | ||
151 | if ( m_applets_changed ) { | 155 | if ( m_applets_changed ) { |
152 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | 156 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); |
153 | m_applets_changed = false; | 157 | m_applets_changed = false; |
154 | } | 158 | } |
155 | if ( apps_changed ) { | 159 | if ( apps_changed ) { |
156 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); | 160 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); |
157 | } | 161 | } |
158 | } | 162 | } |
159 | 163 | ||
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index b3e302a..d03ea49 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -1,156 +1,173 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | 3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "taskbarsettings.h" | 29 | #include "taskbarsettings.h" |
30 | 30 | ||
31 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 32 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/taskbarappletinterface.h> | 34 | #include <qpe/taskbarappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 35 | #include <qpe/qcopenvelope_qws.h> |
36 | 36 | ||
37 | #include <qdir.h> | 37 | #include <qdir.h> |
38 | #include <qlistview.h> | 38 | #include <qlistview.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qheader.h> | 40 | #include <qheader.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qwhatsthis.h> | 43 | #include <qwhatsthis.h> |
44 | 44 | ||
45 | #include <stdlib.h> | 45 | #include <stdlib.h> |
46 | 46 | ||
47 | 47 | ||
48 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) | 48 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) |
49 | : QWidget ( parent, name ) | 49 | : QWidget ( parent, name ) |
50 | { | 50 | { |
51 | m_applets_changed = false; | 51 | m_applets_changed = false; |
52 | 52 | ||
53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 53 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
54 | 54 | ||
55 | QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); | 55 | QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); |
56 | lay-> addWidget ( l ); | 56 | lay-> addWidget ( l ); |
57 | 57 | ||
58 | m_list = new QListView ( this ); | 58 | m_list = new QListView ( this ); |
59 | m_list-> addColumn ( "foobar" ); | 59 | m_list-> addColumn ( "foobar" ); |
60 | m_list-> header ( )-> hide ( ); | 60 | m_list-> header ( )-> hide ( ); |
61 | 61 | ||
62 | lay-> addWidget ( m_list ); | 62 | lay-> addWidget ( m_list ); |
63 | 63 | ||
64 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); | 64 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); |
65 | 65 | ||
66 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 66 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
67 | 67 | ||
68 | init ( ); | 68 | init ( ); |
69 | } | 69 | } |
70 | 70 | ||
71 | void TaskbarSettings::init ( ) | 71 | void TaskbarSettings::init ( ) |
72 | { | 72 | { |
73 | Config cfg ( "Taskbar" ); | 73 | Config cfg ( "Taskbar" ); |
74 | cfg. setGroup ( "Applets" ); | 74 | cfg. setGroup ( "Applets" ); |
75 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 75 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
76 | 76 | ||
77 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 77 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
78 | #ifdef Q_OS_MACX | ||
79 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | ||
80 | #else | ||
78 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 81 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
82 | #endif /* Q_OS_MACX */ | ||
79 | 83 | ||
80 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
81 | QString name; | 85 | QString name; |
82 | QPixmap icon; | 86 | QPixmap icon; |
83 | TaskbarNamedAppletInterface *iface = 0; | 87 | TaskbarNamedAppletInterface *iface = 0; |
84 | 88 | ||
89 | qWarning("Load applet: %s", (*it).latin1() ); | ||
85 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 90 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
86 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); | 91 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); |
92 | qWarning("<1>"); | ||
87 | if ( iface ) { | 93 | if ( iface ) { |
94 | qWarning("<2>"); | ||
88 | QString lang = getenv( "LANG" ); | 95 | QString lang = getenv( "LANG" ); |
89 | QTranslator *trans = new QTranslator ( qApp ); | 96 | QTranslator *trans = new QTranslator ( qApp ); |
90 | QString type = (*it). left ((*it). find (".")); | 97 | QString type = (*it). left ((*it). find (".")); |
91 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; | 98 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; |
92 | if ( trans-> load ( tfn )) | 99 | if ( trans-> load ( tfn )) |
93 | qApp-> installTranslator ( trans ); | 100 | qApp-> installTranslator ( trans ); |
94 | else | 101 | else |
95 | delete trans; | 102 | delete trans; |
96 | name = iface-> name ( ); | 103 | name = iface-> name ( ); |
97 | icon = iface-> icon ( ); | 104 | icon = iface-> icon ( ); |
98 | iface-> release ( ); | 105 | iface-> release ( ); |
99 | } | 106 | } |
107 | qWarning("<3>"); | ||
100 | if ( !iface ) { | 108 | if ( !iface ) { |
109 | qWarning("<4>"); | ||
101 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); | 110 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); |
102 | 111 | ||
103 | if ( iface ) { | 112 | if ( iface ) { |
113 | qWarning("<5>"); | ||
104 | name = (*it). mid ( 3 ); | 114 | name = (*it). mid ( 3 ); |
115 | qWarning("Found applet: %s", name.latin1() ); | ||
116 | #ifdef Q_OS_MACX | ||
117 | int sep = name. find( ".dylib" ); | ||
118 | #else | ||
105 | int sep = name. find( ".so" ); | 119 | int sep = name. find( ".so" ); |
120 | #endif /* Q_OS_MACX */ | ||
106 | if ( sep > 0 ) | 121 | if ( sep > 0 ) |
107 | name. truncate ( sep ); | 122 | name. truncate ( sep ); |
108 | sep = name. find ( "applet" ); | 123 | sep = name. find ( "applet" ); |
109 | if ( sep == (int) name.length ( ) - 6 ) | 124 | if ( sep == (int) name.length ( ) - 6 ) |
110 | name. truncate ( sep ); | 125 | name. truncate ( sep ); |
111 | name[0] = name[0]. upper ( ); | 126 | name[0] = name[0]. upper ( ); |
112 | iface-> release ( ); | 127 | iface-> release ( ); |
113 | } | 128 | } |
114 | } | 129 | } |
130 | qWarning("<6>"); | ||
115 | 131 | ||
116 | if ( iface ) { | 132 | if ( iface ) { |
133 | qWarning("<7>"); | ||
117 | QCheckListItem *item; | 134 | QCheckListItem *item; |
118 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 135 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
119 | if ( !icon. isNull ( )) | 136 | if ( !icon. isNull ( )) |
120 | item-> setPixmap ( 0, icon ); | 137 | item-> setPixmap ( 0, icon ); |
121 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 138 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
122 | m_applets [*it] = item; | 139 | m_applets [*it] = item; |
123 | } | 140 | } |
124 | lib-> unload ( ); | 141 | lib-> unload ( ); |
125 | delete lib; | 142 | delete lib; |
126 | } | 143 | } |
127 | } | 144 | } |
128 | 145 | ||
129 | void TaskbarSettings::appletChanged() | 146 | void TaskbarSettings::appletChanged() |
130 | { | 147 | { |
131 | m_applets_changed = true; | 148 | m_applets_changed = true; |
132 | } | 149 | } |
133 | 150 | ||
134 | void TaskbarSettings::accept ( ) | 151 | void TaskbarSettings::accept ( ) |
135 | { | 152 | { |
136 | Config cfg ( "Taskbar" ); | 153 | Config cfg ( "Taskbar" ); |
137 | cfg. setGroup ( "Applets" ); | 154 | cfg. setGroup ( "Applets" ); |
138 | 155 | ||
139 | if ( m_applets_changed ) { | 156 | if ( m_applets_changed ) { |
140 | QStringList exclude; | 157 | QStringList exclude; |
141 | QMap <QString, QCheckListItem *>::Iterator it; | 158 | QMap <QString, QCheckListItem *>::Iterator it; |
142 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { | 159 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { |
143 | if ( !(*it)-> isOn ( )) | 160 | if ( !(*it)-> isOn ( )) |
144 | exclude << it. key ( ); | 161 | exclude << it. key ( ); |
145 | } | 162 | } |
146 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); | 163 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); |
147 | } | 164 | } |
148 | cfg. writeEntry ( "SafeMode", false ); | 165 | cfg. writeEntry ( "SafeMode", false ); |
149 | cfg. write ( ); | 166 | cfg. write ( ); |
150 | 167 | ||
151 | if ( m_applets_changed ) { | 168 | if ( m_applets_changed ) { |
152 | QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" ); | 169 | QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" ); |
153 | m_applets_changed = false; | 170 | m_applets_changed = false; |
154 | } | 171 | } |
155 | } | 172 | } |
156 | 173 | ||
diff --git a/development/keyview/keyview.pro b/development/keyview/keyview.pro index 70cc171..ca657bd 100644 --- a/development/keyview/keyview.pro +++ b/development/keyview/keyview.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | #CONFIG = qt warn_on debug | 2 | #CONFIG = qt plugin warn_on debug |
3 | CONFIG = qt warn_on release | 3 | CONFIG = qt plugin warn_on release |
4 | HEADERS = keyview.h keyboardimpl.h | 4 | HEADERS = keyview.h keyboardimpl.h |
5 | SOURCES = keyview.cpp keyboardimpl.cpp | 5 | SOURCES = keyview.cpp keyboardimpl.cpp |
6 | INCLUDEPATH+= $(OPIEDIR)/include | 6 | INCLUDEPATH+= $(OPIEDIR)/include |
7 | DEPENDPATH+= $(OPIEDIR)/include ../../launcher | 7 | DEPENDPATH+= $(OPIEDIR)/include ../../launcher |
8 | LIBS += -lqpe | 8 | LIBS += -lqpe |
9 | INTERFACES= | 9 | INTERFACES= |
10 | TARGET = keyview | 10 | TARGET = keyview |
11 | DESTDIR = $(OPIEDIR)/plugins/inputmethods | 11 | DESTDIR = $(OPIEDIR)/plugins/inputmethods |
12 | 12 | ||
13 | TRANSLATIONS = ../i18n/de/keyview.ts \ | 13 | TRANSLATIONS = ../i18n/de/keyview.ts \ |
14 | ../i18n/nl/keyview.ts \ | 14 | ../i18n/nl/keyview.ts \ |
15 | ../i18n/da/keyview.ts \ | 15 | ../i18n/da/keyview.ts \ |
16 | ../i18n/xx/keyview.ts \ | 16 | ../i18n/xx/keyview.ts \ |
17 | ../i18n/en/keyview.ts \ | 17 | ../i18n/en/keyview.ts \ |
18 | ../i18n/es/keyview.ts \ | 18 | ../i18n/es/keyview.ts \ |
19 | ../i18n/fr/keyview.ts \ | 19 | ../i18n/fr/keyview.ts \ |
20 | ../i18n/hu/keyview.ts \ | 20 | ../i18n/hu/keyview.ts \ |
21 | ../i18n/ja/keyview.ts \ | 21 | ../i18n/ja/keyview.ts \ |
22 | ../i18n/ko/keyview.ts \ | 22 | ../i18n/ko/keyview.ts \ |
23 | ../i18n/no/keyview.ts \ | 23 | ../i18n/no/keyview.ts \ |
24 | ../i18n/pl/keyview.ts \ | 24 | ../i18n/pl/keyview.ts \ |
25 | ../i18n/pt/keyview.ts \ | 25 | ../i18n/pt/keyview.ts \ |
26 | ../i18n/pt_BR/keyview.ts \ | 26 | ../i18n/pt_BR/keyview.ts \ |
27 | ../i18n/sl/keyview.ts \ | 27 | ../i18n/sl/keyview.ts \ |
28 | ../i18n/zh_CN/keyview.ts \ | 28 | ../i18n/zh_CN/keyview.ts \ |
29 | ../i18n/zh_TW/keyview.ts | 29 | ../i18n/zh_TW/keyview.ts |
30 | 30 | ||
31 | 31 | ||
32 | 32 | ||
33 | include ( $(OPIEDIR)/include.pro ) | 33 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/development/macosx/README_MACOSX b/development/macosx/README_MACOSX new file mode 100644 index 0000000..e2ed15f --- a/dev/null +++ b/development/macosx/README_MACOSX | |||
@@ -0,0 +1,91 @@ | |||
1 | Information about porting Opie to MacOS-X (eilers) | ||
2 | ================================================== | ||
3 | |||
4 | Credits: | ||
5 | -------- | ||
6 | |||
7 | Special thanks to xxxx for its patches for qt-X11 (2.3.2), QT/E (2.3.5) and qtopia (1.6.1). | ||
8 | Without them, I wouldn't be able to provide the port for OPIE to MacOS-X that fast.. | ||
9 | |||
10 | Status: | ||
11 | ------- | ||
12 | The basic system works quite well. But a lot of applications and plugins, | ||
13 | which are platform specific, need some work to be compileable. | ||
14 | |||
15 | What is ready: | ||
16 | |||
17 | libqpe | ||
18 | libopie1 | ||
19 | pim-applications (addressbook, todolist, datebook, today) | ||
20 | A lot of applications and plugins which are not platform specific. | ||
21 | |||
22 | What will follow soon: | ||
23 | |||
24 | libopie2 | ||
25 | |||
26 | Remember: A lot of configuration-settings are not tested (as for instance | ||
27 | the quicklauncher) and might fail to compile. | ||
28 | If you want to avoid misconfigurations, you may want to start with | ||
29 | the config-file in this directory. Just copy "config_macosx" to $OPIEDIR/.config | ||
30 | to get a working configuration to start with. | ||
31 | |||
32 | (The missing apps/plugins will be ported on demand.) | ||
33 | |||
34 | How to compile Opie for MacOS-X: | ||
35 | ------------------------------- | ||
36 | |||
37 | Before compiling for MacOS-X, you need the following: | ||
38 | |||
39 | 1. X11-Server (Provided by Apple) | ||
40 | 2. QT-2.3.2 for X11 | ||
41 | 3. QT/E-2.3.7 | ||
42 | 4. Patches for QT-2.3.2 for MacOSX | ||
43 | 5. Patches for QT/E-2.3.7 for MacOSX | ||
44 | |||
45 | Please follow the instructions by xxxx how to create a buildsystem | ||
46 | for your Mac. | ||
47 | What is different to the previous desciption: | ||
48 | You don't need Qtopia ! | ||
49 | It is recommended to use QT/E in version 2.3.7 instead of 2.3.5 as described. | ||
50 | The Patch for QT/E for Opie, including all other opie-patches is available in the | ||
51 | qt-directory ($OPIEDIR/qt) and is called "qte237-all-macosx.patch" | ||
52 | |||
53 | If your buildsystem is working correctly, you should be able to build | ||
54 | opie. You have to enter "make menuconfig" and set | ||
55 | "Build Parameters"->"Target Machine"->"Mac OS X (DARWIN)" | ||
56 | activate the platform specific changes. | ||
57 | |||
58 | You will see that a lot of applications and plugins/applets will not compile | ||
59 | successfully, due to the fact that they are not ported to this platform. | ||
60 | You may disable them to be able to compile the rest. | ||
61 | |||
62 | |||
63 | Information for Developers: | ||
64 | --------------------------- | ||
65 | |||
66 | 1. Platform specific code should be surrounded by | ||
67 | #ifdef Q_OS_MACX | ||
68 | MACOS-X CODE | ||
69 | #else | ||
70 | OTHER-CODE | ||
71 | #endif | ||
72 | |||
73 | 2. The Plugin-Handling by MacOS-X is different than it is by Linux. | ||
74 | On linux-systems, shared libraries are not different to dynamic loaded libraries | ||
75 | (aka plugins). They just are different whether they are loaded automatically | ||
76 | at startup or manually by any application. | ||
77 | On MacOS-X, the plugins are loaded by a special mechanism and must be in a special | ||
78 | binary format. Therefore you have to add the term "plugin" to the CONFIG-clause, as | ||
79 | for instance: | ||
80 | |||
81 | TEMPLATE=lib | ||
82 | CONFIG += qt plugin release | ||
83 | |||
84 | If you don't add "plugin" you will get a shared library which is not loadable | ||
85 | (Error-Code: NSObjectFileImageInappropriateFile (2))! | ||
86 | |||
87 | |||
88 | |||
89 | For problems, help and flames, feel free to contact me at | ||
90 | |||
91 | eilers.stefan@epost.de \ No newline at end of file | ||
diff --git a/development/macosx/config_macosx b/development/macosx/config_macosx new file mode 100644 index 0000000..eb0792f --- a/dev/null +++ b/development/macosx/config_macosx | |||
@@ -0,0 +1,290 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | |||
5 | # | ||
6 | # Build Parameters | ||
7 | # | ||
8 | # CONFIG_TARGET_X86 is not set | ||
9 | CONFIG_TARGET_MACOSX=y | ||
10 | # CONFIG_TARGET_SHARP is not set | ||
11 | # CONFIG_TARGET_IPAQ is not set | ||
12 | # CONFIG_TARGET_RAMSES is not set | ||
13 | # CONFIG_TARGET_SIMPAD is not set | ||
14 | # CONFIG_TARGET_YOPY is not set | ||
15 | # CONFIG_OPTIMIZE is not set | ||
16 | CONFIG_DEBUG=y | ||
17 | CONFIG_QUICK_LAUNCH=y | ||
18 | # CONFIG_OPIE_NO_OVERRIDE_QT is not set | ||
19 | CONFIG_SPECFILE="qws/macx-generic-g++" | ||
20 | CONFIG_EXPERIMENTAL=y | ||
21 | |||
22 | # | ||
23 | # Base | ||
24 | # | ||
25 | CONFIG_LIBQPE=y | ||
26 | # CONFIG_X11 is not set | ||
27 | CONFIG_LIBOPIE=y | ||
28 | # CONFIG_OPIE-LOGIN is not set | ||
29 | # CONFIG_OPIEALARM is not set | ||
30 | CONFIG_LAUNCHER=y | ||
31 | CONFIG_PRELOAD=y | ||
32 | CONFIG_LAUNCHER_CORE=y | ||
33 | CONFIG_QWS=y | ||
34 | |||
35 | # | ||
36 | # | ||
37 | # | ||
38 | |||
39 | # | ||
40 | # Applets | ||
41 | # | ||
42 | CONFIG_BATTERYAPPLET=y | ||
43 | # CONFIG_CARDMON is not set | ||
44 | CONFIG_CLIPBOARDAPPLET=y | ||
45 | CONFIG_CLOCKAPPLET=y | ||
46 | CONFIG_HOMEAPPLET=y | ||
47 | # CONFIG_IRDAAPPLET is not set | ||
48 | # CONFIG_LOGOUTAPPLET is not set | ||
49 | # CONFIG_OBEXAPPLET is not set | ||
50 | # CONFIG_OBEX is not set | ||
51 | # CONFIG_RESTARTAPPLET is not set | ||
52 | # CONFIG_ROTATEAPPLET is not set | ||
53 | # CONFIG_SCREENSHOTAPPLET is not set | ||
54 | # CONFIG_SUSPENDAPPLET is not set | ||
55 | # CONFIG_VMEMO is not set | ||
56 | # CONFIG_VOLUMEAPPLET is not set | ||
57 | # CONFIG_VTAPPLET is not set | ||
58 | |||
59 | # | ||
60 | # Network applet needs a libqpe and libopie2 (core, ui, net) | ||
61 | # | ||
62 | CONFIG_NOTESAPPLET=y | ||
63 | # CONFIG_WIRELESSAPPLET is not set | ||
64 | |||
65 | # | ||
66 | # Apps | ||
67 | # | ||
68 | # CONFIG_CALIBRATE is not set | ||
69 | # CONFIG_EMBEDDEDKONSOLE is not set | ||
70 | CONFIG_FILEBROWSER=y | ||
71 | CONFIG_HELPBROWSER=y | ||
72 | # CONFIG_OAPP is not set | ||
73 | CONFIG_OIPKG=y | ||
74 | CONFIG_QCOP=y | ||
75 | CONFIG_TEXTEDIT=y | ||
76 | # CONFIG_ADVANCEDFM is not set | ||
77 | # CONFIG_AQPKG is not set | ||
78 | CONFIG_CHECKBOOK=y | ||
79 | # CONFIG_ODICT is not set | ||
80 | # CONFIG_BARTENDER is not set | ||
81 | # CONFIG_OPIE-CONSOLE is not set | ||
82 | # CONFIG_OPIE-READER is not set | ||
83 | CONFIG_OPIE-SHEET=y | ||
84 | CONFIG_OPIE-WRITE=y | ||
85 | CONFIG_OXYGEN=y | ||
86 | CONFIG_SYSINFO=y | ||
87 | CONFIG_TABLEVIEWER=y | ||
88 | CONFIG_TINYKATE=y | ||
89 | CONFIG_LIBKATE=y | ||
90 | # CONFIG_ZSAFE is not set | ||
91 | |||
92 | # | ||
93 | # Communications and Networking | ||
94 | # | ||
95 | # CONFIG_GSMTOOL is not set | ||
96 | # CONFIG_KEYPEBBLE is not set | ||
97 | # CONFIG_MOBILEMSG is not set | ||
98 | # CONFIG_MAIL is not set | ||
99 | # CONFIG_FTPLIB is not set | ||
100 | # CONFIG_MAILIT is not set | ||
101 | # CONFIG_OPIEIRC is not set | ||
102 | # CONFIG_OPIE-RDESKTOP is not set | ||
103 | # CONFIG_UBROWSER is not set | ||
104 | |||
105 | # | ||
106 | # wellenreiter needs libqpe, libopie1 and libopie2 (core+net+ui) | ||
107 | # | ||
108 | |||
109 | # | ||
110 | # Games | ||
111 | # | ||
112 | CONFIG_BACKGAMMON=y | ||
113 | CONFIG_BOUNCE=y | ||
114 | CONFIG_BUZZWORD=y | ||
115 | CONFIG_FIFTEEN=y | ||
116 | CONFIG_GO=y | ||
117 | CONFIG_KBILL=y | ||
118 | CONFIG_KCHECKERS=y | ||
119 | CONFIG_KPACMAN=y | ||
120 | CONFIG_MINDBREAKER=y | ||
121 | CONFIG_MINESWEEP=y | ||
122 | # CONFIG_WORDGAME is not set | ||
123 | CONFIG_PARASHOOT=y | ||
124 | CONFIG_QASTEROIDS=y | ||
125 | # CONFIG_SFCAVE is not set | ||
126 | # CONFIG_SFCAVE-SDL is not set | ||
127 | # CONFIG_SNAKE is not set | ||
128 | CONFIG_SOLITAIRE=y | ||
129 | # CONFIG_TETRIX is not set | ||
130 | # CONFIG_TICTAC is not set | ||
131 | |||
132 | # | ||
133 | # Graphics and Multimedia | ||
134 | # | ||
135 | # CONFIG_FREETYPE is not set | ||
136 | CONFIG_DRAWPAD=y | ||
137 | # CONFIG_QPDF is not set | ||
138 | # CONFIG_OPIEPLAYER is not set | ||
139 | |||
140 | # | ||
141 | # opie-camera needs a libqpe, libopie and libopie2core | ||
142 | # | ||
143 | # CONFIG_OPIEPLAYER2 is not set | ||
144 | # CONFIG_OPIEREC is not set | ||
145 | CONFIG_SHOWIMG=y | ||
146 | |||
147 | # | ||
148 | # Input methods | ||
149 | # | ||
150 | # CONFIG_DASHER is not set | ||
151 | # CONFIG_DVORAK is not set | ||
152 | CONFIG_HANDWRITING=y | ||
153 | |||
154 | # | ||
155 | # opie-handwriting-classicset automatically selected | ||
156 | # | ||
157 | |||
158 | # | ||
159 | # opie-handwriting-graffitiset automatically selected | ||
160 | # | ||
161 | CONFIG_JUMPX=y | ||
162 | # CONFIG_KEYBOARD is not set | ||
163 | CONFIG_KJUMPX=y | ||
164 | # CONFIG_MULTIKEY is not set | ||
165 | CONFIG_PICKBOARD=y | ||
166 | CONFIG_UNIKEYBOARD=y | ||
167 | |||
168 | # | ||
169 | # Pim | ||
170 | # | ||
171 | CONFIG_ADDRESSBOOK=y | ||
172 | CONFIG_DATEBOOK=y | ||
173 | CONFIG_OSEARCH=y | ||
174 | CONFIG_TODAY=y | ||
175 | CONFIG_TODO=y | ||
176 | |||
177 | # | ||
178 | # Today Plugins | ||
179 | # | ||
180 | # CONFIG_TODAY_FORTUNE is not set | ||
181 | # CONFIG_TODAY_STOCKTICKER is not set | ||
182 | # CONFIG_TODAY_WEATHER is not set | ||
183 | CONFIG_TODAY_ADDRESSBOOK=y | ||
184 | CONFIG_TODAY_DATEBOOK=y | ||
185 | CONFIG_TODAY_MAIL=y | ||
186 | CONFIG_TODAY_TODOLIST=y | ||
187 | |||
188 | # | ||
189 | # Settings | ||
190 | # | ||
191 | CONFIG_BUTTON-SETTINGS=y | ||
192 | CONFIG_CITYTIME=y | ||
193 | CONFIG_LAUNCHER-SETTINGS=y | ||
194 | CONFIG_LIGHT-AND-POWER=y | ||
195 | CONFIG_SECURITY=y | ||
196 | CONFIG_APPEARANCE2=y | ||
197 | CONFIG_BACKUP=y | ||
198 | CONFIG_LANGUAGE=y | ||
199 | CONFIG_MEDIUMMOUNT=y | ||
200 | CONFIG_NETSYSTEMTIME=y | ||
201 | # CONFIG_NETWORKSETUP is not set | ||
202 | # CONFIG_SOUND is not set | ||
203 | # CONFIG_SSHKEYS is not set | ||
204 | CONFIG_TABMANAGER=y | ||
205 | # CONFIG_USERMANAGER is not set | ||
206 | |||
207 | # | ||
208 | # Theming | ||
209 | # | ||
210 | |||
211 | # | ||
212 | # Decorations | ||
213 | # | ||
214 | CONFIG_DECO_FLAT=y | ||
215 | CONFIG_DECO_LIQUID=y | ||
216 | CONFIG_DECO_POLISHED=y | ||
217 | |||
218 | # | ||
219 | # Styles | ||
220 | # | ||
221 | CONFIG_FLAT=y | ||
222 | CONFIG_FRESH=y | ||
223 | CONFIG_LIQUID=y | ||
224 | CONFIG_METAL=y | ||
225 | CONFIG_THEME=y | ||
226 | |||
227 | # | ||
228 | # Tools | ||
229 | # | ||
230 | CONFIG_CALCULATOR=y | ||
231 | CONFIG_CLOCK=y | ||
232 | CONFIG_EUROCONV=y | ||
233 | # CONFIG_FORMATTER is not set | ||
234 | CONFIG_OPIE-SH=y | ||
235 | # CONFIG_REMOTE is not set | ||
236 | |||
237 | # | ||
238 | # Development | ||
239 | # | ||
240 | # CONFIG_KEYVIEW is not set | ||
241 | |||
242 | # | ||
243 | # Examples | ||
244 | # | ||
245 | # CONFIG_EXAMPLES is not set | ||
246 | |||
247 | # | ||
248 | # | ||
249 | # | ||
250 | |||
251 | # | ||
252 | # Experimental | ||
253 | # | ||
254 | |||
255 | # | ||
256 | # libopie2 | ||
257 | # | ||
258 | # CONFIG_LIBOPIE2CORE is not set | ||
259 | |||
260 | # | ||
261 | # libopie2db needs a libqpe and libopie2core | ||
262 | # | ||
263 | |||
264 | # | ||
265 | # libopie2net needs a libqpe and libopie2core | ||
266 | # | ||
267 | |||
268 | # | ||
269 | # libopie2pim needs a libqpe and libopie2core | ||
270 | # | ||
271 | |||
272 | # | ||
273 | # libopie2ui needs a libqpe and libopie2core | ||
274 | # | ||
275 | |||
276 | # | ||
277 | # libopie2mm needs a libqpe and libopie2core | ||
278 | # | ||
279 | |||
280 | # | ||
281 | # | ||
282 | # | ||
283 | |||
284 | # | ||
285 | # the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim, libopie2ui and libopie2mm | ||
286 | # | ||
287 | |||
288 | # | ||
289 | # SQL-Support needs libopie2db! | ||
290 | # | ||
diff --git a/include.pro b/include.pro index 70ed731..4bdcaa7 100644 --- a/include.pro +++ b/include.pro | |||
@@ -1,105 +1,115 @@ | |||
1 | include ( $(OPIEDIR)/gen.pro ) | 1 | include ( $(OPIEDIR)/gen.pro ) |
2 | 2 | ||
3 | # base opie install path | 3 | # base opie install path |
4 | prefix = /opt/QtPalmtop | 4 | # prefix = /opt/QtPalmtop ??? Why here (eilers) ??? |
5 | prefix = $(OPIEDIR) | ||
5 | 6 | ||
6 | contains( CONFIG, quick-app-lib ) { | 7 | contains( CONFIG, quick-app-lib ) { |
7 | TEMPLATE = lib | 8 | TEMPLATE = lib |
8 | DESTDIR = $(OPIEDIR)/plugins/application | 9 | DESTDIR = $(OPIEDIR)/plugins/application |
9 | DEFINES += OPIE_APP_INTERFACE | 10 | DEFINES += OPIE_APP_INTERFACE |
10 | !contains( TARGET, launcher ) { | 11 | !contains( TARGET, launcher ) { |
11 | message( Linking $$TARGET to quicklauncher ) | 12 | message( Linking $$TARGET to quicklauncher ) |
12 | system( rm -f $$(OPIEDIR)/bin/$$TARGET ) | 13 | system( rm -f $$(OPIEDIR)/bin/$$TARGET ) |
13 | system( ln -s quicklauncher $$(OPIEDIR)/bin/$$TARGET ) | 14 | system( ln -s quicklauncher $$(OPIEDIR)/bin/$$TARGET ) |
14 | } | 15 | } |
15 | } | 16 | } |
16 | 17 | ||
17 | contains ( CONFIG, quick-app-bin ) { | 18 | contains ( CONFIG, quick-app-bin ) { |
18 | TEMPLATE = app | 19 | TEMPLATE = app |
19 | DESTDIR = $(OPIEDIR)/bin | 20 | DESTDIR = $(OPIEDIR)/bin |
20 | DEFINES -= OPIE_APP_INTERFACE | 21 | DEFINES -= OPIE_APP_INTERFACE |
21 | message( Touching plugins/application/lib$${TARGET}.so ) | 22 | message( Touching plugins/application/lib$${TARGET}.so ) |
22 | system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so ) | 23 | system( touch $$(OPIEDIR)/plugins/application/lib$${TARGET}.so ) |
23 | } | 24 | } |
24 | 25 | ||
25 | 26 | ||
26 | contains( TEMPLATE, lib ) { | 27 | contains( TEMPLATE, lib ) { |
27 | target.path = $$prefix/lib | 28 | target.path = $$prefix/lib |
28 | } | 29 | } |
29 | !contains( TEMPLATE, lib ) { | 30 | !contains( TEMPLATE, lib ) { |
30 | target.path = $$prefix/bin | 31 | target.path = $$prefix/bin |
31 | } | 32 | } |
32 | INSTALLS += target | 33 | INSTALLS += target |
33 | 34 | ||
34 | # ipkg control files | 35 | # ipkg control files |
35 | control.path = /CONTROL | 36 | control.path = /CONTROL |
36 | control.files = control postinst prerm postrm preinst conffiles | 37 | control.files = control postinst prerm postrm preinst conffiles |
37 | INSTALLS += control | 38 | INSTALLS += control |
38 | 39 | ||
39 | # images, default is $$prefix/pics/$$TARGET | 40 | # images, default is $$prefix/pics/$$TARGET |
40 | pics.path = $$prefix/pics/$$TARGET | 41 | pics.path = $$prefix/pics/$$TARGET |
41 | pics.files = pics/* | 42 | pics.files = pics/* |
42 | INSTALLS += pics | 43 | INSTALLS += pics |
43 | 44 | ||
44 | # sounds, default path is $$prefix/sounds/$$TARGET | 45 | # sounds, default path is $$prefix/sounds/$$TARGET |
45 | sounds.path = $$prefix/sounds/$$TARGET | 46 | sounds.path = $$prefix/sounds/$$TARGET |
46 | sounds.files = sounds/* | 47 | sounds.files = sounds/* |
47 | INSTALLS += sounds | 48 | INSTALLS += sounds |
48 | 49 | ||
49 | # init scripts, default path is /etc/init.d | 50 | # init scripts, default path is /etc/init.d |
50 | init.path = /etc/init.d | 51 | init.path = /etc/init.d |
51 | init.files = init.d/* | 52 | init.files = init.d/* |
52 | INSTALLS += init | 53 | INSTALLS += init |
53 | 54 | ||
54 | # data, default path is /usr/share/$$TARGET | 55 | # data, default path is /usr/share/$$TARGET |
55 | data.path = /usr/share/$$TARGET | 56 | data.path = /usr/share/$$TARGET |
56 | data.files = share/* | 57 | data.files = share/* |
57 | INSTALLS += data | 58 | INSTALLS += data |
58 | 59 | ||
59 | etc.path = $$prefix/etc/ | 60 | etc.path = $$prefix/etc/ |
60 | etc.files = etc/* | 61 | etc.files = etc/* |
61 | INSTALLS += etc | 62 | INSTALLS += etc |
62 | 63 | ||
63 | apps.path = $$prefix/apps/ | 64 | apps.path = $$prefix/apps/ |
64 | apps.files = apps/* | 65 | apps.files = apps/* |
65 | INSTALLS += apps | 66 | INSTALLS += apps |
66 | 67 | ||
67 | # sounds, default path is $$prefix/sounds/$$TARGET | 68 | # sounds, default path is $$prefix/sounds/$$TARGET |
68 | sounds.path = $$prefix/sounds/$$TARGET | 69 | sounds.path = $$prefix/sounds/$$TARGET |
69 | sounds.files = sounds/* | 70 | sounds.files = sounds/* |
70 | INSTALLS += sounds | 71 | INSTALLS += sounds |
71 | 72 | ||
72 | # anything in nonstandard paths | 73 | # anything in nonstandard paths |
73 | root.path = / | 74 | root.path = / |
74 | root.files = root/* | 75 | root.files = root/* |
75 | INSTALLS += root | 76 | INSTALLS += root |
76 | 77 | ||
77 | # new targets | 78 | # new targets |
78 | opie-lupdate.target = opie-lupdate | 79 | opie-lupdate.target = opie-lupdate |
79 | opie-lupdate.commands = opie-lupdate $(PRO) | 80 | opie-lupdate.commands = opie-lupdate $(PRO) |
80 | 81 | ||
81 | opie-lrelease.target = opie-lrelease | 82 | opie-lrelease.target = opie-lrelease |
82 | opie-lrelease.commands = opie-lrelease $(PRO) | 83 | opie-lrelease.commands = opie-lrelease $(PRO) |
83 | 84 | ||
84 | lupdate.target = lupdate | 85 | lupdate.target = lupdate |
85 | lupdate.commands = lupdate -noobsolete $(PRO) | 86 | lupdate.commands = lupdate -noobsolete $(PRO) |
86 | 87 | ||
87 | lrelease.target = lrelease | 88 | lrelease.target = lrelease |
88 | lrelease.commands = lrelease $(PRO) | 89 | lrelease.commands = lrelease $(PRO) |
89 | 90 | ||
90 | # new message target to get all strings from the apps with and without tr | 91 | # new message target to get all strings from the apps with and without tr |
91 | messages.target = messages | 92 | messages.target = messages |
92 | messages.commands = xgettext -C -n -ktr -kQT_TRANSLATE_NOOP $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po' | 93 | messages.commands = xgettext -C -n -ktr -kQT_TRANSLATE_NOOP $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a $$HEADERS $$SOURCES -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po' |
93 | 94 | ||
94 | ipk.target = ipk | 95 | ipk.target = ipk |
95 | ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) | 96 | ipk.commands = tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="$$$$tmp" install && ipkg-build $$$$tmp; rm -rf $$$$tmp; ) |
96 | 97 | ||
97 | QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk opie-lupdate opie-lrelease messages | 98 | QMAKE_EXTRA_UNIX_TARGETS += lupdate lrelease ipk opie-lupdate opie-lrelease messages |
99 | CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX ) | ||
100 | contains( CONFTEST, y ){ | ||
101 | QMAKE_LFLAGS += -Wl | ||
102 | } | ||
103 | else { | ||
98 | QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib | 104 | QMAKE_LFLAGS += -Wl,-rpath=$$prefix/lib |
105 | # I am not sure whether it is a good idea to change the way plugins is build | ||
106 | # on linux. Therefore I remove the "plugin" term, which is needed by MacOS-X | ||
107 | CONFIG -= plugin | ||
108 | } | ||
99 | QMAKE_LIBDIR += $(OPIEDIR)/lib | 109 | QMAKE_LIBDIR += $(OPIEDIR)/lib |
100 | 110 | ||
101 | MOC_DIR=.moc/$(PLATFORM) | 111 | MOC_DIR=.moc/$(PLATFORM) |
102 | OBJECTS_DIR=.obj/$(PLATFORM) | 112 | OBJECTS_DIR=.obj/$(PLATFORM) |
103 | 113 | ||
104 | #was here now at thetop | 114 | #was here now at thetop |
105 | #include ( $(OPIEDIR)/gen.pro ) | 115 | #include ( $(OPIEDIR)/gen.pro ) |
diff --git a/inputmethods/dasher/dasher.pro b/inputmethods/dasher/dasher.pro index 7b6def9..b7669a4 100644 --- a/inputmethods/dasher/dasher.pro +++ b/inputmethods/dasher/dasher.pro | |||
@@ -1,57 +1,57 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | 3 | ||
4 | HEADERS = Alphabet.h \ | 4 | HEADERS = Alphabet.h \ |
5 | DasherModel.h \ | 5 | DasherModel.h \ |
6 | FrameRate.h \ | 6 | FrameRate.h \ |
7 | AlphabetMap.h \ | 7 | AlphabetMap.h \ |
8 | DasherNode.h \ | 8 | DasherNode.h \ |
9 | LanguageModel.h \ | 9 | LanguageModel.h \ |
10 | AlphIO.h \ | 10 | AlphIO.h \ |
11 | DasherScreen.h \ | 11 | DasherScreen.h \ |
12 | PPMLanguageModel.h \ | 12 | PPMLanguageModel.h \ |
13 | Context.h \ | 13 | Context.h \ |
14 | DasherSettingsInterface.h \ | 14 | DasherSettingsInterface.h \ |
15 | QtDasherImpl.h \ | 15 | QtDasherImpl.h \ |
16 | CustomAlphabet.h \ | 16 | CustomAlphabet.h \ |
17 | DasherTypes.h \ | 17 | DasherTypes.h \ |
18 | QtDasherPlugin.h \ | 18 | QtDasherPlugin.h \ |
19 | DashEdit.h \ | 19 | DashEdit.h \ |
20 | DasherView.h \ | 20 | DasherView.h \ |
21 | QtDasherScreen.h \ | 21 | QtDasherScreen.h \ |
22 | DasherAppInterface.h \ | 22 | DasherAppInterface.h \ |
23 | DasherViewSquare.h \ | 23 | DasherViewSquare.h \ |
24 | SettingsStore.h \ | 24 | SettingsStore.h \ |
25 | DasherInterface.h \ | 25 | DasherInterface.h \ |
26 | DasherWidgetInterface.h | 26 | DasherWidgetInterface.h |
27 | SOURCES = Alphabet.cpp \ | 27 | SOURCES = Alphabet.cpp \ |
28 | DasherModel.cpp \ | 28 | DasherModel.cpp \ |
29 | LanguageModel.cpp \ | 29 | LanguageModel.cpp \ |
30 | AlphabetMap.cpp \ | 30 | AlphabetMap.cpp \ |
31 | DasherNode.cpp \ | 31 | DasherNode.cpp \ |
32 | PPMLanguageModel.cpp \ | 32 | PPMLanguageModel.cpp \ |
33 | AlphIO.cpp \ | 33 | AlphIO.cpp \ |
34 | DasherSettingsInterface.cpp \ | 34 | DasherSettingsInterface.cpp \ |
35 | SettingsStore.cpp \ | 35 | SettingsStore.cpp \ |
36 | CustomAlphabet.cpp \ | 36 | CustomAlphabet.cpp \ |
37 | DasherView.cpp \ | 37 | DasherView.cpp \ |
38 | DasherInterface.cpp \ | 38 | DasherInterface.cpp \ |
39 | DasherViewSquare.cpp \ | 39 | DasherViewSquare.cpp \ |
40 | QtDasherImpl.cc \ | 40 | QtDasherImpl.cc \ |
41 | QtDasherPlugin.cc \ | 41 | QtDasherPlugin.cc \ |
42 | QtDasherScreen.cc | 42 | QtDasherScreen.cc |
43 | TARGET = qdasher | 43 | TARGET = qdasher |
44 | DESTDIR = ../../plugins/inputmethods | 44 | DESTDIR = ../../plugins/inputmethods |
45 | INCLUDEPATH += $(OPIEDIR)/include | 45 | INCLUDEPATH += $(OPIEDIR)/include |
46 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 46 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
47 | LIBS += -lqpe | 47 | LIBS += -lqpe |
48 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods | 48 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods |
49 | VERSION = 1.0.0 | 49 | VERSION = 1.0.0 |
50 | SUBDIRS = DasherCore | 50 | SUBDIRS = DasherCore |
51 | 51 | ||
52 | 52 | ||
53 | include ( $(OPIEDIR)/include.pro ) | 53 | include ( $(OPIEDIR)/include.pro ) |
54 | target.path = $$prefix/plugins/inputmethods | 54 | target.path = $$prefix/plugins/inputmethods |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
diff --git a/inputmethods/dvorak/dvorak.pro b/inputmethods/dvorak/dvorak.pro index cd30aa2..67fe4e6 100644 --- a/inputmethods/dvorak/dvorak.pro +++ b/inputmethods/dvorak/dvorak.pro | |||
@@ -1,36 +1,36 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= dvorak.h \ | 3 | HEADERS= dvorak.h \ |
4 | dvorakimpl.h | 4 | dvorakimpl.h |
5 | SOURCES= dvorak.cpp \ | 5 | SOURCES= dvorak.cpp \ |
6 | dvorakimpl.cpp | 6 | dvorakimpl.cpp |
7 | TARGET = qdvorak | 7 | TARGET = qdvorak |
8 | DESTDIR = ../../plugins/inputmethods | 8 | DESTDIR = ../../plugins/inputmethods |
9 | INCLUDEPATH += $(OPIEDIR)/include | 9 | INCLUDEPATH += $(OPIEDIR)/include |
10 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 10 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
11 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard | 11 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard |
12 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods | 12 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods |
13 | VERSION = 1.0.0 | 13 | VERSION = 1.0.0 |
14 | 14 | ||
15 | TRANSLATIONS = ../../i18n/de/libqdvorak.ts \ | 15 | TRANSLATIONS = ../../i18n/de/libqdvorak.ts \ |
16 | ../../i18n/nl/libqdvorak.ts \ | 16 | ../../i18n/nl/libqdvorak.ts \ |
17 | ../../i18n/da/libqdvorak.ts \ | 17 | ../../i18n/da/libqdvorak.ts \ |
18 | ../../i18n/xx/libqdvorak.ts \ | 18 | ../../i18n/xx/libqdvorak.ts \ |
19 | ../../i18n/en/libqdvorak.ts \ | 19 | ../../i18n/en/libqdvorak.ts \ |
20 | ../../i18n/es/libqdvorak.ts \ | 20 | ../../i18n/es/libqdvorak.ts \ |
21 | ../../i18n/fr/libqdvorak.ts \ | 21 | ../../i18n/fr/libqdvorak.ts \ |
22 | ../../i18n/hu/libqdvorak.ts \ | 22 | ../../i18n/hu/libqdvorak.ts \ |
23 | ../../i18n/ja/libqdvorak.ts \ | 23 | ../../i18n/ja/libqdvorak.ts \ |
24 | ../../i18n/ko/libqdvorak.ts \ | 24 | ../../i18n/ko/libqdvorak.ts \ |
25 | ../../i18n/no/libqdvorak.ts \ | 25 | ../../i18n/no/libqdvorak.ts \ |
26 | ../../i18n/pl/libqdvorak.ts \ | 26 | ../../i18n/pl/libqdvorak.ts \ |
27 | ../../i18n/pt/libqdvorak.ts \ | 27 | ../../i18n/pt/libqdvorak.ts \ |
28 | ../../i18n/pt_BR/libqdvorak.ts \ | 28 | ../../i18n/pt_BR/libqdvorak.ts \ |
29 | ../../i18n/sl/libqdvorak.ts \ | 29 | ../../i18n/sl/libqdvorak.ts \ |
30 | ../../i18n/zh_CN/libqdvorak.ts \ | 30 | ../../i18n/zh_CN/libqdvorak.ts \ |
31 | ../../i18n/zh_TW/libqdvorak.ts | 31 | ../../i18n/zh_TW/libqdvorak.ts |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | include ( $(OPIEDIR)/include.pro ) | 35 | include ( $(OPIEDIR)/include.pro ) |
36 | target.path = $$prefix/plugins/inputmethods | 36 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/handwriting/handwriting.pro b/inputmethods/handwriting/handwriting.pro index 4ec5932..7a22208 100644 --- a/inputmethods/handwriting/handwriting.pro +++ b/inputmethods/handwriting/handwriting.pro | |||
@@ -1,54 +1,54 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= qimpenchar.h \ | 3 | HEADERS= qimpenchar.h \ |
4 | qimpenprofile.h \ | 4 | qimpenprofile.h \ |
5 | qimpencombining.h \ | 5 | qimpencombining.h \ |
6 | qimpenhelp.h \ | 6 | qimpenhelp.h \ |
7 | qimpeninput.h \ | 7 | qimpeninput.h \ |
8 | qimpenmatch.h \ | 8 | qimpenmatch.h \ |
9 | qimpensetup.h \ | 9 | qimpensetup.h \ |
10 | qimpenstroke.h \ | 10 | qimpenstroke.h \ |
11 | qimpenwidget.h \ | 11 | qimpenwidget.h \ |
12 | qimpenwordpick.h \ | 12 | qimpenwordpick.h \ |
13 | handwritingimpl.h | 13 | handwritingimpl.h |
14 | SOURCES= qimpenchar.cpp \ | 14 | SOURCES= qimpenchar.cpp \ |
15 | qimpenprofile.cpp \ | 15 | qimpenprofile.cpp \ |
16 | qimpencombining.cpp \ | 16 | qimpencombining.cpp \ |
17 | qimpenhelp.cpp \ | 17 | qimpenhelp.cpp \ |
18 | qimpeninput.cpp \ | 18 | qimpeninput.cpp \ |
19 | qimpenmatch.cpp \ | 19 | qimpenmatch.cpp \ |
20 | qimpensetup.cpp \ | 20 | qimpensetup.cpp \ |
21 | qimpenstroke.cpp \ | 21 | qimpenstroke.cpp \ |
22 | qimpenwidget.cpp \ | 22 | qimpenwidget.cpp \ |
23 | qimpenwordpick.cpp \ | 23 | qimpenwordpick.cpp \ |
24 | handwritingimpl.cpp | 24 | handwritingimpl.cpp |
25 | INTERFACES = qimpenprefbase.ui | 25 | INTERFACES = qimpenprefbase.ui |
26 | TARGET = qhandwriting | 26 | TARGET = qhandwriting |
27 | DESTDIR = ../../plugins/inputmethods | 27 | DESTDIR = ../../plugins/inputmethods |
28 | INCLUDEPATH += $(OPIEDIR)/include | 28 | INCLUDEPATH += $(OPIEDIR)/include |
29 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 29 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
30 | LIBS += -lqpe | 30 | LIBS += -lqpe |
31 | VERSION = 1.0.0 | 31 | VERSION = 1.0.0 |
32 | 32 | ||
33 | TRANSLATIONS = ../../i18n/de/libqhandwriting.ts \ | 33 | TRANSLATIONS = ../../i18n/de/libqhandwriting.ts \ |
34 | ../../i18n/nl/libqhandwriting.ts \ | 34 | ../../i18n/nl/libqhandwriting.ts \ |
35 | ../../i18n/da/libqhandwriting.ts \ | 35 | ../../i18n/da/libqhandwriting.ts \ |
36 | ../../i18n/xx/libqhandwriting.ts \ | 36 | ../../i18n/xx/libqhandwriting.ts \ |
37 | ../../i18n/en/libqhandwriting.ts \ | 37 | ../../i18n/en/libqhandwriting.ts \ |
38 | ../../i18n/es/libqhandwriting.ts \ | 38 | ../../i18n/es/libqhandwriting.ts \ |
39 | ../../i18n/fr/libqhandwriting.ts \ | 39 | ../../i18n/fr/libqhandwriting.ts \ |
40 | ../../i18n/hu/libqhandwriting.ts \ | 40 | ../../i18n/hu/libqhandwriting.ts \ |
41 | ../../i18n/ja/libqhandwriting.ts \ | 41 | ../../i18n/ja/libqhandwriting.ts \ |
42 | ../../i18n/ko/libqhandwriting.ts \ | 42 | ../../i18n/ko/libqhandwriting.ts \ |
43 | ../../i18n/no/libqhandwriting.ts \ | 43 | ../../i18n/no/libqhandwriting.ts \ |
44 | ../../i18n/pl/libqhandwriting.ts \ | 44 | ../../i18n/pl/libqhandwriting.ts \ |
45 | ../../i18n/pt/libqhandwriting.ts \ | 45 | ../../i18n/pt/libqhandwriting.ts \ |
46 | ../../i18n/pt_BR/libqhandwriting.ts \ | 46 | ../../i18n/pt_BR/libqhandwriting.ts \ |
47 | ../../i18n/sl/libqhandwriting.ts \ | 47 | ../../i18n/sl/libqhandwriting.ts \ |
48 | ../../i18n/zh_CN/libqhandwriting.ts \ | 48 | ../../i18n/zh_CN/libqhandwriting.ts \ |
49 | ../../i18n/zh_TW/libqhandwriting.ts | 49 | ../../i18n/zh_TW/libqhandwriting.ts |
50 | 50 | ||
51 | 51 | ||
52 | 52 | ||
53 | include ( $(OPIEDIR)/include.pro ) | 53 | include ( $(OPIEDIR)/include.pro ) |
54 | target.path = $$prefix/plugins/inputmethods | 54 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/jumpx/jumpx.pro b/inputmethods/jumpx/jumpx.pro index eff4563..a75ffd5 100644 --- a/inputmethods/jumpx/jumpx.pro +++ b/inputmethods/jumpx/jumpx.pro | |||
@@ -1,35 +1,35 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = keyboard.h \ | 3 | HEADERS = keyboard.h \ |
4 | keyboardimpl.h | 4 | keyboardimpl.h |
5 | SOURCES = keyboard.cpp \ | 5 | SOURCES = keyboard.cpp \ |
6 | keyboardimpl.cpp | 6 | keyboardimpl.cpp |
7 | TARGET = qjumpx | 7 | TARGET = qjumpx |
8 | DESTDIR = ../../plugins/inputmethods | 8 | DESTDIR = ../../plugins/inputmethods |
9 | INCLUDEPATH += $(OPIEDIR)/include | 9 | INCLUDEPATH += $(OPIEDIR)/include |
10 | DEPENDPATH += $(OPIEDIR)/include | 10 | DEPENDPATH += $(OPIEDIR)/include |
11 | LIBS += -lqpe | 11 | LIBS += -lqpe |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
13 | 13 | ||
14 | TRANSLATIONS = ../../i18n/de/libqjumpx.ts \ | 14 | TRANSLATIONS = ../../i18n/de/libqjumpx.ts \ |
15 | ../../i18n/nl/libqjumpx.ts \ | 15 | ../../i18n/nl/libqjumpx.ts \ |
16 | ../../i18n/da/libqjumpx.ts \ | 16 | ../../i18n/da/libqjumpx.ts \ |
17 | ../../i18n/xx/libqjumpx.ts \ | 17 | ../../i18n/xx/libqjumpx.ts \ |
18 | ../../i18n/en/libqjumpx.ts \ | 18 | ../../i18n/en/libqjumpx.ts \ |
19 | ../../i18n/es/libqjumpx.ts \ | 19 | ../../i18n/es/libqjumpx.ts \ |
20 | ../../i18n/fr/libqjumpx.ts \ | 20 | ../../i18n/fr/libqjumpx.ts \ |
21 | ../../i18n/hu/libqjumpx.ts \ | 21 | ../../i18n/hu/libqjumpx.ts \ |
22 | ../../i18n/ja/libqjumpx.ts \ | 22 | ../../i18n/ja/libqjumpx.ts \ |
23 | ../../i18n/ko/libqjumpx.ts \ | 23 | ../../i18n/ko/libqjumpx.ts \ |
24 | ../../i18n/no/libqjumpx.ts \ | 24 | ../../i18n/no/libqjumpx.ts \ |
25 | ../../i18n/pl/libqjumpx.ts \ | 25 | ../../i18n/pl/libqjumpx.ts \ |
26 | ../../i18n/pt/libqjumpx.ts \ | 26 | ../../i18n/pt/libqjumpx.ts \ |
27 | ../../i18n/pt_BR/libqjumpx.ts \ | 27 | ../../i18n/pt_BR/libqjumpx.ts \ |
28 | ../../i18n/sl/libqjumpx.ts \ | 28 | ../../i18n/sl/libqjumpx.ts \ |
29 | ../../i18n/zh_CN/libqjumpx.ts \ | 29 | ../../i18n/zh_CN/libqjumpx.ts \ |
30 | ../../i18n/zh_TW/libqjumpx.ts | 30 | ../../i18n/zh_TW/libqjumpx.ts |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | include ( $(OPIEDIR)/include.pro ) | 34 | include ( $(OPIEDIR)/include.pro ) |
35 | target.path = $$prefix/plugins/inputmethods | 35 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/keyboard/keyboard.pro b/inputmethods/keyboard/keyboard.pro index 5ca97f1..56e35b9 100644 --- a/inputmethods/keyboard/keyboard.pro +++ b/inputmethods/keyboard/keyboard.pro | |||
@@ -1,36 +1,36 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= keyboard.h \ | 3 | HEADERS= keyboard.h \ |
4 | keyboardimpl.h | 4 | keyboardimpl.h |
5 | SOURCES= keyboard.cpp \ | 5 | SOURCES= keyboard.cpp \ |
6 | keyboardimpl.cpp | 6 | keyboardimpl.cpp |
7 | TARGET = qkeyboard | 7 | TARGET = qkeyboard |
8 | DESTDIR = ../../plugins/inputmethods | 8 | DESTDIR = ../../plugins/inputmethods |
9 | INCLUDEPATH += $(OPIEDIR)/include | 9 | INCLUDEPATH += $(OPIEDIR)/include |
10 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 10 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
11 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard | 11 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard |
12 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods | 12 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods |
13 | VERSION = 1.0.0 | 13 | VERSION = 1.0.0 |
14 | 14 | ||
15 | TRANSLATIONS = ../../i18n/de/libqkeyboard.ts \ | 15 | TRANSLATIONS = ../../i18n/de/libqkeyboard.ts \ |
16 | ../../i18n/nl/libqkeyboard.ts \ | 16 | ../../i18n/nl/libqkeyboard.ts \ |
17 | ../../i18n/da/libqkeyboard.ts \ | 17 | ../../i18n/da/libqkeyboard.ts \ |
18 | ../../i18n/xx/libqkeyboard.ts \ | 18 | ../../i18n/xx/libqkeyboard.ts \ |
19 | ../../i18n/en/libqkeyboard.ts \ | 19 | ../../i18n/en/libqkeyboard.ts \ |
20 | ../../i18n/es/libqkeyboard.ts \ | 20 | ../../i18n/es/libqkeyboard.ts \ |
21 | ../../i18n/fr/libqkeyboard.ts \ | 21 | ../../i18n/fr/libqkeyboard.ts \ |
22 | ../../i18n/hu/libqkeyboard.ts \ | 22 | ../../i18n/hu/libqkeyboard.ts \ |
23 | ../../i18n/ja/libqkeyboard.ts \ | 23 | ../../i18n/ja/libqkeyboard.ts \ |
24 | ../../i18n/ko/libqkeyboard.ts \ | 24 | ../../i18n/ko/libqkeyboard.ts \ |
25 | ../../i18n/no/libqkeyboard.ts \ | 25 | ../../i18n/no/libqkeyboard.ts \ |
26 | ../../i18n/pl/libqkeyboard.ts \ | 26 | ../../i18n/pl/libqkeyboard.ts \ |
27 | ../../i18n/pt/libqkeyboard.ts \ | 27 | ../../i18n/pt/libqkeyboard.ts \ |
28 | ../../i18n/pt_BR/libqkeyboard.ts \ | 28 | ../../i18n/pt_BR/libqkeyboard.ts \ |
29 | ../../i18n/sl/libqkeyboard.ts \ | 29 | ../../i18n/sl/libqkeyboard.ts \ |
30 | ../../i18n/zh_CN/libqkeyboard.ts \ | 30 | ../../i18n/zh_CN/libqkeyboard.ts \ |
31 | ../../i18n/zh_TW/libqkeyboard.ts | 31 | ../../i18n/zh_TW/libqkeyboard.ts |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | include ( $(OPIEDIR)/include.pro ) | 35 | include ( $(OPIEDIR)/include.pro ) |
36 | target.path = $$prefix/plugins/inputmethods | 36 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/kjumpx/kjumpx.pro b/inputmethods/kjumpx/kjumpx.pro index 0624583..2dd6ddf 100644 --- a/inputmethods/kjumpx/kjumpx.pro +++ b/inputmethods/kjumpx/kjumpx.pro | |||
@@ -1,35 +1,35 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = keyboard.h \ | 3 | HEADERS = keyboard.h \ |
4 | keyboardimpl.h | 4 | keyboardimpl.h |
5 | SOURCES = keyboard.cpp \ | 5 | SOURCES = keyboard.cpp \ |
6 | keyboardimpl.cpp | 6 | keyboardimpl.cpp |
7 | TARGET = qkjumpx | 7 | TARGET = qkjumpx |
8 | DESTDIR = ../../plugins/inputmethods | 8 | DESTDIR = ../../plugins/inputmethods |
9 | INCLUDEPATH += $(OPIEDIR)/include | 9 | INCLUDEPATH += $(OPIEDIR)/include |
10 | DEPENDPATH += $(OPIEDIR)/include | 10 | DEPENDPATH += $(OPIEDIR)/include |
11 | LIBS += -lqpe | 11 | LIBS += -lqpe |
12 | VERSION = 1.0.0 | 12 | VERSION = 1.0.0 |
13 | 13 | ||
14 | TRANSLATIONS = ../../i18n/de/libqkjumpx.ts \ | 14 | TRANSLATIONS = ../../i18n/de/libqkjumpx.ts \ |
15 | ../../i18n/nl/libqkjumpx.ts \ | 15 | ../../i18n/nl/libqkjumpx.ts \ |
16 | ../../i18n/da/libqkjumpx.ts \ | 16 | ../../i18n/da/libqkjumpx.ts \ |
17 | ../../i18n/xx/libqkjumpx.ts \ | 17 | ../../i18n/xx/libqkjumpx.ts \ |
18 | ../../i18n/en/libqkjumpx.ts \ | 18 | ../../i18n/en/libqkjumpx.ts \ |
19 | ../../i18n/es/libqkjumpx.ts \ | 19 | ../../i18n/es/libqkjumpx.ts \ |
20 | ../../i18n/fr/libqkjumpx.ts \ | 20 | ../../i18n/fr/libqkjumpx.ts \ |
21 | ../../i18n/hu/libqkjumpx.ts \ | 21 | ../../i18n/hu/libqkjumpx.ts \ |
22 | ../../i18n/ja/libqkjumpx.ts \ | 22 | ../../i18n/ja/libqkjumpx.ts \ |
23 | ../../i18n/ko/libqkjumpx.ts \ | 23 | ../../i18n/ko/libqkjumpx.ts \ |
24 | ../../i18n/no/libqkjumpx.ts \ | 24 | ../../i18n/no/libqkjumpx.ts \ |
25 | ../../i18n/pl/libqkjumpx.ts \ | 25 | ../../i18n/pl/libqkjumpx.ts \ |
26 | ../../i18n/pt/libqkjumpx.ts \ | 26 | ../../i18n/pt/libqkjumpx.ts \ |
27 | ../../i18n/pt_BR/libqkjumpx.ts \ | 27 | ../../i18n/pt_BR/libqkjumpx.ts \ |
28 | ../../i18n/sl/libqkjumpx.ts \ | 28 | ../../i18n/sl/libqkjumpx.ts \ |
29 | ../../i18n/zh_CN/libqkjumpx.ts \ | 29 | ../../i18n/zh_CN/libqkjumpx.ts \ |
30 | ../../i18n/zh_TW/libqkjumpx.ts | 30 | ../../i18n/zh_TW/libqkjumpx.ts |
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | include ( $(OPIEDIR)/include.pro ) | 34 | include ( $(OPIEDIR)/include.pro ) |
35 | target.path = $$prefix/plugins/inputmethods | 35 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/multikey/multikey.pro b/inputmethods/multikey/multikey.pro index 424c000..82dcb94 100644 --- a/inputmethods/multikey/multikey.pro +++ b/inputmethods/multikey/multikey.pro | |||
@@ -1,36 +1,36 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= keyboard.h \ | 3 | HEADERS= keyboard.h \ |
4 | configdlg.h \ | 4 | configdlg.h \ |
5 | keyboardimpl.h | 5 | keyboardimpl.h |
6 | SOURCES= keyboard.cpp \ | 6 | SOURCES= keyboard.cpp \ |
7 | configdlg.cpp \ | 7 | configdlg.cpp \ |
8 | keyboardimpl.cpp | 8 | keyboardimpl.cpp |
9 | TARGET = qmultikey | 9 | TARGET = qmultikey |
10 | DESTDIR = $(OPIEDIR)/plugins/inputmethods | 10 | DESTDIR = $(OPIEDIR)/plugins/inputmethods |
11 | INCLUDEPATH += $(OPIEDIR)/include | 11 | INCLUDEPATH += $(OPIEDIR)/include |
12 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 12 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
13 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard | 13 | LIBS += -lqpe -L$(OPIEDIR)/plugins/inputmethods -lqpickboard |
14 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods | 14 | QMAKE_LFLAGS+= -Wl,-rpath,/opt/QtPalmtop/plugins/inputmethods |
15 | VERSION = 1.0.0 | 15 | VERSION = 1.0.0 |
16 | 16 | ||
17 | TRANSLATIONS = ../../i18n/pt_BR/libqmultikey.ts \ | 17 | TRANSLATIONS = ../../i18n/pt_BR/libqmultikey.ts \ |
18 | ../../i18n/nl/libqmultikey.ts \ | 18 | ../../i18n/nl/libqmultikey.ts \ |
19 | ../../i18n/de/libqmultikey.ts \ | 19 | ../../i18n/de/libqmultikey.ts \ |
20 | ../../i18n/xx/libqmultikey.ts \ | 20 | ../../i18n/xx/libqmultikey.ts \ |
21 | ../../i18n/en/libqmultikey.ts \ | 21 | ../../i18n/en/libqmultikey.ts \ |
22 | ../../i18n/hu/libqmultikey.ts \ | 22 | ../../i18n/hu/libqmultikey.ts \ |
23 | ../../i18n/sl/libqmultikey.ts \ | 23 | ../../i18n/sl/libqmultikey.ts \ |
24 | ../../i18n/ja/libqmultikey.ts \ | 24 | ../../i18n/ja/libqmultikey.ts \ |
25 | ../../i18n/ko/libqmultikey.ts \ | 25 | ../../i18n/ko/libqmultikey.ts \ |
26 | ../../i18n/pl/libqmultikey.ts \ | 26 | ../../i18n/pl/libqmultikey.ts \ |
27 | ../../i18n/no/libqmultikey.ts \ | 27 | ../../i18n/no/libqmultikey.ts \ |
28 | ../../i18n/zh_CN/libqmultikey.ts \ | 28 | ../../i18n/zh_CN/libqmultikey.ts \ |
29 | ../../i18n/zh_TW/libqmultikey.ts \ | 29 | ../../i18n/zh_TW/libqmultikey.ts \ |
30 | ../../i18n/fr/libqmultikey.ts \ | 30 | ../../i18n/fr/libqmultikey.ts \ |
31 | ../../i18n/da/libqmultikey.ts | 31 | ../../i18n/da/libqmultikey.ts |
32 | 32 | ||
33 | 33 | ||
34 | 34 | ||
35 | include ( $(OPIEDIR)/include.pro ) | 35 | include ( $(OPIEDIR)/include.pro ) |
36 | target.path = $$prefix/plugins/inputmethods | 36 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/pickboard/pickboard.pro b/inputmethods/pickboard/pickboard.pro index 53ff8f0..b86c069 100644 --- a/inputmethods/pickboard/pickboard.pro +++ b/inputmethods/pickboard/pickboard.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= pickboard.h pickboardcfg.h pickboardimpl.h pickboardpicks.h | 3 | HEADERS= pickboard.h pickboardcfg.h pickboardimpl.h pickboardpicks.h |
4 | SOURCES= pickboard.cpp pickboardcfg.cpp pickboardimpl.cpp pickboardpicks.cpp | 4 | SOURCES= pickboard.cpp pickboardcfg.cpp pickboardimpl.cpp pickboardpicks.cpp |
5 | TARGET = qpickboard | 5 | TARGET = qpickboard |
6 | DESTDIR = ../../plugins/inputmethods | 6 | DESTDIR = ../../plugins/inputmethods |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 8 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../i18n/de/libqpickboard.ts \ | 12 | TRANSLATIONS = ../../i18n/de/libqpickboard.ts \ |
13 | ../../i18n/nl/libqpickboard.ts \ | 13 | ../../i18n/nl/libqpickboard.ts \ |
14 | ../../i18n/da/libqpickboard.ts \ | 14 | ../../i18n/da/libqpickboard.ts \ |
15 | ../../i18n/xx/libqpickboard.ts \ | 15 | ../../i18n/xx/libqpickboard.ts \ |
16 | ../../i18n/en/libqpickboard.ts \ | 16 | ../../i18n/en/libqpickboard.ts \ |
17 | ../../i18n/es/libqpickboard.ts \ | 17 | ../../i18n/es/libqpickboard.ts \ |
18 | ../../i18n/fr/libqpickboard.ts \ | 18 | ../../i18n/fr/libqpickboard.ts \ |
19 | ../../i18n/hu/libqpickboard.ts \ | 19 | ../../i18n/hu/libqpickboard.ts \ |
20 | ../../i18n/ja/libqpickboard.ts \ | 20 | ../../i18n/ja/libqpickboard.ts \ |
21 | ../../i18n/ko/libqpickboard.ts \ | 21 | ../../i18n/ko/libqpickboard.ts \ |
22 | ../../i18n/no/libqpickboard.ts \ | 22 | ../../i18n/no/libqpickboard.ts \ |
23 | ../../i18n/pl/libqpickboard.ts \ | 23 | ../../i18n/pl/libqpickboard.ts \ |
24 | ../../i18n/pt/libqpickboard.ts \ | 24 | ../../i18n/pt/libqpickboard.ts \ |
25 | ../../i18n/pt_BR/libqpickboard.ts \ | 25 | ../../i18n/pt_BR/libqpickboard.ts \ |
26 | ../../i18n/sl/libqpickboard.ts \ | 26 | ../../i18n/sl/libqpickboard.ts \ |
27 | ../../i18n/zh_CN/libqpickboard.ts \ | 27 | ../../i18n/zh_CN/libqpickboard.ts \ |
28 | ../../i18n/zh_TW/libqpickboard.ts | 28 | ../../i18n/zh_TW/libqpickboard.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/inputmethods | 33 | target.path = $$prefix/plugins/inputmethods |
diff --git a/inputmethods/unikeyboard/unikeyboard.pro b/inputmethods/unikeyboard/unikeyboard.pro index 0732dc8..678f575 100644 --- a/inputmethods/unikeyboard/unikeyboard.pro +++ b/inputmethods/unikeyboard/unikeyboard.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS= unikeyboard.h unikeyboardimpl.h | 3 | HEADERS= unikeyboard.h unikeyboardimpl.h |
4 | SOURCES= unikeyboard.cpp unikeyboardimpl.cpp | 4 | SOURCES= unikeyboard.cpp unikeyboardimpl.cpp |
5 | TARGET = qunikeyboard | 5 | TARGET = qunikeyboard |
6 | DESTDIR = ../../plugins/inputmethods | 6 | DESTDIR = ../../plugins/inputmethods |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 8 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../i18n/de/libqunikeyboard.ts \ | 12 | TRANSLATIONS = ../../i18n/de/libqunikeyboard.ts \ |
13 | ../../i18n/nl/libqunikeyboard.ts \ | 13 | ../../i18n/nl/libqunikeyboard.ts \ |
14 | ../../i18n/da/libqunikeyboard.ts \ | 14 | ../../i18n/da/libqunikeyboard.ts \ |
15 | ../../i18n/xx/libqunikeyboard.ts \ | 15 | ../../i18n/xx/libqunikeyboard.ts \ |
16 | ../../i18n/en/libqunikeyboard.ts \ | 16 | ../../i18n/en/libqunikeyboard.ts \ |
17 | ../../i18n/es/libqunikeyboard.ts \ | 17 | ../../i18n/es/libqunikeyboard.ts \ |
18 | ../../i18n/fr/libqunikeyboard.ts \ | 18 | ../../i18n/fr/libqunikeyboard.ts \ |
19 | ../../i18n/hu/libqunikeyboard.ts \ | 19 | ../../i18n/hu/libqunikeyboard.ts \ |
20 | ../../i18n/ja/libqunikeyboard.ts \ | 20 | ../../i18n/ja/libqunikeyboard.ts \ |
21 | ../../i18n/ko/libqunikeyboard.ts \ | 21 | ../../i18n/ko/libqunikeyboard.ts \ |
22 | ../../i18n/no/libqunikeyboard.ts \ | 22 | ../../i18n/no/libqunikeyboard.ts \ |
23 | ../../i18n/pl/libqunikeyboard.ts \ | 23 | ../../i18n/pl/libqunikeyboard.ts \ |
24 | ../../i18n/pt/libqunikeyboard.ts \ | 24 | ../../i18n/pt/libqunikeyboard.ts \ |
25 | ../../i18n/pt_BR/libqunikeyboard.ts \ | 25 | ../../i18n/pt_BR/libqunikeyboard.ts \ |
26 | ../../i18n/sl/libqunikeyboard.ts \ | 26 | ../../i18n/sl/libqunikeyboard.ts \ |
27 | ../../i18n/zh_CN/libqunikeyboard.ts \ | 27 | ../../i18n/zh_CN/libqunikeyboard.ts \ |
28 | ../../i18n/zh_TW/libqunikeyboard.ts | 28 | ../../i18n/zh_TW/libqunikeyboard.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
33 | target.path = $$prefix/plugins/inputmethods | 33 | target.path = $$prefix/plugins/inputmethods |
diff --git a/libopie/libopie.pro b/libopie/libopie.pro index 0398775..bf6b78f 100644 --- a/libopie/libopie.pro +++ b/libopie/libopie.pro | |||
@@ -1,136 +1,132 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qte warn_on release | 2 | CONFIG += qte warn_on release |
3 | HEADERS = ofontmenu.h \ | 3 | HEADERS = ofontmenu.h \ |
4 | ocolorbutton.h \ | 4 | ocolorbutton.h \ |
5 | ofiledialog.h ofileselector.h \ | 5 | ofiledialog.h ofileselector.h \ |
6 | ofileselector_p.h \ | 6 | ofileselector_p.h \ |
7 | ocheckitem.h \ | 7 | ocheckitem.h \ |
8 | xmltree.h \ | 8 | xmltree.h \ |
9 | colordialog.h colorpopupmenu.h \ | 9 | colordialog.h colorpopupmenu.h \ |
10 | oclickablelabel.h oprocctrl.h \ | 10 | oclickablelabel.h oprocctrl.h \ |
11 | oprocess.h odevice.h odevicebutton.h \ | 11 | oprocess.h odevice.h odevicebutton.h \ |
12 | otimepicker.h otabwidget.h \ | 12 | otimepicker.h otabwidget.h \ |
13 | otabbar.h otabinfo.h \ | 13 | otabbar.h otabinfo.h \ |
14 | ofontselector.h \ | 14 | ofontselector.h \ |
15 | pim/opimrecord.h \ | 15 | pim/opimrecord.h \ |
16 | pim/otodo.h \ | 16 | pim/otodo.h \ |
17 | pim/orecordlist.h \ | 17 | pim/orecordlist.h \ |
18 | pim/opimaccesstemplate.h \ | 18 | pim/opimaccesstemplate.h \ |
19 | pim/opimaccessbackend.h \ | 19 | pim/opimaccessbackend.h \ |
20 | pim/otodoaccess.h \ | 20 | pim/otodoaccess.h \ |
21 | pim/otodoaccessbackend.h \ | 21 | pim/otodoaccessbackend.h \ |
22 | pim/oconversion.h \ | 22 | pim/oconversion.h \ |
23 | pim/ocontact.h \ | 23 | pim/ocontact.h \ |
24 | pim/ocontactfields.h \ | 24 | pim/ocontactfields.h \ |
25 | pim/ocontactaccess.h \ | 25 | pim/ocontactaccess.h \ |
26 | pim/ocontactaccessbackend.h \ | 26 | pim/ocontactaccessbackend.h \ |
27 | pim/ocontactaccessbackend_xml.h \ | 27 | pim/ocontactaccessbackend_xml.h \ |
28 | pim/ocontactaccessbackend_vcard.h \ | 28 | pim/ocontactaccessbackend_vcard.h \ |
29 | pim/obackendfactory.h \ | 29 | pim/obackendfactory.h \ |
30 | pim/opimcache.h \ | 30 | pim/opimcache.h \ |
31 | pim/otodoaccessvcal.h \ | 31 | pim/otodoaccessvcal.h \ |
32 | pim/orecur.h \ | 32 | pim/orecur.h \ |
33 | pim/opimstate.h \ | 33 | pim/opimstate.h \ |
34 | pim/opimxrefpartner.h \ | 34 | pim/opimxrefpartner.h \ |
35 | pim/opimxref.h \ | 35 | pim/opimxref.h \ |
36 | pim/opimxrefmanager.h \ | 36 | pim/opimxrefmanager.h \ |
37 | pim/opimmaintainer.h \ | 37 | pim/opimmaintainer.h \ |
38 | pim/opimnotify.h \ | 38 | pim/opimnotify.h \ |
39 | pim/opimnotifymanager.h \ | 39 | pim/opimnotifymanager.h \ |
40 | pim/opimmainwindow.h \ | 40 | pim/opimmainwindow.h \ |
41 | pim/opimresolver.h \ | 41 | pim/opimresolver.h \ |
42 | pim/oevent.h \ | 42 | pim/oevent.h \ |
43 | pim/otimezone.h \ | 43 | pim/otimezone.h \ |
44 | pim/odatebookaccess.h \ | 44 | pim/odatebookaccess.h \ |
45 | pim/odatebookaccessbackend.h \ | 45 | pim/odatebookaccessbackend.h \ |
46 | pim/odatebookaccessbackend_xml.h \ | 46 | pim/odatebookaccessbackend_xml.h \ |
47 | orecurrancewidget.h \ | 47 | orecurrancewidget.h \ |
48 | oticker.h owait.h | 48 | oticker.h owait.h |
49 | 49 | ||
50 | SOURCES = ofontmenu.cc \ | 50 | SOURCES = ofontmenu.cc \ |
51 | ocolorbutton.cpp \ | 51 | ocolorbutton.cpp \ |
52 | sharp_compat.cpp \ | 52 | sharp_compat.cpp \ |
53 | xmltree.cc \ | 53 | xmltree.cc \ |
54 | ofiledialog.cc ofileselector.cpp \ | 54 | ofiledialog.cc ofileselector.cpp \ |
55 | ocheckitem.cpp \ | 55 | ocheckitem.cpp \ |
56 | colordialog.cpp \ | 56 | colordialog.cpp \ |
57 | colorpopupmenu.cpp oclickablelabel.cpp \ | 57 | colorpopupmenu.cpp oclickablelabel.cpp \ |
58 | oprocctrl.cpp oprocess.cpp \ | 58 | oprocctrl.cpp oprocess.cpp \ |
59 | odevice.cpp odevicebutton.cpp otimepicker.cpp \ | 59 | odevice.cpp odevicebutton.cpp otimepicker.cpp \ |
60 | otabwidget.cpp otabbar.cpp \ | 60 | otabwidget.cpp otabbar.cpp \ |
61 | ofontselector.cpp \ | 61 | ofontselector.cpp \ |
62 | pim/otodo.cpp \ | 62 | pim/otodo.cpp \ |
63 | pim/opimrecord.cpp \ | 63 | pim/opimrecord.cpp \ |
64 | pim/otodoaccess.cpp \ | 64 | pim/otodoaccess.cpp \ |
65 | pim/otodoaccessbackend.cpp \ | 65 | pim/otodoaccessbackend.cpp \ |
66 | pim/otodoaccessxml.cpp \ | 66 | pim/otodoaccessxml.cpp \ |
67 | pim/oconversion.cpp \ | 67 | pim/oconversion.cpp \ |
68 | pim/ocontact.cpp \ | 68 | pim/ocontact.cpp \ |
69 | pim/ocontactfields.cpp \ | 69 | pim/ocontactfields.cpp \ |
70 | pim/ocontactaccess.cpp \ | 70 | pim/ocontactaccess.cpp \ |
71 | pim/ocontactaccessbackend_vcard.cpp \ | 71 | pim/ocontactaccessbackend_vcard.cpp \ |
72 | pim/ocontactaccessbackend_xml.cpp \ | 72 | pim/ocontactaccessbackend_xml.cpp \ |
73 | pim/otodoaccessvcal.cpp \ | 73 | pim/otodoaccessvcal.cpp \ |
74 | pim/orecur.cpp \ | 74 | pim/orecur.cpp \ |
75 | pim/opimstate.cpp \ | 75 | pim/opimstate.cpp \ |
76 | pim/opimxrefpartner.cpp \ | 76 | pim/opimxrefpartner.cpp \ |
77 | pim/opimxref.cpp \ | 77 | pim/opimxref.cpp \ |
78 | pim/opimxrefmanager.cpp \ | 78 | pim/opimxrefmanager.cpp \ |
79 | pim/opimmaintainer.cpp \ | 79 | pim/opimmaintainer.cpp \ |
80 | pim/opimnotify.cpp \ | 80 | pim/opimnotify.cpp \ |
81 | pim/opimnotifymanager.cpp \ | 81 | pim/opimnotifymanager.cpp \ |
82 | pim/opimmainwindow.cpp \ | 82 | pim/opimmainwindow.cpp \ |
83 | pim/opimresolver.cpp \ | 83 | pim/opimresolver.cpp \ |
84 | pim/oevent.cpp \ | 84 | pim/oevent.cpp \ |
85 | pim/otimezone.cpp \ | 85 | pim/otimezone.cpp \ |
86 | pim/odatebookaccess.cpp \ | 86 | pim/odatebookaccess.cpp \ |
87 | pim/odatebookaccessbackend.cpp \ | 87 | pim/odatebookaccessbackend.cpp \ |
88 | pim/odatebookaccessbackend_xml.cpp \ | 88 | pim/odatebookaccessbackend_xml.cpp \ |
89 | orecurrancewidget.cpp \ | 89 | orecurrancewidget.cpp \ |
90 | oticker.cpp owait.cpp | 90 | oticker.cpp owait.cpp |
91 | 91 | ||
92 | TARGET = opie | 92 | TARGET = opie |
93 | INCLUDEPATH += $(OPIEDIR)/include | 93 | INCLUDEPATH += $(OPIEDIR)/include |
94 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) | 94 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) |
95 | 95 | ||
96 | # The following is just for my Notebook ! | ||
97 | # It should never be committed !! (eilers) | ||
98 | # QMAKE_CXXFLAGS += -DQT_NO_SOUND | ||
99 | |||
100 | LIBS += -lqpe | 96 | LIBS += -lqpe |
101 | 97 | ||
102 | # Add SQL-Support if selected by config (eilers) | 98 | # Add SQL-Support if selected by config (eilers) |
103 | CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND ) | 99 | CONFTEST = $$system( echo $CONFIG_SQL_PIM_BACKEND ) |
104 | contains( CONFTEST, y ){ | 100 | contains( CONFTEST, y ){ |
105 | 101 | ||
106 | DEFINES += __USE_SQL | 102 | DEFINES += __USE_SQL |
107 | LIBS += -lopiedb2 -lsqlite | 103 | LIBS += -lopiedb2 -lsqlite |
108 | HEADERS += pim/otodoaccesssql.h pim/ocontactaccessbackend_sql.h | 104 | HEADERS += pim/otodoaccesssql.h pim/ocontactaccessbackend_sql.h |
109 | SOURCES += pim/otodoaccesssql.cpp pim/ocontactaccessbackend_sql.cpp | 105 | SOURCES += pim/otodoaccesssql.cpp pim/ocontactaccessbackend_sql.cpp |
110 | 106 | ||
111 | } | 107 | } |
112 | 108 | ||
113 | INTERFACES = otimepickerbase.ui orecurrancebase.ui | 109 | INTERFACES = otimepickerbase.ui orecurrancebase.ui |
114 | TARGET = opie | 110 | TARGET = opie |
115 | 111 | ||
116 | TRANSLATIONS = ../i18n/de/libopie.ts \ | 112 | TRANSLATIONS = ../i18n/de/libopie.ts \ |
117 | ../i18n/nl/libopie.ts \ | 113 | ../i18n/nl/libopie.ts \ |
118 | ../i18n/xx/libopie.ts \ | 114 | ../i18n/xx/libopie.ts \ |
119 | ../i18n/en/libopie.ts \ | 115 | ../i18n/en/libopie.ts \ |
120 | ../i18n/es/libopie.ts \ | 116 | ../i18n/es/libopie.ts \ |
121 | ../i18n/fr/libopie.ts \ | 117 | ../i18n/fr/libopie.ts \ |
122 | ../i18n/hu/libopie.ts \ | 118 | ../i18n/hu/libopie.ts \ |
123 | ../i18n/ja/libopie.ts \ | 119 | ../i18n/ja/libopie.ts \ |
124 | ../i18n/ko/libopie.ts \ | 120 | ../i18n/ko/libopie.ts \ |
125 | ../i18n/no/libopie.ts \ | 121 | ../i18n/no/libopie.ts \ |
126 | ../i18n/pl/libopie.ts \ | 122 | ../i18n/pl/libopie.ts \ |
127 | ../i18n/pt/libopie.ts \ | 123 | ../i18n/pt/libopie.ts \ |
128 | ../i18n/pt_BR/libopie.ts \ | 124 | ../i18n/pt_BR/libopie.ts \ |
129 | ../i18n/sl/libopie.ts \ | 125 | ../i18n/sl/libopie.ts \ |
130 | ../i18n/zh_CN/libopie.ts \ | 126 | ../i18n/zh_CN/libopie.ts \ |
131 | ../i18n/zh_TW/libopie.ts \ | 127 | ../i18n/zh_TW/libopie.ts \ |
132 | ../i18n/da/libopie.ts | 128 | ../i18n/da/libopie.ts |
133 | 129 | ||
134 | include ( big-screen/big-screen.pro ) | 130 | include ( big-screen/big-screen.pro ) |
135 | 131 | ||
136 | include ( $(OPIEDIR)/include.pro ) | 132 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 3edf8e7..fef623a 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -1,154 +1,156 @@ | |||
1 | /* This file is part of the OPIE libraries | 1 | /* This file is part of the OPIE libraries |
2 | Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) | 2 | Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public | 5 | modify it under the terms of the GNU Library General Public |
6 | License as published by the Free Software Foundation; either | 6 | License as published by the Free Software Foundation; either |
7 | version 2 of the License, or (at your option) any later version. | 7 | version 2 of the License, or (at your option) any later version. |
8 | 8 | ||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | #include <unistd.h> | 21 | #include <unistd.h> |
22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
23 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
24 | #include <signal.h> | 24 | #include <signal.h> |
25 | #include <sys/time.h> | 25 | #include <sys/time.h> |
26 | #ifndef QT_NO_SOUND | ||
26 | #include <linux/soundcard.h> | 27 | #include <linux/soundcard.h> |
28 | #endif | ||
27 | #include <math.h> | 29 | #include <math.h> |
28 | 30 | ||
29 | #include <qapplication.h> | 31 | #include <qapplication.h> |
30 | 32 | ||
31 | #include <qfile.h> | 33 | #include <qfile.h> |
32 | #include <qtextstream.h> | 34 | #include <qtextstream.h> |
33 | #include <qpe/sound.h> | 35 | #include <qpe/sound.h> |
34 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
35 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
36 | #include <qpe/qcopenvelope_qws.h> | 38 | #include <qpe/qcopenvelope_qws.h> |
37 | 39 | ||
38 | #include "odevice.h" | 40 | #include "odevice.h" |
39 | 41 | ||
40 | #include <qwindowsystem_qws.h> | 42 | #include <qwindowsystem_qws.h> |
41 | 43 | ||
42 | #ifndef ARRAY_SIZE | 44 | #ifndef ARRAY_SIZE |
43 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 45 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
44 | #endif | 46 | #endif |
45 | 47 | ||
46 | // _IO and friends are only defined in kernel headers ... | 48 | // _IO and friends are only defined in kernel headers ... |
47 | 49 | ||
48 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 50 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) |
49 | 51 | ||
50 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | 52 | #define OD_IO(type,number) OD_IOC(0,type,number,0) |
51 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | 53 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) |
52 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | 54 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) |
53 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | 55 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
54 | 56 | ||
55 | using namespace Opie; | 57 | using namespace Opie; |
56 | 58 | ||
57 | class ODeviceData { | 59 | class ODeviceData { |
58 | public: | 60 | public: |
59 | QString m_vendorstr; | 61 | QString m_vendorstr; |
60 | OVendor m_vendor; | 62 | OVendor m_vendor; |
61 | 63 | ||
62 | QString m_modelstr; | 64 | QString m_modelstr; |
63 | OModel m_model; | 65 | OModel m_model; |
64 | 66 | ||
65 | QString m_systemstr; | 67 | QString m_systemstr; |
66 | OSystem m_system; | 68 | OSystem m_system; |
67 | 69 | ||
68 | QString m_sysverstr; | 70 | QString m_sysverstr; |
69 | 71 | ||
70 | Transformation m_rotation; | 72 | Transformation m_rotation; |
71 | ODirection m_direction; | 73 | ODirection m_direction; |
72 | 74 | ||
73 | QValueList <ODeviceButton> *m_buttons; | 75 | QValueList <ODeviceButton> *m_buttons; |
74 | uint m_holdtime; | 76 | uint m_holdtime; |
75 | QStrList *m_cpu_frequencies; | 77 | QStrList *m_cpu_frequencies; |
76 | }; | 78 | }; |
77 | 79 | ||
78 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { | 80 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { |
79 | protected: | 81 | protected: |
80 | virtual void init ( ); | 82 | virtual void init ( ); |
81 | virtual void initButtons ( ); | 83 | virtual void initButtons ( ); |
82 | 84 | ||
83 | public: | 85 | public: |
84 | virtual bool setSoftSuspend ( bool soft ); | 86 | virtual bool setSoftSuspend ( bool soft ); |
85 | 87 | ||
86 | virtual bool setDisplayBrightness ( int b ); | 88 | virtual bool setDisplayBrightness ( int b ); |
87 | virtual int displayBrightnessResolution ( ) const; | 89 | virtual int displayBrightnessResolution ( ) const; |
88 | 90 | ||
89 | virtual void alarmSound ( ); | 91 | virtual void alarmSound ( ); |
90 | 92 | ||
91 | virtual QValueList <OLed> ledList ( ) const; | 93 | virtual QValueList <OLed> ledList ( ) const; |
92 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 94 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
93 | virtual OLedState ledState ( OLed led ) const; | 95 | virtual OLedState ledState ( OLed led ) const; |
94 | virtual bool setLedState ( OLed led, OLedState st ); | 96 | virtual bool setLedState ( OLed led, OLedState st ); |
95 | 97 | ||
96 | virtual bool hasLightSensor ( ) const; | 98 | virtual bool hasLightSensor ( ) const; |
97 | virtual int readLightSensor ( ); | 99 | virtual int readLightSensor ( ); |
98 | virtual int lightSensorResolution ( ) const; | 100 | virtual int lightSensorResolution ( ) const; |
99 | 101 | ||
100 | protected: | 102 | protected: |
101 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | 103 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); |
102 | virtual void timerEvent ( QTimerEvent *te ); | 104 | virtual void timerEvent ( QTimerEvent *te ); |
103 | 105 | ||
104 | int m_power_timer; | 106 | int m_power_timer; |
105 | 107 | ||
106 | OLedState m_leds [2]; | 108 | OLedState m_leds [2]; |
107 | }; | 109 | }; |
108 | 110 | ||
109 | class Jornada : public ODevice { | 111 | class Jornada : public ODevice { |
110 | protected: | 112 | protected: |
111 | virtual void init ( ); | 113 | virtual void init ( ); |
112 | //virtual void initButtons ( ); | 114 | //virtual void initButtons ( ); |
113 | public: | 115 | public: |
114 | virtual bool setSoftSuspend ( bool soft ); | 116 | virtual bool setSoftSuspend ( bool soft ); |
115 | virtual bool setDisplayBrightness ( int b ); | 117 | virtual bool setDisplayBrightness ( int b ); |
116 | virtual int displayBrightnessResolution ( ) const; | 118 | virtual int displayBrightnessResolution ( ) const; |
117 | static bool isJornada(); | 119 | static bool isJornada(); |
118 | 120 | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | class Zaurus : public ODevice { | 123 | class Zaurus : public ODevice { |
122 | protected: | 124 | protected: |
123 | virtual void init ( ); | 125 | virtual void init ( ); |
124 | virtual void initButtons ( ); | 126 | virtual void initButtons ( ); |
125 | 127 | ||
126 | public: | 128 | public: |
127 | virtual bool setSoftSuspend ( bool soft ); | 129 | virtual bool setSoftSuspend ( bool soft ); |
128 | 130 | ||
129 | virtual bool setDisplayBrightness ( int b ); | 131 | virtual bool setDisplayBrightness ( int b ); |
130 | virtual int displayBrightnessResolution ( ) const; | 132 | virtual int displayBrightnessResolution ( ) const; |
131 | 133 | ||
132 | virtual void alarmSound ( ); | 134 | virtual void alarmSound ( ); |
133 | virtual void keySound ( ); | 135 | virtual void keySound ( ); |
134 | virtual void touchSound ( ); | 136 | virtual void touchSound ( ); |
135 | 137 | ||
136 | virtual QValueList <OLed> ledList ( ) const; | 138 | virtual QValueList <OLed> ledList ( ) const; |
137 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; | 139 | virtual QValueList <OLedState> ledStateList ( OLed led ) const; |
138 | virtual OLedState ledState ( OLed led ) const; | 140 | virtual OLedState ledState ( OLed led ) const; |
139 | virtual bool setLedState ( OLed led, OLedState st ); | 141 | virtual bool setLedState ( OLed led, OLedState st ); |
140 | 142 | ||
141 | static bool isZaurus(); | 143 | static bool isZaurus(); |
142 | 144 | ||
143 | protected: | 145 | protected: |
144 | virtual void buzzer ( int snd ); | 146 | virtual void buzzer ( int snd ); |
145 | 147 | ||
146 | OLedState m_leds [1]; | 148 | OLedState m_leds [1]; |
147 | bool m_embedix; | 149 | bool m_embedix; |
148 | }; | 150 | }; |
149 | 151 | ||
150 | class SIMpad : public ODevice, public QWSServer::KeyboardFilter { | 152 | class SIMpad : public ODevice, public QWSServer::KeyboardFilter { |
151 | protected: | 153 | protected: |
152 | virtual void init ( ); | 154 | virtual void init ( ); |
153 | virtual void initButtons ( ); | 155 | virtual void initButtons ( ); |
154 | 156 | ||
diff --git a/library/filemanager.cpp b/library/filemanager.cpp index cc657fa..91986a0 100644 --- a/library/filemanager.cpp +++ b/library/filemanager.cpp | |||
@@ -1,341 +1,384 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "filemanager.h" | 20 | #include "filemanager.h" |
21 | #include "applnk.h" | 21 | #include "applnk.h" |
22 | 22 | ||
23 | #include <qdir.h> | 23 | #include <qdir.h> |
24 | #include <qfile.h> | 24 | #include <qfile.h> |
25 | #include <qfileinfo.h> | 25 | #include <qfileinfo.h> |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | #include <qtextcodec.h> | 27 | #include <qtextcodec.h> |
28 | 28 | ||
29 | #include <errno.h> | 29 | #include <errno.h> |
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | #include <unistd.h> | 31 | #include <unistd.h> |
32 | #include <sys/stat.h> | 32 | #include <sys/stat.h> |
33 | #include <dirent.h> | 33 | #include <dirent.h> |
34 | #include <sys/sendfile.h> | 34 | #ifdef Q_OS_MACX |
35 | // MacOS X does not have sendfile.. :( | ||
36 | // But maybe in the future.. !? | ||
37 | # ifdef SENDFILE | ||
38 | # include <sys/types.h> | ||
39 | # include <sys/socket.h> | ||
40 | # endif | ||
41 | #else | ||
42 | # include <sys/sendfile.h> | ||
43 | #endif /* Q_OS_MACX */ | ||
35 | #include <fcntl.h> | 44 | #include <fcntl.h> |
36 | 45 | ||
37 | /*! | 46 | /*! |
38 | \class FileManager | 47 | \class FileManager |
39 | \brief The FileManager class assists with AppLnk input/output. | 48 | \brief The FileManager class assists with AppLnk input/output. |
40 | */ | 49 | */ |
41 | 50 | ||
42 | /*! | 51 | /*! |
43 | Constructs a FileManager. | 52 | Constructs a FileManager. |
44 | */ | 53 | */ |
45 | FileManager::FileManager() | 54 | FileManager::FileManager() |
46 | { | 55 | { |
47 | } | 56 | } |
48 | 57 | ||
49 | /*! | 58 | /*! |
50 | Destroys a FileManager. | 59 | Destroys a FileManager. |
51 | */ | 60 | */ |
52 | FileManager::~FileManager() | 61 | FileManager::~FileManager() |
53 | { | 62 | { |
54 | 63 | ||
55 | } | 64 | } |
56 | 65 | ||
57 | /*! | 66 | /*! |
58 | Saves \a data as the document specified by \a f. | 67 | Saves \a data as the document specified by \a f. |
59 | 68 | ||
60 | Returns whether the operation succeeded. | 69 | Returns whether the operation succeeded. |
61 | */ | 70 | */ |
62 | bool FileManager::saveFile( const DocLnk &f, const QByteArray &data ) | 71 | bool FileManager::saveFile( const DocLnk &f, const QByteArray &data ) |
63 | { | 72 | { |
64 | QString fn = f.file() + ".new"; | 73 | QString fn = f.file() + ".new"; |
65 | ensurePathExists( fn ); | 74 | ensurePathExists( fn ); |
66 | QFile fl( fn ); | 75 | QFile fl( fn ); |
67 | if ( !fl.open( IO_WriteOnly|IO_Raw ) ) { | 76 | if ( !fl.open( IO_WriteOnly|IO_Raw ) ) { |
68 | qWarning("open failed"); | 77 | qWarning("open failed"); |
69 | return FALSE; | 78 | return FALSE; |
70 | } | 79 | } |
71 | int total_written = fl.writeBlock( data ); | 80 | int total_written = fl.writeBlock( data ); |
72 | fl.close(); | 81 | fl.close(); |
73 | if ( total_written != int(data.size()) || !f.writeLink() ) { | 82 | if ( total_written != int(data.size()) || !f.writeLink() ) { |
74 | QFile::remove( fn ); | 83 | QFile::remove( fn ); |
75 | return FALSE; | 84 | return FALSE; |
76 | } | 85 | } |
77 | qDebug("total written %d out of %d", total_written, data.size()); | 86 | qDebug("total written %d out of %d", total_written, data.size()); |
78 | // else rename the file... | 87 | // else rename the file... |
79 | if ( !renameFile( fn.latin1(), f.file().latin1() ) ) { | 88 | if ( !renameFile( fn.latin1(), f.file().latin1() ) ) { |
80 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), | 89 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), |
81 | f.file().latin1(), errno ); | 90 | f.file().latin1(), errno ); |
82 | // remove the file... | 91 | // remove the file... |
83 | } | 92 | } |
84 | return TRUE; | 93 | return TRUE; |
85 | } | 94 | } |
86 | 95 | ||
87 | /*! | 96 | /*! |
88 | Saves \a text as the document specified by \a f. | 97 | Saves \a text as the document specified by \a f. |
89 | 98 | ||
90 | The text is saved in UTF8 format. | 99 | The text is saved in UTF8 format. |
91 | 100 | ||
92 | Returns whether the operation succeeded. | 101 | Returns whether the operation succeeded. |
93 | */ | 102 | */ |
94 | bool FileManager::saveFile( const DocLnk &f, const QString &text ) | 103 | bool FileManager::saveFile( const DocLnk &f, const QString &text ) |
95 | { | 104 | { |
96 | QString fn = f.file() + ".new"; | 105 | QString fn = f.file() + ".new"; |
97 | ensurePathExists( fn ); | 106 | ensurePathExists( fn ); |
98 | QFile fl( fn ); | 107 | QFile fl( fn ); |
99 | if ( !fl.open( IO_WriteOnly|IO_Raw ) ) { | 108 | if ( !fl.open( IO_WriteOnly|IO_Raw ) ) { |
100 | qWarning("open failed"); | 109 | qWarning("open failed"); |
101 | return FALSE; | 110 | return FALSE; |
102 | } | 111 | } |
103 | 112 | ||
104 | QCString cstr = text.utf8(); | 113 | QCString cstr = text.utf8(); |
105 | int total_written; | 114 | int total_written; |
106 | total_written = fl.writeBlock( cstr.data(), cstr.length() ); | 115 | total_written = fl.writeBlock( cstr.data(), cstr.length() ); |
107 | fl.close(); | 116 | fl.close(); |
108 | if ( total_written != int(cstr.length()) || !f.writeLink() ) { | 117 | if ( total_written != int(cstr.length()) || !f.writeLink() ) { |
109 | QFile::remove( fn ); | 118 | QFile::remove( fn ); |
110 | return FALSE; | 119 | return FALSE; |
111 | } | 120 | } |
112 | // okay now rename the file.. | 121 | // okay now rename the file.. |
113 | if ( !renameFile( fn.latin1(), f.file().latin1() ) ) { | 122 | if ( !renameFile( fn.latin1(), f.file().latin1() ) ) { |
114 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), | 123 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), |
115 | f.file().latin1(), errno ); | 124 | f.file().latin1(), errno ); |
116 | 125 | ||
117 | } | 126 | } |
118 | return TRUE; | 127 | return TRUE; |
119 | } | 128 | } |
120 | 129 | ||
121 | 130 | ||
122 | /*! | 131 | /*! |
123 | Loads \a text from the document specified by \a f. | 132 | Loads \a text from the document specified by \a f. |
124 | 133 | ||
125 | The text is required to be in UTF8 format. | 134 | The text is required to be in UTF8 format. |
126 | 135 | ||
127 | Returns whether the operation succeeded. | 136 | Returns whether the operation succeeded. |
128 | */ | 137 | */ |
129 | bool FileManager::loadFile( const DocLnk &f, QString &text ) | 138 | bool FileManager::loadFile( const DocLnk &f, QString &text ) |
130 | { | 139 | { |
131 | QString fn = f.file(); | 140 | QString fn = f.file(); |
132 | QFile fl( fn ); | 141 | QFile fl( fn ); |
133 | if ( !fl.open( IO_ReadOnly ) ) | 142 | if ( !fl.open( IO_ReadOnly ) ) |
134 | return FALSE; | 143 | return FALSE; |
135 | QTextStream ts( &fl ); | 144 | QTextStream ts( &fl ); |
136 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) | 145 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) |
137 | // The below should work, but doesn't in Qt 2.3.0 | 146 | // The below should work, but doesn't in Qt 2.3.0 |
138 | ts.setCodec( QTextCodec::codecForMib( 106 ) ); | 147 | ts.setCodec( QTextCodec::codecForMib( 106 ) ); |
139 | #else | 148 | #else |
140 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 149 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
141 | #endif | 150 | #endif |
142 | text = ts.read(); | 151 | text = ts.read(); |
143 | fl.close(); | 152 | fl.close(); |
144 | return TRUE; | 153 | return TRUE; |
145 | } | 154 | } |
146 | 155 | ||
147 | 156 | ||
148 | /*! | 157 | /*! |
149 | Loads \a ba from the document specified by \a f. | 158 | Loads \a ba from the document specified by \a f. |
150 | 159 | ||
151 | Returns whether the operation succeeded. | 160 | Returns whether the operation succeeded. |
152 | */ | 161 | */ |
153 | bool FileManager::loadFile( const DocLnk &f, QByteArray &ba ) | 162 | bool FileManager::loadFile( const DocLnk &f, QByteArray &ba ) |
154 | { | 163 | { |
155 | QString fn = f.file(); | 164 | QString fn = f.file(); |
156 | QFile fl( fn ); | 165 | QFile fl( fn ); |
157 | if ( !fl.open( IO_ReadOnly ) ) | 166 | if ( !fl.open( IO_ReadOnly ) ) |
158 | return FALSE; | 167 | return FALSE; |
159 | ba.resize( fl.size() ); | 168 | ba.resize( fl.size() ); |
160 | if ( fl.size() > 0 ) | 169 | if ( fl.size() > 0 ) |
161 | fl.readBlock( ba.data(), fl.size() ); | 170 | fl.readBlock( ba.data(), fl.size() ); |
162 | fl.close(); | 171 | fl.close(); |
163 | return TRUE; | 172 | return TRUE; |
164 | } | 173 | } |
165 | 174 | ||
166 | /*! | 175 | /*! |
167 | Copies the document specified by \a src to the document specified | 176 | Copies the document specified by \a src to the document specified |
168 | by \a dest. | 177 | by \a dest. |
169 | 178 | ||
170 | Returns whether the operation succeeded. | 179 | Returns whether the operation succeeded. |
171 | */ | 180 | */ |
172 | bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest ) | 181 | bool FileManager::copyFile( const AppLnk &src, const AppLnk &dest ) |
173 | { | 182 | { |
174 | QFile sf( src.file() ); | 183 | QFile sf( src.file() ); |
175 | if ( !sf.open( IO_ReadOnly ) ) | 184 | if ( !sf.open( IO_ReadOnly ) ) |
176 | return FALSE; | 185 | return FALSE; |
177 | 186 | ||
178 | QString fn = dest.file() + ".new"; | 187 | QString fn = dest.file() + ".new"; |
179 | ensurePathExists( fn ); | 188 | ensurePathExists( fn ); |
180 | QFile df( fn ); | 189 | QFile df( fn ); |
181 | if ( !df.open( IO_WriteOnly|IO_Raw ) ) | 190 | if ( !df.open( IO_WriteOnly|IO_Raw ) ) |
182 | return FALSE; | 191 | return FALSE; |
183 | 192 | ||
184 | const int bufsize = 16384; | 193 | const int bufsize = 16384; |
185 | char buffer[bufsize]; | 194 | char buffer[bufsize]; |
186 | bool ok = TRUE; | 195 | bool ok = TRUE; |
187 | int bytesRead = 0; | 196 | int bytesRead = 0; |
188 | while ( ok && !sf.atEnd() ) { | 197 | while ( ok && !sf.atEnd() ) { |
189 | bytesRead = sf.readBlock( buffer, bufsize ); | 198 | bytesRead = sf.readBlock( buffer, bufsize ); |
190 | if ( bytesRead < 0 ) | 199 | if ( bytesRead < 0 ) |
191 | ok = FALSE; | 200 | ok = FALSE; |
192 | while ( ok && bytesRead > 0 ) { | 201 | while ( ok && bytesRead > 0 ) { |
193 | int bytesWritten = df.writeBlock( buffer, bytesRead ); | 202 | int bytesWritten = df.writeBlock( buffer, bytesRead ); |
194 | if ( bytesWritten < 0 ) | 203 | if ( bytesWritten < 0 ) |
195 | ok = FALSE; | 204 | ok = FALSE; |
196 | else | 205 | else |
197 | bytesRead -= bytesWritten; | 206 | bytesRead -= bytesWritten; |
198 | } | 207 | } |
199 | } | 208 | } |
200 | 209 | ||
201 | if ( ok ) | 210 | if ( ok ) |
202 | ok = dest.writeLink(); | 211 | ok = dest.writeLink(); |
203 | 212 | ||
204 | if ( ok ) { | 213 | if ( ok ) { |
205 | // okay now rename the file... | 214 | // okay now rename the file... |
206 | if ( !renameFile( fn.latin1(), dest.file().latin1() ) ) { | 215 | if ( !renameFile( fn.latin1(), dest.file().latin1() ) ) { |
207 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), | 216 | qWarning( "problem renaming file %s to %s, errno: %d", fn.latin1(), |
208 | dest.file().latin1(), errno ); | 217 | dest.file().latin1(), errno ); |
209 | // remove the tmp file, otherwise, it will just lay around... | 218 | // remove the tmp file, otherwise, it will just lay around... |
210 | QFile::remove( fn.latin1() ); | 219 | QFile::remove( fn.latin1() ); |
211 | } | 220 | } |
212 | } else { | 221 | } else { |
213 | QFile::remove( fn.latin1() ); | 222 | QFile::remove( fn.latin1() ); |
214 | } | 223 | } |
215 | 224 | ||
216 | return ok; | 225 | return ok; |
217 | } | 226 | } |
218 | 227 | ||
228 | |||
229 | |||
219 | bool FileManager::copyFile( const QString & src, const QString & dest ) { | 230 | bool FileManager::copyFile( const QString & src, const QString & dest ) { |
220 | bool success = true; | 231 | bool success = true; |
221 | struct stat status; | 232 | struct stat status; |
222 | int read_fd=0; | 233 | int read_fd=0; |
223 | int write_fd=0; | 234 | int write_fd=0; |
224 | struct stat stat_buf; | 235 | struct stat stat_buf; |
225 | off_t offset = 0; | 236 | off_t offset = 0; |
226 | QFile srcFile(src); | 237 | QFile srcFile(src); |
227 | QFile destFile(dest); | 238 | QFile destFile(dest); |
228 | 239 | ||
229 | if(!srcFile.open( IO_ReadOnly|IO_Raw)) { | 240 | if(!srcFile.open( IO_ReadOnly|IO_Raw)) { |
230 | return success = false; | 241 | return success = false; |
231 | } | 242 | } |
232 | read_fd = srcFile.handle(); | 243 | read_fd = srcFile.handle(); |
233 | if(read_fd != -1) { | 244 | if(read_fd != -1) { |
234 | fstat (read_fd, &stat_buf); | 245 | fstat (read_fd, &stat_buf); |
235 | if( !destFile.open( IO_WriteOnly|IO_Raw ) ) | 246 | if( !destFile.open( IO_WriteOnly|IO_Raw ) ) |
236 | return success = false; | 247 | return success = false; |
237 | write_fd = destFile.handle(); | 248 | write_fd = destFile.handle(); |
238 | if(write_fd != -1) { | 249 | if(write_fd != -1) { |
239 | int err=0; | 250 | int err=0; |
240 | QString msg; | 251 | QString msg; |
241 | err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); | 252 | #ifdef Q_OS_MACX |
242 | if( err == -1) { | 253 | #ifdef SENDMAIL |
243 | switch(err) { | 254 | /* FreeBSD does support a different kind of |
244 | case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; | 255 | * sendfile. (eilers) |
245 | case EINVAL: msg = "Descriptor is not valid or locked. "; | 256 | * I took this from Very Secure FTPd |
246 | case ENOMEM: msg = "Insufficient memory to read from in_fd."; | 257 | * Licence: GPL |
247 | case EIO: msg = "Unspecified error while reading from in_fd."; | 258 | * Author: Chris Evans |
248 | }; | 259 | * sysdeputil.c |
249 | success = false; | 260 | */ |
250 | } | 261 | /* XXX - start_pos will truncate on 32-bit machines - can we |
251 | } else { | 262 | * say "start from current pos"? |
263 | */ | ||
264 | off_t written = 0; | ||
265 | int retval = 0; | ||
266 | retval = sendfile(read_fd, write_fd, offset, stat_buf.st_size, NULL, | ||
267 | &written, 0); | ||
268 | /* Translate to Linux-like retval */ | ||
269 | if (written > 0) | ||
270 | { | ||
271 | err = (int) written; | ||
272 | } | ||
273 | #else /* SENDMAIL */ | ||
274 | err == -1; | ||
275 | msg = "FAILURE: Using unsupported function \"sendfile()\" Need Workaround !!"; | ||
276 | success = false; | ||
277 | # warning "Need workaround for sendfile!!(eilers)" | ||
278 | #endif /* SENDMAIL */ | ||
279 | |||
280 | #else | ||
281 | err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); | ||
282 | if( err == -1) { | ||
283 | switch(err) { | ||
284 | case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; | ||
285 | case EINVAL: msg = "Descriptor is not valid or locked. "; | ||
286 | case ENOMEM: msg = "Insufficient memory to read from in_fd."; | ||
287 | case EIO: msg = "Unspecified error while reading from in_fd."; | ||
288 | }; | ||
289 | success = false; | ||
290 | } | ||
291 | #endif /* Q_OS_MACX */ | ||
292 | if( !success ) | ||
293 | qWarning( msg ); | ||
294 | } else { | ||
252 | qWarning("open write failed %s, %s",src.latin1(), dest.latin1()); | 295 | qWarning("open write failed %s, %s",src.latin1(), dest.latin1()); |
253 | success = false; | 296 | success = false; |
254 | } | 297 | } |
255 | } else { | 298 | } else { |
256 | qWarning("open read failed %s, %s",src.latin1(), dest.latin1()); | 299 | qWarning("open read failed %s, %s",src.latin1(), dest.latin1()); |
257 | success = false; | 300 | success = false; |
258 | } | 301 | } |
259 | srcFile.close(); | 302 | srcFile.close(); |
260 | destFile.close(); | 303 | destFile.close(); |
261 | // Set file permissions | 304 | // Set file permissions |
262 | if( stat( (const char *) src, &status ) == 0 ) { | 305 | if( stat( (const char *) src, &status ) == 0 ) { |
263 | chmod( (const char *) dest, status.st_mode ); | 306 | chmod( (const char *) dest, status.st_mode ); |
264 | } | 307 | } |
265 | 308 | ||
266 | return success; | 309 | return success; |
267 | } | 310 | } |
268 | 311 | ||
269 | 312 | ||
270 | bool FileManager::renameFile( const QString & src, const QString & dest ) { | 313 | bool FileManager::renameFile( const QString & src, const QString & dest ) { |
271 | if(copyFile( src, dest )) { | 314 | if(copyFile( src, dest )) { |
272 | if(QFile::remove(src) ) { | 315 | if(QFile::remove(src) ) { |
273 | return true; | 316 | return true; |
274 | } | 317 | } |
275 | } | 318 | } |
276 | return false; | 319 | return false; |
277 | } | 320 | } |
278 | 321 | ||
279 | 322 | ||
280 | /*! | 323 | /*! |
281 | Opens the document specified by \a f as a readable QIODevice. | 324 | Opens the document specified by \a f as a readable QIODevice. |
282 | The caller must delete the return value. | 325 | The caller must delete the return value. |
283 | 326 | ||
284 | Returns 0 if the operation fails. | 327 | Returns 0 if the operation fails. |
285 | */ | 328 | */ |
286 | QIODevice* FileManager::openFile( const DocLnk& f ) | 329 | QIODevice* FileManager::openFile( const DocLnk& f ) |
287 | { | 330 | { |
288 | QString fn = f.file(); | 331 | QString fn = f.file(); |
289 | QFile* fl = new QFile( fn ); | 332 | QFile* fl = new QFile( fn ); |
290 | if ( !fl->open( IO_ReadOnly ) ) { | 333 | if ( !fl->open( IO_ReadOnly ) ) { |
291 | delete fl; | 334 | delete fl; |
292 | fl = 0; | 335 | fl = 0; |
293 | } | 336 | } |
294 | return fl; | 337 | return fl; |
295 | } | 338 | } |
296 | 339 | ||
297 | /*! | 340 | /*! |
298 | Opens the document specified by \a f as a writable QIODevice. | 341 | Opens the document specified by \a f as a writable QIODevice. |
299 | The caller must delete the return value. | 342 | The caller must delete the return value. |
300 | 343 | ||
301 | Returns 0 if the operation fails. | 344 | Returns 0 if the operation fails. |
302 | */ | 345 | */ |
303 | QIODevice* FileManager::saveFile( const DocLnk& f ) | 346 | QIODevice* FileManager::saveFile( const DocLnk& f ) |
304 | { | 347 | { |
305 | QString fn = f.file(); | 348 | QString fn = f.file(); |
306 | ensurePathExists( fn ); | 349 | ensurePathExists( fn ); |
307 | QFile* fl = new QFile( fn ); | 350 | QFile* fl = new QFile( fn ); |
308 | if ( fl->open( IO_WriteOnly ) ) { | 351 | if ( fl->open( IO_WriteOnly ) ) { |
309 | f.writeLink(); | 352 | f.writeLink(); |
310 | } else { | 353 | } else { |
311 | delete fl; | 354 | delete fl; |
312 | fl = 0; | 355 | fl = 0; |
313 | } | 356 | } |
314 | return fl; | 357 | return fl; |
315 | } | 358 | } |
316 | 359 | ||
317 | /*! | 360 | /*! |
318 | Returns whether the document specified by \a f current exists | 361 | Returns whether the document specified by \a f current exists |
319 | as a file on disk. | 362 | as a file on disk. |
320 | */ | 363 | */ |
321 | bool FileManager::exists( const DocLnk &f ) | 364 | bool FileManager::exists( const DocLnk &f ) |
322 | { | 365 | { |
323 | return QFile::exists(f.file()); | 366 | return QFile::exists(f.file()); |
324 | } | 367 | } |
325 | 368 | ||
326 | 369 | ||
327 | /*! | 370 | /*! |
328 | Ensures that the path \a fn exists, by creating required directories. | 371 | Ensures that the path \a fn exists, by creating required directories. |
329 | Returns TRUE if successful. | 372 | Returns TRUE if successful. |
330 | */ | 373 | */ |
331 | bool FileManager::ensurePathExists( const QString &fn ) | 374 | bool FileManager::ensurePathExists( const QString &fn ) |
332 | { | 375 | { |
333 | QFileInfo fi(fn); | 376 | QFileInfo fi(fn); |
334 | fi.setFile( fi.dirPath(TRUE) ); | 377 | fi.setFile( fi.dirPath(TRUE) ); |
335 | if ( !fi.exists() ) { | 378 | if ( !fi.exists() ) { |
336 | if ( system(("mkdir -p "+fi.filePath())) ) | 379 | if ( system(("mkdir -p "+fi.filePath())) ) |
337 | return FALSE; | 380 | return FALSE; |
338 | } | 381 | } |
339 | 382 | ||
340 | return TRUE; | 383 | return TRUE; |
341 | } | 384 | } |
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index c7a5211..2ad8e95 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp | |||
@@ -45,205 +45,209 @@ static QString fontFamily( const QString& key ) | |||
45 | int u2 = key.find('_',u1+1); | 45 | int u2 = key.find('_',u1+1); |
46 | QString family = key.left(u0); | 46 | QString family = key.left(u0); |
47 | //int pointSize = key.mid(u0+1,u1-u0-1).toInt(); | 47 | //int pointSize = key.mid(u0+1,u1-u0-1).toInt(); |
48 | //int weight = key.mid(u1+1,u2-u1-1).toInt(); | 48 | //int weight = key.mid(u1+1,u2-u1-1).toInt(); |
49 | //bool italic = key.mid(u2-1,1) == "i"; | 49 | //bool italic = key.mid(u2-1,1) == "i"; |
50 | // #### ignores _t and _I fields | 50 | // #### ignores _t and _I fields |
51 | return family; | 51 | return family; |
52 | } | 52 | } |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | 55 | ||
56 | QValueList<FontFactory> *FontDatabase::factoryList = 0; | 56 | QValueList<FontFactory> *FontDatabase::factoryList = 0; |
57 | /*! | 57 | /*! |
58 | \class FontDatabase fontdatabase.h | 58 | \class FontDatabase fontdatabase.h |
59 | \brief The FontDatabase class provides information about available fonts. | 59 | \brief The FontDatabase class provides information about available fonts. |
60 | 60 | ||
61 | Most often you will simply want to query the database for the | 61 | Most often you will simply want to query the database for the |
62 | available font families(). | 62 | available font families(). |
63 | 63 | ||
64 | Use FontDatabase rather than QFontDatabase when you may need access | 64 | Use FontDatabase rather than QFontDatabase when you may need access |
65 | to fonts that are not normally available. For example, if the | 65 | to fonts that are not normally available. For example, if the |
66 | freetype library and the Qtopia freetype plugin are installed, | 66 | freetype library and the Qtopia freetype plugin are installed, |
67 | TrueType fonts will be available to your application. Font renderer | 67 | TrueType fonts will be available to your application. Font renderer |
68 | plugins have greater resource requirements than system fonts so they | 68 | plugins have greater resource requirements than system fonts so they |
69 | should be used only when necessary. You can force the loading of | 69 | should be used only when necessary. You can force the loading of |
70 | font renderer plugins with loadRenderers(). | 70 | font renderer plugins with loadRenderers(). |
71 | 71 | ||
72 | \ingroup qtopiaemb | 72 | \ingroup qtopiaemb |
73 | */ | 73 | */ |
74 | 74 | ||
75 | /*! | 75 | /*! |
76 | Constructs a FontDatabase object. | 76 | Constructs a FontDatabase object. |
77 | */ | 77 | */ |
78 | FontDatabase::FontDatabase() | 78 | FontDatabase::FontDatabase() |
79 | #ifndef QT_NO_FONTDATABASE | 79 | #ifndef QT_NO_FONTDATABASE |
80 | : QFontDatabase() | 80 | : QFontDatabase() |
81 | #endif | 81 | #endif |
82 | { | 82 | { |
83 | if ( !factoryList ) | 83 | if ( !factoryList ) |
84 | loadRenderers(); | 84 | loadRenderers(); |
85 | } | 85 | } |
86 | 86 | ||
87 | /*! | 87 | /*! |
88 | Returns a list of names of all the available font families. | 88 | Returns a list of names of all the available font families. |
89 | */ | 89 | */ |
90 | QStringList FontDatabase::families() const | 90 | QStringList FontDatabase::families() const |
91 | { | 91 | { |
92 | #ifndef QT_NO_FONTDATABASE | 92 | #ifndef QT_NO_FONTDATABASE |
93 | return QFontDatabase::families(); | 93 | return QFontDatabase::families(); |
94 | #else | 94 | #else |
95 | 95 | ||
96 | #ifndef QWS | 96 | #ifndef QWS |
97 | QStringList list; | 97 | QStringList list; |
98 | return list; | 98 | return list; |
99 | #else | 99 | #else |
100 | QStringList list; | 100 | QStringList list; |
101 | QDict<void> familyDict; | 101 | QDict<void> familyDict; |
102 | QDiskFont *qdf; | 102 | QDiskFont *qdf; |
103 | for ( qdf=qt_fontmanager->diskfonts.first(); qdf!=0; | 103 | for ( qdf=qt_fontmanager->diskfonts.first(); qdf!=0; |
104 | qdf=qt_fontmanager->diskfonts.next()) { | 104 | qdf=qt_fontmanager->diskfonts.next()) { |
105 | QString familyname = qdf->name; | 105 | QString familyname = qdf->name; |
106 | if ( !familyDict.find( familyname ) ) { | 106 | if ( !familyDict.find( familyname ) ) { |
107 | familyDict.insert( familyname, (void *)1 ); | 107 | familyDict.insert( familyname, (void *)1 ); |
108 | list.append( familyname ); | 108 | list.append( familyname ); |
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | QDir dir(fontDir(),"*.qpf"); | 112 | QDir dir(fontDir(),"*.qpf"); |
113 | for (int i=0; i<(int)dir.count(); i++) { | 113 | for (int i=0; i<(int)dir.count(); i++) { |
114 | QString familyname = fontFamily(dir[i]); | 114 | QString familyname = fontFamily(dir[i]); |
115 | if ( !familyDict.find( familyname ) ) { | 115 | if ( !familyDict.find( familyname ) ) { |
116 | familyDict.insert( familyname, (void *)1 ); | 116 | familyDict.insert( familyname, (void *)1 ); |
117 | list.append( familyname ); | 117 | list.append( familyname ); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | return list; | 121 | return list; |
122 | #endif | 122 | #endif |
123 | #endif | 123 | #endif |
124 | } | 124 | } |
125 | 125 | ||
126 | #ifdef QT_NO_FONTDATABASE | 126 | #ifdef QT_NO_FONTDATABASE |
127 | /*! | 127 | /*! |
128 | Returns a list of standard fontsizes. | 128 | Returns a list of standard fontsizes. |
129 | */ | 129 | */ |
130 | QValueList<int> FontDatabase::standardSizes() | 130 | QValueList<int> FontDatabase::standardSizes() |
131 | { | 131 | { |
132 | static int s[]={ 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, | 132 | static int s[]={ 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, |
133 | 36, 48, 72, 0 }; | 133 | 36, 48, 72, 0 }; |
134 | static bool first = TRUE; | 134 | static bool first = TRUE; |
135 | static QValueList<int> sList; | 135 | static QValueList<int> sList; |
136 | if ( first ) { | 136 | if ( first ) { |
137 | first = FALSE; | 137 | first = FALSE; |
138 | int i = 0; | 138 | int i = 0; |
139 | while( s[i] ) | 139 | while( s[i] ) |
140 | sList.append( s[i++] ); | 140 | sList.append( s[i++] ); |
141 | } | 141 | } |
142 | return sList; | 142 | return sList; |
143 | } | 143 | } |
144 | 144 | ||
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /*! | 147 | /*! |
148 | Load any font renderer plugins that are available and make the fonts | 148 | Load any font renderer plugins that are available and make the fonts |
149 | that the plugins can read available. | 149 | that the plugins can read available. |
150 | */ | 150 | */ |
151 | void FontDatabase::loadRenderers() | 151 | void FontDatabase::loadRenderers() |
152 | { | 152 | { |
153 | #ifndef QWS | 153 | #ifndef QWS |
154 | return; | 154 | return; |
155 | #else | 155 | #else |
156 | 156 | ||
157 | #ifndef QT_NO_COMPONENT | 157 | #ifndef QT_NO_COMPONENT |
158 | if ( !factoryList ) | 158 | if ( !factoryList ) |
159 | factoryList = new QValueList<FontFactory>; | 159 | factoryList = new QValueList<FontFactory>; |
160 | 160 | ||
161 | QValueList<FontFactory>::Iterator mit; | 161 | QValueList<FontFactory>::Iterator mit; |
162 | for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) { | 162 | for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) { |
163 | qt_fontmanager->factories.setAutoDelete( false ); | 163 | qt_fontmanager->factories.setAutoDelete( false ); |
164 | qt_fontmanager->factories.removeRef( (*mit).factory ); | 164 | qt_fontmanager->factories.removeRef( (*mit).factory ); |
165 | qt_fontmanager->factories.setAutoDelete( true ); | 165 | qt_fontmanager->factories.setAutoDelete( true ); |
166 | (*mit).interface->release(); | 166 | (*mit).interface->release(); |
167 | (*mit).library->unload(); | 167 | (*mit).library->unload(); |
168 | delete (*mit).library; | 168 | delete (*mit).library; |
169 | } | 169 | } |
170 | factoryList->clear(); | 170 | factoryList->clear(); |
171 | 171 | ||
172 | QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; | 172 | QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; |
173 | #ifdef Q_OS_MACX | ||
174 | QDir dir( path, "lib*.dylib" ); | ||
175 | #else | ||
173 | QDir dir( path, "lib*.so" ); | 176 | QDir dir( path, "lib*.so" ); |
177 | #endif | ||
174 | 178 | ||
175 | if ( !dir.exists()) | 179 | if ( !dir.exists()) |
176 | return; | 180 | return; |
177 | 181 | ||
178 | QStringList list = dir.entryList(); | 182 | QStringList list = dir.entryList(); |
179 | QStringList::Iterator it; | 183 | QStringList::Iterator it; |
180 | for ( it = list.begin(); it != list.end(); ++it ) { | 184 | for ( it = list.begin(); it != list.end(); ++it ) { |
181 | FontFactoryInterface *iface = 0; | 185 | FontFactoryInterface *iface = 0; |
182 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 186 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
183 | if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { | 187 | if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { |
184 | FontFactory factory; | 188 | FontFactory factory; |
185 | factory.library = lib; | 189 | factory.library = lib; |
186 | factory.interface = iface; | 190 | factory.interface = iface; |
187 | factory.factory = factory.interface->fontFactory(); | 191 | factory.factory = factory.interface->fontFactory(); |
188 | factoryList->append( factory ); | 192 | factoryList->append( factory ); |
189 | qt_fontmanager->factories.append( factory.factory ); | 193 | qt_fontmanager->factories.append( factory.factory ); |
190 | readFonts( factory.factory ); | 194 | readFonts( factory.factory ); |
191 | } else { | 195 | } else { |
192 | delete lib; | 196 | delete lib; |
193 | } | 197 | } |
194 | } | 198 | } |
195 | #endif | 199 | #endif |
196 | #endif | 200 | #endif |
197 | } | 201 | } |
198 | 202 | ||
199 | /*! | 203 | /*! |
200 | \internal | 204 | \internal |
201 | */ | 205 | */ |
202 | void FontDatabase::readFonts( QFontFactory *factory ) | 206 | void FontDatabase::readFonts( QFontFactory *factory ) |
203 | { | 207 | { |
204 | #ifndef QWS | 208 | #ifndef QWS |
205 | return; | 209 | return; |
206 | #else | 210 | #else |
207 | // Load in font definition file | 211 | // Load in font definition file |
208 | QString fn = fontDir() + "fontdir"; | 212 | QString fn = fontDir() + "fontdir"; |
209 | FILE* fontdef=fopen(fn.local8Bit(),"r"); | 213 | FILE* fontdef=fopen(fn.local8Bit(),"r"); |
210 | if(!fontdef) { | 214 | if(!fontdef) { |
211 | QCString temp=fn.local8Bit(); | 215 | QCString temp=fn.local8Bit(); |
212 | qWarning("Cannot find font definition file %s - is $QTDIR set correctly?", | 216 | qWarning("Cannot find font definition file %s - is $QTDIR set correctly?", |
213 | temp.data()); | 217 | temp.data()); |
214 | return; | 218 | return; |
215 | } | 219 | } |
216 | char buf[200]=""; | 220 | char buf[200]=""; |
217 | char name[200]=""; | 221 | char name[200]=""; |
218 | char render[200]=""; | 222 | char render[200]=""; |
219 | char file[200]=""; | 223 | char file[200]=""; |
220 | char flags[200]=""; | 224 | char flags[200]=""; |
221 | char isitalic[10]=""; | 225 | char isitalic[10]=""; |
222 | fgets(buf,200,fontdef); | 226 | fgets(buf,200,fontdef); |
223 | while(!feof(fontdef)) { | 227 | while(!feof(fontdef)) { |
224 | if ( buf[0] != '#' ) { | 228 | if ( buf[0] != '#' ) { |
225 | int weight=50; | 229 | int weight=50; |
226 | int size=0; | 230 | int size=0; |
227 | flags[0]=0; | 231 | flags[0]=0; |
228 | sscanf(buf,"%s %s %s %s %d %d %s",name,file,render,isitalic,&weight,&size,flags); | 232 | sscanf(buf,"%s %s %s %s %d %d %s",name,file,render,isitalic,&weight,&size,flags); |
229 | QString filename; | 233 | QString filename; |
230 | if ( file[0] != '/' ) | 234 | if ( file[0] != '/' ) |
231 | filename = fontDir(); | 235 | filename = fontDir(); |
232 | filename += file; | 236 | filename += file; |
233 | if ( QFile::exists(filename) ) { | 237 | if ( QFile::exists(filename) ) { |
234 | if( factory->name() == render ) { | 238 | if( factory->name() == render ) { |
235 | QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y', | 239 | QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y', |
236 | weight,size,flags,filename); | 240 | weight,size,flags,filename); |
237 | qt_fontmanager->diskfonts.append(qdf); | 241 | qt_fontmanager->diskfonts.append(qdf); |
238 | #if QT_VERSION >= 232 | 242 | #if QT_VERSION >= 232 |
239 | QFontDatabase::qwsAddDiskFont( qdf ); | 243 | QFontDatabase::qwsAddDiskFont( qdf ); |
240 | #endif | 244 | #endif |
241 | } | 245 | } |
242 | } | 246 | } |
243 | } | 247 | } |
244 | fgets(buf,200,fontdef); | 248 | fgets(buf,200,fontdef); |
245 | } | 249 | } |
246 | fclose(fontdef); | 250 | fclose(fontdef); |
247 | #endif | 251 | #endif |
248 | } | 252 | } |
249 | 253 | ||
diff --git a/library/global.cpp b/library/global.cpp index 90954fe..05d23ac 100644 --- a/library/global.cpp +++ b/library/global.cpp | |||
@@ -479,257 +479,261 @@ bool Global::isBuiltinCommand( const QString &name ) | |||
479 | } | 479 | } |
480 | 480 | ||
481 | Global::Command* Global::builtin=0; | 481 | Global::Command* Global::builtin=0; |
482 | QGuardedPtr<QWidget> *Global::running=0; | 482 | QGuardedPtr<QWidget> *Global::running=0; |
483 | 483 | ||
484 | /*! | 484 | /*! |
485 | \class Global::Command | 485 | \class Global::Command |
486 | \brief The Global::Command class is internal. | 486 | \brief The Global::Command class is internal. |
487 | \internal | 487 | \internal |
488 | */ | 488 | */ |
489 | 489 | ||
490 | /*! | 490 | /*! |
491 | \internal | 491 | \internal |
492 | */ | 492 | */ |
493 | void Global::setBuiltinCommands( Command* list ) | 493 | void Global::setBuiltinCommands( Command* list ) |
494 | { | 494 | { |
495 | if ( running ) | 495 | if ( running ) |
496 | delete [] running; | 496 | delete [] running; |
497 | 497 | ||
498 | builtin = list; | 498 | builtin = list; |
499 | int count = 0; | 499 | int count = 0; |
500 | if (!builtin) | 500 | if (!builtin) |
501 | return; | 501 | return; |
502 | while ( builtin[count].file ) | 502 | while ( builtin[count].file ) |
503 | count++; | 503 | count++; |
504 | 504 | ||
505 | running = new QGuardedPtr<QWidget> [ count ]; | 505 | running = new QGuardedPtr<QWidget> [ count ]; |
506 | } | 506 | } |
507 | 507 | ||
508 | /*! | 508 | /*! |
509 | \internal | 509 | \internal |
510 | */ | 510 | */ |
511 | void Global::setDocument( QWidget* receiver, const QString& document ) | 511 | void Global::setDocument( QWidget* receiver, const QString& document ) |
512 | { | 512 | { |
513 | Emitter emitter(receiver,document); | 513 | Emitter emitter(receiver,document); |
514 | } | 514 | } |
515 | 515 | ||
516 | /*! | 516 | /*! |
517 | \internal | 517 | \internal |
518 | */ | 518 | */ |
519 | bool Global::terminateBuiltin( const QString& n ) | 519 | bool Global::terminateBuiltin( const QString& n ) |
520 | { | 520 | { |
521 | if (!builtin) | 521 | if (!builtin) |
522 | return FALSE; | 522 | return FALSE; |
523 | for (int i = 0; builtin[i].file; i++) { | 523 | for (int i = 0; builtin[i].file; i++) { |
524 | if ( builtin[i].file == n ) { | 524 | if ( builtin[i].file == n ) { |
525 | delete running[i]; | 525 | delete running[i]; |
526 | return TRUE; | 526 | return TRUE; |
527 | } | 527 | } |
528 | } | 528 | } |
529 | return FALSE; | 529 | return FALSE; |
530 | } | 530 | } |
531 | 531 | ||
532 | /*! | 532 | /*! |
533 | \internal | 533 | \internal |
534 | */ | 534 | */ |
535 | void Global::terminate( const AppLnk* app ) | 535 | void Global::terminate( const AppLnk* app ) |
536 | { | 536 | { |
537 | //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this | 537 | //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this |
538 | 538 | ||
539 | #ifndef QT_NO_COP | 539 | #ifndef QT_NO_COP |
540 | QCString channel = "QPE/Application/" + app->exec().utf8(); | 540 | QCString channel = "QPE/Application/" + app->exec().utf8(); |
541 | if ( QCopChannel::isRegistered(channel) ) { | 541 | if ( QCopChannel::isRegistered(channel) ) { |
542 | QCopEnvelope e(channel, "quit()"); | 542 | QCopEnvelope e(channel, "quit()"); |
543 | } | 543 | } |
544 | #endif | 544 | #endif |
545 | } | 545 | } |
546 | 546 | ||
547 | /*! | 547 | /*! |
548 | Low-level function to run command \a c. | 548 | Low-level function to run command \a c. |
549 | 549 | ||
550 | \warning Do not use this function. Use execute instead. | 550 | \warning Do not use this function. Use execute instead. |
551 | 551 | ||
552 | \sa execute() | 552 | \sa execute() |
553 | */ | 553 | */ |
554 | void Global::invoke(const QString &c) | 554 | void Global::invoke(const QString &c) |
555 | { | 555 | { |
556 | // Convert the command line in to a list of arguments | 556 | // Convert the command line in to a list of arguments |
557 | QStringList list = QStringList::split(QRegExp(" *"),c); | 557 | QStringList list = QStringList::split(QRegExp(" *"),c); |
558 | 558 | ||
559 | #if !defined(QT_NO_COP) | 559 | #if !defined(QT_NO_COP) |
560 | QString ap=list[0]; | 560 | QString ap=list[0]; |
561 | // see if the application is already running | 561 | // see if the application is already running |
562 | // XXX should lock file /tmp/qcop-msg-ap | 562 | // XXX should lock file /tmp/qcop-msg-ap |
563 | if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { | 563 | if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { |
564 | // If the channel is already register, the app is already running, so show it. | 564 | // If the channel is already register, the app is already running, so show it. |
565 | { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } | 565 | { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } |
566 | 566 | ||
567 | //QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 567 | //QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
568 | //e << ap; | 568 | //e << ap; |
569 | return; | 569 | return; |
570 | } | 570 | } |
571 | // XXX should unlock file /tmp/qcop-msg-ap | 571 | // XXX should unlock file /tmp/qcop-msg-ap |
572 | //see if it is being started | 572 | //see if it is being started |
573 | if ( StartingAppList::isStarting( ap ) ) { | 573 | if ( StartingAppList::isStarting( ap ) ) { |
574 | // FIXME take it out for now, since it leads to a much to short showing of wait if | 574 | // FIXME take it out for now, since it leads to a much to short showing of wait if |
575 | // some entry is clicked. | 575 | // some entry is clicked. |
576 | // Real cause is that ::execute is called twice for document tab. But it would need some larger changes | 576 | // Real cause is that ::execute is called twice for document tab. But it would need some larger changes |
577 | // to fix that, and with future syncs with qtopia 1.6 it will change anyway big time since somebody there | 577 | // to fix that, and with future syncs with qtopia 1.6 it will change anyway big time since somebody there |
578 | // had the idea that an apploader belongs to the launcher ... | 578 | // had the idea that an apploader belongs to the launcher ... |
579 | //QCopEnvelope e("QPE/System", "notBusy(QString)" ); | 579 | //QCopEnvelope e("QPE/System", "notBusy(QString)" ); |
580 | //e << ap; | 580 | //e << ap; |
581 | return; | 581 | return; |
582 | } | 582 | } |
583 | 583 | ||
584 | #endif | 584 | #endif |
585 | 585 | ||
586 | #ifdef QT_NO_QWS_MULTIPROCESS | 586 | #ifdef QT_NO_QWS_MULTIPROCESS |
587 | QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 ); | 587 | QMessageBox::warning( 0, "Error", "Could not find the application " + c, "Ok", 0, 0, 0, 1 ); |
588 | #else | 588 | #else |
589 | 589 | ||
590 | QStrList slist; | 590 | QStrList slist; |
591 | unsigned int j; | 591 | unsigned int j; |
592 | for ( j = 0; j < list.count(); j++ ) | 592 | for ( j = 0; j < list.count(); j++ ) |
593 | slist.append( list[j].utf8() ); | 593 | slist.append( list[j].utf8() ); |
594 | 594 | ||
595 | const char **args = new (const char *)[slist.count() + 1]; | 595 | const char **args = new (const char *)[slist.count() + 1]; |
596 | for ( j = 0; j < slist.count(); j++ ) | 596 | for ( j = 0; j < slist.count(); j++ ) |
597 | args[j] = slist.at(j); | 597 | args[j] = slist.at(j); |
598 | args[j] = NULL; | 598 | args[j] = NULL; |
599 | 599 | ||
600 | #if !defined(QT_NO_COP) | 600 | #if !defined(QT_NO_COP) |
601 | // an attempt to show a wait... | 601 | // an attempt to show a wait... |
602 | // more logic should be used, but this will be fine for the moment... | 602 | // more logic should be used, but this will be fine for the moment... |
603 | QCopEnvelope ( "QPE/System", "busy()" ); | 603 | QCopEnvelope ( "QPE/System", "busy()" ); |
604 | #endif | 604 | #endif |
605 | 605 | ||
606 | #ifdef HAVE_QUICKEXEC | 606 | #ifdef HAVE_QUICKEXEC |
607 | #ifdef Q_OS_MACX | ||
608 | QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".dylib"; | ||
609 | #else | ||
607 | QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; | 610 | QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; |
611 | #endif | ||
608 | qDebug("libfile = %s", libexe.latin1() ); | 612 | qDebug("libfile = %s", libexe.latin1() ); |
609 | if ( QFile::exists( libexe ) ) { | 613 | if ( QFile::exists( libexe ) ) { |
610 | qDebug("calling quickexec %s", libexe.latin1() ); | 614 | qDebug("calling quickexec %s", libexe.latin1() ); |
611 | quickexecv( libexe.utf8().data(), (const char **)args ); | 615 | quickexecv( libexe.utf8().data(), (const char **)args ); |
612 | } else | 616 | } else |
613 | #endif | 617 | #endif |
614 | { | 618 | { |
615 | bool success = false; | 619 | bool success = false; |
616 | int pfd [2]; | 620 | int pfd [2]; |
617 | if ( ::pipe ( pfd ) < 0 ) | 621 | if ( ::pipe ( pfd ) < 0 ) |
618 | pfd [0] = pfd [1] = -1; | 622 | pfd [0] = pfd [1] = -1; |
619 | 623 | ||
620 | pid_t pid = ::fork ( ); | 624 | pid_t pid = ::fork ( ); |
621 | 625 | ||
622 | if ( pid == 0 ) { // child | 626 | if ( pid == 0 ) { // child |
623 | for ( int fd = 3; fd < 100; fd++ ) { | 627 | for ( int fd = 3; fd < 100; fd++ ) { |
624 | if ( fd != pfd [1] ) | 628 | if ( fd != pfd [1] ) |
625 | ::close ( fd ); | 629 | ::close ( fd ); |
626 | } | 630 | } |
627 | ::setpgid ( ::getpid ( ), ::getppid ( )); | 631 | ::setpgid ( ::getpid ( ), ::getppid ( )); |
628 | 632 | ||
629 | // Closing of fd[1] indicates that the execvp succeeded! | 633 | // Closing of fd[1] indicates that the execvp succeeded! |
630 | if ( pfd [1] >= 0 ) | 634 | if ( pfd [1] >= 0 ) |
631 | ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); | 635 | ::fcntl ( pfd [1], F_SETFD, FD_CLOEXEC ); |
632 | 636 | ||
633 | // Try bindir first, so that foo/bar works too | 637 | // Try bindir first, so that foo/bar works too |
634 | ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); | 638 | ::execv ( qpeDir ( ) + "/bin/" + args [0], (char * const *) args ); |
635 | ::execvp ( args [0], (char * const *) args ); | 639 | ::execvp ( args [0], (char * const *) args ); |
636 | 640 | ||
637 | char resultByte = 1; | 641 | char resultByte = 1; |
638 | if ( pfd [1] >= 0 ) | 642 | if ( pfd [1] >= 0 ) |
639 | ::write ( pfd [1], &resultByte, 1 ); | 643 | ::write ( pfd [1], &resultByte, 1 ); |
640 | ::_exit ( -1 ); | 644 | ::_exit ( -1 ); |
641 | } | 645 | } |
642 | else if ( pid > 0 ) { | 646 | else if ( pid > 0 ) { |
643 | success = true; | 647 | success = true; |
644 | 648 | ||
645 | if ( pfd [1] >= 0 ) | 649 | if ( pfd [1] >= 0 ) |
646 | ::close ( pfd [1] ); | 650 | ::close ( pfd [1] ); |
647 | if ( pfd [0] >= 0 ) { | 651 | if ( pfd [0] >= 0 ) { |
648 | while ( true ) { | 652 | while ( true ) { |
649 | char resultByte; | 653 | char resultByte; |
650 | int n = ::read ( pfd [0], &resultByte, 1 ); | 654 | int n = ::read ( pfd [0], &resultByte, 1 ); |
651 | if ( n == 1 ) { | 655 | if ( n == 1 ) { |
652 | success = false; | 656 | success = false; |
653 | break; | 657 | break; |
654 | } | 658 | } |
655 | if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) | 659 | if (( n == -1 ) && (( errno == ECHILD ) || ( errno == EINTR ))) |
656 | continue; | 660 | continue; |
657 | 661 | ||
658 | break; // success | 662 | break; // success |
659 | } | 663 | } |
660 | ::close ( pfd [0] ); | 664 | ::close ( pfd [0] ); |
661 | } | 665 | } |
662 | } | 666 | } |
663 | if ( success ) | 667 | if ( success ) |
664 | StartingAppList::add( list[0] ); | 668 | StartingAppList::add( list[0] ); |
665 | else | 669 | else |
666 | QMessageBox::warning( 0, "Error", "Could not start the application " + c, "Ok", 0, 0, 0, 1 ); | 670 | QMessageBox::warning( 0, "Error", "Could not start the application " + c, "Ok", 0, 0, 0, 1 ); |
667 | } | 671 | } |
668 | #endif //QT_NO_QWS_MULTIPROCESS | 672 | #endif //QT_NO_QWS_MULTIPROCESS |
669 | } | 673 | } |
670 | 674 | ||
671 | 675 | ||
672 | /*! | 676 | /*! |
673 | Executes the application identfied by \a c, passing \a | 677 | Executes the application identfied by \a c, passing \a |
674 | document if it isn't null. | 678 | document if it isn't null. |
675 | 679 | ||
676 | Note that a better approach might be to send a QCop message to the | 680 | Note that a better approach might be to send a QCop message to the |
677 | application's QPE/Application/\e{appname} channel. | 681 | application's QPE/Application/\e{appname} channel. |
678 | */ | 682 | */ |
679 | void Global::execute( const QString &c, const QString& document ) | 683 | void Global::execute( const QString &c, const QString& document ) |
680 | { | 684 | { |
681 | // ask the server to do the work | 685 | // ask the server to do the work |
682 | #if !defined(QT_NO_COP) | 686 | #if !defined(QT_NO_COP) |
683 | if ( document.isNull() ) { | 687 | if ( document.isNull() ) { |
684 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 688 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
685 | e << c; | 689 | e << c; |
686 | } else { | 690 | } else { |
687 | QCopEnvelope e( "QPE/System", "execute(QString,QString)" ); | 691 | QCopEnvelope e( "QPE/System", "execute(QString,QString)" ); |
688 | e << c << document; | 692 | e << c << document; |
689 | } | 693 | } |
690 | #endif | 694 | #endif |
691 | return; | 695 | return; |
692 | } | 696 | } |
693 | 697 | ||
694 | /*! | 698 | /*! |
695 | Returns the string \a s with the characters '\', '"', and '$' quoted | 699 | Returns the string \a s with the characters '\', '"', and '$' quoted |
696 | by a preceeding '\'. | 700 | by a preceeding '\'. |
697 | 701 | ||
698 | \sa stringQuote() | 702 | \sa stringQuote() |
699 | */ | 703 | */ |
700 | QString Global::shellQuote(const QString& s) | 704 | QString Global::shellQuote(const QString& s) |
701 | { | 705 | { |
702 | QString r="\""; | 706 | QString r="\""; |
703 | for (int i=0; i<(int)s.length(); i++) { | 707 | for (int i=0; i<(int)s.length(); i++) { |
704 | char c = s[i].latin1(); | 708 | char c = s[i].latin1(); |
705 | switch (c) { | 709 | switch (c) { |
706 | case '\\': case '"': case '$': | 710 | case '\\': case '"': case '$': |
707 | r+="\\"; | 711 | r+="\\"; |
708 | } | 712 | } |
709 | r += s[i]; | 713 | r += s[i]; |
710 | } | 714 | } |
711 | r += "\""; | 715 | r += "\""; |
712 | return r; | 716 | return r; |
713 | } | 717 | } |
714 | 718 | ||
715 | /*! | 719 | /*! |
716 | Returns the string \a s with the characters '\' and '"' quoted by a | 720 | Returns the string \a s with the characters '\' and '"' quoted by a |
717 | preceeding '\'. | 721 | preceeding '\'. |
718 | 722 | ||
719 | \sa shellQuote() | 723 | \sa shellQuote() |
720 | */ | 724 | */ |
721 | QString Global::stringQuote(const QString& s) | 725 | QString Global::stringQuote(const QString& s) |
722 | { | 726 | { |
723 | QString r="\""; | 727 | QString r="\""; |
724 | for (int i=0; i<(int)s.length(); i++) { | 728 | for (int i=0; i<(int)s.length(); i++) { |
725 | char c = s[i].latin1(); | 729 | char c = s[i].latin1(); |
726 | switch (c) { | 730 | switch (c) { |
727 | case '\\': case '"': | 731 | case '\\': case '"': |
728 | r+="\\"; | 732 | r+="\\"; |
729 | } | 733 | } |
730 | r += s[i]; | 734 | r += s[i]; |
731 | } | 735 | } |
732 | r += "\""; | 736 | r += "\""; |
733 | return r; | 737 | return r; |
734 | } | 738 | } |
735 | 739 | ||
diff --git a/library/library.pro b/library/library.pro index ab1f451..5acfc0c 100644 --- a/library/library.pro +++ b/library/library.pro | |||
@@ -1,157 +1,157 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | #CONFIG += qt warn_on release | 2 | #CONFIG += qt warn_on release |
3 | CONFIG += qt warn_on debug | 3 | CONFIG += qt warn_on debug |
4 | HEADERS= calendar.h \ | 4 | HEADERS= calendar.h \ |
5 | global.h \ | 5 | global.h \ |
6 | resource.h \ | 6 | resource.h \ |
7 | xmlreader.h \ | 7 | xmlreader.h \ |
8 | mimetype.h \ | 8 | mimetype.h \ |
9 | menubutton.h \ | 9 | menubutton.h \ |
10 | network.h \ | 10 | network.h \ |
11 | networkinterface.h \ | 11 | networkinterface.h \ |
12 | filemanager.h \ | 12 | filemanager.h \ |
13 | fontmanager.h \ | 13 | fontmanager.h \ |
14 | qdawg.h \ | 14 | qdawg.h \ |
15 | datebookmonth.h \ | 15 | datebookmonth.h \ |
16 | fileselector.h \ | 16 | fileselector.h \ |
17 | fileselector_p.h \ | 17 | fileselector_p.h \ |
18 | imageedit.h \ | 18 | imageedit.h \ |
19 | qcopenvelope_qws.h \ | 19 | qcopenvelope_qws.h \ |
20 | qpedecoration_qws.h \ | 20 | qpedecoration_qws.h \ |
21 | qpeapplication.h \ | 21 | qpeapplication.h \ |
22 | qpestyle.h \ | 22 | qpestyle.h \ |
23 | qpedialog.h \ | 23 | qpedialog.h \ |
24 | lightstyle.h \ | 24 | lightstyle.h \ |
25 | config.h \ | 25 | config.h \ |
26 | applnk.h \ | 26 | applnk.h \ |
27 | sound.h \ | 27 | sound.h \ |
28 | tzselect.h \ | 28 | tzselect.h \ |
29 | qmath.h \ | 29 | qmath.h \ |
30 | datebookdb.h \ | 30 | datebookdb.h \ |
31 | alarmserver.h \ | 31 | alarmserver.h \ |
32 | process.h \ | 32 | process.h \ |
33 | password.h \ | 33 | password.h \ |
34 | timestring.h \ | 34 | timestring.h \ |
35 | fontfactoryinterface.h \ | 35 | fontfactoryinterface.h \ |
36 | fontdatabase.h \ | 36 | fontdatabase.h \ |
37 | power.h \ | 37 | power.h \ |
38 | storage.h \ | 38 | storage.h \ |
39 | qpemessagebox.h \ | 39 | qpemessagebox.h \ |
40 | timeconversion.h \ | 40 | timeconversion.h \ |
41 | qpedebug.h \ | 41 | qpedebug.h \ |
42 | qpemenubar.h \ | 42 | qpemenubar.h \ |
43 | qpetoolbar.h \ | 43 | qpetoolbar.h \ |
44 | backend/categories.h \ | 44 | backend/categories.h \ |
45 | stringutil.h \ | 45 | stringutil.h \ |
46 | backend/palmtoprecord.h \ | 46 | backend/palmtoprecord.h \ |
47 | backend/task.h \ | 47 | backend/task.h \ |
48 | backend/event.h \ | 48 | backend/event.h \ |
49 | backend/contact.h\ | 49 | backend/contact.h\ |
50 | categorymenu.h \ | 50 | categorymenu.h \ |
51 | categoryedit_p.h \ | 51 | categoryedit_p.h \ |
52 | categoryselect.h \ | 52 | categoryselect.h \ |
53 | categorywidget.h \ | 53 | categorywidget.h \ |
54 | ir.h \ | 54 | ir.h \ |
55 | backend/vobject_p.h \ | 55 | backend/vobject_p.h \ |
56 | findwidget_p.h \ | 56 | findwidget_p.h \ |
57 | finddialog.h \ | 57 | finddialog.h \ |
58 | lnkproperties.h \ | 58 | lnkproperties.h \ |
59 | windowdecorationinterface.h \ | 59 | windowdecorationinterface.h \ |
60 | textcodecinterface.h \ | 60 | textcodecinterface.h \ |
61 | imagecodecinterface.h \ | 61 | imagecodecinterface.h \ |
62 | qt_override_p.h | 62 | qt_override_p.h |
63 | 63 | ||
64 | SOURCES= calendar.cpp \ | 64 | SOURCES= calendar.cpp \ |
65 | global.cpp \ | 65 | global.cpp \ |
66 | xmlreader.cpp \ | 66 | xmlreader.cpp \ |
67 | mimetype.cpp \ | 67 | mimetype.cpp \ |
68 | menubutton.cpp \ | 68 | menubutton.cpp \ |
69 | network.cpp \ | 69 | network.cpp \ |
70 | networkinterface.cpp \ | 70 | networkinterface.cpp \ |
71 | filemanager.cpp \ | 71 | filemanager.cpp \ |
72 | fontmanager.cpp \ | 72 | fontmanager.cpp \ |
73 | qdawg.cpp \ | 73 | qdawg.cpp \ |
74 | datebookmonth.cpp \ | 74 | datebookmonth.cpp \ |
75 | fileselector.cpp \ | 75 | fileselector.cpp \ |
76 | imageedit.cpp \ | 76 | imageedit.cpp \ |
77 | resource.cpp \ | 77 | resource.cpp \ |
78 | qpedecoration_qws.cpp \ | 78 | qpedecoration_qws.cpp \ |
79 | qcopenvelope_qws.cpp \ | 79 | qcopenvelope_qws.cpp \ |
80 | qpeapplication.cpp \ | 80 | qpeapplication.cpp \ |
81 | qpestyle.cpp \ | 81 | qpestyle.cpp \ |
82 | qpedialog.cpp \ | 82 | qpedialog.cpp \ |
83 | lightstyle.cpp \ | 83 | lightstyle.cpp \ |
84 | config.cpp \ | 84 | config.cpp \ |
85 | applnk.cpp \ | 85 | applnk.cpp \ |
86 | sound.cpp \ | 86 | sound.cpp \ |
87 | tzselect.cpp \ | 87 | tzselect.cpp \ |
88 | qmath.c \ | 88 | qmath.c \ |
89 | datebookdb.cpp \ | 89 | datebookdb.cpp \ |
90 | alarmserver.cpp \ | 90 | alarmserver.cpp \ |
91 | password.cpp \ | 91 | password.cpp \ |
92 | process.cpp \ | 92 | process.cpp \ |
93 | process_unix.cpp \ | 93 | process_unix.cpp \ |
94 | timestring.cpp \ | 94 | timestring.cpp \ |
95 | fontdatabase.cpp \ | 95 | fontdatabase.cpp \ |
96 | power.cpp \ | 96 | power.cpp \ |
97 | storage.cpp \ | 97 | storage.cpp \ |
98 | qpemessagebox.cpp \ | 98 | qpemessagebox.cpp \ |
99 | backend/timeconversion.cpp \ | 99 | backend/timeconversion.cpp \ |
100 | qpedebug.cpp \ | 100 | qpedebug.cpp \ |
101 | qpemenubar.cpp \ | 101 | qpemenubar.cpp \ |
102 | qpetoolbar.cpp \ | 102 | qpetoolbar.cpp \ |
103 | backend/categories.cpp \ | 103 | backend/categories.cpp \ |
104 | backend/stringutil.cpp \ | 104 | backend/stringutil.cpp \ |
105 | backend/palmtoprecord.cpp \ | 105 | backend/palmtoprecord.cpp \ |
106 | backend/task.cpp \ | 106 | backend/task.cpp \ |
107 | backend/event.cpp \ | 107 | backend/event.cpp \ |
108 | backend/contact.cpp \ | 108 | backend/contact.cpp \ |
109 | categorymenu.cpp \ | 109 | categorymenu.cpp \ |
110 | categoryedit_p.cpp \ | 110 | categoryedit_p.cpp \ |
111 | categoryselect.cpp \ | 111 | categoryselect.cpp \ |
112 | categorywidget.cpp \ | 112 | categorywidget.cpp \ |
113 | ir.cpp \ | 113 | ir.cpp \ |
114 | backend/vcc_yacc.cpp \ | 114 | backend/vcc_yacc.cpp \ |
115 | backend/vobject.cpp \ | 115 | backend/vobject.cpp \ |
116 | findwidget_p.cpp \ | 116 | findwidget_p.cpp \ |
117 | finddialog.cpp \ | 117 | finddialog.cpp \ |
118 | lnkproperties.cpp \ | 118 | lnkproperties.cpp \ |
119 | qt_override.cpp | 119 | qt_override.cpp |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | # Qt 3 compatibility | 123 | # Qt 3 compatibility |
124 | HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h | 124 | HEADERS += quuid.h qcom.h qlibrary.h qlibrary_p.h |
125 | SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp | 125 | SOURCES += quuid.cpp qlibrary.cpp qlibrary_unix.cpp |
126 | INCLUDEPATH += $(OPIEDIR)/include backend | 126 | INCLUDEPATH += $(OPIEDIR)/include backend |
127 | LIBS += -ldl -lcrypt -lm | 127 | # LIBS += -ldl -lcrypt -lm |
128 | INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui | 128 | INTERFACES = passwordbase_p.ui categoryeditbase_p.ui findwidgetbase_p.ui lnkpropertiesbase_p.ui |
129 | TARGET = qpe | 129 | TARGET = qpe |
130 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) | 130 | DESTDIR = $(OPIEDIR)/lib$(PROJMAK) |
131 | VERSION = 1.5.0.1 | 131 | VERSION = 1.5.0.1 |
132 | 132 | ||
133 | TRANSLATIONS = ../i18n/de/libqpe.ts \ | 133 | TRANSLATIONS = ../i18n/de/libqpe.ts \ |
134 | ../i18n/nl/libqpe.ts \ | 134 | ../i18n/nl/libqpe.ts \ |
135 | ../i18n/xx/libqpe.ts \ | 135 | ../i18n/xx/libqpe.ts \ |
136 | ../i18n/en/libqpe.ts \ | 136 | ../i18n/en/libqpe.ts \ |
137 | ../i18n/es/libqpe.ts \ | 137 | ../i18n/es/libqpe.ts \ |
138 | ../i18n/fr/libqpe.ts \ | 138 | ../i18n/fr/libqpe.ts \ |
139 | ../i18n/hu/libqpe.ts \ | 139 | ../i18n/hu/libqpe.ts \ |
140 | ../i18n/ja/libqpe.ts \ | 140 | ../i18n/ja/libqpe.ts \ |
141 | ../i18n/ko/libqpe.ts \ | 141 | ../i18n/ko/libqpe.ts \ |
142 | ../i18n/no/libqpe.ts \ | 142 | ../i18n/no/libqpe.ts \ |
143 | ../i18n/pl/libqpe.ts \ | 143 | ../i18n/pl/libqpe.ts \ |
144 | ../i18n/pt/libqpe.ts \ | 144 | ../i18n/pt/libqpe.ts \ |
145 | ../i18n/pt_BR/libqpe.ts \ | 145 | ../i18n/pt_BR/libqpe.ts \ |
146 | ../i18n/sl/libqpe.ts \ | 146 | ../i18n/sl/libqpe.ts \ |
147 | ../i18n/zh_CN/libqpe.ts \ | 147 | ../i18n/zh_CN/libqpe.ts \ |
148 | ../i18n/it/libqpe.ts \ | 148 | ../i18n/it/libqpe.ts \ |
149 | ../i18n/zh_TW/libqpe.ts \ | 149 | ../i18n/zh_TW/libqpe.ts \ |
150 | ../i18n/da/libqpe.ts | 150 | ../i18n/da/libqpe.ts |
151 | 151 | ||
152 | 152 | ||
153 | include ( $(OPIEDIR)/include.pro ) | 153 | include ( $(OPIEDIR)/include.pro ) |
154 | 154 | ||
155 | contains( CONFIG, no-override ){ | 155 | contains( CONFIG, no-override ){ |
156 | DEFINES += OPIE_NO_OVERRIDE_QT | 156 | DEFINES += OPIE_NO_OVERRIDE_QT |
157 | } | 157 | } |
diff --git a/library/network.cpp b/library/network.cpp index 3568809..991e11a 100644 --- a/library/network.cpp +++ b/library/network.cpp | |||
@@ -293,152 +293,156 @@ private: | |||
293 | startTimer(400); | 293 | startTimer(400); |
294 | stopped = TRUE; | 294 | stopped = TRUE; |
295 | } | 295 | } |
296 | } | 296 | } |
297 | } | 297 | } |
298 | if ( !stopped ) { | 298 | if ( !stopped ) { |
299 | QCopEnvelope("QPE/Network", "failed()"); | 299 | QCopEnvelope("QPE/Network", "failed()"); |
300 | } | 300 | } |
301 | } | 301 | } |
302 | 302 | ||
303 | void timerEvent(QTimerEvent*) | 303 | void timerEvent(QTimerEvent*) |
304 | { | 304 | { |
305 | examineNetworks(); | 305 | examineNetworks(); |
306 | if ( wait >= 0 ) { | 306 | if ( wait >= 0 ) { |
307 | if ( up == !current.isNull() ) { | 307 | if ( up == !current.isNull() ) { |
308 | // done | 308 | // done |
309 | killTimers(); | 309 | killTimers(); |
310 | if ( up ) { | 310 | if ( up ) { |
311 | startTimer(3000); // monitor link | 311 | startTimer(3000); // monitor link |
312 | wait = -1; | 312 | wait = -1; |
313 | } | 313 | } |
314 | } else { | 314 | } else { |
315 | wait++; | 315 | wait++; |
316 | if ( wait == 600 ) { | 316 | if ( wait == 600 ) { |
317 | killTimers(); // forget about it after 240 s | 317 | killTimers(); // forget about it after 240 s |
318 | QCopEnvelope("QPE/Network", "failed()"); | 318 | QCopEnvelope("QPE/Network", "failed()"); |
319 | up = !current.isNull(); | 319 | up = !current.isNull(); |
320 | } | 320 | } |
321 | } | 321 | } |
322 | } else if ( !up ) { | 322 | } else if ( !up ) { |
323 | killTimers(); | 323 | killTimers(); |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | private: | 327 | private: |
328 | QStringList available; | 328 | QStringList available; |
329 | QString current; | 329 | QString current; |
330 | bool up; | 330 | bool up; |
331 | int wait; | 331 | int wait; |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static NetworkServer* ns=0; | 334 | static NetworkServer* ns=0; |
335 | 335 | ||
336 | /*! | 336 | /*! |
337 | \internal | 337 | \internal |
338 | */ | 338 | */ |
339 | QString Network::serviceName(const QString& service) | 339 | QString Network::serviceName(const QString& service) |
340 | { | 340 | { |
341 | Config cfg(service, Config::File); | 341 | Config cfg(service, Config::File); |
342 | cfg.setGroup("Info"); | 342 | cfg.setGroup("Info"); |
343 | return cfg.readEntry("Name"); | 343 | return cfg.readEntry("Name"); |
344 | } | 344 | } |
345 | 345 | ||
346 | /*! | 346 | /*! |
347 | \internal | 347 | \internal |
348 | */ | 348 | */ |
349 | QString Network::serviceType(const QString& service) | 349 | QString Network::serviceType(const QString& service) |
350 | { | 350 | { |
351 | Config cfg(service, Config::File); | 351 | Config cfg(service, Config::File); |
352 | cfg.setGroup("Info"); | 352 | cfg.setGroup("Info"); |
353 | return cfg.readEntry("Type"); | 353 | return cfg.readEntry("Type"); |
354 | } | 354 | } |
355 | 355 | ||
356 | /*! | 356 | /*! |
357 | \internal | 357 | \internal |
358 | */ | 358 | */ |
359 | bool Network::serviceNeedsPassword(const QString& service) | 359 | bool Network::serviceNeedsPassword(const QString& service) |
360 | { | 360 | { |
361 | Config cfg(service,Config::File); | 361 | Config cfg(service,Config::File); |
362 | cfg.setGroup("Info"); | 362 | cfg.setGroup("Info"); |
363 | QString type = cfg.readEntry("Type"); | 363 | QString type = cfg.readEntry("Type"); |
364 | NetworkInterface* plugin = Network::loadPlugin(type); | 364 | NetworkInterface* plugin = Network::loadPlugin(type); |
365 | cfg.setGroup("Properties"); | 365 | cfg.setGroup("Properties"); |
366 | return plugin ? plugin->needPassword(cfg) : FALSE; | 366 | return plugin ? plugin->needPassword(cfg) : FALSE; |
367 | } | 367 | } |
368 | 368 | ||
369 | /*! | 369 | /*! |
370 | \internal | 370 | \internal |
371 | */ | 371 | */ |
372 | bool Network::networkOnline() | 372 | bool Network::networkOnline() |
373 | { | 373 | { |
374 | return ns && ns->networkOnline(); | 374 | return ns && ns->networkOnline(); |
375 | } | 375 | } |
376 | 376 | ||
377 | /*! | 377 | /*! |
378 | \internal | 378 | \internal |
379 | */ | 379 | */ |
380 | void Network::createServer(QObject* parent) | 380 | void Network::createServer(QObject* parent) |
381 | { | 381 | { |
382 | ns = new NetworkServer(parent); | 382 | ns = new NetworkServer(parent); |
383 | } | 383 | } |
384 | 384 | ||
385 | /*! | 385 | /*! |
386 | \internal | 386 | \internal |
387 | */ | 387 | */ |
388 | int Network::addStateWidgets(QWidget* parent) | 388 | int Network::addStateWidgets(QWidget* parent) |
389 | { | 389 | { |
390 | int n=0; | 390 | int n=0; |
391 | QStringList l = Network::choices(); | 391 | QStringList l = Network::choices(); |
392 | QVBoxLayout* vb = new QVBoxLayout(parent); | 392 | QVBoxLayout* vb = new QVBoxLayout(parent); |
393 | for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { | 393 | for (QStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { |
394 | Config cfg(*it,Config::File); | 394 | Config cfg(*it,Config::File); |
395 | cfg.setGroup("Info"); | 395 | cfg.setGroup("Info"); |
396 | QString type = cfg.readEntry("Type"); | 396 | QString type = cfg.readEntry("Type"); |
397 | NetworkInterface* plugin = Network::loadPlugin(type); | 397 | NetworkInterface* plugin = Network::loadPlugin(type); |
398 | cfg.setGroup("Properties"); | 398 | cfg.setGroup("Properties"); |
399 | if ( plugin ) { | 399 | if ( plugin ) { |
400 | QWidget* w; | 400 | QWidget* w; |
401 | if ( (w=plugin->addStateWidget(parent,cfg)) ) { | 401 | if ( (w=plugin->addStateWidget(parent,cfg)) ) { |
402 | n++; | 402 | n++; |
403 | vb->addWidget(w); | 403 | vb->addWidget(w); |
404 | } | 404 | } |
405 | } | 405 | } |
406 | } | 406 | } |
407 | return n; | 407 | return n; |
408 | } | 408 | } |
409 | 409 | ||
410 | static QDict<NetworkInterface> *ifaces; | 410 | static QDict<NetworkInterface> *ifaces; |
411 | 411 | ||
412 | /*! | 412 | /*! |
413 | \internal | 413 | \internal |
414 | */ | 414 | */ |
415 | NetworkInterface* Network::loadPlugin(const QString& type) | 415 | NetworkInterface* Network::loadPlugin(const QString& type) |
416 | { | 416 | { |
417 | #ifndef QT_NO_COMPONENT | 417 | #ifndef QT_NO_COMPONENT |
418 | if ( !ifaces ) ifaces = new QDict<NetworkInterface>; | 418 | if ( !ifaces ) ifaces = new QDict<NetworkInterface>; |
419 | NetworkInterface *iface = ifaces->find(type); | 419 | NetworkInterface *iface = ifaces->find(type); |
420 | if ( !iface ) { | 420 | if ( !iface ) { |
421 | #ifdef Q_OS_MACX | ||
422 | QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".dylib"; | ||
423 | #else | ||
421 | QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; | 424 | QString libfile = QPEApplication::qpeDir() + "/plugins/network/lib" + type + ".so"; |
425 | #endif | ||
422 | QLibrary lib(libfile); | 426 | QLibrary lib(libfile); |
423 | if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) | 427 | if ( !lib.queryInterface( IID_Network, (QUnknownInterface**)&iface ) == QS_OK ) |
424 | return 0; | 428 | return 0; |
425 | ifaces->insert(type,iface); | 429 | ifaces->insert(type,iface); |
426 | QStringList langs = Global::languageList(); | 430 | QStringList langs = Global::languageList(); |
427 | for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { | 431 | for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) { |
428 | QString lang = *it; | 432 | QString lang = *it; |
429 | QTranslator * trans = new QTranslator(qApp); | 433 | QTranslator * trans = new QTranslator(qApp); |
430 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; | 434 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm"; |
431 | if ( trans->load( tfn )) | 435 | if ( trans->load( tfn )) |
432 | qApp->installTranslator( trans ); | 436 | qApp->installTranslator( trans ); |
433 | else | 437 | else |
434 | delete trans; | 438 | delete trans; |
435 | } | 439 | } |
436 | } | 440 | } |
437 | return iface; | 441 | return iface; |
438 | #else | 442 | #else |
439 | return 0; | 443 | return 0; |
440 | #endif | 444 | #endif |
441 | } | 445 | } |
442 | 446 | ||
443 | #include "network.moc" | 447 | #include "network.moc" |
444 | #endif// QT_NO_COP | 448 | #endif// QT_NO_COP |
diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp index 7740321..0229b7b 100644 --- a/library/qlibrary_unix.cpp +++ b/library/qlibrary_unix.cpp | |||
@@ -1,132 +1,243 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "qlibrary_p.h" | 21 | #include "qlibrary_p.h" |
22 | 22 | ||
23 | #ifndef QT_NO_COMPONENT | 23 | #ifndef QT_NO_COMPONENT |
24 | 24 | ||
25 | /* | 25 | /* |
26 | The platform dependent implementations of | 26 | The platform dependent implementations of |
27 | - loadLibrary | 27 | - loadLibrary |
28 | - freeLibrary | 28 | - freeLibrary |
29 | - resolveSymbol | 29 | - resolveSymbol |
30 | 30 | ||
31 | It's not too hard to guess what the functions do. | 31 | It's not too hard to guess what the functions do. |
32 | */ | 32 | */ |
33 | #if defined(Q_OS_HPUX) | 33 | #if defined(Q_OS_HPUX) |
34 | // for HP-UX < 11.x and 32 bit | 34 | // for HP-UX < 11.x and 32 bit |
35 | #include <dl.h> | 35 | #include <dl.h> |
36 | 36 | ||
37 | bool QLibraryPrivate::loadLibrary() | 37 | bool QLibraryPrivate::loadLibrary() |
38 | { | 38 | { |
39 | if ( pHnd ) | 39 | if ( pHnd ) |
40 | return TRUE; | 40 | return TRUE; |
41 | 41 | ||
42 | QString filename = library->library(); | 42 | QString filename = library->library(); |
43 | 43 | ||
44 | pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 ); | 44 | pHnd = (void*)shl_load( filename.latin1(), BIND_DEFERRED | BIND_NONFATAL | DYNAMIC_PATH, 0 ); |
45 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | 45 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) |
46 | if ( !pHnd ) | 46 | if ( !pHnd ) |
47 | qDebug( "Failed to load library %s!", filename.latin1() ); | 47 | qDebug( "Failed to load library %s!", filename.latin1() ); |
48 | #endif | 48 | #endif |
49 | return pHnd != 0; | 49 | return pHnd != 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | bool QLibraryPrivate::freeLibrary() | 52 | bool QLibraryPrivate::freeLibrary() |
53 | { | 53 | { |
54 | if ( !pHnd ) | 54 | if ( !pHnd ) |
55 | return TRUE; | 55 | return TRUE; |
56 | 56 | ||
57 | if ( !shl_unload( (shl_t)pHnd ) ) { | 57 | if ( !shl_unload( (shl_t)pHnd ) ) { |
58 | pHnd = 0; | 58 | pHnd = 0; |
59 | return TRUE; | 59 | return TRUE; |
60 | } | 60 | } |
61 | return FALSE; | 61 | return FALSE; |
62 | } | 62 | } |
63 | 63 | ||
64 | void* QLibraryPrivate::resolveSymbol( const char* symbol ) | 64 | void* QLibraryPrivate::resolveSymbol( const char* symbol ) |
65 | { | 65 | { |
66 | if ( !pHnd ) | 66 | if ( !pHnd ) |
67 | return 0; | 67 | return 0; |
68 | 68 | ||
69 | void* address = 0; | 69 | void* address = 0; |
70 | if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) { | 70 | if ( shl_findsym( (shl_t*)&pHnd, symbol, TYPE_UNDEFINED, address ) < 0 ) { |
71 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | 71 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) |
72 | qDebug( "Couldn't resolve symbol \"%s\"", symbol ); | 72 | qDebug( "Couldn't resolve symbol \"%s\"", symbol ); |
73 | #endif | 73 | #endif |
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | return address; | 76 | return address; |
77 | } | 77 | } |
78 | 78 | ||
79 | #else // Q_OS_HPUX | 79 | #elif defined(_NULL_LIB_) |
80 | |||
81 | bool QLibraryPrivate::loadLibrary() | ||
82 | { | ||
83 | //qDebug("QLibraryPrivate::loadLibrary\n"); | ||
84 | return FALSE; | ||
85 | } | ||
86 | bool QLibraryPrivate::freeLibrary() | ||
87 | { | ||
88 | //qDebug("QLibraryPrivate::freeLibrary\n"); | ||
89 | return FALSE; | ||
90 | } | ||
91 | void* QLibraryPrivate::resolveSymbol( const char* symbol ) | ||
92 | { | ||
93 | //qDebug("QLibraryPrivate::resolveSymbol\n"); | ||
94 | return FALSE; | ||
95 | } | ||
96 | |||
97 | #elif defined(Q_OS_MACX) | ||
98 | |||
99 | #define ENUM_DYLD_BOOL | ||
100 | enum DYLD_BOOL { | ||
101 | DYLD_FALSE, | ||
102 | DYLD_TRUE | ||
103 | }; | ||
104 | #include <mach-o/dyld.h> | ||
105 | typedef struct { | ||
106 | NSObjectFileImage img; | ||
107 | NSModule mod; | ||
108 | } DyldLibDesc; | ||
109 | |||
110 | bool QLibraryPrivate::loadLibrary() | ||
111 | { | ||
112 | // qDebug("QLibraryPrivate::loadLibrary\n"); | ||
113 | // return FALSE; | ||
114 | if ( pHnd ) | ||
115 | return TRUE; | ||
116 | |||
117 | QString filename = library->library(); | ||
118 | |||
119 | NSObjectFileImage img = 0; | ||
120 | NSModule mod = 0; | ||
121 | NSObjectFileImageReturnCode ret = NSCreateObjectFileImageFromFile( filename.latin1() , &img ); | ||
122 | if ( ret != NSObjectFileImageSuccess ) { | ||
123 | qWarning( "Error in NSCreateObjectFileImageFromFile(): %d; Filename: %s", ret, filename.latin1() ); | ||
124 | if (ret == NSObjectFileImageAccess) { | ||
125 | qWarning ("(NSObjectFileImageAccess)" ); | ||
126 | } | ||
127 | } else { | ||
128 | mod = NSLinkModule(img, filename.latin1(), NSLINKMODULE_OPTION_BINDNOW | | ||
129 | NSLINKMODULE_OPTION_PRIVATE | | ||
130 | NSLINKMODULE_OPTION_RETURN_ON_ERROR); | ||
131 | if (mod == 0) { | ||
132 | qWarning( "Error in NSLinkModule()" ); | ||
133 | NSDestroyObjectFileImage(img); | ||
134 | } | ||
135 | } | ||
136 | DyldLibDesc* desc = 0; | ||
137 | if (img != 0 && mod != 0) { | ||
138 | desc = new DyldLibDesc; | ||
139 | desc->img = img; | ||
140 | desc->mod = mod; | ||
141 | } | ||
142 | pHnd = desc; | ||
143 | return pHnd != 0; | ||
144 | } | ||
145 | |||
146 | bool QLibraryPrivate::freeLibrary() | ||
147 | { | ||
148 | //qDebug("QLibraryPrivate::freeLibrary\n"); | ||
149 | //return FALSE; | ||
150 | if ( !pHnd ) | ||
151 | return TRUE; | ||
152 | |||
153 | DyldLibDesc* desc = (DyldLibDesc*) pHnd; | ||
154 | NSModule mod = desc->mod; | ||
155 | NSObjectFileImage img = desc->img; | ||
156 | DYLD_BOOL success = NSUnLinkModule(mod, NSUNLINKMODULE_OPTION_NONE); | ||
157 | if ( success ) { | ||
158 | NSDestroyObjectFileImage(img); | ||
159 | delete desc; | ||
160 | pHnd = 0; | ||
161 | } | ||
162 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | ||
163 | else { | ||
164 | qWarning( "Error in NSUnLinkModule(): %d", ret ); | ||
165 | } | ||
166 | #endif | ||
167 | return pHnd == 0; | ||
168 | } | ||
169 | |||
170 | void* QLibraryPrivate::resolveSymbol( const char* symbol ) | ||
171 | { | ||
172 | //qDebug("QLibraryPrivate::resolveSymbol\n"); | ||
173 | //return FALSE; | ||
174 | if ( !pHnd ) | ||
175 | return 0; | ||
176 | |||
177 | DyldLibDesc* desc = (DyldLibDesc*) pHnd; | ||
178 | NSSymbol sym = NSLookupSymbolInModule(desc->mod, symbol); | ||
179 | void* address = 0; | ||
180 | if (sym != 0) { | ||
181 | address = NSAddressOfSymbol(sym); | ||
182 | } | ||
183 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | ||
184 | if ( address == 0 ) | ||
185 | qWarning( "Cannot find symbol: %s", symbol ); | ||
186 | #endif | ||
187 | return address; | ||
188 | } | ||
189 | |||
190 | #else | ||
80 | // Something else, assuming POSIX | 191 | // Something else, assuming POSIX |
81 | #include <dlfcn.h> | 192 | #include <dlfcn.h> |
82 | 193 | ||
83 | bool QLibraryPrivate::loadLibrary() | 194 | bool QLibraryPrivate::loadLibrary() |
84 | { | 195 | { |
85 | if ( pHnd ) | 196 | if ( pHnd ) |
86 | return TRUE; | 197 | return TRUE; |
87 | 198 | ||
88 | QString filename = library->library(); | 199 | QString filename = library->library(); |
89 | 200 | ||
90 | pHnd = dlopen( filename.latin1() , RTLD_LAZY ); | 201 | pHnd = dlopen( filename.latin1() , RTLD_LAZY ); |
91 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | 202 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) |
92 | if ( !pHnd ) | 203 | if ( !pHnd ) |
93 | qWarning( "%s", dlerror() ); | 204 | qWarning( "%s", dlerror() ); |
94 | #endif | 205 | #endif |
95 | return pHnd != 0; | 206 | return pHnd != 0; |
96 | } | 207 | } |
97 | 208 | ||
98 | bool QLibraryPrivate::freeLibrary() | 209 | bool QLibraryPrivate::freeLibrary() |
99 | { | 210 | { |
100 | if ( !pHnd ) | 211 | if ( !pHnd ) |
101 | return TRUE; | 212 | return TRUE; |
102 | 213 | ||
103 | int ec = dlclose( pHnd ); | 214 | int ec = dlclose( pHnd ); |
104 | if ( !ec ) | 215 | if ( !ec ) |
105 | pHnd = 0; | 216 | pHnd = 0; |
106 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | 217 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) |
107 | else { | 218 | else { |
108 | const char* error = dlerror(); | 219 | const char* error = dlerror(); |
109 | if ( error ) | 220 | if ( error ) |
110 | qWarning( "%s", error ); | 221 | qWarning( "%s", error ); |
111 | } | 222 | } |
112 | #endif | 223 | #endif |
113 | return pHnd == 0; | 224 | return pHnd == 0; |
114 | } | 225 | } |
115 | 226 | ||
116 | void* QLibraryPrivate::resolveSymbol( const char* f ) | 227 | void* QLibraryPrivate::resolveSymbol( const char* f ) |
117 | { | 228 | { |
118 | if ( !pHnd ) | 229 | if ( !pHnd ) |
119 | return 0; | 230 | return 0; |
120 | 231 | ||
121 | void* address = dlsym( pHnd, f ); | 232 | void* address = dlsym( pHnd, f ); |
122 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) | 233 | #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) |
123 | const char* error = dlerror(); | 234 | const char* error = dlerror(); |
124 | if ( error ) | 235 | if ( error ) |
125 | qWarning( "%s", error ); | 236 | qWarning( "%s", error ); |
126 | #endif | 237 | #endif |
127 | return address; | 238 | return address; |
128 | } | 239 | } |
129 | 240 | ||
130 | #endif // POSIX | 241 | #endif // POSIX |
131 | 242 | ||
132 | #endif // QT_NO_COMPONENT | 243 | #endif // QT_NO_COMPONENT |
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index d4734ae..a97efc0 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -1,540 +1,559 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | */ | 19 | */ |
20 | #define QTOPIA_INTERNAL_LANGLIST | 20 | #define QTOPIA_INTERNAL_LANGLIST |
21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
22 | #include <unistd.h> | 22 | #include <unistd.h> |
23 | #ifndef Q_OS_MACX | ||
23 | #include <linux/limits.h> // needed for some toolchains (PATH_MAX) | 24 | #include <linux/limits.h> // needed for some toolchains (PATH_MAX) |
25 | #endif | ||
24 | #include <qfile.h> | 26 | #include <qfile.h> |
25 | #include <qqueue.h> | 27 | #include <qqueue.h> |
26 | #ifdef Q_WS_QWS | 28 | #ifdef Q_WS_QWS |
27 | #ifndef QT_NO_COP | 29 | #ifndef QT_NO_COP |
28 | #if QT_VERSION <= 231 | 30 | #if QT_VERSION <= 231 |
29 | #define private public | 31 | #define private public |
30 | #define sendLocally processEvent | 32 | #define sendLocally processEvent |
31 | #include "qcopenvelope_qws.h" | 33 | #include "qcopenvelope_qws.h" |
32 | #undef private | 34 | #undef private |
33 | #else | 35 | #else |
34 | #include "qcopenvelope_qws.h" | 36 | #include "qcopenvelope_qws.h" |
35 | #endif | 37 | #endif |
36 | #endif | 38 | #endif |
37 | #include <qwindowsystem_qws.h> | 39 | #include <qwindowsystem_qws.h> |
38 | #endif | 40 | #endif |
39 | #include <qtextstream.h> | 41 | #include <qtextstream.h> |
40 | #include <qpalette.h> | 42 | #include <qpalette.h> |
41 | #include <qbuffer.h> | 43 | #include <qbuffer.h> |
42 | #include <qptrdict.h> | 44 | #include <qptrdict.h> |
43 | #include <qregexp.h> | 45 | #include <qregexp.h> |
44 | #include <qdir.h> | 46 | #include <qdir.h> |
45 | #include <qlabel.h> | 47 | #include <qlabel.h> |
46 | #include <qdialog.h> | 48 | #include <qdialog.h> |
47 | #include <qdragobject.h> | 49 | #include <qdragobject.h> |
48 | #include <qtextcodec.h> | 50 | #include <qtextcodec.h> |
49 | #include <qevent.h> | 51 | #include <qevent.h> |
50 | #include <qtooltip.h> | 52 | #include <qtooltip.h> |
51 | #include <qsignal.h> | 53 | #include <qsignal.h> |
52 | #include <qmainwindow.h> | 54 | #include <qmainwindow.h> |
53 | #include <qwidgetlist.h> | 55 | #include <qwidgetlist.h> |
54 | #include <qpixmapcache.h> | 56 | #include <qpixmapcache.h> |
55 | 57 | ||
56 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 58 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
57 | #define QTOPIA_INTERNAL_INITAPP | 59 | #define QTOPIA_INTERNAL_INITAPP |
58 | #include "qpeapplication.h" | 60 | #include "qpeapplication.h" |
59 | #include "qpestyle.h" | 61 | #include "qpestyle.h" |
60 | #include "styleinterface.h" | 62 | #include "styleinterface.h" |
61 | #if QT_VERSION >= 300 | 63 | #if QT_VERSION >= 300 |
62 | #include <qstylefactory.h> | 64 | #include <qstylefactory.h> |
63 | #else | 65 | #else |
64 | #include <qplatinumstyle.h> | 66 | #include <qplatinumstyle.h> |
65 | #include <qwindowsstyle.h> | 67 | #include <qwindowsstyle.h> |
66 | #include <qmotifstyle.h> | 68 | #include <qmotifstyle.h> |
67 | #include <qmotifplusstyle.h> | 69 | #include <qmotifplusstyle.h> |
68 | #include "lightstyle.h" | 70 | #include "lightstyle.h" |
69 | 71 | ||
70 | #include <qpe/qlibrary.h> | 72 | #include <qpe/qlibrary.h> |
71 | #endif | 73 | #endif |
72 | #include "global.h" | 74 | #include "global.h" |
73 | #include "resource.h" | 75 | #include "resource.h" |
74 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) | 76 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) |
75 | #include "qutfcodec.h" | 77 | #include "qutfcodec.h" |
76 | #endif | 78 | #endif |
77 | #include "config.h" | 79 | #include "config.h" |
78 | #include "network.h" | 80 | #include "network.h" |
79 | #ifdef QWS | 81 | #ifdef QWS |
80 | #include "fontmanager.h" | 82 | #include "fontmanager.h" |
81 | #endif | 83 | #endif |
82 | 84 | ||
83 | #include "alarmserver.h" | 85 | #include "alarmserver.h" |
84 | #include "applnk.h" | 86 | #include "applnk.h" |
85 | #include "qpemenubar.h" | 87 | #include "qpemenubar.h" |
86 | #include "textcodecinterface.h" | 88 | #include "textcodecinterface.h" |
87 | #include "imagecodecinterface.h" | 89 | #include "imagecodecinterface.h" |
88 | 90 | ||
89 | #include <unistd.h> | 91 | #include <unistd.h> |
90 | #include <sys/file.h> | 92 | #include <sys/file.h> |
91 | #include <sys/ioctl.h> | 93 | #include <sys/ioctl.h> |
94 | #ifndef QT_NO_SOUND | ||
92 | #include <sys/soundcard.h> | 95 | #include <sys/soundcard.h> |
93 | 96 | #endif | |
94 | #include "qt_override_p.h" | 97 | #include "qt_override_p.h" |
95 | 98 | ||
96 | 99 | ||
97 | class QPEApplicationData | 100 | class QPEApplicationData |
98 | { | 101 | { |
99 | public: | 102 | public: |
100 | QPEApplicationData ( ) | 103 | QPEApplicationData ( ) |
101 | : presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ), | 104 | : presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ), |
102 | notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), | 105 | notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ), |
103 | keep_running( true ), qcopQok( false ), qpe_main_widget( 0 ) | 106 | keep_running( true ), qcopQok( false ), qpe_main_widget( 0 ) |
104 | 107 | ||
105 | {} | 108 | {} |
106 | 109 | ||
107 | int presstimer; | 110 | int presstimer; |
108 | QWidget* presswidget; | 111 | QWidget* presswidget; |
109 | QPoint presspos; | 112 | QPoint presspos; |
110 | 113 | ||
111 | bool rightpressed : 1; | 114 | bool rightpressed : 1; |
112 | bool kbgrabbed : 1; | 115 | bool kbgrabbed : 1; |
113 | bool notbusysent : 1; | 116 | bool notbusysent : 1; |
114 | bool preloaded : 1; | 117 | bool preloaded : 1; |
115 | bool forceshow : 1; | 118 | bool forceshow : 1; |
116 | bool nomaximize : 1; | 119 | bool nomaximize : 1; |
117 | bool keep_running : 1; | 120 | bool keep_running : 1; |
118 | bool qcopQok : 1; | 121 | bool qcopQok : 1; |
119 | 122 | ||
120 | 123 | ||
121 | QStringList langs; | 124 | QStringList langs; |
122 | QString appName; | 125 | QString appName; |
123 | struct QCopRec | 126 | struct QCopRec |
124 | { | 127 | { |
125 | QCopRec( const QCString &ch, const QCString &msg, | 128 | QCopRec( const QCString &ch, const QCString &msg, |
126 | const QByteArray &d ) : | 129 | const QByteArray &d ) : |
127 | channel( ch ), message( msg ), data( d ) | 130 | channel( ch ), message( msg ), data( d ) |
128 | { } | 131 | { } |
129 | 132 | ||
130 | QCString channel; | 133 | QCString channel; |
131 | QCString message; | 134 | QCString message; |
132 | QByteArray data; | 135 | QByteArray data; |
133 | }; | 136 | }; |
134 | QWidget* qpe_main_widget; | 137 | QWidget* qpe_main_widget; |
135 | QGuardedPtr<QWidget> lastraised; | 138 | QGuardedPtr<QWidget> lastraised; |
136 | QQueue<QCopRec> qcopq; | 139 | QQueue<QCopRec> qcopq; |
137 | QString styleName; | 140 | QString styleName; |
138 | QString decorationName; | 141 | QString decorationName; |
139 | 142 | ||
140 | void enqueueQCop( const QCString &ch, const QCString &msg, | 143 | void enqueueQCop( const QCString &ch, const QCString &msg, |
141 | const QByteArray &data ) | 144 | const QByteArray &data ) |
142 | { | 145 | { |
143 | qcopq.enqueue( new QCopRec( ch, msg, data ) ); | 146 | qcopq.enqueue( new QCopRec( ch, msg, data ) ); |
144 | } | 147 | } |
145 | void sendQCopQ() | 148 | void sendQCopQ() |
146 | { | 149 | { |
147 | if (!qcopQok ) | 150 | if (!qcopQok ) |
148 | return; | 151 | return; |
149 | 152 | ||
150 | QCopRec * r; | 153 | QCopRec * r; |
151 | 154 | ||
152 | while((r=qcopq.dequeue())) { | 155 | while((r=qcopq.dequeue())) { |
153 | // remove from queue before sending... | 156 | // remove from queue before sending... |
154 | // event loop can come around again before getting | 157 | // event loop can come around again before getting |
155 | // back from sendLocally | 158 | // back from sendLocally |
156 | #ifndef QT_NO_COP | 159 | #ifndef QT_NO_COP |
157 | QCopChannel::sendLocally( r->channel, r->message, r->data ); | 160 | QCopChannel::sendLocally( r->channel, r->message, r->data ); |
158 | #endif | 161 | #endif |
159 | 162 | ||
160 | delete r; | 163 | delete r; |
161 | } | 164 | } |
162 | } | 165 | } |
163 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) | 166 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) |
164 | { | 167 | { |
165 | 168 | ||
166 | // ugly hack, remove that later after finding a sane solution | 169 | // ugly hack, remove that later after finding a sane solution |
167 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, | 170 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, |
168 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has | 171 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has |
169 | // a (physically) large enough display to use the small icons | 172 | // a (physically) large enough display to use the small icons |
170 | #if defined(OPIE_HIGH_RES_SMALL_PHY) | 173 | #if defined(OPIE_HIGH_RES_SMALL_PHY) |
171 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { | 174 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { |
172 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); | 175 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); |
173 | } | 176 | } |
174 | #endif | 177 | #endif |
175 | 178 | ||
176 | if ( mw->layout() && mw->inherits("QDialog") ) { | 179 | if ( mw->layout() && mw->inherits("QDialog") ) { |
177 | QPEApplication::showDialog((QDialog*)mw, nomaximize); | 180 | QPEApplication::showDialog((QDialog*)mw, nomaximize); |
178 | } | 181 | } |
179 | else { | 182 | else { |
180 | #ifdef Q_WS_QWS | 183 | #ifdef Q_WS_QWS |
181 | if ( !nomaximize ) | 184 | if ( !nomaximize ) |
182 | mw->showMaximized(); | 185 | mw->showMaximized(); |
183 | else | 186 | else |
184 | #endif | 187 | #endif |
185 | 188 | ||
186 | mw->show(); | 189 | mw->show(); |
187 | } | 190 | } |
188 | } | 191 | } |
189 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) | 192 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) |
190 | { | 193 | { |
191 | /* | 194 | /* |
192 | // This works but disable it for now until it is safe to apply | 195 | // This works but disable it for now until it is safe to apply |
193 | // What is does is scan the .desktop files of all the apps for | 196 | // What is does is scan the .desktop files of all the apps for |
194 | // the applnk that has the corresponding argv[0] as this program | 197 | // the applnk that has the corresponding argv[0] as this program |
195 | // then it uses the name stored in the .desktop file as the caption | 198 | // then it uses the name stored in the .desktop file as the caption |
196 | // for the main widget. This saves duplicating translations for | 199 | // for the main widget. This saves duplicating translations for |
197 | // the app name in the program and in the .desktop files. | 200 | // the app name in the program and in the .desktop files. |
198 | 201 | ||
199 | AppLnkSet apps( appsPath ); | 202 | AppLnkSet apps( appsPath ); |
200 | 203 | ||
201 | QList<AppLnk> appsList = apps.children(); | 204 | QList<AppLnk> appsList = apps.children(); |
202 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { | 205 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { |
203 | if ( (*it)->exec() == appName ) { | 206 | if ( (*it)->exec() == appName ) { |
204 | mw->setCaption( (*it)->name() ); | 207 | mw->setCaption( (*it)->name() ); |
205 | return TRUE; | 208 | return TRUE; |
206 | } | 209 | } |
207 | } | 210 | } |
208 | */ | 211 | */ |
209 | return FALSE; | 212 | return FALSE; |
210 | } | 213 | } |
211 | 214 | ||
212 | 215 | ||
213 | void show(QWidget* mw, bool nomax) | 216 | void show(QWidget* mw, bool nomax) |
214 | { | 217 | { |
215 | setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" ); | 218 | setWidgetCaptionFromAppName( mw, appName, QPEApplication::qpeDir() + "apps" ); |
216 | nomaximize = nomax; | 219 | nomaximize = nomax; |
217 | qpe_main_widget = mw; | 220 | qpe_main_widget = mw; |
218 | qcopQok = TRUE; | 221 | qcopQok = TRUE; |
219 | #ifndef QT_NO_COP | 222 | #ifndef QT_NO_COP |
220 | 223 | ||
221 | sendQCopQ(); | 224 | sendQCopQ(); |
222 | #endif | 225 | #endif |
223 | 226 | ||
224 | if ( preloaded ) { | 227 | if ( preloaded ) { |
225 | if (forceshow) | 228 | if (forceshow) |
226 | show_mx(mw, nomax); | 229 | show_mx(mw, nomax); |
227 | } | 230 | } |
228 | else if ( keep_running ) { | 231 | else if ( keep_running ) { |
229 | show_mx(mw, nomax); | 232 | show_mx(mw, nomax); |
230 | } | 233 | } |
231 | } | 234 | } |
232 | 235 | ||
233 | void loadTextCodecs() | 236 | void loadTextCodecs() |
234 | { | 237 | { |
235 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; | 238 | QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; |
239 | #ifdef Q_OS_MACX | ||
240 | QDir dir( path, "lib*.dylib" ); | ||
241 | #else | ||
236 | QDir dir( path, "lib*.so" ); | 242 | QDir dir( path, "lib*.so" ); |
243 | #endif | ||
237 | QStringList list; | 244 | QStringList list; |
238 | if ( dir. exists ( )) | 245 | if ( dir. exists ( )) |
239 | list = dir.entryList(); | 246 | list = dir.entryList(); |
240 | QStringList::Iterator it; | 247 | QStringList::Iterator it; |
241 | for ( it = list.begin(); it != list.end(); ++it ) { | 248 | for ( it = list.begin(); it != list.end(); ++it ) { |
242 | TextCodecInterface *iface = 0; | 249 | TextCodecInterface *iface = 0; |
243 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 250 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
244 | if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { | 251 | if ( lib->queryInterface( IID_QtopiaTextCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { |
245 | QValueList<int> mibs = iface->mibEnums(); | 252 | QValueList<int> mibs = iface->mibEnums(); |
246 | for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { | 253 | for (QValueList<int>::ConstIterator i = mibs.begin(); i != mibs.end(); ++i) { |
247 | (void)iface->createForMib(*i); | 254 | (void)iface->createForMib(*i); |
248 | // ### it exists now; need to remember if we can delete it | 255 | // ### it exists now; need to remember if we can delete it |
249 | } | 256 | } |
250 | } | 257 | } |
251 | else { | 258 | else { |
252 | lib->unload(); | 259 | lib->unload(); |
253 | delete lib; | 260 | delete lib; |
254 | } | 261 | } |
255 | } | 262 | } |
256 | } | 263 | } |
257 | 264 | ||
258 | void loadImageCodecs() | 265 | void loadImageCodecs() |
259 | { | 266 | { |
260 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; | 267 | QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; |
268 | #ifdef Q_OS_MACX | ||
269 | QDir dir( path, "lib*.dylib" ); | ||
270 | #else | ||
261 | QDir dir( path, "lib*.so" ); | 271 | QDir dir( path, "lib*.so" ); |
272 | #endif | ||
262 | QStringList list; | 273 | QStringList list; |
263 | if ( dir. exists ( )) | 274 | if ( dir. exists ( )) |
264 | list = dir.entryList(); | 275 | list = dir.entryList(); |
265 | QStringList::Iterator it; | 276 | QStringList::Iterator it; |
266 | for ( it = list.begin(); it != list.end(); ++it ) { | 277 | for ( it = list.begin(); it != list.end(); ++it ) { |
267 | ImageCodecInterface *iface = 0; | 278 | ImageCodecInterface *iface = 0; |
268 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 279 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
269 | if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { | 280 | if ( lib->queryInterface( IID_QtopiaImageCodec, (QUnknownInterface**)&iface ) == QS_OK && iface ) { |
270 | QStringList formats = iface->keys(); | 281 | QStringList formats = iface->keys(); |
271 | for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { | 282 | for (QStringList::ConstIterator i = formats.begin(); i != formats.end(); ++i) { |
272 | (void)iface->installIOHandler(*i); | 283 | (void)iface->installIOHandler(*i); |
273 | // ### it exists now; need to remember if we can delete it | 284 | // ### it exists now; need to remember if we can delete it |
274 | } | 285 | } |
275 | } | 286 | } |
276 | else { | 287 | else { |
277 | lib->unload(); | 288 | lib->unload(); |
278 | delete lib; | 289 | delete lib; |
279 | } | 290 | } |
280 | } | 291 | } |
281 | } | 292 | } |
282 | }; | 293 | }; |
283 | 294 | ||
284 | class ResourceMimeFactory : public QMimeSourceFactory | 295 | class ResourceMimeFactory : public QMimeSourceFactory |
285 | { | 296 | { |
286 | public: | 297 | public: |
287 | ResourceMimeFactory() : resImage( 0 ) | 298 | ResourceMimeFactory() : resImage( 0 ) |
288 | { | 299 | { |
289 | setFilePath( Global::helpPath() ); | 300 | setFilePath( Global::helpPath() ); |
290 | setExtensionType( "html", "text/html;charset=UTF-8" ); | 301 | setExtensionType( "html", "text/html;charset=UTF-8" ); |
291 | } | 302 | } |
292 | ~ResourceMimeFactory() { | 303 | ~ResourceMimeFactory() { |
293 | delete resImage; | 304 | delete resImage; |
294 | } | 305 | } |
295 | 306 | ||
296 | const QMimeSource* data( const QString& abs_name ) const | 307 | const QMimeSource* data( const QString& abs_name ) const |
297 | { | 308 | { |
298 | const QMimeSource * r = QMimeSourceFactory::data( abs_name ); | 309 | const QMimeSource * r = QMimeSourceFactory::data( abs_name ); |
299 | if ( !r ) { | 310 | if ( !r ) { |
300 | int sl = abs_name.length(); | 311 | int sl = abs_name.length(); |
301 | do { | 312 | do { |
302 | sl = abs_name.findRev( '/', sl - 1 ); | 313 | sl = abs_name.findRev( '/', sl - 1 ); |
303 | QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name; | 314 | QString name = sl >= 0 ? abs_name.mid( sl + 1 ) : abs_name; |
304 | int dot = name.findRev( '.' ); | 315 | int dot = name.findRev( '.' ); |
305 | if ( dot >= 0 ) | 316 | if ( dot >= 0 ) |
306 | name = name.left( dot ); | 317 | name = name.left( dot ); |
307 | QImage img = Resource::loadImage( name ); | 318 | QImage img = Resource::loadImage( name ); |
308 | if ( !img.isNull() ) { | 319 | if ( !img.isNull() ) { |
309 | delete resImage; | 320 | delete resImage; |
310 | resImage = new QImageDrag( img ); | 321 | resImage = new QImageDrag( img ); |
311 | r = resImage; | 322 | r = resImage; |
312 | } | 323 | } |
313 | } | 324 | } |
314 | while ( !r && sl > 0 ); | 325 | while ( !r && sl > 0 ); |
315 | } | 326 | } |
316 | return r; | 327 | return r; |
317 | } | 328 | } |
318 | private: | 329 | private: |
319 | mutable QImageDrag *resImage; | 330 | mutable QImageDrag *resImage; |
320 | }; | 331 | }; |
321 | 332 | ||
322 | static int& hack(int& i) | 333 | static int& hack(int& i) |
323 | { | 334 | { |
324 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) | 335 | #if QT_VERSION <= 230 && defined(QT_NO_CODECS) |
325 | // These should be created, but aren't in Qt 2.3.0 | 336 | // These should be created, but aren't in Qt 2.3.0 |
326 | (void)new QUtf8Codec; | 337 | (void)new QUtf8Codec; |
327 | (void)new QUtf16Codec; | 338 | (void)new QUtf16Codec; |
328 | #endif | 339 | #endif |
329 | return i; | 340 | return i; |
330 | } | 341 | } |
331 | 342 | ||
332 | static int muted = 0; | 343 | static int muted = 0; |
333 | static int micMuted = 0; | 344 | static int micMuted = 0; |
334 | 345 | ||
335 | static void setVolume( int t = 0, int percent = -1 ) | 346 | static void setVolume( int t = 0, int percent = -1 ) |
336 | { | 347 | { |
337 | switch ( t ) { | 348 | switch ( t ) { |
338 | case 0: { | 349 | case 0: { |
339 | Config cfg( "qpe" ); | 350 | Config cfg( "qpe" ); |
340 | cfg.setGroup( "Volume" ); | 351 | cfg.setGroup( "Volume" ); |
341 | if ( percent < 0 ) | 352 | if ( percent < 0 ) |
342 | percent = cfg.readNumEntry( "VolumePercent", 50 ); | 353 | percent = cfg.readNumEntry( "VolumePercent", 50 ); |
354 | #ifndef QT_NO_SOUND | ||
343 | int fd = 0; | 355 | int fd = 0; |
344 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { | 356 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { |
345 | int vol = muted ? 0 : percent; | 357 | int vol = muted ? 0 : percent; |
346 | // set both channels to same volume | 358 | // set both channels to same volume |
347 | vol |= vol << 8; | 359 | vol |= vol << 8; |
348 | ioctl( fd, MIXER_WRITE( 0 ), &vol ); | 360 | ioctl( fd, MIXER_WRITE( 0 ), &vol ); |
349 | ::close( fd ); | 361 | ::close( fd ); |
350 | } | 362 | } |
363 | #endif | ||
351 | } | 364 | } |
352 | break; | 365 | break; |
353 | } | 366 | } |
354 | } | 367 | } |
355 | 368 | ||
356 | static void setMic( int t = 0, int percent = -1 ) | 369 | static void setMic( int t = 0, int percent = -1 ) |
357 | { | 370 | { |
358 | switch ( t ) { | 371 | switch ( t ) { |
359 | case 0: { | 372 | case 0: { |
360 | Config cfg( "qpe" ); | 373 | Config cfg( "qpe" ); |
361 | cfg.setGroup( "Volume" ); | 374 | cfg.setGroup( "Volume" ); |
362 | if ( percent < 0 ) | 375 | if ( percent < 0 ) |
363 | percent = cfg.readNumEntry( "Mic", 50 ); | 376 | percent = cfg.readNumEntry( "Mic", 50 ); |
364 | 377 | ||
378 | #ifndef QT_NO_SOUND | ||
365 | int fd = 0; | 379 | int fd = 0; |
366 | int mic = micMuted ? 0 : percent; | 380 | int mic = micMuted ? 0 : percent; |
367 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { | 381 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { |
368 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic ); | 382 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic ); |
369 | ::close( fd ); | 383 | ::close( fd ); |
370 | } | 384 | } |
385 | #endif | ||
371 | } | 386 | } |
372 | break; | 387 | break; |
373 | } | 388 | } |
374 | } | 389 | } |
375 | 390 | ||
376 | 391 | ||
377 | static void setBass( int t = 0, int percent = -1 ) | 392 | static void setBass( int t = 0, int percent = -1 ) |
378 | { | 393 | { |
379 | switch ( t ) { | 394 | switch ( t ) { |
380 | case 0: { | 395 | case 0: { |
381 | Config cfg( "qpe" ); | 396 | Config cfg( "qpe" ); |
382 | cfg.setGroup( "Volume" ); | 397 | cfg.setGroup( "Volume" ); |
383 | if ( percent < 0 ) | 398 | if ( percent < 0 ) |
384 | percent = cfg.readNumEntry( "BassPercent", 50 ); | 399 | percent = cfg.readNumEntry( "BassPercent", 50 ); |
385 | 400 | ||
401 | #ifndef QT_NO_SOUND | ||
386 | int fd = 0; | 402 | int fd = 0; |
387 | int bass = percent; | 403 | int bass = percent; |
388 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { | 404 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { |
389 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_BASS ), &bass ); | 405 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_BASS ), &bass ); |
390 | ::close( fd ); | 406 | ::close( fd ); |
391 | } | 407 | } |
408 | #endif | ||
392 | } | 409 | } |
393 | break; | 410 | break; |
394 | } | 411 | } |
395 | } | 412 | } |
396 | 413 | ||
397 | 414 | ||
398 | static void setTreble( int t = 0, int percent = -1 ) | 415 | static void setTreble( int t = 0, int percent = -1 ) |
399 | { | 416 | { |
400 | switch ( t ) { | 417 | switch ( t ) { |
401 | case 0: { | 418 | case 0: { |
402 | Config cfg( "qpe" ); | 419 | Config cfg( "qpe" ); |
403 | cfg.setGroup( "Volume" ); | 420 | cfg.setGroup( "Volume" ); |
404 | if ( percent < 0 ) | 421 | if ( percent < 0 ) |
405 | percent = cfg.readNumEntry( "TreblePercent", 50 ); | 422 | percent = cfg.readNumEntry( "TreblePercent", 50 ); |
406 | 423 | ||
424 | #ifndef QT_NO_SOUND | ||
407 | int fd = 0; | 425 | int fd = 0; |
408 | int treble = percent; | 426 | int treble = percent; |
409 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { | 427 | if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) { |
410 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_TREBLE ), &treble ); | 428 | ioctl( fd, MIXER_WRITE( SOUND_MIXER_TREBLE ), &treble ); |
411 | ::close( fd ); | 429 | ::close( fd ); |
412 | } | 430 | } |
431 | #endif | ||
413 | } | 432 | } |
414 | break; | 433 | break; |
415 | } | 434 | } |
416 | } | 435 | } |
417 | 436 | ||
418 | 437 | ||
419 | /*! | 438 | /*! |
420 | \class QPEApplication qpeapplication.h | 439 | \class QPEApplication qpeapplication.h |
421 | \brief The QPEApplication class implements various system services | 440 | \brief The QPEApplication class implements various system services |
422 | that are available to all Qtopia applications. | 441 | that are available to all Qtopia applications. |
423 | 442 | ||
424 | Simply by using QPEApplication instead of QApplication, a standard Qt | 443 | Simply by using QPEApplication instead of QApplication, a standard Qt |
425 | application becomes a Qtopia application. It automatically follows | 444 | application becomes a Qtopia application. It automatically follows |
426 | style changes, quits and raises, and in the | 445 | style changes, quits and raises, and in the |
427 | case of \link docwidget.html document-oriented\endlink applications, | 446 | case of \link docwidget.html document-oriented\endlink applications, |
428 | changes the currently displayed document in response to the environment. | 447 | changes the currently displayed document in response to the environment. |
429 | 448 | ||
430 | To create a \link docwidget.html document-oriented\endlink | 449 | To create a \link docwidget.html document-oriented\endlink |
431 | application use showMainDocumentWidget(); to create a | 450 | application use showMainDocumentWidget(); to create a |
432 | non-document-oriented application use showMainWidget(). The | 451 | non-document-oriented application use showMainWidget(). The |
433 | keepRunning() function indicates whether the application will | 452 | keepRunning() function indicates whether the application will |
434 | continue running after it's processed the last \link qcop.html | 453 | continue running after it's processed the last \link qcop.html |
435 | QCop\endlink message. This can be changed using setKeepRunning(). | 454 | QCop\endlink message. This can be changed using setKeepRunning(). |
436 | 455 | ||
437 | A variety of signals are emitted when certain events occur, for | 456 | A variety of signals are emitted when certain events occur, for |
438 | example, timeChanged(), clockChanged(), weekChanged(), | 457 | example, timeChanged(), clockChanged(), weekChanged(), |
439 | dateFormatChanged() and volumeChanged(). If the application receives | 458 | dateFormatChanged() and volumeChanged(). If the application receives |
440 | a \link qcop.html QCop\endlink message on the application's | 459 | a \link qcop.html QCop\endlink message on the application's |
441 | QPE/Application/\e{appname} channel, the appMessage() signal is | 460 | QPE/Application/\e{appname} channel, the appMessage() signal is |
442 | emitted. There are also flush() and reload() signals, which | 461 | emitted. There are also flush() and reload() signals, which |
443 | are emitted when synching begins and ends respectively - upon these | 462 | are emitted when synching begins and ends respectively - upon these |
444 | signals, the application should save and reload any data | 463 | signals, the application should save and reload any data |
445 | files that are involved in synching. Most of these signals will initially | 464 | files that are involved in synching. Most of these signals will initially |
446 | be received and unfiltered through the appMessage() signal. | 465 | be received and unfiltered through the appMessage() signal. |
447 | 466 | ||
448 | This class also provides a set of useful static functions. The | 467 | This class also provides a set of useful static functions. The |
449 | qpeDir() and documentDir() functions return the respective paths. | 468 | qpeDir() and documentDir() functions return the respective paths. |
450 | The grabKeyboard() and ungrabKeyboard() functions are used to | 469 | The grabKeyboard() and ungrabKeyboard() functions are used to |
451 | control whether the application takes control of the device's | 470 | control whether the application takes control of the device's |
452 | physical buttons (e.g. application launch keys). The stylus' mode of | 471 | physical buttons (e.g. application launch keys). The stylus' mode of |
453 | operation is set with setStylusOperation() and retrieved with | 472 | operation is set with setStylusOperation() and retrieved with |
454 | stylusOperation(). There are also setInputMethodHint() and | 473 | stylusOperation(). There are also setInputMethodHint() and |
455 | inputMethodHint() functions. | 474 | inputMethodHint() functions. |
456 | 475 | ||
457 | \ingroup qtopiaemb | 476 | \ingroup qtopiaemb |
458 | */ | 477 | */ |
459 | 478 | ||
460 | /*! | 479 | /*! |
461 | \fn void QPEApplication::clientMoused() | 480 | \fn void QPEApplication::clientMoused() |
462 | 481 | ||
463 | \internal | 482 | \internal |
464 | */ | 483 | */ |
465 | 484 | ||
466 | /*! | 485 | /*! |
467 | \fn void QPEApplication::timeChanged(); | 486 | \fn void QPEApplication::timeChanged(); |
468 | This signal is emitted when the time changes outside the normal | 487 | This signal is emitted when the time changes outside the normal |
469 | passage of time, i.e. if the time is set backwards or forwards. | 488 | passage of time, i.e. if the time is set backwards or forwards. |
470 | */ | 489 | */ |
471 | 490 | ||
472 | /*! | 491 | /*! |
473 | \fn void QPEApplication::clockChanged( bool ampm ); | 492 | \fn void QPEApplication::clockChanged( bool ampm ); |
474 | 493 | ||
475 | This signal is emitted when the user changes the clock's style. If | 494 | This signal is emitted when the user changes the clock's style. If |
476 | \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, | 495 | \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, |
477 | they want a 24-hour clock. | 496 | they want a 24-hour clock. |
478 | */ | 497 | */ |
479 | 498 | ||
480 | /*! | 499 | /*! |
481 | \fn void QPEApplication::volumeChanged( bool muted ) | 500 | \fn void QPEApplication::volumeChanged( bool muted ) |
482 | 501 | ||
483 | This signal is emitted whenever the mute state is changed. If \a | 502 | This signal is emitted whenever the mute state is changed. If \a |
484 | muted is TRUE, then sound output has been muted. | 503 | muted is TRUE, then sound output has been muted. |
485 | */ | 504 | */ |
486 | 505 | ||
487 | /*! | 506 | /*! |
488 | \fn void QPEApplication::weekChanged( bool startOnMonday ) | 507 | \fn void QPEApplication::weekChanged( bool startOnMonday ) |
489 | 508 | ||
490 | This signal is emitted if the week start day is changed. If \a | 509 | This signal is emitted if the week start day is changed. If \a |
491 | startOnMonday is TRUE then the first day of the week is Monday; if | 510 | startOnMonday is TRUE then the first day of the week is Monday; if |
492 | \a startOnMonday is FALSE then the first day of the week is | 511 | \a startOnMonday is FALSE then the first day of the week is |
493 | Sunday. | 512 | Sunday. |
494 | */ | 513 | */ |
495 | 514 | ||
496 | /*! | 515 | /*! |
497 | \fn void QPEApplication::dateFormatChanged(DateFormat) | 516 | \fn void QPEApplication::dateFormatChanged(DateFormat) |
498 | 517 | ||
499 | This signal is emitted whenever the date format is changed. | 518 | This signal is emitted whenever the date format is changed. |
500 | */ | 519 | */ |
501 | 520 | ||
502 | /*! | 521 | /*! |
503 | \fn void QPEApplication::flush() | 522 | \fn void QPEApplication::flush() |
504 | 523 | ||
505 | ### | 524 | ### |
506 | */ | 525 | */ |
507 | 526 | ||
508 | /*! | 527 | /*! |
509 | \fn void QPEApplication::reload() | 528 | \fn void QPEApplication::reload() |
510 | 529 | ||
511 | */ | 530 | */ |
512 | 531 | ||
513 | 532 | ||
514 | 533 | ||
515 | void QPEApplication::processQCopFile() | 534 | void QPEApplication::processQCopFile() |
516 | { | 535 | { |
517 | QString qcopfn("/tmp/qcop-msg-"); | 536 | QString qcopfn("/tmp/qcop-msg-"); |
518 | qcopfn += d->appName; // append command name | 537 | qcopfn += d->appName; // append command name |
519 | 538 | ||
520 | QFile f(qcopfn); | 539 | QFile f(qcopfn); |
521 | if ( f.open(IO_ReadWrite) ) { | 540 | if ( f.open(IO_ReadWrite) ) { |
522 | #ifndef Q_OS_WIN32 | 541 | #ifndef Q_OS_WIN32 |
523 | flock(f.handle(), LOCK_EX); | 542 | flock(f.handle(), LOCK_EX); |
524 | #endif | 543 | #endif |
525 | QDataStream ds(&f); | 544 | QDataStream ds(&f); |
526 | QCString channel, message; | 545 | QCString channel, message; |
527 | QByteArray data; | 546 | QByteArray data; |
528 | while(!ds.atEnd()) { | 547 | while(!ds.atEnd()) { |
529 | ds >> channel >> message >> data; | 548 | ds >> channel >> message >> data; |
530 | d->enqueueQCop(channel,message,data); | 549 | d->enqueueQCop(channel,message,data); |
531 | } | 550 | } |
532 | ::ftruncate(f.handle(), 0); | 551 | ::ftruncate(f.handle(), 0); |
533 | #ifndef Q_OS_WIN32 | 552 | #ifndef Q_OS_WIN32 |
534 | f.flush(); | 553 | f.flush(); |
535 | flock(f.handle(), LOCK_UN); | 554 | flock(f.handle(), LOCK_UN); |
536 | #endif | 555 | #endif |
537 | } | 556 | } |
538 | #endif | 557 | #endif |
539 | } | 558 | } |
540 | 559 | ||
@@ -1524,261 +1543,267 @@ void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data) | |||
1524 | }else | 1543 | }else |
1525 | { | 1544 | { |
1526 | bool p = d->keep_running; | 1545 | bool p = d->keep_running; |
1527 | d->keep_running = FALSE; | 1546 | d->keep_running = FALSE; |
1528 | emit appMessage( msg, data); | 1547 | emit appMessage( msg, data); |
1529 | if ( d->keep_running ) { | 1548 | if ( d->keep_running ) { |
1530 | d->notbusysent = FALSE; | 1549 | d->notbusysent = FALSE; |
1531 | raiseAppropriateWindow(); | 1550 | raiseAppropriateWindow(); |
1532 | if ( !p ) { | 1551 | if ( !p ) { |
1533 | // Tell the system we're still chugging along... | 1552 | // Tell the system we're still chugging along... |
1534 | #ifndef QT_NO_COP | 1553 | #ifndef QT_NO_COP |
1535 | QCopEnvelope e("QPE/System", "appRaised(QString)"); | 1554 | QCopEnvelope e("QPE/System", "appRaised(QString)"); |
1536 | e << d->appName; | 1555 | e << d->appName; |
1537 | #endif | 1556 | #endif |
1538 | } | 1557 | } |
1539 | } | 1558 | } |
1540 | if ( p ) | 1559 | if ( p ) |
1541 | d->keep_running = p; | 1560 | d->keep_running = p; |
1542 | } | 1561 | } |
1543 | #endif | 1562 | #endif |
1544 | } | 1563 | } |
1545 | 1564 | ||
1546 | 1565 | ||
1547 | /*! | 1566 | /*! |
1548 | Sets widget \a mw as the mainWidget() and shows it. For small windows, | 1567 | Sets widget \a mw as the mainWidget() and shows it. For small windows, |
1549 | consider passing TRUE for \a nomaximize rather than the default FALSE. | 1568 | consider passing TRUE for \a nomaximize rather than the default FALSE. |
1550 | 1569 | ||
1551 | \sa showMainDocumentWidget() | 1570 | \sa showMainDocumentWidget() |
1552 | */ | 1571 | */ |
1553 | void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) | 1572 | void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) |
1554 | { | 1573 | { |
1555 | d->show(mw, nomaximize ); | 1574 | d->show(mw, nomaximize ); |
1556 | } | 1575 | } |
1557 | 1576 | ||
1558 | /*! | 1577 | /*! |
1559 | Sets widget \a mw as the mainWidget() and shows it. For small windows, | 1578 | Sets widget \a mw as the mainWidget() and shows it. For small windows, |
1560 | consider passing TRUE for \a nomaximize rather than the default FALSE. | 1579 | consider passing TRUE for \a nomaximize rather than the default FALSE. |
1561 | 1580 | ||
1562 | This calls designates the application as | 1581 | This calls designates the application as |
1563 | a \link docwidget.html document-oriented\endlink application. | 1582 | a \link docwidget.html document-oriented\endlink application. |
1564 | 1583 | ||
1565 | The \a mw widget \e must have this slot: setDocument(const QString&). | 1584 | The \a mw widget \e must have this slot: setDocument(const QString&). |
1566 | 1585 | ||
1567 | \sa showMainWidget() | 1586 | \sa showMainWidget() |
1568 | */ | 1587 | */ |
1569 | void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) | 1588 | void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) |
1570 | { | 1589 | { |
1571 | if ( mw && argc() == 2 ) | 1590 | if ( mw && argc() == 2 ) |
1572 | Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); | 1591 | Global::setDocument( mw, QString::fromUtf8(argv()[1]) ); |
1573 | 1592 | ||
1574 | 1593 | ||
1575 | d->show(mw, nomaximize ); | 1594 | d->show(mw, nomaximize ); |
1576 | } | 1595 | } |
1577 | 1596 | ||
1578 | 1597 | ||
1579 | /*! | 1598 | /*! |
1580 | If an application is started via a \link qcop.html QCop\endlink | 1599 | If an application is started via a \link qcop.html QCop\endlink |
1581 | message, the application will process the \link qcop.html | 1600 | message, the application will process the \link qcop.html |
1582 | QCop\endlink message and then quit. If the application calls this | 1601 | QCop\endlink message and then quit. If the application calls this |
1583 | function while processing a \link qcop.html QCop\endlink message, | 1602 | function while processing a \link qcop.html QCop\endlink message, |
1584 | after processing its outstanding \link qcop.html QCop\endlink | 1603 | after processing its outstanding \link qcop.html QCop\endlink |
1585 | messages the application will start 'properly' and show itself. | 1604 | messages the application will start 'properly' and show itself. |
1586 | 1605 | ||
1587 | \sa keepRunning() | 1606 | \sa keepRunning() |
1588 | */ | 1607 | */ |
1589 | void QPEApplication::setKeepRunning() | 1608 | void QPEApplication::setKeepRunning() |
1590 | { | 1609 | { |
1591 | if ( qApp && qApp->inherits( "QPEApplication" ) ) { | 1610 | if ( qApp && qApp->inherits( "QPEApplication" ) ) { |
1592 | QPEApplication * qpeApp = ( QPEApplication* ) qApp; | 1611 | QPEApplication * qpeApp = ( QPEApplication* ) qApp; |
1593 | qpeApp->d->keep_running = TRUE; | 1612 | qpeApp->d->keep_running = TRUE; |
1594 | } | 1613 | } |
1595 | } | 1614 | } |
1596 | 1615 | ||
1597 | /*! | 1616 | /*! |
1598 | Returns TRUE if the application will quit after processing the | 1617 | Returns TRUE if the application will quit after processing the |
1599 | current list of qcop messages; otherwise returns FALSE. | 1618 | current list of qcop messages; otherwise returns FALSE. |
1600 | 1619 | ||
1601 | \sa setKeepRunning() | 1620 | \sa setKeepRunning() |
1602 | */ | 1621 | */ |
1603 | bool QPEApplication::keepRunning() const | 1622 | bool QPEApplication::keepRunning() const |
1604 | { | 1623 | { |
1605 | return d->keep_running; | 1624 | return d->keep_running; |
1606 | } | 1625 | } |
1607 | 1626 | ||
1608 | /*! | 1627 | /*! |
1609 | \internal | 1628 | \internal |
1610 | */ | 1629 | */ |
1611 | void QPEApplication::internalSetStyle( const QString &style ) | 1630 | void QPEApplication::internalSetStyle( const QString &style ) |
1612 | { | 1631 | { |
1613 | #if QT_VERSION >= 300 | 1632 | #if QT_VERSION >= 300 |
1614 | if ( style == "QPE" ) { | 1633 | if ( style == "QPE" ) { |
1615 | setStyle( new QPEStyle ); | 1634 | setStyle( new QPEStyle ); |
1616 | } | 1635 | } |
1617 | else { | 1636 | else { |
1618 | QStyle *s = QStyleFactory::create( style ); | 1637 | QStyle *s = QStyleFactory::create( style ); |
1619 | if ( s ) | 1638 | if ( s ) |
1620 | setStyle( s ); | 1639 | setStyle( s ); |
1621 | } | 1640 | } |
1622 | #else | 1641 | #else |
1623 | if ( style == "Windows" ) { | 1642 | if ( style == "Windows" ) { |
1624 | setStyle( new QWindowsStyle ); | 1643 | setStyle( new QWindowsStyle ); |
1625 | } | 1644 | } |
1626 | else if ( style == "QPE" ) { | 1645 | else if ( style == "QPE" ) { |
1627 | setStyle( new QPEStyle ); | 1646 | setStyle( new QPEStyle ); |
1628 | } | 1647 | } |
1629 | else if ( style == "Light" ) { | 1648 | else if ( style == "Light" ) { |
1630 | setStyle( new LightStyle ); | 1649 | setStyle( new LightStyle ); |
1631 | } | 1650 | } |
1632 | #ifndef QT_NO_STYLE_PLATINUM | 1651 | #ifndef QT_NO_STYLE_PLATINUM |
1633 | else if ( style == "Platinum" ) { | 1652 | else if ( style == "Platinum" ) { |
1634 | setStyle( new QPlatinumStyle ); | 1653 | setStyle( new QPlatinumStyle ); |
1635 | } | 1654 | } |
1636 | #endif | 1655 | #endif |
1637 | #ifndef QT_NO_STYLE_MOTIF | 1656 | #ifndef QT_NO_STYLE_MOTIF |
1638 | else if ( style == "Motif" ) { | 1657 | else if ( style == "Motif" ) { |
1639 | setStyle( new QMotifStyle ); | 1658 | setStyle( new QMotifStyle ); |
1640 | } | 1659 | } |
1641 | #endif | 1660 | #endif |
1642 | #ifndef QT_NO_STYLE_MOTIFPLUS | 1661 | #ifndef QT_NO_STYLE_MOTIFPLUS |
1643 | else if ( style == "MotifPlus" ) { | 1662 | else if ( style == "MotifPlus" ) { |
1644 | setStyle( new QMotifPlusStyle ); | 1663 | setStyle( new QMotifPlusStyle ); |
1645 | } | 1664 | } |
1646 | #endif | 1665 | #endif |
1647 | 1666 | ||
1648 | else { | 1667 | else { |
1649 | QStyle *sty = 0; | 1668 | QStyle *sty = 0; |
1650 | QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; | 1669 | QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; |
1651 | 1670 | ||
1671 | #ifdef Q_OS_MACX | ||
1672 | if ( style. find ( ".dylib" ) > 0 ) | ||
1673 | path += style; | ||
1674 | else | ||
1675 | path = path + "lib" + style. lower ( ) + ".dylib"; // compatibility | ||
1676 | #else | ||
1652 | if ( style. find ( ".so" ) > 0 ) | 1677 | if ( style. find ( ".so" ) > 0 ) |
1653 | path += style; | 1678 | path += style; |
1654 | else | 1679 | else |
1655 | path = path + "lib" + style. lower ( ) + ".so"; // compatibility | 1680 | path = path + "lib" + style. lower ( ) + ".so"; // compatibility |
1656 | 1681 | #endif | |
1657 | static QLibrary *lastlib = 0; | 1682 | static QLibrary *lastlib = 0; |
1658 | static StyleInterface *lastiface = 0; | 1683 | static StyleInterface *lastiface = 0; |
1659 | 1684 | ||
1660 | QLibrary *lib = new QLibrary ( path ); | 1685 | QLibrary *lib = new QLibrary ( path ); |
1661 | StyleInterface *iface = 0; | 1686 | StyleInterface *iface = 0; |
1662 | 1687 | ||
1663 | if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) | 1688 | if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) |
1664 | sty = iface-> style ( ); | 1689 | sty = iface-> style ( ); |
1665 | 1690 | ||
1666 | if ( sty ) { | 1691 | if ( sty ) { |
1667 | setStyle ( sty ); | 1692 | setStyle ( sty ); |
1668 | 1693 | ||
1669 | if ( lastiface ) | 1694 | if ( lastiface ) |
1670 | lastiface-> release ( ); | 1695 | lastiface-> release ( ); |
1671 | lastiface = iface; | 1696 | lastiface = iface; |
1672 | 1697 | ||
1673 | if ( lastlib ) { | 1698 | if ( lastlib ) { |
1674 | lastlib-> unload ( ); | 1699 | lastlib-> unload ( ); |
1675 | delete lastlib; | 1700 | delete lastlib; |
1676 | } | 1701 | } |
1677 | lastlib = lib; | 1702 | lastlib = lib; |
1678 | } | 1703 | } |
1679 | else { | 1704 | else { |
1680 | if ( iface ) | 1705 | if ( iface ) |
1681 | iface-> release ( ); | 1706 | iface-> release ( ); |
1682 | delete lib; | 1707 | delete lib; |
1683 | 1708 | ||
1684 | setStyle ( new LightStyle ( )); | 1709 | setStyle ( new LightStyle ( )); |
1685 | } | 1710 | } |
1686 | } | 1711 | } |
1687 | #endif | 1712 | #endif |
1688 | } | 1713 | } |
1689 | 1714 | ||
1690 | /*! | 1715 | /*! |
1691 | \internal | 1716 | \internal |
1692 | */ | 1717 | */ |
1693 | void QPEApplication::prepareForTermination( bool willrestart ) | 1718 | void QPEApplication::prepareForTermination( bool willrestart ) |
1694 | { | 1719 | { |
1695 | if ( willrestart ) { | 1720 | if ( willrestart ) { |
1696 | // Draw a big wait icon, the image can be altered in later revisions | 1721 | // Draw a big wait icon, the image can be altered in later revisions |
1697 | // QWidget *d = QApplication::desktop(); | 1722 | // QWidget *d = QApplication::desktop(); |
1698 | QImage img = Resource::loadImage( "launcher/new_wait" ); | 1723 | QImage img = Resource::loadImage( "launcher/new_wait" ); |
1699 | QPixmap pix; | 1724 | QPixmap pix; |
1700 | pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); | 1725 | pix.convertFromImage( img.smoothScale( 1 * img.width(), 1 * img.height() ) ); |
1701 | QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | | 1726 | QLabel *lblWait = new QLabel( 0, "wait hack!", QWidget::WStyle_Customize | |
1702 | QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); | 1727 | QWidget::WStyle_NoBorder | QWidget::WStyle_Tool ); |
1703 | lblWait->setPixmap( pix ); | 1728 | lblWait->setPixmap( pix ); |
1704 | lblWait->setAlignment( QWidget::AlignCenter ); | 1729 | lblWait->setAlignment( QWidget::AlignCenter ); |
1705 | lblWait->show(); | 1730 | lblWait->show(); |
1706 | lblWait->showMaximized(); | 1731 | lblWait->showMaximized(); |
1707 | } | 1732 | } |
1708 | #ifndef SINGLE_APP | 1733 | #ifndef SINGLE_APP |
1709 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); | 1734 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); |
1710 | } | 1735 | } |
1711 | processEvents(); // ensure the message goes out. | 1736 | processEvents(); // ensure the message goes out. |
1712 | sleep( 1 ); // You have 1 second to comply. | 1737 | sleep( 1 ); // You have 1 second to comply. |
1713 | #endif | 1738 | #endif |
1714 | } | 1739 | } |
1715 | 1740 | ||
1716 | /*! | 1741 | /*! |
1717 | \internal | 1742 | \internal |
1718 | */ | 1743 | */ |
1719 | void QPEApplication::shutdown() | 1744 | void QPEApplication::shutdown() |
1720 | { | 1745 | { |
1721 | // Implement in server's QPEApplication subclass | 1746 | // Implement in server's QPEApplication subclass |
1722 | } | 1747 | } |
1723 | 1748 | ||
1724 | /*! | 1749 | /*! |
1725 | \internal | 1750 | \internal |
1726 | */ | 1751 | */ |
1727 | void QPEApplication::restart() | 1752 | void QPEApplication::restart() |
1728 | { | 1753 | { |
1729 | // Implement in server's QPEApplication subclass | 1754 | // Implement in server's QPEApplication subclass |
1730 | } | 1755 | } |
1731 | 1756 | ||
1732 | static QPtrDict<void>* stylusDict = 0; | 1757 | static QPtrDict<void>* stylusDict = 0; |
1733 | static void createDict() | 1758 | static void createDict() |
1734 | { | 1759 | { |
1735 | if ( !stylusDict ) | 1760 | if ( !stylusDict ) |
1736 | stylusDict = new QPtrDict<void>; | 1761 | stylusDict = new QPtrDict<void>; |
1737 | } | 1762 | } |
1738 | 1763 | ||
1739 | /*! | 1764 | /*! |
1740 | Returns the current StylusMode for widget \a w. | 1765 | Returns the current StylusMode for widget \a w. |
1741 | 1766 | ||
1742 | \sa setStylusOperation() StylusMode | 1767 | \sa setStylusOperation() StylusMode |
1743 | */ | 1768 | */ |
1744 | QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w ) | 1769 | QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget* w ) |
1745 | { | 1770 | { |
1746 | if ( stylusDict ) | 1771 | if ( stylusDict ) |
1747 | return ( StylusMode ) ( int ) stylusDict->find( w ); | 1772 | return ( StylusMode ) ( int ) stylusDict->find( w ); |
1748 | return LeftOnly; | 1773 | return LeftOnly; |
1749 | } | 1774 | } |
1750 | 1775 | ||
1751 | /*! | 1776 | /*! |
1752 | \enum QPEApplication::StylusMode | 1777 | \enum QPEApplication::StylusMode |
1753 | 1778 | ||
1754 | \value LeftOnly the stylus only generates LeftButton | 1779 | \value LeftOnly the stylus only generates LeftButton |
1755 | events (the default). | 1780 | events (the default). |
1756 | \value RightOnHold the stylus generates RightButton events | 1781 | \value RightOnHold the stylus generates RightButton events |
1757 | if the user uses the press-and-hold gesture. | 1782 | if the user uses the press-and-hold gesture. |
1758 | 1783 | ||
1759 | \sa setStylusOperation() stylusOperation() | 1784 | \sa setStylusOperation() stylusOperation() |
1760 | */ | 1785 | */ |
1761 | 1786 | ||
1762 | /*! | 1787 | /*! |
1763 | Causes widget \a w to receive mouse events according to the stylus | 1788 | Causes widget \a w to receive mouse events according to the stylus |
1764 | \a mode. | 1789 | \a mode. |
1765 | 1790 | ||
1766 | \sa stylusOperation() StylusMode | 1791 | \sa stylusOperation() StylusMode |
1767 | */ | 1792 | */ |
1768 | void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode ) | 1793 | void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode ) |
1769 | { | 1794 | { |
1770 | createDict(); | 1795 | createDict(); |
1771 | if ( mode == LeftOnly ) { | 1796 | if ( mode == LeftOnly ) { |
1772 | stylusDict->remove | 1797 | stylusDict->remove |
1773 | ( w ); | 1798 | ( w ); |
1774 | w->removeEventFilter( qApp ); | 1799 | w->removeEventFilter( qApp ); |
1775 | } | 1800 | } |
1776 | else { | 1801 | else { |
1777 | stylusDict->insert( w, ( void* ) mode ); | 1802 | stylusDict->insert( w, ( void* ) mode ); |
1778 | connect( w, SIGNAL( destroyed() ), qApp, SLOT( removeSenderFromStylusDict() ) ); | 1803 | connect( w, SIGNAL( destroyed() ), qApp, SLOT( removeSenderFromStylusDict() ) ); |
1779 | w->installEventFilter( qApp ); | 1804 | w->installEventFilter( qApp ); |
1780 | } | 1805 | } |
1781 | } | 1806 | } |
1782 | 1807 | ||
1783 | 1808 | ||
1784 | /*! | 1809 | /*! |
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 933542d..bac1a75 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -387,261 +387,269 @@ void WindowDecorationInterface::drawArea( Area a, QPainter *p, const WindowData | |||
387 | break; | 387 | break; |
388 | case Title: | 388 | case Title: |
389 | { | 389 | { |
390 | const QColorGroup &cg = wd->palette.active(); | 390 | const QColorGroup &cg = wd->palette.active(); |
391 | QBrush titleBrush; | 391 | QBrush titleBrush; |
392 | QPen titleLines; | 392 | QPen titleLines; |
393 | 393 | ||
394 | if ( wd->flags & WindowData::Active ) { | 394 | if ( wd->flags & WindowData::Active ) { |
395 | titleBrush = cg.brush(QColorGroup::Highlight); | 395 | titleBrush = cg.brush(QColorGroup::Highlight); |
396 | titleLines = titleBrush.color().dark(); | 396 | titleLines = titleBrush.color().dark(); |
397 | } else { | 397 | } else { |
398 | titleBrush = cg.brush(QColorGroup::Background); | 398 | titleBrush = cg.brush(QColorGroup::Background); |
399 | titleLines = titleBrush.color(); | 399 | titleLines = titleBrush.color(); |
400 | } | 400 | } |
401 | 401 | ||
402 | p->fillRect( r.x(), r.y()-th, r.width(), th, titleBrush); | 402 | p->fillRect( r.x(), r.y()-th, r.width(), th, titleBrush); |
403 | 403 | ||
404 | p->setPen( titleLines ); | 404 | p->setPen( titleLines ); |
405 | for ( int i = r.y()-th; i < r.y(); i += 2 ) | 405 | for ( int i = r.y()-th; i < r.y(); i += 2 ) |
406 | p->drawLine( r.left(), i, r.right(), i ); | 406 | p->drawLine( r.left(), i, r.right(), i ); |
407 | } | 407 | } |
408 | break; | 408 | break; |
409 | case TitleText: | 409 | case TitleText: |
410 | p->drawText( r.x()+3+metric(HelpWidth,wd), r.top()-th, | 410 | p->drawText( r.x()+3+metric(HelpWidth,wd), r.top()-th, |
411 | r.width()-metric(OKWidth,wd)-metric(CloseWidth,wd), | 411 | r.width()-metric(OKWidth,wd)-metric(CloseWidth,wd), |
412 | th, QPainter::AlignVCenter, wd->caption); | 412 | th, QPainter::AlignVCenter, wd->caption); |
413 | break; | 413 | break; |
414 | } | 414 | } |
415 | } | 415 | } |
416 | 416 | ||
417 | void WindowDecorationInterface::drawButton( Button b, QPainter *p, const WindowData *wd, int x, int y, int, int, QWSButton::State state ) const | 417 | void WindowDecorationInterface::drawButton( Button b, QPainter *p, const WindowData *wd, int x, int y, int, int, QWSButton::State state ) const |
418 | { | 418 | { |
419 | QImage *img = 0; | 419 | QImage *img = 0; |
420 | switch ( b ) { | 420 | switch ( b ) { |
421 | case OK: | 421 | case OK: |
422 | img = okImage(metric(TitleHeight,wd)); | 422 | img = okImage(metric(TitleHeight,wd)); |
423 | break; | 423 | break; |
424 | case Close: | 424 | case Close: |
425 | img = closeImage(metric(TitleHeight,wd)); | 425 | img = closeImage(metric(TitleHeight,wd)); |
426 | break; | 426 | break; |
427 | case Help: | 427 | case Help: |
428 | img = helpImage(metric(TitleHeight,wd)); | 428 | img = helpImage(metric(TitleHeight,wd)); |
429 | break; | 429 | break; |
430 | case Maximize: | 430 | case Maximize: |
431 | img = maximizeImage(metric(TitleHeight,wd)); | 431 | img = maximizeImage(metric(TitleHeight,wd)); |
432 | break; | 432 | break; |
433 | } | 433 | } |
434 | 434 | ||
435 | if ( img ) { | 435 | if ( img ) { |
436 | if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked)) | 436 | if ((state & QWSButton::MouseOver) && (state & QWSButton::Clicked)) |
437 | p->drawImage(x+2, y+2, *img); | 437 | p->drawImage(x+2, y+2, *img); |
438 | else | 438 | else |
439 | p->drawImage(x+1, y+1, *img); | 439 | p->drawImage(x+1, y+1, *img); |
440 | } | 440 | } |
441 | } | 441 | } |
442 | 442 | ||
443 | QRegion WindowDecorationInterface::mask( const WindowData *wd ) const | 443 | QRegion WindowDecorationInterface::mask( const WindowData *wd ) const |
444 | { | 444 | { |
445 | int th = metric(TitleHeight,wd); | 445 | int th = metric(TitleHeight,wd); |
446 | QRect rect( wd->rect ); | 446 | QRect rect( wd->rect ); |
447 | QRect r(rect.left() - metric(LeftBorder,wd), | 447 | QRect r(rect.left() - metric(LeftBorder,wd), |
448 | rect.top() - th - metric(TopBorder,wd), | 448 | rect.top() - th - metric(TopBorder,wd), |
449 | rect.width() + metric(LeftBorder,wd) + metric(RightBorder,wd), | 449 | rect.width() + metric(LeftBorder,wd) + metric(RightBorder,wd), |
450 | rect.height() + th + metric(TopBorder,wd) + metric(BottomBorder,wd)); | 450 | rect.height() + th + metric(TopBorder,wd) + metric(BottomBorder,wd)); |
451 | return QRegion(r) - rect; | 451 | return QRegion(r) - rect; |
452 | } | 452 | } |
453 | 453 | ||
454 | class DefaultWindowDecoration : public WindowDecorationInterface | 454 | class DefaultWindowDecoration : public WindowDecorationInterface |
455 | { | 455 | { |
456 | public: | 456 | public: |
457 | DefaultWindowDecoration() : ref(0) {} | 457 | DefaultWindowDecoration() : ref(0) {} |
458 | QString name() const { | 458 | QString name() const { |
459 | return "Default"; | 459 | return "Default"; |
460 | } | 460 | } |
461 | QPixmap icon() const { | 461 | QPixmap icon() const { |
462 | return QPixmap(); | 462 | return QPixmap(); |
463 | } | 463 | } |
464 | QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { | 464 | QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { |
465 | *iface = 0; | 465 | *iface = 0; |
466 | if ( uuid == IID_QUnknown ) | 466 | if ( uuid == IID_QUnknown ) |
467 | *iface = this; | 467 | *iface = this; |
468 | else if ( uuid == IID_WindowDecoration ) | 468 | else if ( uuid == IID_WindowDecoration ) |
469 | *iface = this; | 469 | *iface = this; |
470 | 470 | ||
471 | if ( *iface ) | 471 | if ( *iface ) |
472 | (*iface)->addRef(); | 472 | (*iface)->addRef(); |
473 | return QS_OK; | 473 | return QS_OK; |
474 | } | 474 | } |
475 | Q_REFCOUNT | 475 | Q_REFCOUNT |
476 | 476 | ||
477 | private: | 477 | private: |
478 | ulong ref; | 478 | ulong ref; |
479 | }; | 479 | }; |
480 | 480 | ||
481 | static WindowDecorationInterface *wdiface = 0; | 481 | static WindowDecorationInterface *wdiface = 0; |
482 | static QLibrary *wdlib = 0; | 482 | static QLibrary *wdlib = 0; |
483 | static QString libname; | 483 | static QString libname; |
484 | 484 | ||
485 | //=========================================================================== | 485 | //=========================================================================== |
486 | 486 | ||
487 | QPEDecoration::QPEDecoration() | 487 | QPEDecoration::QPEDecoration() |
488 | : QWSDefaultDecoration() | 488 | : QWSDefaultDecoration() |
489 | { | 489 | { |
490 | init ( libname ); | 490 | init ( libname ); |
491 | } | 491 | } |
492 | 492 | ||
493 | QPEDecoration::QPEDecoration( const QString &plugin ) | 493 | QPEDecoration::QPEDecoration( const QString &plugin ) |
494 | : QWSDefaultDecoration() | 494 | : QWSDefaultDecoration() |
495 | { | 495 | { |
496 | init ( plugin ); | 496 | init ( plugin ); |
497 | } | 497 | } |
498 | 498 | ||
499 | void QPEDecoration::init ( const QString &plugin ) | 499 | void QPEDecoration::init ( const QString &plugin ) |
500 | { | 500 | { |
501 | libname = plugin; | 501 | libname = plugin; |
502 | 502 | ||
503 | if ( wdlib ) { | 503 | if ( wdlib ) { |
504 | wdiface->release(); | 504 | wdiface->release(); |
505 | wdlib->unload(); | 505 | wdlib->unload(); |
506 | delete wdlib; | 506 | delete wdlib; |
507 | wdlib = 0; | 507 | wdlib = 0; |
508 | } else { | 508 | } else { |
509 | delete wdiface; | 509 | delete wdiface; |
510 | } | 510 | } |
511 | 511 | ||
512 | WindowDecorationInterface *iface = 0; | 512 | WindowDecorationInterface *iface = 0; |
513 | QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; | 513 | QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; |
514 | 514 | ||
515 | #ifdef Q_OS_MACX | ||
516 | if ( plugin.find( ".dylib" ) > 0 ) { | ||
517 | #else | ||
515 | if ( plugin.find( ".so" ) > 0 ) { | 518 | if ( plugin.find( ".so" ) > 0 ) { |
519 | #endif | ||
516 | // full library name supplied | 520 | // full library name supplied |
517 | path += plugin; | 521 | path += plugin; |
518 | } else { | 522 | } else { |
523 | #ifdef Q_OS_MACX | ||
524 | path += "lib" + plugin.lower() + ".dylib"; // compatibility | ||
525 | #else | ||
519 | path += "lib" + plugin.lower() + ".so"; // compatibility | 526 | path += "lib" + plugin.lower() + ".so"; // compatibility |
527 | #endif | ||
520 | } | 528 | } |
521 | 529 | ||
522 | QLibrary *lib = new QLibrary( path ); | 530 | QLibrary *lib = new QLibrary( path ); |
523 | if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { | 531 | if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { |
524 | wdiface = iface; | 532 | wdiface = iface; |
525 | wdlib = lib; | 533 | wdlib = lib; |
526 | } else { | 534 | } else { |
527 | delete lib; | 535 | delete lib; |
528 | wdiface = new DefaultWindowDecoration; | 536 | wdiface = new DefaultWindowDecoration; |
529 | } | 537 | } |
530 | 538 | ||
531 | helpFile = QString(qApp->argv()[0]) + ".html"; | 539 | helpFile = QString(qApp->argv()[0]) + ".html"; |
532 | QStringList helpPath = Global::helpPath(); | 540 | QStringList helpPath = Global::helpPath(); |
533 | helpExists = FALSE; | 541 | helpExists = FALSE; |
534 | for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) { | 542 | for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) { |
535 | helpExists = QFile::exists( *it + "/" + helpFile ); | 543 | helpExists = QFile::exists( *it + "/" + helpFile ); |
536 | //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); | 544 | //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); |
537 | } | 545 | } |
538 | qpeManager = new QPEManager( this ); | 546 | qpeManager = new QPEManager( this ); |
539 | 547 | ||
540 | // Qtopia 1.5 compatibility | 548 | // Qtopia 1.5 compatibility |
541 | imageOk = *okImage ( 15 ); | 549 | imageOk = *okImage ( 15 ); |
542 | imageClose = *closeImage ( 15 ); | 550 | imageClose = *closeImage ( 15 ); |
543 | imageHelp = *helpImage ( 15 ); | 551 | imageHelp = *helpImage ( 15 ); |
544 | } | 552 | } |
545 | 553 | ||
546 | QPEDecoration::~QPEDecoration() | 554 | QPEDecoration::~QPEDecoration() |
547 | { | 555 | { |
548 | delete qpeManager; | 556 | delete qpeManager; |
549 | } | 557 | } |
550 | 558 | ||
551 | const char **QPEDecoration::menuPixmap() | 559 | const char **QPEDecoration::menuPixmap() |
552 | { | 560 | { |
553 | return (const char **)0; | 561 | return (const char **)0; |
554 | } | 562 | } |
555 | 563 | ||
556 | const char **QPEDecoration::closePixmap() | 564 | const char **QPEDecoration::closePixmap() |
557 | { | 565 | { |
558 | return (const char **)qpe_close_xpm; | 566 | return (const char **)qpe_close_xpm; |
559 | } | 567 | } |
560 | 568 | ||
561 | const char **QPEDecoration::minimizePixmap() | 569 | const char **QPEDecoration::minimizePixmap() |
562 | { | 570 | { |
563 | return (const char **)qpe_accept_xpm; | 571 | return (const char **)qpe_accept_xpm; |
564 | } | 572 | } |
565 | 573 | ||
566 | const char **QPEDecoration::maximizePixmap() | 574 | const char **QPEDecoration::maximizePixmap() |
567 | { | 575 | { |
568 | return (const char **)0; | 576 | return (const char **)0; |
569 | } | 577 | } |
570 | 578 | ||
571 | const char **QPEDecoration::normalizePixmap() | 579 | const char **QPEDecoration::normalizePixmap() |
572 | { | 580 | { |
573 | return (const char **)0; | 581 | return (const char **)0; |
574 | } | 582 | } |
575 | 583 | ||
576 | int QPEDecoration::getTitleHeight( const QWidget *w ) | 584 | int QPEDecoration::getTitleHeight( const QWidget *w ) |
577 | { | 585 | { |
578 | WindowDecorationInterface::WindowData wd; | 586 | WindowDecorationInterface::WindowData wd; |
579 | windowData( w, wd ); | 587 | windowData( w, wd ); |
580 | return wdiface->metric(WindowDecorationInterface::TitleHeight,&wd); | 588 | return wdiface->metric(WindowDecorationInterface::TitleHeight,&wd); |
581 | } | 589 | } |
582 | 590 | ||
583 | /* | 591 | /* |
584 | If rect is empty, no frame is added. (a hack, really) | 592 | If rect is empty, no frame is added. (a hack, really) |
585 | */ | 593 | */ |
586 | QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type) | 594 | QRegion QPEDecoration::region(const QWidget *widget, const QRect &rect, QWSDecoration::Region type) |
587 | { | 595 | { |
588 | qpeManager->updateActive(); | 596 | qpeManager->updateActive(); |
589 | 597 | ||
590 | WindowDecorationInterface::WindowData wd; | 598 | WindowDecorationInterface::WindowData wd; |
591 | windowData( widget, wd ); | 599 | windowData( widget, wd ); |
592 | wd.rect = rect; | 600 | wd.rect = rect; |
593 | 601 | ||
594 | int titleHeight = wdiface->metric(WindowDecorationInterface::TitleHeight,&wd); | 602 | int titleHeight = wdiface->metric(WindowDecorationInterface::TitleHeight,&wd); |
595 | int okWidth = wdiface->metric(WindowDecorationInterface::OKWidth,&wd); | 603 | int okWidth = wdiface->metric(WindowDecorationInterface::OKWidth,&wd); |
596 | int closeWidth = wdiface->metric(WindowDecorationInterface::CloseWidth,&wd); | 604 | int closeWidth = wdiface->metric(WindowDecorationInterface::CloseWidth,&wd); |
597 | int helpWidth = wdiface->metric(WindowDecorationInterface::HelpWidth,&wd); | 605 | int helpWidth = wdiface->metric(WindowDecorationInterface::HelpWidth,&wd); |
598 | int grab = wdiface->metric(WindowDecorationInterface::CornerGrabSize,&wd); | 606 | int grab = wdiface->metric(WindowDecorationInterface::CornerGrabSize,&wd); |
599 | 607 | ||
600 | QRegion region; | 608 | QRegion region; |
601 | 609 | ||
602 | switch ((int)type) { | 610 | switch ((int)type) { |
603 | case Menu: | 611 | case Menu: |
604 | break; | 612 | break; |
605 | case Maximize: | 613 | case Maximize: |
606 | if ( !widget->inherits( "QDialog" ) && qApp->desktop()->width() > 350 ) { | 614 | if ( !widget->inherits( "QDialog" ) && qApp->desktop()->width() > 350 ) { |
607 | int maximizeWidth = wdiface->metric(WindowDecorationInterface::MaximizeWidth,&wd); | 615 | int maximizeWidth = wdiface->metric(WindowDecorationInterface::MaximizeWidth,&wd); |
608 | int left = rect.right() - maximizeWidth - closeWidth; | 616 | int left = rect.right() - maximizeWidth - closeWidth; |
609 | if ( ((HackWidget *)widget)->needsOk() ) | 617 | if ( ((HackWidget *)widget)->needsOk() ) |
610 | left -= okWidth; | 618 | left -= okWidth; |
611 | QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight); | 619 | QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight); |
612 | region = r; | 620 | region = r; |
613 | } | 621 | } |
614 | break; | 622 | break; |
615 | case Minimize: | 623 | case Minimize: |
616 | if ( ((HackWidget *)widget)->needsOk() ) { | 624 | if ( ((HackWidget *)widget)->needsOk() ) { |
617 | QRect r(rect.right() - okWidth, | 625 | QRect r(rect.right() - okWidth, |
618 | rect.top() - titleHeight, okWidth, titleHeight); | 626 | rect.top() - titleHeight, okWidth, titleHeight); |
619 | if (r.left() > rect.left() + titleHeight) | 627 | if (r.left() > rect.left() + titleHeight) |
620 | region = r; | 628 | region = r; |
621 | } | 629 | } |
622 | break; | 630 | break; |
623 | case Close: | 631 | case Close: |
624 | { | 632 | { |
625 | int left = rect.right() - closeWidth; | 633 | int left = rect.right() - closeWidth; |
626 | if ( ((HackWidget *)widget)->needsOk() ) | 634 | if ( ((HackWidget *)widget)->needsOk() ) |
627 | left -= okWidth; | 635 | left -= okWidth; |
628 | QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight); | 636 | QRect r(left, rect.top() - titleHeight, closeWidth, titleHeight); |
629 | region = r; | 637 | region = r; |
630 | } | 638 | } |
631 | break; | 639 | break; |
632 | case Title: | 640 | case Title: |
633 | if ( !widget->isMaximized() ) { | 641 | if ( !widget->isMaximized() ) { |
634 | int width = rect.width() - helpWidth - closeWidth; | 642 | int width = rect.width() - helpWidth - closeWidth; |
635 | if ( ((HackWidget *)widget)->needsOk() ) | 643 | if ( ((HackWidget *)widget)->needsOk() ) |
636 | width -= okWidth; | 644 | width -= okWidth; |
637 | QRect r(rect.left()+helpWidth, rect.top() - titleHeight, | 645 | QRect r(rect.left()+helpWidth, rect.top() - titleHeight, |
638 | width, titleHeight); | 646 | width, titleHeight); |
639 | if (r.width() > 0) | 647 | if (r.width() > 0) |
640 | region = r; | 648 | region = r; |
641 | } | 649 | } |
642 | break; | 650 | break; |
643 | case Help: | 651 | case Help: |
644 | if ( helpExists || widget->testWFlags(Qt::WStyle_ContextHelp) ) { | 652 | if ( helpExists || widget->testWFlags(Qt::WStyle_ContextHelp) ) { |
645 | QRect r(rect.left(), rect.top() - titleHeight, | 653 | QRect r(rect.left(), rect.top() - titleHeight, |
646 | helpWidth, titleHeight); | 654 | helpWidth, titleHeight); |
647 | region = r; | 655 | region = r; |
diff --git a/library/sound.cpp b/library/sound.cpp index c8704f9..5b67995 100644 --- a/library/sound.cpp +++ b/library/sound.cpp | |||
@@ -1,159 +1,162 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/sound.h> | 22 | #include <qpe/sound.h> |
23 | #include <qpe/qcopenvelope_qws.h> | 23 | #include <qpe/qcopenvelope_qws.h> |
24 | 24 | ||
25 | #include <qsound.h> | 25 | #include <qsound.h> |
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | 27 | ||
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <fcntl.h> | 29 | #include <fcntl.h> |
30 | #include <sys/ioctl.h> | 30 | #include <sys/ioctl.h> |
31 | |||
32 | #ifndef QT_NO_SOUND | ||
31 | #include <sys/soundcard.h> | 33 | #include <sys/soundcard.h> |
34 | #endif | ||
32 | 35 | ||
33 | #include "config.h" | 36 | #include "config.h" |
34 | #include <qmessagebox.h> | 37 | #include <qmessagebox.h> |
35 | #ifndef QT_NO_SOUND | 38 | #ifndef QT_NO_SOUND |
36 | static int WAVsoundDuration(const QString& filename) | 39 | static int WAVsoundDuration(const QString& filename) |
37 | { | 40 | { |
38 | // bad solution | 41 | // bad solution |
39 | 42 | ||
40 | // most of this is copied from qsoundqss.cpp | 43 | // most of this is copied from qsoundqss.cpp |
41 | 44 | ||
42 | QFile input(filename); | 45 | QFile input(filename); |
43 | if ( !input.open(IO_ReadOnly) ) | 46 | if ( !input.open(IO_ReadOnly) ) |
44 | return 0; | 47 | return 0; |
45 | 48 | ||
46 | struct QRiffChunk { | 49 | struct QRiffChunk { |
47 | char id[4]; | 50 | char id[4]; |
48 | Q_UINT32 size; | 51 | Q_UINT32 size; |
49 | char data[4/*size*/]; | 52 | char data[4/*size*/]; |
50 | } chunk; | 53 | } chunk; |
51 | 54 | ||
52 | struct { | 55 | struct { |
53 | Q_INT16 formatTag; | 56 | Q_INT16 formatTag; |
54 | Q_INT16 channels; | 57 | Q_INT16 channels; |
55 | Q_INT32 samplesPerSec; | 58 | Q_INT32 samplesPerSec; |
56 | Q_INT32 avgBytesPerSec; | 59 | Q_INT32 avgBytesPerSec; |
57 | Q_INT16 blockAlign; | 60 | Q_INT16 blockAlign; |
58 | Q_INT16 wBitsPerSample; | 61 | Q_INT16 wBitsPerSample; |
59 | } chunkdata; | 62 | } chunkdata; |
60 | 63 | ||
61 | int total = 0; | 64 | int total = 0; |
62 | 65 | ||
63 | while(1) { | 66 | while(1) { |
64 | // Keep reading chunks... | 67 | // Keep reading chunks... |
65 | const int n = sizeof(chunk)-sizeof(chunk.data); | 68 | const int n = sizeof(chunk)-sizeof(chunk.data); |
66 | if ( input.readBlock((char*)&chunk,n) != n ) | 69 | if ( input.readBlock((char*)&chunk,n) != n ) |
67 | break; | 70 | break; |
68 | if ( qstrncmp(chunk.id,"data",4) == 0 ) { | 71 | if ( qstrncmp(chunk.id,"data",4) == 0 ) { |
69 | total += chunkdata.avgBytesPerSec ? | 72 | total += chunkdata.avgBytesPerSec ? |
70 | chunk.size * 1000 / chunkdata.avgBytesPerSec : 0; | 73 | chunk.size * 1000 / chunkdata.avgBytesPerSec : 0; |
71 | //qDebug("%d bytes of PCM (%dms)", chunk.size,chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0); | 74 | //qDebug("%d bytes of PCM (%dms)", chunk.size,chunkdata.avgBytesPerSec ? chunk.size * 1000 / chunkdata.avgBytesPerSec : 0); |
72 | input.at(input.at()+chunk.size-4); | 75 | input.at(input.at()+chunk.size-4); |
73 | } else if ( qstrncmp(chunk.id,"RIFF",4) == 0 ) { | 76 | } else if ( qstrncmp(chunk.id,"RIFF",4) == 0 ) { |
74 | char d[4]; | 77 | char d[4]; |
75 | if ( input.readBlock(d,4) != 4 ) | 78 | if ( input.readBlock(d,4) != 4 ) |
76 | return 0; | 79 | return 0; |
77 | if ( qstrncmp(d,"WAVE",4) != 0 ) { | 80 | if ( qstrncmp(d,"WAVE",4) != 0 ) { |
78 | // skip | 81 | // skip |
79 | //qDebug("skip %.4s RIFF chunk",d); | 82 | //qDebug("skip %.4s RIFF chunk",d); |
80 | if ( chunk.size < 10000000 ) | 83 | if ( chunk.size < 10000000 ) |
81 | (void)input.at(input.at()+chunk.size-4); | 84 | (void)input.at(input.at()+chunk.size-4); |
82 | } | 85 | } |
83 | } else if ( qstrncmp(chunk.id,"fmt ",4) == 0 ) { | 86 | } else if ( qstrncmp(chunk.id,"fmt ",4) == 0 ) { |
84 | if ( input.readBlock((char*)&chunkdata,sizeof(chunkdata)) != sizeof(chunkdata) ) | 87 | if ( input.readBlock((char*)&chunkdata,sizeof(chunkdata)) != sizeof(chunkdata) ) |
85 | return 0; | 88 | return 0; |
86 | #define WAVE_FORMAT_PCM 1 | 89 | #define WAVE_FORMAT_PCM 1 |
87 | if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) { | 90 | if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) { |
88 | //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag); | 91 | //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag); |
89 | return 0; | 92 | return 0; |
90 | } | 93 | } |
91 | } else { | 94 | } else { |
92 | //qDebug("skip %.4s chunk",chunk.id); | 95 | //qDebug("skip %.4s chunk",chunk.id); |
93 | // ignored chunk | 96 | // ignored chunk |
94 | if ( chunk.size < 10000000 ) | 97 | if ( chunk.size < 10000000 ) |
95 | (void)input.at(input.at()+chunk.size); | 98 | (void)input.at(input.at()+chunk.size); |
96 | } | 99 | } |
97 | } | 100 | } |
98 | 101 | ||
99 | //qDebug("%dms",total); | 102 | //qDebug("%dms",total); |
100 | return total; | 103 | return total; |
101 | } | 104 | } |
102 | 105 | ||
103 | class SoundData : public QSound { | 106 | class SoundData : public QSound { |
104 | public: | 107 | public: |
105 | SoundData ( const QString& name ) : | 108 | SoundData ( const QString& name ) : |
106 | QSound ( Resource::findSound ( name )), | 109 | QSound ( Resource::findSound ( name )), |
107 | filename ( Resource::findSound ( name )) | 110 | filename ( Resource::findSound ( name )) |
108 | { | 111 | { |
109 | loopsleft=0; | 112 | loopsleft=0; |
110 | ms = WAVsoundDuration(filename); | 113 | ms = WAVsoundDuration(filename); |
111 | } | 114 | } |
112 | 115 | ||
113 | void playLoop ( int loopcnt = -1 ) | 116 | void playLoop ( int loopcnt = -1 ) |
114 | { | 117 | { |
115 | // needs server support | 118 | // needs server support |
116 | loopsleft = loopcnt; | 119 | loopsleft = loopcnt; |
117 | 120 | ||
118 | if ( ms ) | 121 | if ( ms ) |
119 | startTimer ( ms > 50 ? ms-50 : 0 ); // 50 for latency | 122 | startTimer ( ms > 50 ? ms-50 : 0 ); // 50 for latency |
120 | play ( ); | 123 | play ( ); |
121 | } | 124 | } |
122 | 125 | ||
123 | void timerEvent ( QTimerEvent *e ) | 126 | void timerEvent ( QTimerEvent *e ) |
124 | { | 127 | { |
125 | if ( loopsleft >= 0 ) { | 128 | if ( loopsleft >= 0 ) { |
126 | if ( --loopsleft <= 0 ) { | 129 | if ( --loopsleft <= 0 ) { |
127 | killTimer ( e-> timerId ( )); | 130 | killTimer ( e-> timerId ( )); |
128 | loopsleft = 0; | 131 | loopsleft = 0; |
129 | return; | 132 | return; |
130 | } | 133 | } |
131 | } | 134 | } |
132 | play(); | 135 | play(); |
133 | } | 136 | } |
134 | 137 | ||
135 | bool isFinished ( ) const | 138 | bool isFinished ( ) const |
136 | { | 139 | { |
137 | return ( loopsleft == 0 ); | 140 | return ( loopsleft == 0 ); |
138 | } | 141 | } |
139 | 142 | ||
140 | private: | 143 | private: |
141 | QString filename; | 144 | QString filename; |
142 | int loopsleft; | 145 | int loopsleft; |
143 | int ms; | 146 | int ms; |
144 | }; | 147 | }; |
145 | 148 | ||
146 | #endif | 149 | #endif |
147 | 150 | ||
148 | /*! Opens a wave sound file \a name for playing | 151 | /*! Opens a wave sound file \a name for playing |
149 | * Resource is used for finding the file | 152 | * Resource is used for finding the file |
150 | **/ | 153 | **/ |
151 | Sound::Sound(const QString& name) | 154 | Sound::Sound(const QString& name) |
152 | { | 155 | { |
153 | #ifndef QT_NO_SOUND | 156 | #ifndef QT_NO_SOUND |
154 | d = new SoundData(name); | 157 | d = new SoundData(name); |
155 | #endif | 158 | #endif |
156 | } | 159 | } |
157 | 160 | ||
158 | /*! Destroys the sound */ | 161 | /*! Destroys the sound */ |
159 | Sound::~Sound() | 162 | Sound::~Sound() |
diff --git a/library/storage.cpp b/library/storage.cpp index dc5cc22..f8b75d0 100644 --- a/library/storage.cpp +++ b/library/storage.cpp | |||
@@ -1,344 +1,376 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> | 2 | ** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> |
3 | ** Copyright (C) Lorn Potter <llornkcor@handhelds.org> | 3 | ** Copyright (C) Lorn Potter <llornkcor@handhelds.org> |
4 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 4 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This file is part of Opie Environment. | 6 | ** This file is part of Opie Environment. |
7 | ** | 7 | ** |
8 | ** This file may be distributed and/or modified under the terms of the | 8 | ** This file may be distributed and/or modified under the terms of the |
9 | ** GNU General Public License version 2 as published by the Free Software | 9 | ** GNU General Public License version 2 as published by the Free Software |
10 | ** Foundation and appearing in the file LICENSE.GPL included in the | 10 | ** Foundation and appearing in the file LICENSE.GPL included in the |
11 | ** packaging of this file. | 11 | ** packaging of this file. |
12 | ** | 12 | ** |
13 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 13 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
14 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 14 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
15 | ** | 15 | ** |
16 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 16 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
17 | ** | 17 | ** |
18 | ** Contact info@trolltech.com if any conditions of this licensing are | 18 | ** Contact info@trolltech.com if any conditions of this licensing are |
19 | ** not clear to you. | 19 | ** not clear to you. |
20 | ** | 20 | ** |
21 | **********************************************************************/ | 21 | **********************************************************************/ |
22 | 22 | ||
23 | #include <qpe/storage.h> | 23 | #include <qpe/storage.h> |
24 | #include <qpe/custom.h> | 24 | #include <qpe/custom.h> |
25 | 25 | ||
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | #include <qtimer.h> | 27 | #include <qtimer.h> |
28 | #include <qcopchannel_qws.h> | 28 | #include <qcopchannel_qws.h> |
29 | 29 | ||
30 | #include <stdio.h> | 30 | #include <stdio.h> |
31 | 31 | ||
32 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 32 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
33 | #include <sys/vfs.h> | 33 | #include <sys/vfs.h> |
34 | #include <mntent.h> | 34 | #include <mntent.h> |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef Q_OS_MACX | ||
38 | # include <sys/param.h> | ||
39 | # include <sys/ucred.h> | ||
40 | # include <sys/mount.h> | ||
41 | # include <stdio.h> // For strerror() | ||
42 | # include <errno.h> | ||
43 | #endif /* Q_OS_MACX */ | ||
44 | |||
37 | #include <qstringlist.h> | 45 | #include <qstringlist.h> |
38 | 46 | ||
39 | #include <sys/vfs.h> | 47 | // Shouldn't be here ! (eilers) |
40 | #include <mntent.h> | 48 | // #include <sys/vfs.h> |
49 | // #include <mntent.h> | ||
41 | 50 | ||
42 | 51 | ||
43 | static bool isCF(const QString& m) | 52 | static bool isCF(const QString& m) |
44 | { | 53 | { |
54 | |||
55 | #ifndef Q_OS_MACX | ||
45 | FILE* f = fopen("/var/run/stab", "r"); | 56 | FILE* f = fopen("/var/run/stab", "r"); |
46 | if (!f) f = fopen("/var/state/pcmcia/stab", "r"); | 57 | if (!f) f = fopen("/var/state/pcmcia/stab", "r"); |
47 | if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); | 58 | if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); |
48 | if ( f ) { | 59 | if ( f ) { |
49 | char line[1024]; | 60 | char line[1024]; |
50 | char devtype[80]; | 61 | char devtype[80]; |
51 | char devname[80]; | 62 | char devname[80]; |
52 | while ( fgets( line, 1024, f ) ) { | 63 | while ( fgets( line, 1024, f ) ) { |
53 | // 0 ide ide-cs 0 hda 3 0 | 64 | // 0 ide ide-cs 0 hda 3 0 |
54 | if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 ) | 65 | if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 ) |
55 | { | 66 | { |
56 | if ( QString(devtype) == "ide" && m.find(devname)>0 ) { | 67 | if ( QString(devtype) == "ide" && m.find(devname)>0 ) { |
57 | fclose(f); | 68 | fclose(f); |
58 | return TRUE; | 69 | return TRUE; |
59 | } | 70 | } |
60 | } | 71 | } |
61 | } | 72 | } |
62 | fclose(f); | 73 | fclose(f); |
63 | } | 74 | } |
75 | #endif /* Q_OS_MACX */ | ||
64 | return FALSE; | 76 | return FALSE; |
65 | } | 77 | } |
66 | 78 | ||
67 | /*! \class StorageInfo storage.h | 79 | /*! \class StorageInfo storage.h |
68 | \brief The StorageInfo class describes the disks mounted on the file system. | 80 | \brief The StorageInfo class describes the disks mounted on the file system. |
69 | 81 | ||
70 | This class provides access to the mount information for the Linux | 82 | This class provides access to the mount information for the Linux |
71 | filesystem. Each mount point is represented by the FileSystem class. | 83 | filesystem. Each mount point is represented by the FileSystem class. |
72 | To ensure this class has the most up to date size information, call | 84 | To ensure this class has the most up to date size information, call |
73 | the update() method. Note that this will automatically be signaled | 85 | the update() method. Note that this will automatically be signaled |
74 | by the operating system when a disk has been mounted or unmounted. | 86 | by the operating system when a disk has been mounted or unmounted. |
75 | 87 | ||
76 | \ingroup qtopiaemb | 88 | \ingroup qtopiaemb |
77 | */ | 89 | */ |
78 | 90 | ||
79 | /*! Constructor that determines the current mount points of the filesystem. | 91 | /*! Constructor that determines the current mount points of the filesystem. |
80 | The standard \a parent parameters is passed on to QObject. | 92 | The standard \a parent parameters is passed on to QObject. |
81 | */ | 93 | */ |
82 | StorageInfo::StorageInfo( QObject *parent ) | 94 | StorageInfo::StorageInfo( QObject *parent ) |
83 | : QObject( parent ) | 95 | : QObject( parent ) |
84 | { | 96 | { |
85 | mFileSystems.setAutoDelete( TRUE ); | 97 | mFileSystems.setAutoDelete( TRUE ); |
86 | channel = new QCopChannel( "QPE/Card", this ); | 98 | channel = new QCopChannel( "QPE/Card", this ); |
87 | connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), | 99 | connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), |
88 | this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); | 100 | this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); |
89 | update(); | 101 | update(); |
90 | } | 102 | } |
91 | 103 | ||
92 | /*! Returns the longest matching FileSystem that starts with the | 104 | /*! Returns the longest matching FileSystem that starts with the |
93 | same prefix as \a filename as its mount point. | 105 | same prefix as \a filename as its mount point. |
94 | */ | 106 | */ |
95 | const FileSystem *StorageInfo::fileSystemOf( const QString &filename ) | 107 | const FileSystem *StorageInfo::fileSystemOf( const QString &filename ) |
96 | { | 108 | { |
97 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { | 109 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { |
98 | if ( filename.startsWith( (*i)->path() ) ) | 110 | if ( filename.startsWith( (*i)->path() ) ) |
99 | return (*i); | 111 | return (*i); |
100 | } | 112 | } |
101 | return 0; | 113 | return 0; |
102 | } | 114 | } |
103 | 115 | ||
104 | 116 | ||
105 | void StorageInfo::cardMessage( const QCString& msg, const QByteArray& ) | 117 | void StorageInfo::cardMessage( const QCString& msg, const QByteArray& ) |
106 | { | 118 | { |
107 | if ( msg == "mtabChanged()" ) | 119 | if ( msg == "mtabChanged()" ) |
108 | update(); | 120 | update(); |
109 | } | 121 | } |
110 | 122 | ||
111 | 123 | ||
112 | /*! Updates the mount and free space available information for each mount | 124 | /*! Updates the mount and free space available information for each mount |
113 | point. This method is automatically called when a disk is mounted or | 125 | point. This method is automatically called when a disk is mounted or |
114 | unmounted. | 126 | unmounted. |
115 | */ | 127 | */ |
116 | // cause of the lack of a d pointer we need | 128 | // cause of the lack of a d pointer we need |
117 | // to store informations in a config file :( | 129 | // to store informations in a config file :( |
118 | void StorageInfo::update() | 130 | void StorageInfo::update() |
119 | { | 131 | { |
120 | //qDebug("StorageInfo::updating"); | 132 | //qDebug("StorageInfo::updating"); |
121 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 133 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
122 | struct mntent *me; | 134 | struct mntent *me; |
123 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); | 135 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); |
124 | 136 | ||
125 | QStringList curdisks; | 137 | QStringList curdisks; |
126 | QStringList curopts; | 138 | QStringList curopts; |
127 | QStringList curfs; | 139 | QStringList curfs; |
128 | bool rebuild = FALSE; | 140 | bool rebuild = FALSE; |
129 | int n=0; | 141 | int n=0; |
130 | if ( mntfp ) { | 142 | if ( mntfp ) { |
131 | while ( (me = getmntent( mntfp )) != 0 ) { | 143 | while ( (me = getmntent( mntfp )) != 0 ) { |
132 | QString fs = me->mnt_fsname; | 144 | QString fs = me->mnt_fsname; |
133 | if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd" | 145 | if ( fs.left(7)=="/dev/hd" || fs.left(7)=="/dev/sd" |
134 | || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" | 146 | || fs.left(8)=="/dev/mtd" || fs.left(9) == "/dev/mmcd" |
135 | || fs.left( 14 ) == "/dev/mmc/part1" | 147 | || fs.left( 14 ) == "/dev/mmc/part1" |
136 | || fs.left(5)=="tmpfs" || fs.left(9)=="/dev/root" ) | 148 | || fs.left(5)=="tmpfs" || fs.left(9)=="/dev/root" ) |
137 | { | 149 | { |
138 | n++; | 150 | n++; |
139 | curdisks.append(fs); | 151 | curdisks.append(fs); |
140 | curopts.append( me->mnt_opts ); | 152 | curopts.append( me->mnt_opts ); |
141 | //qDebug("-->fs %s opts %s", fs.latin1(), me->mnt_opts ); | 153 | //qDebug("-->fs %s opts %s", fs.latin1(), me->mnt_opts ); |
142 | curfs.append( me->mnt_dir ); | 154 | curfs.append( me->mnt_dir ); |
143 | bool found = FALSE; | 155 | bool found = FALSE; |
144 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { | 156 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) { |
145 | if ( (*i)->disk() == fs ) { | 157 | if ( (*i)->disk() == fs ) { |
146 | found = TRUE; | 158 | found = TRUE; |
147 | break; | 159 | break; |
148 | } | 160 | } |
149 | } | 161 | } |
150 | if ( !found ) | 162 | if ( !found ) |
151 | rebuild = TRUE; | 163 | rebuild = TRUE; |
152 | } | 164 | } |
153 | } | 165 | } |
154 | endmntent( mntfp ); | 166 | endmntent( mntfp ); |
155 | } | 167 | } |
156 | if ( rebuild || n != (int)mFileSystems.count() ) { | 168 | if ( rebuild || n != (int)mFileSystems.count() ) { |
157 | mFileSystems.clear(); | 169 | mFileSystems.clear(); |
158 | QStringList::ConstIterator it=curdisks.begin(); | 170 | QStringList::ConstIterator it=curdisks.begin(); |
159 | QStringList::ConstIterator fsit=curfs.begin(); | 171 | QStringList::ConstIterator fsit=curfs.begin(); |
160 | QStringList::ConstIterator optsIt=curopts.begin(); | 172 | QStringList::ConstIterator optsIt=curopts.begin(); |
161 | for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) { | 173 | for (; it!=curdisks.end(); ++it, ++fsit, ++optsIt) { |
162 | QString opts = *optsIt; | 174 | QString opts = *optsIt; |
163 | 175 | ||
164 | QString disk = *it; | 176 | QString disk = *it; |
165 | QString humanname; | 177 | QString humanname; |
166 | bool removable = FALSE; | 178 | bool removable = FALSE; |
167 | if ( isCF(disk) ) { | 179 | if ( isCF(disk) ) { |
168 | humanname = tr("CF Card"); | 180 | humanname = tr("CF Card"); |
169 | removable = TRUE; | 181 | removable = TRUE; |
170 | } else if ( disk == "/dev/hda1" ) { | 182 | } else if ( disk == "/dev/hda1" ) { |
171 | humanname = tr("Hard Disk"); | 183 | humanname = tr("Hard Disk"); |
172 | } else if ( disk.left(9) == "/dev/mmcd" ) { | 184 | } else if ( disk.left(9) == "/dev/mmcd" ) { |
173 | humanname = tr("SD Card"); | 185 | humanname = tr("SD Card"); |
174 | removable = TRUE; | 186 | removable = TRUE; |
175 | } else if ( disk.left( 14 ) == "/dev/mmc/part1" ) { | 187 | } else if ( disk.left( 14 ) == "/dev/mmc/part1" ) { |
176 | humanname = tr("MMC Card"); | 188 | humanname = tr("MMC Card"); |
177 | removable = TRUE; | 189 | removable = TRUE; |
178 | } else if ( disk.left(7) == "/dev/hd" ) | 190 | } else if ( disk.left(7) == "/dev/hd" ) |
179 | humanname = tr("Hard Disk") + " " + disk; | 191 | humanname = tr("Hard Disk") + " " + disk; |
180 | else if ( disk.left(7) == "/dev/sd" ) | 192 | else if ( disk.left(7) == "/dev/sd" ) |
181 | humanname = tr("SCSI Hard Disk") + " " + disk; | 193 | humanname = tr("SCSI Hard Disk") + " " + disk; |
182 | else if ( disk.left(14) == "/dev/mtdblock6" ) //openzaurus ramfs | 194 | else if ( disk.left(14) == "/dev/mtdblock6" ) //openzaurus ramfs |
183 | humanname = tr("Internal Memory"); | 195 | humanname = tr("Internal Memory"); |
184 | else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" ) | 196 | else if ( disk == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" ) |
185 | humanname = tr("Internal Storage"); | 197 | humanname = tr("Internal Storage"); |
186 | else if ( disk.left(14) == "/dev/mtdblock/" ) | 198 | else if ( disk.left(14) == "/dev/mtdblock/" ) |
187 | humanname = tr("Internal Storage") + " " + disk; | 199 | humanname = tr("Internal Storage") + " " + disk; |
188 | else if ( disk.left(13) == "/dev/mtdblock" ) | 200 | else if ( disk.left(13) == "/dev/mtdblock" ) |
189 | humanname = tr("Internal Storage") + " " + disk; | 201 | humanname = tr("Internal Storage") + " " + disk; |
190 | else if ( disk.left(9) == "/dev/root" ) | 202 | else if ( disk.left(9) == "/dev/root" ) |
191 | humanname = tr("Internal Storage") + " " + disk; | 203 | humanname = tr("Internal Storage") + " " + disk; |
192 | else if ( disk.left(5) == "tmpfs" ) //ipaqs /mnt/ramfs | 204 | else if ( disk.left(5) == "tmpfs" ) //ipaqs /mnt/ramfs |
193 | humanname = tr("Internal Memory"); | 205 | humanname = tr("Internal Memory"); |
194 | FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts ); | 206 | FileSystem *fs = new FileSystem( disk, *fsit, humanname, removable, opts ); |
195 | mFileSystems.append( fs ); | 207 | mFileSystems.append( fs ); |
196 | } | 208 | } |
197 | emit disksChanged(); | 209 | emit disksChanged(); |
198 | } else { | 210 | } else { |
199 | // just update them | 211 | // just update them |
200 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) | 212 | for (QListIterator<FileSystem> i(mFileSystems); i.current(); ++i) |
201 | i.current()->update(); | 213 | i.current()->update(); |
202 | } | 214 | } |
203 | #endif | 215 | #endif |
204 | } | 216 | } |
205 | 217 | ||
206 | bool deviceTab( const char *device) { | 218 | bool deviceTab( const char *device) { |
207 | QString name = device; | 219 | QString name = device; |
208 | bool hasDevice=false; | 220 | bool hasDevice=false; |
221 | |||
222 | #ifdef Q_OS_MACX | ||
223 | // Darwin (MacOS X) | ||
224 | struct statfs** mntbufp; | ||
225 | int count = 0; | ||
226 | if ( ( count = getmntinfo( mntbufp, MNT_WAIT ) ) == 0 ){ | ||
227 | qWarning("deviceTab: Error in getmntinfo(): %s",strerror( errno ) ); | ||
228 | hasDevice = false; | ||
229 | } | ||
230 | for( int i = 0; i < count; i++ ){ | ||
231 | QString deviceName = mntbufp[i]->f_mntfromname; | ||
232 | qDebug(deviceName); | ||
233 | if( deviceName.left( name.length() ) == name ) | ||
234 | hasDevice = true; | ||
235 | } | ||
236 | #else | ||
237 | // Linux | ||
209 | struct mntent *me; | 238 | struct mntent *me; |
210 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); | 239 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); |
211 | if ( mntfp ) { | 240 | if ( mntfp ) { |
212 | while ( (me = getmntent( mntfp )) != 0 ) { | 241 | while ( (me = getmntent( mntfp )) != 0 ) { |
213 | QString deviceName = me->mnt_fsname; | 242 | QString deviceName = me->mnt_fsname; |
214 | // qDebug(deviceName); | 243 | // qDebug(deviceName); |
215 | if( deviceName.left(name.length()) == name) { | 244 | if( deviceName.left(name.length()) == name) { |
216 | hasDevice = true; | 245 | hasDevice = true; |
217 | } | 246 | } |
218 | } | 247 | } |
219 | } | 248 | } |
220 | endmntent( mntfp ); | 249 | endmntent( mntfp ); |
250 | #endif /* Q_OS_MACX */ | ||
251 | |||
252 | |||
221 | return hasDevice; | 253 | return hasDevice; |
222 | } | 254 | } |
223 | 255 | ||
224 | /*! | 256 | /*! |
225 | * @fn static bool StorageInfo::hasCf() | 257 | * @fn static bool StorageInfo::hasCf() |
226 | * @brief returns whether device has Cf mounted | 258 | * @brief returns whether device has Cf mounted |
227 | * | 259 | * |
228 | */ | 260 | */ |
229 | bool StorageInfo::hasCf() | 261 | bool StorageInfo::hasCf() |
230 | { | 262 | { |
231 | return deviceTab("/dev/hd"); | 263 | return deviceTab("/dev/hd"); |
232 | } | 264 | } |
233 | 265 | ||
234 | /*! | 266 | /*! |
235 | * @fn static bool StorageInfo::hasSd() | 267 | * @fn static bool StorageInfo::hasSd() |
236 | * @brief returns whether device has SD mounted | 268 | * @brief returns whether device has SD mounted |
237 | * | 269 | * |
238 | */ | 270 | */ |
239 | bool StorageInfo::hasSd() | 271 | bool StorageInfo::hasSd() |
240 | { | 272 | { |
241 | return deviceTab("/dev/mmcd"); | 273 | return deviceTab("/dev/mmcd"); |
242 | } | 274 | } |
243 | 275 | ||
244 | /*! | 276 | /*! |
245 | * @fn static bool StorageInfo::hasMmc() | 277 | * @fn static bool StorageInfo::hasMmc() |
246 | * @brief reutrns whether device has mmc mounted | 278 | * @brief reutrns whether device has mmc mounted |
247 | * | 279 | * |
248 | */ | 280 | */ |
249 | bool StorageInfo::hasMmc() | 281 | bool StorageInfo::hasMmc() |
250 | { | 282 | { |
251 | bool hasMmc=false; | 283 | bool hasMmc=false; |
252 | if( deviceTab("/dev/mmc/part")) | 284 | if( deviceTab("/dev/mmc/part")) |
253 | hasMmc=true; | 285 | hasMmc=true; |
254 | if( deviceTab("/dev/mmcd")) | 286 | if( deviceTab("/dev/mmcd")) |
255 | hasMmc=true; | 287 | hasMmc=true; |
256 | return hasMmc; | 288 | return hasMmc; |
257 | } | 289 | } |
258 | 290 | ||
259 | /*! \fn const QList<FileSystem> &StorageInfo::fileSystems() const | 291 | /*! \fn const QList<FileSystem> &StorageInfo::fileSystems() const |
260 | Returns a list of all available mounted file systems. | 292 | Returns a list of all available mounted file systems. |
261 | 293 | ||
262 | \warning This may change in Qtopia 3.x to return only relevant Qtopia file systems (and ignore mount points such as /tmp) | 294 | \warning This may change in Qtopia 3.x to return only relevant Qtopia file systems (and ignore mount points such as /tmp) |
263 | */ | 295 | */ |
264 | 296 | ||
265 | /*! \fn void StorageInfo::disksChanged() | 297 | /*! \fn void StorageInfo::disksChanged() |
266 | Gets emitted when a disk has been mounted or unmounted, such as when | 298 | Gets emitted when a disk has been mounted or unmounted, such as when |
267 | a CF c | 299 | a CF c |
268 | */ | 300 | */ |
269 | //--------------------------------------------------------------------------- | 301 | //--------------------------------------------------------------------------- |
270 | 302 | ||
271 | FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o ) | 303 | FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o ) |
272 | : fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o ) | 304 | : fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o ) |
273 | { | 305 | { |
274 | update(); | 306 | update(); |
275 | } | 307 | } |
276 | 308 | ||
277 | void FileSystem::update() | 309 | void FileSystem::update() |
278 | { | 310 | { |
279 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 311 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
280 | struct statfs fs; | 312 | struct statfs fs; |
281 | if ( !statfs( fspath.latin1(), &fs ) ) { | 313 | if ( !statfs( fspath.latin1(), &fs ) ) { |
282 | blkSize = fs.f_bsize; | 314 | blkSize = fs.f_bsize; |
283 | totalBlks = fs.f_blocks; | 315 | totalBlks = fs.f_blocks; |
284 | availBlks = fs.f_bavail; | 316 | availBlks = fs.f_bavail; |
285 | } else { | 317 | } else { |
286 | blkSize = 0; | 318 | blkSize = 0; |
287 | totalBlks = 0; | 319 | totalBlks = 0; |
288 | availBlks = 0; | 320 | availBlks = 0; |
289 | } | 321 | } |
290 | #endif | 322 | #endif |
291 | } | 323 | } |
292 | 324 | ||
293 | /*! \class FileSystem storage.h | 325 | /*! \class FileSystem storage.h |
294 | \brief The FileSystem class describes a single mount point. | 326 | \brief The FileSystem class describes a single mount point. |
295 | 327 | ||
296 | This class simply returns information about a mount point, including | 328 | This class simply returns information about a mount point, including |
297 | file system name, mount point, human readable name, size information | 329 | file system name, mount point, human readable name, size information |
298 | and mount options information. | 330 | and mount options information. |
299 | \ingroup qtopiaemb | 331 | \ingroup qtopiaemb |
300 | 332 | ||
301 | \sa StorageInfo | 333 | \sa StorageInfo |
302 | */ | 334 | */ |
303 | 335 | ||
304 | /*! \fn const QString &FileSystem::disk() const | 336 | /*! \fn const QString &FileSystem::disk() const |
305 | Returns the file system name, such as /dev/hda3 | 337 | Returns the file system name, such as /dev/hda3 |
306 | */ | 338 | */ |
307 | 339 | ||
308 | /*! \fn const QString &FileSystem::path() const | 340 | /*! \fn const QString &FileSystem::path() const |
309 | Returns the mount path, such as /home | 341 | Returns the mount path, such as /home |
310 | */ | 342 | */ |
311 | 343 | ||
312 | /*! \fn const QString &FileSystem::name() const | 344 | /*! \fn const QString &FileSystem::name() const |
313 | Returns the translated, human readable name for the mount directory. | 345 | Returns the translated, human readable name for the mount directory. |
314 | */ | 346 | */ |
315 | 347 | ||
316 | /*! \fn const QString &FileSystem::options() const | 348 | /*! \fn const QString &FileSystem::options() const |
317 | Returns the mount options | 349 | Returns the mount options |
318 | */ | 350 | */ |
319 | 351 | ||
320 | /*! \fn long FileSystem::blockSize() const | 352 | /*! \fn long FileSystem::blockSize() const |
321 | Returns the size of each block on the file system. | 353 | Returns the size of each block on the file system. |
322 | */ | 354 | */ |
323 | 355 | ||
324 | /*! \fn long FileSystem::totalBlocks() const | 356 | /*! \fn long FileSystem::totalBlocks() const |
325 | Returns the total number of blocks on the file system | 357 | Returns the total number of blocks on the file system |
326 | */ | 358 | */ |
327 | 359 | ||
328 | /*! \fn long FileSystem::availBlocks() const | 360 | /*! \fn long FileSystem::availBlocks() const |
329 | Returns the number of available blocks on the file system | 361 | Returns the number of available blocks on the file system |
330 | */ | 362 | */ |
331 | 363 | ||
332 | /*! \fn bool FileSystem::isRemovable() const | 364 | /*! \fn bool FileSystem::isRemovable() const |
333 | Returns flag whether the file system can be removed, such as a CF card | 365 | Returns flag whether the file system can be removed, such as a CF card |
334 | would be removable, but the internal memory wouldn't | 366 | would be removable, but the internal memory wouldn't |
335 | */ | 367 | */ |
336 | 368 | ||
337 | /*! \fn bool FileSystem::isWritable() const | 369 | /*! \fn bool FileSystem::isWritable() const |
338 | Returns flag whether the file system is mounted as writable or read-only. | 370 | Returns flag whether the file system is mounted as writable or read-only. |
339 | Returns FALSE if read-only, TRUE if read and write. | 371 | Returns FALSE if read-only, TRUE if read and write. |
340 | */ | 372 | */ |
341 | 373 | ||
342 | /*! \fn QStringList StorageInfo::fileSystemNames() const | 374 | /*! \fn QStringList StorageInfo::fileSystemNames() const |
343 | Returns a list of filesystem names. | 375 | Returns a list of filesystem names. |
344 | */ | 376 | */ |
diff --git a/mkspecs/qws/macx-generic-g++/qmake.conf b/mkspecs/qws/macx-generic-g++/qmake.conf index 3460a40..04f1c8b 100644 --- a/mkspecs/qws/macx-generic-g++/qmake.conf +++ b/mkspecs/qws/macx-generic-g++/qmake.conf | |||
@@ -1,80 +1,81 @@ | |||
1 | # | 1 | # |
2 | # $Id$ | 2 | # $Id$ |
3 | # | 3 | # |
4 | # qmake configuration for macx-g++ with Qt/Embedded | 4 | # qmake configuration for macx-g++ with Qt/Embedded |
5 | # | 5 | # |
6 | 6 | ||
7 | MAKEFILE_GENERATOR= UNIX | 7 | MAKEFILE_GENERATOR= UNIX |
8 | TEMPLATE = app | 8 | TEMPLATE = app |
9 | CONFIG += qt warn_on release | 9 | CONFIG += qt warn_on release |
10 | QMAKE_EXTENSION_SHLIB= dylib | 10 | QMAKE_EXTENSION_SHLIB= dylib |
11 | 11 | ||
12 | QMAKE_CC = $(TB)cc | 12 | QMAKE_CC = $(TB)cc |
13 | QMAKE_LEX = flex | 13 | QMAKE_LEX = flex |
14 | QMAKE_LEXFLAGS = | 14 | QMAKE_LEXFLAGS = |
15 | QMAKE_YACC = yacc | 15 | QMAKE_YACC = yacc |
16 | QMAKE_YACCFLAGS = -d | 16 | QMAKE_YACCFLAGS = -d |
17 | QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) | 17 | QMAKE_CFLAGS = -pipe $(CFLAGS_EXTRA) |
18 | QMAKE_CFLAGS_WARN_ON= -Wall -W | 18 | QMAKE_CFLAGS_WARN_ON= -Wall -W |
19 | QMAKE_CFLAGS_WARN_OFF= | 19 | QMAKE_CFLAGS_WARN_OFF= |
20 | QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline) | 20 | QMAKE_CFLAGS_RELEASE= $(if $(CFLAGS_RELEASE),$(CFLAGS_RELEASE), -O2 -fno-default-inline) |
21 | QMAKE_CFLAGS_DEBUG= -g | 21 | QMAKE_CFLAGS_DEBUG= -g |
22 | QMAKE_CFLAGS_SHLIB= -fPIC | 22 | QMAKE_CFLAGS_SHLIB= -fPIC |
23 | QMAKE_CFLAGS_YACC= -Wno-unused -Wno-parentheses | 23 | QMAKE_CFLAGS_YACC= -Wno-unused -Wno-parentheses |
24 | QMAKE_CFLAGS_THREAD= -D_REENTRANT | 24 | QMAKE_CFLAGS_THREAD= -D_REENTRANT |
25 | 25 | ||
26 | QMAKE_CXX = $(TB)c++ | 26 | QMAKE_CXX = $(TB)c++ |
27 | QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) | 27 | QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -DQT_NO_QWS_TRANSFORMED -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) -DQ_OS_MACX -DQT_NO_SOUND -DOPIE_NO_OVERRIDE_QT |
28 | QMAKE_CXXFLAGS_WARN_ON= $$QMAKE_CFLAGS_WARN_ON | 28 | QMAKE_CXXFLAGS_WARN_ON= $$QMAKE_CFLAGS_WARN_ON |
29 | QMAKE_CXXFLAGS_WARN_OFF= $$QMAKE_CFLAGS_WARN_OFF | 29 | QMAKE_CXXFLAGS_WARN_OFF= $$QMAKE_CFLAGS_WARN_OFF |
30 | QMAKE_CXXFLAGS_RELEASE= $$QMAKE_CFLAGS_RELEASE | 30 | QMAKE_CXXFLAGS_RELEASE= $$QMAKE_CFLAGS_RELEASE |
31 | QMAKE_CXXFLAGS_DEBUG= $$QMAKE_CFLAGS_DEBUG | 31 | QMAKE_CXXFLAGS_DEBUG= $$QMAKE_CFLAGS_DEBUG |
32 | QMAKE_CXXFLAGS_SHLIB= $$QMAKE_CFLAGS_SHLIB | 32 | QMAKE_CXXFLAGS_SHLIB= $$QMAKE_CFLAGS_SHLIB |
33 | QMAKE_CXXFLAGS_YACC= $$QMAKE_CFLAGS_YACC | 33 | QMAKE_CXXFLAGS_YACC= $$QMAKE_CFLAGS_YACC |
34 | QMAKE_CXXFLAGS_THREAD= $$QMAKE_CFLAGS_THREAD | 34 | QMAKE_CXXFLAGS_THREAD= $$QMAKE_CFLAGS_THREAD |
35 | 35 | ||
36 | QMAKE_INCDIR = | 36 | QMAKE_INCDIR = |
37 | QMAKE_LIBDIR = | 37 | QMAKE_LIBDIR = |
38 | QMAKE_INCDIR_X11= | 38 | QMAKE_INCDIR_X11= |
39 | QMAKE_LIBDIR_X11= | 39 | QMAKE_LIBDIR_X11= |
40 | QMAKE_INCDIR_QT = $(QTDIR)/include | 40 | QMAKE_INCDIR_QT = $(QTDIR)/include |
41 | QMAKE_LIBDIR_QT = $(QTDIR)/lib | 41 | QMAKE_LIBDIR_QT = $(QTDIR)/lib |
42 | QMAKE_INCDIR_OPENGL= /usr/X11R6/include | 42 | QMAKE_INCDIR_OPENGL= /usr/X11R6/include |
43 | QMAKE_LIBDIR_OPENGL= /usr/X11R6/lib | 43 | QMAKE_LIBDIR_OPENGL= /usr/X11R6/lib |
44 | 44 | ||
45 | QMAKE_LINK = $$QMAKE_CXX | 45 | QMAKE_LINK = $$QMAKE_CXX |
46 | QMAKE_LINK_SHLIB= $$QMAKE_CXX | 46 | QMAKE_LINK_SHLIB= $$QMAKE_CXX |
47 | QMAKE_LFLAGS = $(LFLAGS_EXTRA) | 47 | QMAKE_LFLAGS = $(LFLAGS_EXTRA) |
48 | QMAKE_LFLAGS_RELEASE= | 48 | QMAKE_LFLAGS_RELEASE= |
49 | QMAKE_LFLAGS_DEBUG= | 49 | QMAKE_LFLAGS_DEBUG= |
50 | QMAKE_LFLAGS_SHLIB= -dynamiclib | 50 | QMAKE_LFLAGS_SHLIB= -dynamiclib |
51 | QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace | 51 | QMAKE_LFLAGS_INCREMENTAL = -undefined suppress -flat_namespace |
52 | QMAKE_LFLAGS_PLUGIN= -bundle | 52 | QMAKE_LFLAGS_PLUGIN= -bundle |
53 | QMAKE_LFLAGS_SONAME= | 53 | QMAKE_LFLAGS_SONAME= |
54 | QMAKE_LFLAGS_THREAD= | 54 | QMAKE_LFLAGS_THREAD= |
55 | QMAKE_RPATH = | 55 | QMAKE_RPATH = |
56 | 56 | ||
57 | QMAKE_LIBS = $(LIBS_EXTRA) | 57 | QMAKE_LIBS = $(LIBS_EXTRA) |
58 | QMAKE_LIBS_X11 = | 58 | QMAKE_LIBS_X11 = |
59 | QMAKE_LIBS_X11SM= | 59 | QMAKE_LIBS_X11SM= |
60 | QMAKE_LIBS_QT = -lqte | 60 | QMAKE_LIBS_QT = -lqte |
61 | #QMAKE_LIBS_QT = libqte.dylib | ||
61 | QMAKE_LIBS_QT_THREAD= -lqte-mt | 62 | QMAKE_LIBS_QT_THREAD= -lqte-mt |
62 | QMAKE_LIBS_QT_OPENGL= -lqgl | 63 | QMAKE_LIBS_QT_OPENGL= -lqgl |
63 | QMAKE_LIBS_THREAD= | 64 | QMAKE_LIBS_THREAD= |
64 | 65 | ||
65 | QMAKE_MOC = $(QTDIR)/bin/moc | 66 | QMAKE_MOC = $(QTDIR)/bin/moc |
66 | QMAKE_UIC = $(QTDIR)/bin/uic | 67 | QMAKE_UIC = $(QTDIR)/bin/uic |
67 | 68 | ||
68 | QMAKE_AR = ar cqs | 69 | QMAKE_AR = ar cqs |
69 | QMAKE_RANLIB = | 70 | QMAKE_RANLIB = |
70 | 71 | ||
71 | QMAKE_TAR = tar -cf | 72 | QMAKE_TAR = tar -cf |
72 | QMAKE_GZIP = gzip -9f | 73 | QMAKE_GZIP = gzip -9f |
73 | 74 | ||
74 | QMAKE_COPY = cp -f | 75 | QMAKE_COPY = cp -f |
75 | QMAKE_MOVE = mv -f | 76 | QMAKE_MOVE = mv -f |
76 | QMAKE_DEL_FILE = rm -f | 77 | QMAKE_DEL_FILE = rm -f |
77 | QMAKE_DEL_DIR = rmdir | 78 | QMAKE_DEL_DIR = rmdir |
78 | 79 | ||
79 | 80 | ||
80 | 81 | ||
diff --git a/noncore/applets/networkapplet/networkapplet.pro b/noncore/applets/networkapplet/networkapplet.pro index ec58455..368f80e 100644 --- a/noncore/applets/networkapplet/networkapplet.pro +++ b/noncore/applets/networkapplet/networkapplet.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = networkapplet.h | 3 | HEADERS = networkapplet.h |
4 | SOURCES = networkapplet.cpp | 4 | SOURCES = networkapplet.cpp |
5 | TARGET = networkapplet | 5 | TARGET = networkapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 | 9 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 |
10 | VERSION = 0.1.0 | 10 | VERSION = 0.1.0 |
11 | MOC_DIR = moc | 11 | MOC_DIR = moc |
12 | OBJECTS_DIR = obj | 12 | OBJECTS_DIR = obj |
13 | 13 | ||
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | 15 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/applets/notesapplet/notesapplet.pro b/noncore/applets/notesapplet/notesapplet.pro index e4558f7..3075948 100644 --- a/noncore/applets/notesapplet/notesapplet.pro +++ b/noncore/applets/notesapplet/notesapplet.pro | |||
@@ -1,16 +1,16 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = notes.h notesappletimpl.h | 3 | HEADERS = notes.h notesappletimpl.h |
4 | SOURCES = notes.cpp notesappletimpl.cpp | 4 | SOURCES = notes.cpp notesappletimpl.cpp |
5 | TARGET = notesapplet | 5 | TARGET = notesapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | MOC_DIR=opieobj | 11 | MOC_DIR=opieobj |
12 | OBJECTS_DIR=opieobj | 12 | OBJECTS_DIR=opieobj |
13 | 13 | ||
14 | 14 | ||
15 | 15 | ||
16 | include ( $(OPIEDIR)/include.pro ) | 16 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/applets/wirelessapplet/wirelessapplet.pro b/noncore/applets/wirelessapplet/wirelessapplet.pro index 501327d..aee89d7 100644 --- a/noncore/applets/wirelessapplet/wirelessapplet.pro +++ b/noncore/applets/wirelessapplet/wirelessapplet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = wireless.h wirelessappletimpl.h networkinfo.h mgraph.h advancedconfig.h | 3 | HEADERS = wireless.h wirelessappletimpl.h networkinfo.h mgraph.h advancedconfig.h |
4 | SOURCES = wireless.cpp wirelessappletimpl.cpp networkinfo.cpp mgraph.cpp advancedconfig.cpp | 4 | SOURCES = wireless.cpp wirelessappletimpl.cpp networkinfo.cpp mgraph.cpp advancedconfig.cpp |
5 | INTERFACES = advancedconfigbase.ui | 5 | INTERFACES = advancedconfigbase.ui |
6 | TARGET = wirelessapplet | 6 | TARGET = wirelessapplet |
7 | DESTDIR = $(OPIEDIR)/plugins/applets | 7 | DESTDIR = $(OPIEDIR)/plugins/applets |
8 | INCLUDEPATH += $(OPIEDIR)/include | 8 | INCLUDEPATH += $(OPIEDIR)/include |
9 | DEPENDPATH += ../$(OPIEDIR)/include | 9 | DEPENDPATH += ../$(OPIEDIR)/include |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe |
11 | VERSION = 0.1.0 | 11 | VERSION = 0.1.0 |
12 | 12 | ||
13 | TRANSLATIONS = ../../../i18n/de/libwirelessapplet.ts \ | 13 | TRANSLATIONS = ../../../i18n/de/libwirelessapplet.ts \ |
14 | ../../../i18n/nl/libwirelessapplet.ts \ | 14 | ../../../i18n/nl/libwirelessapplet.ts \ |
15 | ../../../i18n/da/libwirelessapplet.ts \ | 15 | ../../../i18n/da/libwirelessapplet.ts \ |
16 | ../../../i18n/xx/libwirelessapplet.ts \ | 16 | ../../../i18n/xx/libwirelessapplet.ts \ |
17 | ../../../i18n/en/libwirelessapplet.ts \ | 17 | ../../../i18n/en/libwirelessapplet.ts \ |
18 | ../../../i18n/es/libwirelessapplet.ts \ | 18 | ../../../i18n/es/libwirelessapplet.ts \ |
19 | ../../../i18n/fr/libwirelessapplet.ts \ | 19 | ../../../i18n/fr/libwirelessapplet.ts \ |
20 | ../../../i18n/hu/libwirelessapplet.ts \ | 20 | ../../../i18n/hu/libwirelessapplet.ts \ |
21 | ../../../i18n/ja/libwirelessapplet.ts \ | 21 | ../../../i18n/ja/libwirelessapplet.ts \ |
22 | ../../../i18n/ko/libwirelessapplet.ts \ | 22 | ../../../i18n/ko/libwirelessapplet.ts \ |
23 | ../../../i18n/no/libwirelessapplet.ts \ | 23 | ../../../i18n/no/libwirelessapplet.ts \ |
24 | ../../../i18n/pl/libwirelessapplet.ts \ | 24 | ../../../i18n/pl/libwirelessapplet.ts \ |
25 | ../../../i18n/pt/libwirelessapplet.ts \ | 25 | ../../../i18n/pt/libwirelessapplet.ts \ |
26 | ../../../i18n/pt_BR/libwirelessapplet.ts \ | 26 | ../../../i18n/pt_BR/libwirelessapplet.ts \ |
27 | ../../../i18n/sl/libwirelessapplet.ts \ | 27 | ../../../i18n/sl/libwirelessapplet.ts \ |
28 | ../../../i18n/zh_CN/libwirelessapplet.ts \ | 28 | ../../../i18n/zh_CN/libwirelessapplet.ts \ |
29 | ../../../i18n/zh_TW/libwirelessapplet.ts | 29 | ../../../i18n/zh_TW/libwirelessapplet.ts |
30 | 30 | ||
31 | 31 | ||
32 | 32 | ||
33 | include ( $(OPIEDIR)/include.pro ) | 33 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/decorations/flat/flat.pro b/noncore/decorations/flat/flat.pro index e691339..f3d63ea 100644 --- a/noncore/decorations/flat/flat.pro +++ b/noncore/decorations/flat/flat.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = flat.h | 3 | HEADERS = flat.h |
4 | SOURCES = flat.cpp | 4 | SOURCES = flat.cpp |
5 | TARGET = flat | 5 | TARGET = flat |
6 | DESTDIR = $(OPIEDIR)/plugins/decorations | 6 | DESTDIR = $(OPIEDIR)/plugins/decorations |
7 | INCLUDEPATH+= $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | 15 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/decorations/liquid/liquid.pro b/noncore/decorations/liquid/liquid.pro index 7c310a6..2afed26 100644 --- a/noncore/decorations/liquid/liquid.pro +++ b/noncore/decorations/liquid/liquid.pro | |||
@@ -1,14 +1,14 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG = qt embedded release warn_on | 2 | CONFIG = qt plugin embedded release warn_on |
3 | SOURCES = liquid.cpp | 3 | SOURCES = liquid.cpp |
4 | HEADERS = liquid.h | 4 | HEADERS = liquid.h |
5 | LIBS += -lqpe | 5 | LIBS += -lqpe |
6 | INCLUDEPATH += $(OPIEDIR)/include | 6 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DESTDIR = $(OPIEDIR)/plugins/decorations | 7 | DESTDIR = $(OPIEDIR)/plugins/decorations |
8 | TARGET = liquid | 8 | TARGET = liquid |
9 | VERSION = 1.0.0 | 9 | VERSION = 1.0.0 |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | include ( $(OPIEDIR)/include.pro ) | 14 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/decorations/polished/polished.pro b/noncore/decorations/polished/polished.pro index 1ee940e..d3f3dcc 100644 --- a/noncore/decorations/polished/polished.pro +++ b/noncore/decorations/polished/polished.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = polished.h | 3 | HEADERS = polished.h |
4 | SOURCES = polished.cpp | 4 | SOURCES = polished.cpp |
5 | TARGET = polished | 5 | TARGET = polished |
6 | DESTDIR = $(OPIEDIR)/plugins/decorations | 6 | DESTDIR = $(OPIEDIR)/plugins/decorations |
7 | INCLUDEPATH+= $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | 15 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/net/opietooth/applet/applet.pro b/noncore/net/opietooth/applet/applet.pro index 23c1d0a..4efcb42 100644 --- a/noncore/net/opietooth/applet/applet.pro +++ b/noncore/net/opietooth/applet/applet.pro | |||
@@ -1,33 +1,33 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = bluezapplet.h bluezappletimpl.h | 3 | HEADERS = bluezapplet.h bluezappletimpl.h |
4 | SOURCES = bluezapplet.cpp bluezappletimpl.cpp | 4 | SOURCES = bluezapplet.cpp bluezappletimpl.cpp |
5 | TARGET = bluetoothapplet | 5 | TARGET = bluetoothapplet |
6 | DESTDIR = $(OPIEDIR)/plugins/applets | 6 | DESTDIR = $(OPIEDIR)/plugins/applets |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib | 8 | INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |
10 | LIBS += -lqpe -lopietooth | 10 | LIBS += -lqpe -lopietooth |
11 | VERSION = 0.0.3 | 11 | VERSION = 0.0.3 |
12 | 12 | ||
13 | TRANSLATIONS = ../../../../i18n/de/libbluetoothapplet.ts \ | 13 | TRANSLATIONS = ../../../../i18n/de/libbluetoothapplet.ts \ |
14 | ../../../../i18n/nl/libbluetoothapplet.ts \ | 14 | ../../../../i18n/nl/libbluetoothapplet.ts \ |
15 | ../../../../i18n/da/libbluetoothapplet.ts \ | 15 | ../../../../i18n/da/libbluetoothapplet.ts \ |
16 | ../../../../i18n/xx/libbluetoothapplet.ts \ | 16 | ../../../../i18n/xx/libbluetoothapplet.ts \ |
17 | ../../../../i18n/en/libbluetoothapplet.ts \ | 17 | ../../../../i18n/en/libbluetoothapplet.ts \ |
18 | ../../../../i18n/es/libbluetoothapplet.ts \ | 18 | ../../../../i18n/es/libbluetoothapplet.ts \ |
19 | ../../../../i18n/fr/libbluetoothapplet.ts \ | 19 | ../../../../i18n/fr/libbluetoothapplet.ts \ |
20 | ../../../../i18n/hu/libbluetoothapplet.ts \ | 20 | ../../../../i18n/hu/libbluetoothapplet.ts \ |
21 | ../../../../i18n/ja/libbluetoothapplet.ts \ | 21 | ../../../../i18n/ja/libbluetoothapplet.ts \ |
22 | ../../../../i18n/ko/libbluetoothapplet.ts \ | 22 | ../../../../i18n/ko/libbluetoothapplet.ts \ |
23 | ../../../../i18n/no/libbluetoothapplet.ts \ | 23 | ../../../../i18n/no/libbluetoothapplet.ts \ |
24 | ../../../../i18n/pl/libbluetoothapplet.ts \ | 24 | ../../../../i18n/pl/libbluetoothapplet.ts \ |
25 | ../../../../i18n/pt/libbluetoothapplet.ts \ | 25 | ../../../../i18n/pt/libbluetoothapplet.ts \ |
26 | ../../../../i18n/pt_BR/libbluetoothapplet.ts \ | 26 | ../../../../i18n/pt_BR/libbluetoothapplet.ts \ |
27 | ../../../../i18n/sl/libbluetoothapplet.ts \ | 27 | ../../../../i18n/sl/libbluetoothapplet.ts \ |
28 | ../../../../i18n/zh_CN/libbluetoothapplet.ts \ | 28 | ../../../../i18n/zh_CN/libbluetoothapplet.ts \ |
29 | ../../../../i18n/zh_TW/libbluetoothapplet.ts | 29 | ../../../../i18n/zh_TW/libbluetoothapplet.ts |
30 | 30 | ||
31 | 31 | ||
32 | 32 | ||
33 | include ( $(OPIEDIR)/include.pro ) | 33 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro index 84acd0e..dc78eb1 100644 --- a/noncore/settings/networksettings/ppp/ppp.pro +++ b/noncore/settings/networksettings/ppp/ppp.pro | |||
@@ -1,17 +1,17 @@ | |||
1 | #TEMPLATE = app | 1 | #TEMPLATE = app |
2 | # | 2 | # |
3 | TEMPLATE = lib | 3 | TEMPLATE = lib |
4 | #CONFIG += qt warn_on release | 4 | #CONFIG += qt plugin warn_on release |
5 | CONFIG += qt warn_on debug | 5 | CONFIG += qt plugin warn_on debug |
6 | DESTDIR = $(OPIEDIR)/plugins/networksettings | 6 | DESTDIR = $(OPIEDIR)/plugins/networksettings |
7 | HEADERS = pppmodule.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h interfaceinformationppp.h interfaceppp.h authwidget.h chooserwidget.h devices.h | 7 | HEADERS = pppmodule.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h interfaceinformationppp.h interfaceppp.h authwidget.h chooserwidget.h devices.h |
8 | SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp interfaceinformationppp.cpp interfaceppp.cpp authwidget.cpp chooserwidget.cpp devices.cpp | 8 | SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp interfaceinformationppp.cpp interfaceppp.cpp authwidget.cpp chooserwidget.cpp devices.cpp |
9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ | 9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ |
10 | DEPENDPATH+= $(OPIEDIR)/include | 10 | DEPENDPATH+= $(OPIEDIR)/include |
11 | LIBS += -lqpe -L../interfaces/ -linterfaces | 11 | LIBS += -lqpe -L../interfaces/ -linterfaces |
12 | TARGET = kppp | 12 | TARGET = kppp |
13 | VERSION = 1.0.0 | 13 | VERSION = 1.0.0 |
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | include ( $(OPIEDIR)/include.pro ) | 17 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index 82a5b2f..098ad1d 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro | |||
@@ -1,28 +1,28 @@ | |||
1 | # | 1 | # |
2 | TEMPLATE = lib | 2 | TEMPLATE = lib |
3 | #TEMPLATE = app | 3 | #TEMPLATE = app |
4 | CONFIG += qt warn_on release | 4 | CONFIG += qt plugin warn_on release |
5 | #CONFIG += qt warn_on debug | 5 | #CONFIG += qt plugin warn_on debug |
6 | DESTDIR = $(OPIEDIR)/plugins/networksettings | 6 | DESTDIR = $(OPIEDIR)/plugins/networksettings |
7 | HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h | 7 | HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h |
8 | SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp | 8 | SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp |
9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ | 9 | INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ |
10 | DEPENDPATH+= $(OPIEDIR)/include | 10 | DEPENDPATH+= $(OPIEDIR)/include |
11 | LIBS += -lqpe -L../interfaces/ -linterfaces -lopienet2 | 11 | LIBS += -lqpe -L../interfaces/ -linterfaces -lopienet2 |
12 | INTERFACES= wlan.ui info.ui | 12 | INTERFACES= wlan.ui info.ui |
13 | TARGET = wlan | 13 | TARGET = wlan |
14 | VERSION = 1.0.0 | 14 | VERSION = 1.0.0 |
15 | 15 | ||
16 | #CONFIG += wirelessopts | 16 | #CONFIG += wirelessopts |
17 | 17 | ||
18 | wirelessopts { | 18 | wirelessopts { |
19 | HEADERS+= wlanimp.h | 19 | HEADERS+= wlanimp.h |
20 | SOURCES+= wlanimp.cpp | 20 | SOURCES+= wlanimp.cpp |
21 | } | 21 | } |
22 | 22 | ||
23 | ! wirelessopts { | 23 | ! wirelessopts { |
24 | HEADERS+= wlanimp2.h | 24 | HEADERS+= wlanimp2.h |
25 | SOURCES += wlanimp2.cpp | 25 | SOURCES += wlanimp2.cpp |
26 | } | 26 | } |
27 | 27 | ||
28 | include ( $(OPIEDIR)/include.pro ) | 28 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/styles/flat/flat.pro b/noncore/styles/flat/flat.pro index ed25d5c..2721e14 100644 --- a/noncore/styles/flat/flat.pro +++ b/noncore/styles/flat/flat.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = flat.h | 3 | HEADERS = flat.h |
4 | SOURCES = flat.cpp | 4 | SOURCES = flat.cpp |
5 | TARGET = flatstyle | 5 | TARGET = flatstyle |
6 | DESTDIR = $(OPIEDIR)/plugins/styles | 6 | DESTDIR = $(OPIEDIR)/plugins/styles |
7 | INCLUDEPATH+= $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | 15 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/styles/fresh/fresh.pro b/noncore/styles/fresh/fresh.pro index 88a8de3..564c5cd 100644 --- a/noncore/styles/fresh/fresh.pro +++ b/noncore/styles/fresh/fresh.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE= lib | 1 | TEMPLATE= lib |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt plugin warn_on release |
3 | HEADERS = fresh.h | 3 | HEADERS = fresh.h |
4 | SOURCES = fresh.cpp | 4 | SOURCES = fresh.cpp |
5 | TARGET = freshstyle | 5 | TARGET = freshstyle |
6 | DESTDIR = $(OPIEDIR)/plugins/styles | 6 | DESTDIR = $(OPIEDIR)/plugins/styles |
7 | INCLUDEPATH+= $(OPIEDIR)/include | 7 | INCLUDEPATH+= $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | include ( $(OPIEDIR)/include.pro ) | 15 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/styles/liquid/liquid.pro b/noncore/styles/liquid/liquid.pro index 9241eba..4e1c575 100644 --- a/noncore/styles/liquid/liquid.pro +++ b/noncore/styles/liquid/liquid.pro | |||
@@ -1,39 +1,39 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG = qt embedded release warn_on | 2 | CONFIG = qt plugin embedded release warn_on |
3 | SOURCES = liquid.cpp \ | 3 | SOURCES = liquid.cpp \ |
4 | effects.cpp \ | 4 | effects.cpp \ |
5 | liquidset.cpp \ | 5 | liquidset.cpp \ |
6 | plugin.cpp | 6 | plugin.cpp |
7 | 7 | ||
8 | HEADERS = liquid.h \ | 8 | HEADERS = liquid.h \ |
9 | effects.h \ | 9 | effects.h \ |
10 | liquidset.h \ | 10 | liquidset.h \ |
11 | plugin.h | 11 | plugin.h |
12 | 12 | ||
13 | LIBS += -lqpe -lopie | 13 | LIBS += -lqpe -lopie |
14 | INCLUDEPATH += $(OPIEDIR)/include | 14 | INCLUDEPATH += $(OPIEDIR)/include |
15 | DESTDIR = $(OPIEDIR)/plugins/styles | 15 | DESTDIR = $(OPIEDIR)/plugins/styles |
16 | TARGET = liquid | 16 | TARGET = liquid |
17 | VERSION = 1.0.0 | 17 | VERSION = 1.0.0 |
18 | 18 | ||
19 | TRANSLATIONS = ../../../i18n/de/libliquid.ts \ | 19 | TRANSLATIONS = ../../../i18n/de/libliquid.ts \ |
20 | ../../../i18n/nl/libliquid.ts \ | 20 | ../../../i18n/nl/libliquid.ts \ |
21 | ../../../i18n/da/libliquid.ts \ | 21 | ../../../i18n/da/libliquid.ts \ |
22 | ../../../i18n/xx/libliquid.ts \ | 22 | ../../../i18n/xx/libliquid.ts \ |
23 | ../../../i18n/en/libliquid.ts \ | 23 | ../../../i18n/en/libliquid.ts \ |
24 | ../../../i18n/es/libliquid.ts \ | 24 | ../../../i18n/es/libliquid.ts \ |
25 | ../../../i18n/fr/libliquid.ts \ | 25 | ../../../i18n/fr/libliquid.ts \ |
26 | ../../../i18n/hu/libliquid.ts \ | 26 | ../../../i18n/hu/libliquid.ts \ |
27 | ../../../i18n/ja/libliquid.ts \ | 27 | ../../../i18n/ja/libliquid.ts \ |
28 | ../../../i18n/ko/libliquid.ts \ | 28 | ../../../i18n/ko/libliquid.ts \ |
29 | ../../../i18n/no/libliquid.ts \ | 29 | ../../../i18n/no/libliquid.ts \ |
30 | ../../../i18n/pl/libliquid.ts \ | 30 | ../../../i18n/pl/libliquid.ts \ |
31 | ../../../i18n/pt/libliquid.ts \ | 31 | ../../../i18n/pt/libliquid.ts \ |
32 | ../../../i18n/pt_BR/libliquid.ts \ | 32 | ../../../i18n/pt_BR/libliquid.ts \ |
33 | ../../../i18n/sl/libliquid.ts \ | 33 | ../../../i18n/sl/libliquid.ts \ |
34 | ../../../i18n/zh_CN/libliquid.ts \ | 34 | ../../../i18n/zh_CN/libliquid.ts \ |
35 | ../../../i18n/zh_TW/libliquid.ts | 35 | ../../../i18n/zh_TW/libliquid.ts |
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/styles/metal/metal.pro b/noncore/styles/metal/metal.pro index 3bb376d..8633284 100644 --- a/noncore/styles/metal/metal.pro +++ b/noncore/styles/metal/metal.pro | |||
@@ -1,32 +1,32 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG = qt embedded release warn_on | 2 | CONFIG = qt plugin embedded release warn_on |
3 | SOURCES = metal.cpp plugin.cpp | 3 | SOURCES = metal.cpp plugin.cpp |
4 | 4 | ||
5 | HEADERS = metal.h plugin.h | 5 | HEADERS = metal.h plugin.h |
6 | LIBS += -lqpe | 6 | LIBS += -lqpe |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DESTDIR = $(OPIEDIR)/plugins/styles | 8 | DESTDIR = $(OPIEDIR)/plugins/styles |
9 | TARGET = metal | 9 | TARGET = metal |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libmetal.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libmetal.ts \ |
13 | ../../../i18n/nl/libmetal.ts \ | 13 | ../../../i18n/nl/libmetal.ts \ |
14 | ../../../i18n/da/libmetal.ts \ | 14 | ../../../i18n/da/libmetal.ts \ |
15 | ../../../i18n/xx/libmetal.ts \ | 15 | ../../../i18n/xx/libmetal.ts \ |
16 | ../../../i18n/en/libmetal.ts \ | 16 | ../../../i18n/en/libmetal.ts \ |
17 | ../../../i18n/es/libmetal.ts \ | 17 | ../../../i18n/es/libmetal.ts \ |
18 | ../../../i18n/fr/libmetal.ts \ | 18 | ../../../i18n/fr/libmetal.ts \ |
19 | ../../../i18n/hu/libmetal.ts \ | 19 | ../../../i18n/hu/libmetal.ts \ |
20 | ../../../i18n/ja/libmetal.ts \ | 20 | ../../../i18n/ja/libmetal.ts \ |
21 | ../../../i18n/ko/libmetal.ts \ | 21 | ../../../i18n/ko/libmetal.ts \ |
22 | ../../../i18n/no/libmetal.ts \ | 22 | ../../../i18n/no/libmetal.ts \ |
23 | ../../../i18n/pl/libmetal.ts \ | 23 | ../../../i18n/pl/libmetal.ts \ |
24 | ../../../i18n/pt/libmetal.ts \ | 24 | ../../../i18n/pt/libmetal.ts \ |
25 | ../../../i18n/pt_BR/libmetal.ts \ | 25 | ../../../i18n/pt_BR/libmetal.ts \ |
26 | ../../../i18n/sl/libmetal.ts \ | 26 | ../../../i18n/sl/libmetal.ts \ |
27 | ../../../i18n/zh_CN/libmetal.ts \ | 27 | ../../../i18n/zh_CN/libmetal.ts \ |
28 | ../../../i18n/zh_TW/libmetal.ts | 28 | ../../../i18n/zh_TW/libmetal.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/styles/theme/theme.pro b/noncore/styles/theme/theme.pro index f7ed324..4f84f3f 100644 --- a/noncore/styles/theme/theme.pro +++ b/noncore/styles/theme/theme.pro | |||
@@ -1,42 +1,42 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG = qt embedded debug warn_on | 2 | CONFIG = qt plugin embedded debug warn_on |
3 | SOURCES = ogfxeffect.cpp \ | 3 | SOURCES = ogfxeffect.cpp \ |
4 | othemestyle.cpp \ | 4 | othemestyle.cpp \ |
5 | othemebase.cpp \ | 5 | othemebase.cpp \ |
6 | themeset.cpp \ | 6 | themeset.cpp \ |
7 | plugin.cpp | 7 | plugin.cpp |
8 | 8 | ||
9 | HEADERS = ogfxeffect.h \ | 9 | HEADERS = ogfxeffect.h \ |
10 | othemebase.h \ | 10 | othemebase.h \ |
11 | othemestyle.h \ | 11 | othemestyle.h \ |
12 | themeset.h \ | 12 | themeset.h \ |
13 | plugin.h | 13 | plugin.h |
14 | 14 | ||
15 | 15 | ||
16 | LIBS += -lqpe | 16 | LIBS += -lqpe |
17 | INCLUDEPATH += $(OPIEDIR)/include | 17 | INCLUDEPATH += $(OPIEDIR)/include |
18 | DESTDIR = $(OPIEDIR)/plugins/styles | 18 | DESTDIR = $(OPIEDIR)/plugins/styles |
19 | TARGET = theme | 19 | TARGET = theme |
20 | VERSION = 1.0.0 | 20 | VERSION = 1.0.0 |
21 | 21 | ||
22 | TRANSLATIONS = ../../../i18n/de/libtheme.ts \ | 22 | TRANSLATIONS = ../../../i18n/de/libtheme.ts \ |
23 | ../../../i18n/nl/libtheme.ts \ | 23 | ../../../i18n/nl/libtheme.ts \ |
24 | ../../../i18n/da/libtheme.ts \ | 24 | ../../../i18n/da/libtheme.ts \ |
25 | ../../../i18n/xx/libtheme.ts \ | 25 | ../../../i18n/xx/libtheme.ts \ |
26 | ../../../i18n/en/libtheme.ts \ | 26 | ../../../i18n/en/libtheme.ts \ |
27 | ../../../i18n/es/libtheme.ts \ | 27 | ../../../i18n/es/libtheme.ts \ |
28 | ../../../i18n/fr/libtheme.ts \ | 28 | ../../../i18n/fr/libtheme.ts \ |
29 | ../../../i18n/hu/libtheme.ts \ | 29 | ../../../i18n/hu/libtheme.ts \ |
30 | ../../../i18n/ja/libtheme.ts \ | 30 | ../../../i18n/ja/libtheme.ts \ |
31 | ../../../i18n/ko/libtheme.ts \ | 31 | ../../../i18n/ko/libtheme.ts \ |
32 | ../../../i18n/no/libtheme.ts \ | 32 | ../../../i18n/no/libtheme.ts \ |
33 | ../../../i18n/pl/libtheme.ts \ | 33 | ../../../i18n/pl/libtheme.ts \ |
34 | ../../../i18n/pt/libtheme.ts \ | 34 | ../../../i18n/pt/libtheme.ts \ |
35 | ../../../i18n/pt_BR/libtheme.ts \ | 35 | ../../../i18n/pt_BR/libtheme.ts \ |
36 | ../../../i18n/sl/libtheme.ts \ | 36 | ../../../i18n/sl/libtheme.ts \ |
37 | ../../../i18n/zh_CN/libtheme.ts \ | 37 | ../../../i18n/zh_CN/libtheme.ts \ |
38 | ../../../i18n/zh_TW/libtheme.ts | 38 | ../../../i18n/zh_TW/libtheme.ts |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | include ( $(OPIEDIR)/include.pro ) | 42 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro index 0a0d5b9..ac503c3 100644 --- a/noncore/todayplugins/fortune/fortune.pro +++ b/noncore/todayplugins/fortune/fortune.pro | |||
@@ -1,41 +1,41 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | #CONFIG -= moc | 2 | #CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ | 6 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ |
7 | fortunepluginwidget.h | 7 | fortunepluginwidget.h |
8 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ | 8 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ |
9 | fortunepluginwidget.cpp | 9 | fortunepluginwidget.cpp |
10 | 10 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 11 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 12 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 13 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 14 | ../ ../library |
15 | 15 | ||
16 | LIBS+= -lqpe -lopie | 16 | LIBS+= -lqpe -lopie |
17 | 17 | ||
18 | DESTDIR = $(OPIEDIR)/plugins/today | 18 | DESTDIR = $(OPIEDIR)/plugins/today |
19 | TARGET = todayfortuneplugin | 19 | TARGET = todayfortuneplugin |
20 | 20 | ||
21 | TRANSLATIONS = ../../../i18n/de/libtodayfortuneplugin.ts \ | 21 | TRANSLATIONS = ../../../i18n/de/libtodayfortuneplugin.ts \ |
22 | ../../../i18n/nl/libtodayfortuneplugin.ts \ | 22 | ../../../i18n/nl/libtodayfortuneplugin.ts \ |
23 | ../../../i18n/xx/libtodayfortuneplugin.ts \ | 23 | ../../../i18n/xx/libtodayfortuneplugin.ts \ |
24 | ../../../i18n/en/libtodayfortuneplugin.ts \ | 24 | ../../../i18n/en/libtodayfortuneplugin.ts \ |
25 | ../../../i18n/es/libtodayfortuneplugin.ts \ | 25 | ../../../i18n/es/libtodayfortuneplugin.ts \ |
26 | ../../../i18n/fr/libtodayfortuneplugin.ts \ | 26 | ../../../i18n/fr/libtodayfortuneplugin.ts \ |
27 | ../../../i18n/hu/libtodayfortuneplugin.ts \ | 27 | ../../../i18n/hu/libtodayfortuneplugin.ts \ |
28 | ../../../i18n/ja/libtodayfortuneplugin.ts \ | 28 | ../../../i18n/ja/libtodayfortuneplugin.ts \ |
29 | ../../../i18n/ko/libtodayfortuneplugin.ts \ | 29 | ../../../i18n/ko/libtodayfortuneplugin.ts \ |
30 | ../../../i18n/no/libtodayfortuneplugin.ts \ | 30 | ../../../i18n/no/libtodayfortuneplugin.ts \ |
31 | ../../../i18n/pl/libtodayfortuneplugin.ts \ | 31 | ../../../i18n/pl/libtodayfortuneplugin.ts \ |
32 | ../../../i18n/pt/libtodayfortuneplugin.ts \ | 32 | ../../../i18n/pt/libtodayfortuneplugin.ts \ |
33 | ../../../i18n/pt_BR/libtodayfortuneplugin.ts \ | 33 | ../../../i18n/pt_BR/libtodayfortuneplugin.ts \ |
34 | ../../../i18n/sl/libtodayfortuneplugin.ts \ | 34 | ../../../i18n/sl/libtodayfortuneplugin.ts \ |
35 | ../../../i18n/zh_CN/libtodayfortuneplugin.ts \ | 35 | ../../../i18n/zh_CN/libtodayfortuneplugin.ts \ |
36 | ../../../i18n/zh_TW/libtodayfortuneplugin.ts \ | 36 | ../../../i18n/zh_TW/libtodayfortuneplugin.ts \ |
37 | ../../../i18n/it/libtodayfortuneplugin.ts \ | 37 | ../../../i18n/it/libtodayfortuneplugin.ts \ |
38 | ../../../i18n/da/libtodayfortuneplugin.ts | 38 | ../../../i18n/da/libtodayfortuneplugin.ts |
39 | 39 | ||
40 | 40 | ||
41 | include ( $(OPIEDIR)/include.pro ) | 41 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro index c34be33..490a8f9 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro | |||
@@ -1,48 +1,48 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ | 5 | HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ |
6 | ../libstocks/csv.h \ | 6 | ../libstocks/csv.h \ |
7 | ../libstocks/http.h \ | 7 | ../libstocks/http.h \ |
8 | ../libstocks/lists.h \ | 8 | ../libstocks/lists.h \ |
9 | ../libstocks/stocks.h | 9 | ../libstocks/stocks.h |
10 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp stocktickerconfig.cpp \ | 10 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp stocktickerconfig.cpp \ |
11 | ../libstocks/csv.c \ | 11 | ../libstocks/csv.c \ |
12 | ../libstocks/currency.c \ | 12 | ../libstocks/currency.c \ |
13 | ../libstocks/history.c \ | 13 | ../libstocks/history.c \ |
14 | ../libstocks/http.c \ | 14 | ../libstocks/http.c \ |
15 | ../libstocks/lists.c \ | 15 | ../libstocks/lists.c \ |
16 | ../libstocks/stocks.c | 16 | ../libstocks/stocks.c |
17 | 17 | ||
18 | INCLUDEPATH += $(OPIEDIR)/include \ | 18 | INCLUDEPATH += $(OPIEDIR)/include \ |
19 | ../ ../library | 19 | ../ ../library |
20 | DEPENDPATH += $(OPIEDIR)/include \ | 20 | DEPENDPATH += $(OPIEDIR)/include \ |
21 | ../ ../library | 21 | ../ ../library |
22 | 22 | ||
23 | LIBS+= -lqpe -lopie -lpthread | 23 | LIBS+= -lqpe -lopie -lpthread |
24 | TMAKE_CFLAGS += -D__UNIX__ | 24 | TMAKE_CFLAGS += -D__UNIX__ |
25 | 25 | ||
26 | DESTDIR = $(OPIEDIR)/plugins/today | 26 | DESTDIR = $(OPIEDIR)/plugins/today |
27 | TARGET = todaystocktickerplugin | 27 | TARGET = todaystocktickerplugin |
28 | 28 | ||
29 | TRANSLATIONS = ../../../../i18n/de/libtodaystocktickerplugin.ts \ | 29 | TRANSLATIONS = ../../../../i18n/de/libtodaystocktickerplugin.ts \ |
30 | ../../../../i18n/nl/libtodaystocktickerplugin.ts \ | 30 | ../../../../i18n/nl/libtodaystocktickerplugin.ts \ |
31 | ../../../../i18n/xx/libtodaystocktickerplugin.ts \ | 31 | ../../../../i18n/xx/libtodaystocktickerplugin.ts \ |
32 | ../../../../i18n/en/libtodaystocktickerplugin.ts \ | 32 | ../../../../i18n/en/libtodaystocktickerplugin.ts \ |
33 | ../../../../i18n/es/libtodaystocktickerplugin.ts \ | 33 | ../../../../i18n/es/libtodaystocktickerplugin.ts \ |
34 | ../../../../i18n/fr/libtodaystocktickerplugin.ts \ | 34 | ../../../../i18n/fr/libtodaystocktickerplugin.ts \ |
35 | ../../../../i18n/hu/libtodaystocktickerplugin.ts \ | 35 | ../../../../i18n/hu/libtodaystocktickerplugin.ts \ |
36 | ../../../../i18n/ja/libtodaystocktickerplugin.ts \ | 36 | ../../../../i18n/ja/libtodaystocktickerplugin.ts \ |
37 | ../../../../i18n/ko/libtodaystocktickerplugin.ts \ | 37 | ../../../../i18n/ko/libtodaystocktickerplugin.ts \ |
38 | ../../../../i18n/no/libtodaystocktickerplugin.ts \ | 38 | ../../../../i18n/no/libtodaystocktickerplugin.ts \ |
39 | ../../../../i18n/pl/libtodaystocktickerplugin.ts \ | 39 | ../../../../i18n/pl/libtodaystocktickerplugin.ts \ |
40 | ../../../../i18n/pt/libtodaystocktickerplugin.ts \ | 40 | ../../../../i18n/pt/libtodaystocktickerplugin.ts \ |
41 | ../../../../i18n/pt_BR/libtodaystocktickerplugin.ts \ | 41 | ../../../../i18n/pt_BR/libtodaystocktickerplugin.ts \ |
42 | ../../../../i18n/sl/libtodaystocktickerplugin.ts \ | 42 | ../../../../i18n/sl/libtodaystocktickerplugin.ts \ |
43 | ../../../../i18n/zh_CN/libtodaystocktickerplugin.ts \ | 43 | ../../../../i18n/zh_CN/libtodaystocktickerplugin.ts \ |
44 | ../../../../i18n/zh_TW/libtodaystocktickerplugin.ts \ | 44 | ../../../../i18n/zh_TW/libtodaystocktickerplugin.ts \ |
45 | ../../../../i18n/it/libtodaystocktickerplugin.ts \ | 45 | ../../../../i18n/it/libtodaystocktickerplugin.ts \ |
46 | ../../../../i18n/da/libtodaystocktickerplugin.ts | 46 | ../../../../i18n/da/libtodaystocktickerplugin.ts |
47 | 47 | ||
48 | include ( $(OPIEDIR)/include.pro ) | 48 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/todayplugins/weather/weather.pro b/noncore/todayplugins/weather/weather.pro index 2833e88..bd4b565 100644 --- a/noncore/todayplugins/weather/weather.pro +++ b/noncore/todayplugins/weather/weather.pro | |||
@@ -1,43 +1,43 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | #CONFIG -= moc | 2 | #CONFIG -= moc |
3 | CONFIG += qt release | 3 | CONFIG += qt plugin release |
4 | 4 | ||
5 | HEADERS = weatherplugin.h \ | 5 | HEADERS = weatherplugin.h \ |
6 | weatherpluginimpl.h \ | 6 | weatherpluginimpl.h \ |
7 | weatherpluginwidget.h \ | 7 | weatherpluginwidget.h \ |
8 | weatherconfig.h | 8 | weatherconfig.h |
9 | 9 | ||
10 | SOURCES = weatherplugin.cpp \ | 10 | SOURCES = weatherplugin.cpp \ |
11 | weatherpluginimpl.cpp \ | 11 | weatherpluginimpl.cpp \ |
12 | weatherpluginwidget.cpp \ | 12 | weatherpluginwidget.cpp \ |
13 | weatherconfig.cpp | 13 | weatherconfig.cpp |
14 | 14 | ||
15 | INCLUDEPATH += $(OPIEDIR)/include \ | 15 | INCLUDEPATH += $(OPIEDIR)/include \ |
16 | ../ ../library | 16 | ../ ../library |
17 | DEPENDPATH += $(OPIEDIR)/include \ | 17 | DEPENDPATH += $(OPIEDIR)/include \ |
18 | ../ ../library | 18 | ../ ../library |
19 | 19 | ||
20 | LIBS+= -lqpe -lopie | 20 | LIBS+= -lqpe -lopie |
21 | 21 | ||
22 | DESTDIR = $(OPIEDIR)/plugins/today | 22 | DESTDIR = $(OPIEDIR)/plugins/today |
23 | TARGET = todayweatherplugin | 23 | TARGET = todayweatherplugin |
24 | 24 | ||
25 | TRANSLATIONS = ../../../i18n/de/libtodayweatherplugin.ts \ | 25 | TRANSLATIONS = ../../../i18n/de/libtodayweatherplugin.ts \ |
26 | ../../../i18n/nl/libtodayweatherplugin.ts \ | 26 | ../../../i18n/nl/libtodayweatherplugin.ts \ |
27 | ../../../i18n/xx/libtodayweatherplugin.ts \ | 27 | ../../../i18n/xx/libtodayweatherplugin.ts \ |
28 | ../../../i18n/en/libtodayweatherplugin.ts \ | 28 | ../../../i18n/en/libtodayweatherplugin.ts \ |
29 | ../../../i18n/es/libtodayweatherplugin.ts \ | 29 | ../../../i18n/es/libtodayweatherplugin.ts \ |
30 | ../../../i18n/fr/libtodayweatherplugin.ts \ | 30 | ../../../i18n/fr/libtodayweatherplugin.ts \ |
31 | ../../../i18n/hu/libtodayweatherplugin.ts \ | 31 | ../../../i18n/hu/libtodayweatherplugin.ts \ |
32 | ../../../i18n/ja/libtodayweatherplugin.ts \ | 32 | ../../../i18n/ja/libtodayweatherplugin.ts \ |
33 | ../../../i18n/ko/libtodayweatherplugin.ts \ | 33 | ../../../i18n/ko/libtodayweatherplugin.ts \ |
34 | ../../../i18n/no/libtodayweatherplugin.ts \ | 34 | ../../../i18n/no/libtodayweatherplugin.ts \ |
35 | ../../../i18n/pl/libtodayweatherplugin.ts \ | 35 | ../../../i18n/pl/libtodayweatherplugin.ts \ |
36 | ../../../i18n/pt/libtodayweatherplugin.ts \ | 36 | ../../../i18n/pt/libtodayweatherplugin.ts \ |
37 | ../../../i18n/pt_BR/libtodayweatherplugin.ts \ | 37 | ../../../i18n/pt_BR/libtodayweatherplugin.ts \ |
38 | ../../../i18n/sl/libtodayweatherplugin.ts \ | 38 | ../../../i18n/sl/libtodayweatherplugin.ts \ |
39 | ../../../i18n/zh_CN/libtodayweatherplugin.ts \ | 39 | ../../../i18n/zh_CN/libtodayweatherplugin.ts \ |
40 | ../../../i18n/zh_TW/libtodayweatherplugin.ts \ | 40 | ../../../i18n/zh_TW/libtodayweatherplugin.ts \ |
41 | ../../../i18n/it/libtodayweatherplugin.ts \ | 41 | ../../../i18n/it/libtodayweatherplugin.ts \ |
42 | ../../../i18n/da/libtodayweatherplugin.ts | 42 | ../../../i18n/da/libtodayweatherplugin.ts |
43 | include ( $(OPIEDIR)/include.pro ) | 43 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/unsupported/mail2/bend/bend.pro b/noncore/unsupported/mail2/bend/bend.pro index b03f652..61eea5f 100644 --- a/noncore/unsupported/mail2/bend/bend.pro +++ b/noncore/unsupported/mail2/bend/bend.pro | |||
@@ -1,32 +1,32 @@ | |||
1 | TEMPLATE =lib | 1 | TEMPLATE =lib |
2 | CONFIG +=qt warn_on release | 2 | CONFIG +=qt plugin warn_on release |
3 | HEADERS +=bend.h \ | 3 | HEADERS +=bend.h \ |
4 | bendimpl.h | 4 | bendimpl.h |
5 | SOURCES +=bend.cpp \ | 5 | SOURCES +=bend.cpp \ |
6 | bendimpl.cpp | 6 | bendimpl.cpp |
7 | INCLUDEPATH +=$(OPIEDIR)/include ../libmail | 7 | INCLUDEPATH +=$(OPIEDIR)/include ../libmail |
8 | LIBS +=-lmail -lqpe | 8 | LIBS +=-lmail -lqpe |
9 | TARGET =bend | 9 | TARGET =bend |
10 | DESTDIR +=$(OPIEDIR)/plugins/applets/ | 10 | DESTDIR +=$(OPIEDIR)/plugins/applets/ |
11 | 11 | ||
12 | TRANSLATIONS = ../../../i18n/de/libbend.ts \ | 12 | TRANSLATIONS = ../../../i18n/de/libbend.ts \ |
13 | ../../../i18n/nl/libbend.ts \ | 13 | ../../../i18n/nl/libbend.ts \ |
14 | ../../../i18n/da/libbend.ts \ | 14 | ../../../i18n/da/libbend.ts \ |
15 | ../../../i18n/xx/libbend.ts \ | 15 | ../../../i18n/xx/libbend.ts \ |
16 | ../../../i18n/en/libbend.ts \ | 16 | ../../../i18n/en/libbend.ts \ |
17 | ../../../i18n/es/libbend.ts \ | 17 | ../../../i18n/es/libbend.ts \ |
18 | ../../../i18n/fr/libbend.ts \ | 18 | ../../../i18n/fr/libbend.ts \ |
19 | ../../../i18n/hu/libbend.ts \ | 19 | ../../../i18n/hu/libbend.ts \ |
20 | ../../../i18n/ja/libbend.ts \ | 20 | ../../../i18n/ja/libbend.ts \ |
21 | ../../../i18n/ko/libbend.ts \ | 21 | ../../../i18n/ko/libbend.ts \ |
22 | ../../../i18n/no/libbend.ts \ | 22 | ../../../i18n/no/libbend.ts \ |
23 | ../../../i18n/pl/libbend.ts \ | 23 | ../../../i18n/pl/libbend.ts \ |
24 | ../../../i18n/pt/libbend.ts \ | 24 | ../../../i18n/pt/libbend.ts \ |
25 | ../../../i18n/pt_BR/libbend.ts \ | 25 | ../../../i18n/pt_BR/libbend.ts \ |
26 | ../../../i18n/sl/libbend.ts \ | 26 | ../../../i18n/sl/libbend.ts \ |
27 | ../../../i18n/zh_CN/libbend.ts \ | 27 | ../../../i18n/zh_CN/libbend.ts \ |
28 | ../../../i18n/zh_TW/libbend.ts | 28 | ../../../i18n/zh_TW/libbend.ts |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | include ( $(OPIEDIR)/include.pro ) | 32 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/plugins/Makefile b/plugins/Makefile index 4863bd0..2515903 100644 --- a/plugins/Makefile +++ b/plugins/Makefile | |||
@@ -1,4 +1,8 @@ | |||
1 | clean: | 1 | clean: |
2 | find -name "*.so*" -print0 | xargs -0 rm -f | 2 | ifeq ( CONFIG_TARGET_MACOSX, y ) |
3 | find ./ -name "*.dylib*" -print0 | xargs -0 rm -f | ||
4 | else | ||
5 | find ./ -name "*.so*" -print0 | xargs -0 rm -f | ||
6 | endif | ||
3 | 7 | ||
4 | all install ipk lupdate lrelease opie-lupdate opie-lrelease: | 8 | all install ipk lupdate lrelease opie-lupdate opie-lrelease: |
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h index d212bff..94e5607 100644 --- a/qmake/include/qglobal.h +++ b/qmake/include/qglobal.h | |||
@@ -29,257 +29,264 @@ | |||
29 | ** information about Qt Commercial License Agreements. | 29 | ** information about Qt Commercial License Agreements. |
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. |
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
32 | ** | 32 | ** |
33 | ** Contact info@trolltech.com if any conditions of this licensing are | 33 | ** Contact info@trolltech.com if any conditions of this licensing are |
34 | ** not clear to you. | 34 | ** not clear to you. |
35 | ** | 35 | ** |
36 | **********************************************************************/ | 36 | **********************************************************************/ |
37 | 37 | ||
38 | #ifndef QGLOBAL_H | 38 | #ifndef QGLOBAL_H |
39 | #define QGLOBAL_H | 39 | #define QGLOBAL_H |
40 | 40 | ||
41 | #define QT_VERSION_STR "3.1.2" | 41 | #define QT_VERSION_STR "3.1.2" |
42 | /* | 42 | /* |
43 | QT_VERSION is (major << 16) + (minor << 8) + patch. | 43 | QT_VERSION is (major << 16) + (minor << 8) + patch. |
44 | */ | 44 | */ |
45 | #define QT_VERSION 0x030102 | 45 | #define QT_VERSION 0x030102 |
46 | 46 | ||
47 | /* | 47 | /* |
48 | The operating system, must be one of: (Q_OS_x) | 48 | The operating system, must be one of: (Q_OS_x) |
49 | 49 | ||
50 | MACX- Mac OS X | 50 | MACX- Mac OS X |
51 | MAC9- Mac OS 9 | 51 | MAC9- Mac OS 9 |
52 | MSDOS- MS-DOS and Windows | 52 | MSDOS- MS-DOS and Windows |
53 | OS2- OS/2 | 53 | OS2- OS/2 |
54 | OS2EMX- XFree86 on OS/2 (not PM) | 54 | OS2EMX- XFree86 on OS/2 (not PM) |
55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) | 55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) |
56 | CYGWIN- Cygwin | 56 | CYGWIN- Cygwin |
57 | SOLARIS- Sun Solaris | 57 | SOLARIS- Sun Solaris |
58 | HPUX- HP-UX | 58 | HPUX- HP-UX |
59 | ULTRIX- DEC Ultrix | 59 | ULTRIX- DEC Ultrix |
60 | LINUX- Linux | 60 | LINUX- Linux |
61 | FREEBSD- FreeBSD | 61 | FREEBSD- FreeBSD |
62 | NETBSD- NetBSD | 62 | NETBSD- NetBSD |
63 | OPENBSD- OpenBSD | 63 | OPENBSD- OpenBSD |
64 | BSDI- BSD/OS | 64 | BSDI- BSD/OS |
65 | IRIX- SGI Irix | 65 | IRIX- SGI Irix |
66 | OSF- HP Tru64 UNIX | 66 | OSF- HP Tru64 UNIX |
67 | SCO- SCO OpenServer 5 | 67 | SCO- SCO OpenServer 5 |
68 | UNIXWARE- UnixWare 7, Open UNIX 8 | 68 | UNIXWARE- UnixWare 7, Open UNIX 8 |
69 | AIX- AIX | 69 | AIX- AIX |
70 | HURD- GNU Hurd | 70 | HURD- GNU Hurd |
71 | DGUX- DG/UX | 71 | DGUX- DG/UX |
72 | RELIANT- Reliant UNIX | 72 | RELIANT- Reliant UNIX |
73 | DYNIX- DYNIX/ptx | 73 | DYNIX- DYNIX/ptx |
74 | QNX- QNX | 74 | QNX- QNX |
75 | QNX6- QNX RTP 6.1 | 75 | QNX6- QNX RTP 6.1 |
76 | LYNX- LynxOS | 76 | LYNX- LynxOS |
77 | BSD4- Any BSD 4.4 system | 77 | BSD4- Any BSD 4.4 system |
78 | UNIX- Any UNIX BSD/SYSV system | 78 | UNIX- Any UNIX BSD/SYSV system |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #if defined(__APPLE__) && defined(__GNUC__) | 81 | #if defined(__APPLE__) && defined(__GNUC__) |
82 | # define Q_OS_MACX | 82 | # define Q_OS_MACX |
83 | #elif defined(__MACOSX__) | 83 | #elif defined(__MACOSX__) |
84 | # define Q_OS_MACX | 84 | # define Q_OS_MACX |
85 | #elif defined(macintosh) | 85 | #elif defined(macintosh) |
86 | # define Q_OS_MAC9 | 86 | # define Q_OS_MAC9 |
87 | #elif defined(__CYGWIN__) | 87 | #elif defined(__CYGWIN__) |
88 | # define Q_OS_CYGWIN | 88 | # define Q_OS_CYGWIN |
89 | #elif defined(MSDOS) || defined(_MSDOS) | 89 | #elif defined(MSDOS) || defined(_MSDOS) |
90 | # define Q_OS_MSDOS | 90 | # define Q_OS_MSDOS |
91 | #elif defined(__OS2__) | 91 | #elif defined(__OS2__) |
92 | # if defined(__EMX__) | 92 | # if defined(__EMX__) |
93 | # define Q_OS_OS2EMX | 93 | # define Q_OS_OS2EMX |
94 | # else | 94 | # else |
95 | # define Q_OS_OS2 | 95 | # define Q_OS_OS2 |
96 | # endif | 96 | # endif |
97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) | 97 | #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) |
98 | # define Q_OS_WIN32 | 98 | # define Q_OS_WIN32 |
99 | # define Q_OS_WIN64 | 99 | # define Q_OS_WIN64 |
100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) | 100 | #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) |
101 | # define Q_OS_WIN32 | 101 | # define Q_OS_WIN32 |
102 | #elif defined(__MWERKS__) && defined(__INTEL__) | 102 | #elif defined(__MWERKS__) && defined(__INTEL__) |
103 | # define Q_OS_WIN32 | 103 | # define Q_OS_WIN32 |
104 | #elif defined(__sun) || defined(sun) | 104 | #elif defined(__sun) || defined(sun) |
105 | # define Q_OS_SOLARIS | 105 | # define Q_OS_SOLARIS |
106 | #elif defined(hpux) || defined(__hpux) | 106 | #elif defined(hpux) || defined(__hpux) |
107 | # define Q_OS_HPUX | 107 | # define Q_OS_HPUX |
108 | #elif defined(__ultrix) || defined(ultrix) | 108 | #elif defined(__ultrix) || defined(ultrix) |
109 | # define Q_OS_ULTRIX | 109 | # define Q_OS_ULTRIX |
110 | #elif defined(sinix) | 110 | #elif defined(sinix) |
111 | # define Q_OS_RELIANT | 111 | # define Q_OS_RELIANT |
112 | #elif defined(__linux__) || defined(__linux) | 112 | #elif defined(__linux__) || defined(__linux) |
113 | # define Q_OS_LINUX | 113 | # define Q_OS_LINUX |
114 | #elif defined(__FreeBSD__) | 114 | #elif defined(__FreeBSD__) |
115 | # define Q_OS_FREEBSD | 115 | # define Q_OS_FREEBSD |
116 | # define Q_OS_BSD4 | 116 | # define Q_OS_BSD4 |
117 | #elif defined(__NetBSD__) | 117 | #elif defined(__NetBSD__) |
118 | # define Q_OS_NETBSD | 118 | # define Q_OS_NETBSD |
119 | # define Q_OS_BSD4 | 119 | # define Q_OS_BSD4 |
120 | #elif defined(__OpenBSD__) | 120 | #elif defined(__OpenBSD__) |
121 | # define Q_OS_OPENBSD | 121 | # define Q_OS_OPENBSD |
122 | # define Q_OS_BSD4 | 122 | # define Q_OS_BSD4 |
123 | #elif defined(__bsdi__) | 123 | #elif defined(__bsdi__) |
124 | # define Q_OS_BSDI | 124 | # define Q_OS_BSDI |
125 | # define Q_OS_BSD4 | 125 | # define Q_OS_BSD4 |
126 | #elif defined(__sgi) | 126 | #elif defined(__sgi) |
127 | # define Q_OS_IRIX | 127 | # define Q_OS_IRIX |
128 | #elif defined(__osf__) | 128 | #elif defined(__osf__) |
129 | # define Q_OS_OSF | 129 | # define Q_OS_OSF |
130 | #elif defined(_AIX) | 130 | #elif defined(_AIX) |
131 | # define Q_OS_AIX | 131 | # define Q_OS_AIX |
132 | #elif defined(__Lynx__) | 132 | #elif defined(__Lynx__) |
133 | # define Q_OS_LYNX | 133 | # define Q_OS_LYNX |
134 | #elif defined(__GNU_HURD__) | 134 | #elif defined(__GNU_HURD__) |
135 | # define Q_OS_HURD | 135 | # define Q_OS_HURD |
136 | #elif defined(__DGUX__) | 136 | #elif defined(__DGUX__) |
137 | # define Q_OS_DGUX | 137 | # define Q_OS_DGUX |
138 | #elif defined(__QNXNTO__) | 138 | #elif defined(__QNXNTO__) |
139 | # define Q_OS_QNX6 | 139 | # define Q_OS_QNX6 |
140 | #elif defined(__QNX__) | 140 | #elif defined(__QNX__) |
141 | # define Q_OS_QNX | 141 | # define Q_OS_QNX |
142 | #elif defined(_SEQUENT_) | 142 | #elif defined(_SEQUENT_) |
143 | # define Q_OS_DYNIX | 143 | # define Q_OS_DYNIX |
144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ | 144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ |
145 | # define Q_OS_SCO | 145 | # define Q_OS_SCO |
146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ | 146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ |
147 | # define Q_OS_UNIXWARE | 147 | # define Q_OS_UNIXWARE |
148 | # define Q_OS_UNIXWARE7 | 148 | # define Q_OS_UNIXWARE7 |
149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ | 149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ |
150 | # define Q_OS_UNIXWARE | 150 | # define Q_OS_UNIXWARE |
151 | # define Q_OS_UNIXWARE7 | 151 | # define Q_OS_UNIXWARE7 |
152 | #else | 152 | #else |
153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" | 153 | # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) | 156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) |
157 | # define Q_OS_MAC | 157 | /* This hack forces the generater to compile qmake not for maxosx native. It is |
158 | * compiled for Linux and generates usual makefiles.. | ||
159 | * Does anyone has a better solution for this ? (eilers) | ||
160 | */ | ||
161 | // # define Q_OS_MAC | ||
162 | #define Q_OS_LINUX | ||
163 | #warning "boeser Hack !! (se)" | ||
164 | #undef Q_OS_MACX | ||
158 | #endif | 165 | #endif |
159 | 166 | ||
160 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 167 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) |
161 | # undef Q_OS_UNIX | 168 | # undef Q_OS_UNIX |
162 | #elif !defined(Q_OS_UNIX) | 169 | #elif !defined(Q_OS_UNIX) |
163 | # define Q_OS_UNIX | 170 | # define Q_OS_UNIX |
164 | #endif | 171 | #endif |
165 | 172 | ||
166 | 173 | ||
167 | /* | 174 | /* |
168 | The compiler, must be one of: (Q_CC_x) | 175 | The compiler, must be one of: (Q_CC_x) |
169 | 176 | ||
170 | SYM- Symantec C++ for both PC and Macintosh | 177 | SYM- Symantec C++ for both PC and Macintosh |
171 | MPW- MPW C++ | 178 | MPW- MPW C++ |
172 | MWERKS- Metrowerks CodeWarrior | 179 | MWERKS- Metrowerks CodeWarrior |
173 | MSVC- Microsoft Visual C/C++ | 180 | MSVC- Microsoft Visual C/C++ |
174 | BOR- Borland/Turbo C++ | 181 | BOR- Borland/Turbo C++ |
175 | WAT- Watcom C++ | 182 | WAT- Watcom C++ |
176 | GNU- GNU C++ | 183 | GNU- GNU C++ |
177 | COMEAU- Comeau C++ | 184 | COMEAU- Comeau C++ |
178 | EDG- Edison Design Group C++ | 185 | EDG- Edison Design Group C++ |
179 | OC - CenterLine C++ | 186 | OC - CenterLine C++ |
180 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ | 187 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ |
181 | MIPS- MIPSpro C++ | 188 | MIPS- MIPSpro C++ |
182 | DEC- DEC C++ | 189 | DEC- DEC C++ |
183 | HP - HPUX C++ | 190 | HP - HPUX C++ |
184 | HPACC- HPUX ANSI C++ | 191 | HPACC- HPUX ANSI C++ |
185 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ | 192 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ |
186 | CDS- Reliant C++ | 193 | CDS- Reliant C++ |
187 | KAI- KAI C++ | 194 | KAI- KAI C++ |
188 | INTEL- Intel C++ | 195 | INTEL- Intel C++ |
189 | HIGHC- MetaWare High C/C++ | 196 | HIGHC- MetaWare High C/C++ |
190 | PGI- Portland Group C++ | 197 | PGI- Portland Group C++ |
191 | GHS- Green Hills Optimizing C++ Compilers | 198 | GHS- Green Hills Optimizing C++ Compilers |
192 | 199 | ||
193 | Should be sorted most to least authoritative. | 200 | Should be sorted most to least authoritative. |
194 | */ | 201 | */ |
195 | 202 | ||
196 | /* Symantec C++ is now Digital Mars */ | 203 | /* Symantec C++ is now Digital Mars */ |
197 | #if defined(__DMC__) || defined(__SC__) | 204 | #if defined(__DMC__) || defined(__SC__) |
198 | # define Q_CC_SYM | 205 | # define Q_CC_SYM |
199 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ | 206 | /* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ |
200 | # if defined(__SC__) && __SC__ < 0x750 | 207 | # if defined(__SC__) && __SC__ < 0x750 |
201 | # define Q_NO_EXPLICIT_KEYWORD | 208 | # define Q_NO_EXPLICIT_KEYWORD |
202 | # endif | 209 | # endif |
203 | # define Q_NO_USING_KEYWORD | 210 | # define Q_NO_USING_KEYWORD |
204 | # if !defined(_CPPUNWIND) | 211 | # if !defined(_CPPUNWIND) |
205 | # define Q_NO_EXCEPTIONS | 212 | # define Q_NO_EXCEPTIONS |
206 | # endif | 213 | # endif |
207 | 214 | ||
208 | #elif defined(applec) | 215 | #elif defined(applec) |
209 | # define Q_CC_MPW | 216 | # define Q_CC_MPW |
210 | # define Q_NO_BOOL_TYPE | 217 | # define Q_NO_BOOL_TYPE |
211 | # define Q_NO_EXPLICIT_KEYWORD | 218 | # define Q_NO_EXPLICIT_KEYWORD |
212 | # define Q_NO_USING_KEYWORD | 219 | # define Q_NO_USING_KEYWORD |
213 | 220 | ||
214 | #elif defined(__MWERKS__) | 221 | #elif defined(__MWERKS__) |
215 | # define Q_CC_MWERKS | 222 | # define Q_CC_MWERKS |
216 | /* "explicit" recognized since 4.0d1 */ | 223 | /* "explicit" recognized since 4.0d1 */ |
217 | # define QMAC_PASCAL pascal | 224 | # define QMAC_PASCAL pascal |
218 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 225 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
219 | 226 | ||
220 | #elif defined(_MSC_VER) | 227 | #elif defined(_MSC_VER) |
221 | # define Q_CC_MSVC | 228 | # define Q_CC_MSVC |
222 | /* proper support of bool for _MSC_VER >= 1100 */ | 229 | /* proper support of bool for _MSC_VER >= 1100 */ |
223 | # define Q_CANNOT_DELETE_CONSTANT | 230 | # define Q_CANNOT_DELETE_CONSTANT |
224 | # define Q_INLINE_TEMPLATES inline | 231 | # define Q_INLINE_TEMPLATES inline |
225 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ | 232 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ |
226 | # if _MSC_VER >= 1300 | 233 | # if _MSC_VER >= 1300 |
227 | # define Q_CC_MSVC_NET | 234 | # define Q_CC_MSVC_NET |
228 | # if _MSC_VER < 1310 | 235 | # if _MSC_VER < 1310 |
229 | # define Q_TYPENAME | 236 | # define Q_TYPENAME |
230 | # endif | 237 | # endif |
231 | # endif | 238 | # endif |
232 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 239 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
233 | 240 | ||
234 | #elif defined(__BORLANDC__) || defined(__TURBOC__) | 241 | #elif defined(__BORLANDC__) || defined(__TURBOC__) |
235 | # define Q_CC_BOR | 242 | # define Q_CC_BOR |
236 | # if __BORLANDC__ < 0x502 | 243 | # if __BORLANDC__ < 0x502 |
237 | # define Q_NO_BOOL_TYPE | 244 | # define Q_NO_BOOL_TYPE |
238 | # define Q_NO_EXPLICIT_KEYWORD | 245 | # define Q_NO_EXPLICIT_KEYWORD |
239 | # endif | 246 | # endif |
240 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 247 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
241 | 248 | ||
242 | #elif defined(__WATCOMC__) | 249 | #elif defined(__WATCOMC__) |
243 | # define Q_CC_WAT | 250 | # define Q_CC_WAT |
244 | # if defined(Q_OS_QNX4) | 251 | # if defined(Q_OS_QNX4) |
245 | /* compiler flags */ | 252 | /* compiler flags */ |
246 | # define Q_TYPENAME | 253 | # define Q_TYPENAME |
247 | # define Q_NO_BOOL_TYPE | 254 | # define Q_NO_BOOL_TYPE |
248 | # define Q_CANNOT_DELETE_CONSTANT | 255 | # define Q_CANNOT_DELETE_CONSTANT |
249 | # define mutable | 256 | # define mutable |
250 | /* ??? */ | 257 | /* ??? */ |
251 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 258 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
252 | /* no template classes in QVariant */ | 259 | /* no template classes in QVariant */ |
253 | # define QT_NO_TEMPLATE_VARIANT | 260 | # define QT_NO_TEMPLATE_VARIANT |
254 | /* Wcc does not fill in functions needed by valuelists, maps, and | 261 | /* Wcc does not fill in functions needed by valuelists, maps, and |
255 | valuestacks implicitly */ | 262 | valuestacks implicitly */ |
256 | # define Q_FULL_TEMPLATE_INSTANTIATION | 263 | # define Q_FULL_TEMPLATE_INSTANTIATION |
257 | /* can we just compare the structures? */ | 264 | /* can we just compare the structures? */ |
258 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP | 265 | # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP |
259 | /* these are not useful to our customers */ | 266 | /* these are not useful to our customers */ |
260 | # define QT_QWS_NO_SHM | 267 | # define QT_QWS_NO_SHM |
261 | # define QT_NO_QWS_MULTIPROCESS | 268 | # define QT_NO_QWS_MULTIPROCESS |
262 | # define QT_NO_SQL | 269 | # define QT_NO_SQL |
263 | # define QT_NO_QWS_CURSOR | 270 | # define QT_NO_QWS_CURSOR |
264 | # endif | 271 | # endif |
265 | 272 | ||
266 | #elif defined(__GNUC__) | 273 | #elif defined(__GNUC__) |
267 | # define Q_CC_GNU | 274 | # define Q_CC_GNU |
268 | # define Q_C_CALLBACKS | 275 | # define Q_C_CALLBACKS |
269 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 | 276 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 |
270 | # define Q_FULL_TEMPLATE_INSTANTIATION | 277 | # define Q_FULL_TEMPLATE_INSTANTIATION |
271 | # endif | 278 | # endif |
272 | /* GCC 2.95 knows "using" but does not support it correctly */ | 279 | /* GCC 2.95 knows "using" but does not support it correctly */ |
273 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 | 280 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 |
274 | # define Q_NO_USING_KEYWORD | 281 | # define Q_NO_USING_KEYWORD |
275 | # endif | 282 | # endif |
276 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ | 283 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ |
277 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 | 284 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 |
278 | # define Q_WRONG_SB_CTYPE_MACROS | 285 | # define Q_WRONG_SB_CTYPE_MACROS |
279 | # endif | 286 | # endif |
280 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 287 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
281 | # define Q_PACKED __attribute__ ((packed)) | 288 | # define Q_PACKED __attribute__ ((packed)) |
282 | # endif | 289 | # endif |
283 | # if !defined(__EXCEPTIONS) | 290 | # if !defined(__EXCEPTIONS) |
284 | # define Q_NO_EXCEPTIONS | 291 | # define Q_NO_EXCEPTIONS |
285 | # endif | 292 | # endif |
diff --git a/qt/qt-2.3.7.patch/qte237-all-macosx.patch b/qt/qt-2.3.7.patch/qte237-all-macosx.patch new file mode 100644 index 0000000..82ed530 --- a/dev/null +++ b/qt/qt-2.3.7.patch/qte237-all-macosx.patch | |||
@@ -0,0 +1,1161 @@ | |||
1 | diff -ru qte-2.3.7_orig/include/qapplication.h qte-2.3.7/include/qapplication.h | ||
2 | --- qte-2.3.7_orig/include/qapplication.hThu Jul 17 03:20:25 2003 | ||
3 | +++ qte-2.3.7/include/qapplication.hMon Oct 27 14:21:28 2003 | ||
4 | @@ -61,6 +61,10 @@ | ||
5 | class QSemaphore; | ||
6 | #endif | ||
7 | |||
8 | +#if !defined( QT_WEAK_SYMBOL ) | ||
9 | +#define QT_WEAK_SYMBOL | ||
10 | +#endif | ||
11 | + | ||
12 | // REMOVE IN 3.0 (just here for moc source compatibility) | ||
13 | #define QNonBaseApplication QApplication | ||
14 | |||
15 | @@ -85,7 +89,10 @@ | ||
16 | |||
17 | #ifndef QT_NO_STYLE | ||
18 | static QStyle &style(); | ||
19 | - static void setStyle( QStyle* ); | ||
20 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; | ||
21 | +private: | ||
22 | +static void setStyle_NonWeak( QStyle* ); | ||
23 | +public: | ||
24 | #endif | ||
25 | #if 1/* OBSOLETE */ | ||
26 | enum ColorMode { NormalColors, CustomColors }; | ||
27 | @@ -106,11 +113,19 @@ | ||
28 | #ifndef QT_NO_PALETTE | ||
29 | static QPalette palette( const QWidget* = 0 ); | ||
30 | static void setPalette( const QPalette &, bool informWidgets=FALSE, | ||
31 | + const char* className = 0 ) QT_WEAK_SYMBOL; | ||
32 | +private: | ||
33 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, | ||
34 | const char* className = 0 ); | ||
35 | +public: | ||
36 | #endif | ||
37 | static QFont font( const QWidget* = 0 ); | ||
38 | static void setFont( const QFont &, bool informWidgets=FALSE, | ||
39 | + const char* className = 0 ) QT_WEAK_SYMBOL; | ||
40 | +private: | ||
41 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, | ||
42 | const char* className = 0 ); | ||
43 | +public: | ||
44 | static QFontMetrics fontMetrics(); | ||
45 | |||
46 | QWidget *mainWidget() const; | ||
47 | @@ -207,7 +222,10 @@ | ||
48 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); | ||
49 | #ifndef QT_NO_QWS_MANAGER | ||
50 | static QWSDecoration &qwsDecoration(); | ||
51 | - static void qwsSetDecoration( QWSDecoration *); | ||
52 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; | ||
53 | +private: | ||
54 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); | ||
55 | +public: | ||
56 | #endif | ||
57 | #endif | ||
58 | |||
59 | Only in qte-2.3.7/include: qconfig-qpe.h | ||
60 | diff -ru qte-2.3.7_orig/include/qconfig.h qte-2.3.7/include/qconfig.h | ||
61 | --- qte-2.3.7_orig/include/qconfig.hFri Jan 26 14:43:06 2001 | ||
62 | +++ qte-2.3.7/include/qconfig.hWed Oct 29 22:13:16 2003 | ||
63 | @@ -1,3 +1,26 @@ | ||
64 | +// Copied from qconfig-qpe.h | ||
65 | +/********************************************************************** | ||
66 | +** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
67 | +** | ||
68 | +** This file is part of Qtopia Environment. | ||
69 | +** | ||
70 | +** This file may be distributed and/or modified under the terms of the | ||
71 | +** GNU General Public License version 2 as published by the Free Software | ||
72 | +** Foundation and appearing in the file LICENSE.GPL included in the | ||
73 | +** packaging of this file. | ||
74 | +** | ||
75 | +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
76 | +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
77 | +** | ||
78 | +** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
79 | +** | ||
80 | +** Contact info@trolltech.com if any conditions of this licensing are | ||
81 | +** not clear to you. | ||
82 | +** | ||
83 | +**********************************************************************/ | ||
84 | +#ifndef QT_H | ||
85 | +#endif // QT_H | ||
86 | + | ||
87 | // Empty leaves all features enabled. See doc/html/features.html for choices. | ||
88 | |||
89 | // Note that disabling some features will produce a libqt that is not | ||
90 | @@ -8,3 +31,69 @@ | ||
91 | #ifndef QT_DLL | ||
92 | #define QT_DLL // Internal | ||
93 | #endif | ||
94 | + | ||
95 | +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) | ||
96 | +# define QT_NO_QWS_CURSOR | ||
97 | +# define QT_NO_QWS_MOUSE_AUTO | ||
98 | +#endif | ||
99 | +#ifndef QT_NO_CODECS | ||
100 | +#define QT_NO_CODECS | ||
101 | +#endif | ||
102 | +#define QT_NO_UNICODETABLES | ||
103 | +//#define QT_NO_IMAGEIO_BMP | ||
104 | +#define QT_NO_IMAGEIO_PPM | ||
105 | +//#define QT_NO_ASYNC_IO | ||
106 | +//#define QT_NO_ASYNC_IMAGE_IO | ||
107 | +#define QT_NO_FREETYPE | ||
108 | +#define QT_NO_BDF | ||
109 | +//#define QT_NO_FONTDATABASE | ||
110 | +#define QT_NO_DRAGANDDROP | ||
111 | +//#define QT_NO_CLIPBOARD | ||
112 | +#define QT_NO_PROPERTIES | ||
113 | +#define QT_NO_NETWORKPROTOCOL | ||
114 | + | ||
115 | +#define QT_NO_IMAGE_TEXT | ||
116 | + | ||
117 | +//#define QT_NO_TOOLTIP | ||
118 | +#define QT_NO_COLORNAMES | ||
119 | +#define QT_NO_TRANSFORMATIONS | ||
120 | +#define QT_NO_TRANSLATION_BUILDER | ||
121 | +#define QT_NO_COMPLEXTEXT | ||
122 | +#define QT_NO_PRINTER | ||
123 | +#define QT_NO_PICTURE | ||
124 | +//#define QT_NO_ICONVIEW | ||
125 | +#define QT_NO_DIAL | ||
126 | +#define QT_NO_SIZEGRIP | ||
127 | +#define QT_NO_WORKSPACE | ||
128 | +//#define QT_NO_TABLE | ||
129 | +//#define QT_NO_ACTION | ||
130 | +//#define QT_NO_SETTINGS | ||
131 | +#define QT_NO_STYLE_POCKETPC | ||
132 | +#ifndef QT_NO_STYLE_AQUA | ||
133 | +# define QT_NO_STYLE_AQUA | ||
134 | +#endif | ||
135 | +#define QT_NO_STYLE_MOTIF | ||
136 | +#define QT_NO_STYLE_PLATINUM | ||
137 | +#define QT_NO_FILEDIALOG | ||
138 | +#define QT_NO_FONTDIALOG | ||
139 | +#define QT_NO_PRINTDIALOG | ||
140 | +#define QT_NO_COLORDIALOG | ||
141 | +#define QT_NO_INPUTDIALOG | ||
142 | +//#define QT_NO_MESSAGEBOX | ||
143 | +#define QT_NO_PROGRESSDIALOG | ||
144 | +//#define QT_NO_TABDIALOG | ||
145 | +#define QT_NO_WIZARD | ||
146 | +#define QT_NO_EFFECTS | ||
147 | +//#define QT_NO_COMPONENT | ||
148 | +#define QT_NO_DOM | ||
149 | +#define QT_NO_SEMIMODAL | ||
150 | +//#define QT_NO_PROGRESSBAR | ||
151 | +#define QT_NO_SPLITTER | ||
152 | + | ||
153 | +//#define QT_NO_QWS_SAVEFONTS | ||
154 | +//#define QT_NO_QWS_PROPERTIES | ||
155 | + | ||
156 | +#define QT_NO_QWS_BEOS_WM_STYLE | ||
157 | +#define QT_NO_QWS_KDE2_WM_STYLE | ||
158 | +#define QT_NO_QWS_KDE_WM_STYLE | ||
159 | +#define QT_NO_QWS_WINDOWS_WM_STYLE | ||
160 | diff -ru qte-2.3.7_orig/include/qfontdatabase.h qte-2.3.7/include/qfontdatabase.h | ||
161 | --- qte-2.3.7_orig/include/qfontdatabase.hThu Jul 17 03:20:25 2003 | ||
162 | +++ qte-2.3.7/include/qfontdatabase.hMon Oct 27 14:21:28 2003 | ||
163 | @@ -59,6 +59,10 @@ | ||
164 | class QDiskFont; | ||
165 | #endif | ||
166 | |||
167 | +#if !defined( QT_WEAK_SYMBOL ) | ||
168 | +#define QT_WEAK_SYMBOL | ||
169 | +#endif | ||
170 | + | ||
171 | class QFontDatabasePrivate; | ||
172 | |||
173 | class Q_EXPORT QFontDatabase | ||
174 | @@ -67,9 +71,16 @@ | ||
175 | QFontDatabase(); | ||
176 | |||
177 | QStringList families( bool onlyForLocale = TRUE ) const; | ||
178 | + | ||
179 | + | ||
180 | QValueList<int> pointSizes( const QString &family, | ||
181 | const QString &style = QString::null, | ||
182 | - const QString &charSet = QString::null ); | ||
183 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; | ||
184 | +private: | ||
185 | + QValueList<int> pointSizes_NonWeak( const QString &family, | ||
186 | + const QString &style, | ||
187 | + const QString &charSet ); | ||
188 | +public: | ||
189 | QStringList styles( const QString &family, | ||
190 | const QString &charSet = QString::null ) const; | ||
191 | QStringList charSets( const QString &familyName, | ||
192 | Only in qte-2.3.7_orig/include: qgifimageformat_p.h | ||
193 | diff -ru qte-2.3.7_orig/include/qmodules.h qte-2.3.7/include/qmodules.h | ||
194 | --- qte-2.3.7_orig/include/qmodules.hFri Aug 31 17:00:56 2001 | ||
195 | +++ qte-2.3.7/include/qmodules.hWed Oct 29 21:57:53 2003 | ||
196 | @@ -1,14 +1,12 @@ | ||
197 | -#ifndef QT_H | ||
198 | -#endif // QT_H | ||
199 | - | ||
200 | +// These modules are licensed to you | ||
201 | #define QT_MODULE_TOOLS | ||
202 | #define QT_MODULE_KERNEL | ||
203 | #define QT_MODULE_WIDGETS | ||
204 | #define QT_MODULE_DIALOGS | ||
205 | - | ||
206 | #define QT_MODULE_ICONVIEW | ||
207 | #define QT_MODULE_WORKSPACE | ||
208 | -#define QT_MODULE_TABLE | ||
209 | +#define QT_MODULE_NETWORK | ||
210 | #define QT_MODULE_CANVAS | ||
211 | +#define QT_MODULE_TABLE | ||
212 | #define QT_MODULE_XML | ||
213 | -#define QT_MODULE_NETWORK | ||
214 | +#define QT_MODULE_OPENGL | ||
215 | Only in qte-2.3.7_orig/include: qxt.h | ||
216 | Only in qte-2.3.7/lib: libqte.dylib | ||
217 | Only in qte-2.3.7/lib: libqte.dylib.2 | ||
218 | Only in qte-2.3.7/lib: libqte.dylib.2.3 | ||
219 | Only in qte-2.3.7/lib: libqte.dylib.2.3.7 | ||
220 | Only in qte-2.3.7/src/3rdparty/kernel: qgifimageformat.o | ||
221 | Only in qte-2.3.7/src/3rdparty/kernel: qpointarray.o | ||
222 | Only in qte-2.3.7/src/3rdparty/kernel: qpolygonscanner.o | ||
223 | Only in qte-2.3.7/src/3rdparty/kernel: qregion_qws.o | ||
224 | Only in qte-2.3.7/src/3rdparty/libpng: png.o | ||
225 | Only in qte-2.3.7/src/3rdparty/libpng: pngerror.o | ||
226 | Only in qte-2.3.7/src/3rdparty/libpng: pngget.o | ||
227 | Only in qte-2.3.7/src/3rdparty/libpng: pngmem.o | ||
228 | Only in qte-2.3.7/src/3rdparty/libpng: pngpread.o | ||
229 | Only in qte-2.3.7/src/3rdparty/libpng: pngread.o | ||
230 | Only in qte-2.3.7/src/3rdparty/libpng: pngrio.o | ||
231 | Only in qte-2.3.7/src/3rdparty/libpng: pngrtran.o | ||
232 | Only in qte-2.3.7/src/3rdparty/libpng: pngrutil.o | ||
233 | Only in qte-2.3.7/src/3rdparty/libpng: pngset.o | ||
234 | Only in qte-2.3.7/src/3rdparty/libpng: pngtrans.o | ||
235 | Only in qte-2.3.7/src/3rdparty/libpng: pngwio.o | ||
236 | Only in qte-2.3.7/src/3rdparty/libpng: pngwrite.o | ||
237 | Only in qte-2.3.7/src/3rdparty/libpng: pngwtran.o | ||
238 | Only in qte-2.3.7/src/3rdparty/libpng: pngwutil.o | ||
239 | Only in qte-2.3.7/src/3rdparty/tools: qbig5codec.o | ||
240 | Only in qte-2.3.7/src/3rdparty/tools: qeucjpcodec.o | ||
241 | Only in qte-2.3.7/src/3rdparty/tools: qeuckrcodec.o | ||
242 | Only in qte-2.3.7/src/3rdparty/tools: qgbkcodec.o | ||
243 | Only in qte-2.3.7/src/3rdparty/tools: qjiscodec.o | ||
244 | Only in qte-2.3.7/src/3rdparty/tools: qjpunicode.o | ||
245 | Only in qte-2.3.7/src/3rdparty/tools: qrtlcodec.o | ||
246 | Only in qte-2.3.7/src/3rdparty/tools: qsjiscodec.o | ||
247 | Only in qte-2.3.7/src/3rdparty/tools: qtsciicodec.o | ||
248 | Only in qte-2.3.7/src/3rdparty/zlib: Makefile | ||
249 | Only in qte-2.3.7/src/3rdparty/zlib: adler32.o | ||
250 | Only in qte-2.3.7/src/3rdparty/zlib: compress.o | ||
251 | Only in qte-2.3.7/src/3rdparty/zlib: crc32.o | ||
252 | Only in qte-2.3.7/src/3rdparty/zlib: deflate.o | ||
253 | Only in qte-2.3.7/src/3rdparty/zlib: gzio.o | ||
254 | Only in qte-2.3.7/src/3rdparty/zlib: infblock.o | ||
255 | Only in qte-2.3.7/src/3rdparty/zlib: infcodes.o | ||
256 | Only in qte-2.3.7/src/3rdparty/zlib: inffast.o | ||
257 | Only in qte-2.3.7/src/3rdparty/zlib: inflate.o | ||
258 | Only in qte-2.3.7/src/3rdparty/zlib: inftrees.o | ||
259 | Only in qte-2.3.7/src/3rdparty/zlib: infutil.o | ||
260 | Only in qte-2.3.7/src/3rdparty/zlib: trees.o | ||
261 | Only in qte-2.3.7/src/3rdparty/zlib: uncompr.o | ||
262 | Only in qte-2.3.7/src/3rdparty/zlib: zutil.o | ||
263 | Only in qte-2.3.7/src: Makefile | ||
264 | Only in qte-2.3.7/src: allmoc.cpp | ||
265 | Only in qte-2.3.7/src: allmoc.o | ||
266 | Only in qte-2.3.7/src/canvas: qcanvas.o | ||
267 | Only in qte-2.3.7/src/dialogs: qcolordialog.moc | ||
268 | Only in qte-2.3.7/src/dialogs: qcolordialog.o | ||
269 | Only in qte-2.3.7/src/dialogs: qfiledialog.moc | ||
270 | Only in qte-2.3.7/src/dialogs: qfiledialog.o | ||
271 | Only in qte-2.3.7/src/dialogs: qfontdialog.o | ||
272 | Only in qte-2.3.7/src/dialogs: qinputdialog.o | ||
273 | Only in qte-2.3.7/src/dialogs: qmessagebox.o | ||
274 | Only in qte-2.3.7/src/dialogs: qprintdialog.o | ||
275 | Only in qte-2.3.7/src/dialogs: qprogressdialog.o | ||
276 | Only in qte-2.3.7/src/dialogs: qtabdialog.o | ||
277 | Only in qte-2.3.7/src/dialogs: qwizard.o | ||
278 | Only in qte-2.3.7/src/iconview: qiconview.o | ||
279 | Only in qte-2.3.7/src/kernel: qabstractlayout.o | ||
280 | Only in qte-2.3.7/src/kernel: qaccel.o | ||
281 | diff -ru qte-2.3.7_orig/src/kernel/qapplication.cpp qte-2.3.7/src/kernel/qapplication.cpp | ||
282 | --- qte-2.3.7_orig/src/kernel/qapplication.cppThu Jul 17 03:20:25 2003 | ||
283 | +++ qte-2.3.7/src/kernel/qapplication.cppMon Oct 27 14:21:28 2003 | ||
284 | @@ -35,6 +35,8 @@ | ||
285 | ** | ||
286 | **********************************************************************/ | ||
287 | |||
288 | +#define QT_WEAK_SYMBOL__attribute__(( weak )) | ||
289 | + | ||
290 | #include "qobjectlist.h" | ||
291 | #include "qobjectdict.h" | ||
292 | #include "qapplication.h" | ||
293 | @@ -933,11 +935,16 @@ | ||
294 | #ifndef QT_NO_STYLE | ||
295 | void QApplication::setStyle( QStyle *style ) | ||
296 | { | ||
297 | +setStyle_NonWeak ( style ); | ||
298 | +} | ||
299 | + | ||
300 | +void QApplication::setStyle_NonWeak( QStyle *style ) | ||
301 | +{ | ||
302 | QStyle* old = app_style; | ||
303 | - app_style = style; | ||
304 | |||
305 | if ( startingUp() ) { | ||
306 | delete old; | ||
307 | +app_style = style; | ||
308 | return; | ||
309 | } | ||
310 | |||
311 | @@ -958,6 +965,8 @@ | ||
312 | old->unPolish( qApp ); | ||
313 | } | ||
314 | |||
315 | + app_style = style; | ||
316 | + | ||
317 | // take care of possible palette requirements of certain gui | ||
318 | // styles. Do it before polishing the application since the style | ||
319 | // might call QApplication::setStyle() itself | ||
320 | @@ -1184,13 +1193,30 @@ | ||
321 | \sa QWidget::setPalette(), palette(), QStyle::polish() | ||
322 | */ | ||
323 | |||
324 | -void QApplication::setPalette( const QPalette &palette, bool informWidgets, | ||
325 | +void QApplication::setPalette ( const QPalette &palette, bool informWidgets, | ||
326 | + const char* className ) | ||
327 | +{ | ||
328 | +setPalette_NonWeak ( palette, informWidgets, className ); | ||
329 | +} | ||
330 | + | ||
331 | +void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets, | ||
332 | const char* className ) | ||
333 | { | ||
334 | QPalette pal = palette; | ||
335 | #ifndef QT_NO_STYLE | ||
336 | - if ( !startingUp() ) | ||
337 | + if ( !startingUp() ) { | ||
338 | qApp->style().polish( pal );// NB: non-const reference | ||
339 | +if ( className ) { | ||
340 | + // if we just polished a class specific palette (this normally | ||
341 | + // only called by qt_fix_tooltips - see below), we better re- | ||
342 | + // polish the global palette. Some styles like liquid can get | ||
343 | + // confused, because they can not detect if the polished palette | ||
344 | + // is the global one or only a class specific one. | ||
345 | + // (liquid uses this palette to calculate blending pixmaps) | ||
346 | + QPalette p = qApp-> palette ( ); | ||
347 | + qApp->style().polish ( p ); | ||
348 | +} | ||
349 | + } | ||
350 | #endif | ||
351 | bool all = FALSE; | ||
352 | if ( !className ) { | ||
353 | @@ -1273,6 +1299,12 @@ | ||
354 | */ | ||
355 | |||
356 | void QApplication::setFont( const QFont &font, bool informWidgets, | ||
357 | + const char* className ) | ||
358 | +{ | ||
359 | +setFont_NonWeak ( font, informWidgets, className ); | ||
360 | +} | ||
361 | + | ||
362 | +void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, | ||
363 | const char* className ) | ||
364 | { | ||
365 | bool all = FALSE; | ||
366 | diff -ru qte-2.3.7_orig/src/kernel/qapplication.h qte-2.3.7/src/kernel/qapplication.h | ||
367 | --- qte-2.3.7_orig/src/kernel/qapplication.hThu Jul 17 03:20:25 2003 | ||
368 | +++ qte-2.3.7/src/kernel/qapplication.hMon Oct 27 14:21:28 2003 | ||
369 | @@ -61,6 +61,10 @@ | ||
370 | class QSemaphore; | ||
371 | #endif | ||
372 | |||
373 | +#if !defined( QT_WEAK_SYMBOL ) | ||
374 | +#define QT_WEAK_SYMBOL | ||
375 | +#endif | ||
376 | + | ||
377 | // REMOVE IN 3.0 (just here for moc source compatibility) | ||
378 | #define QNonBaseApplication QApplication | ||
379 | |||
380 | @@ -85,7 +89,10 @@ | ||
381 | |||
382 | #ifndef QT_NO_STYLE | ||
383 | static QStyle &style(); | ||
384 | - static void setStyle( QStyle* ); | ||
385 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; | ||
386 | +private: | ||
387 | +static void setStyle_NonWeak( QStyle* ); | ||
388 | +public: | ||
389 | #endif | ||
390 | #if 1/* OBSOLETE */ | ||
391 | enum ColorMode { NormalColors, CustomColors }; | ||
392 | @@ -106,11 +113,19 @@ | ||
393 | #ifndef QT_NO_PALETTE | ||
394 | static QPalette palette( const QWidget* = 0 ); | ||
395 | static void setPalette( const QPalette &, bool informWidgets=FALSE, | ||
396 | + const char* className = 0 ) QT_WEAK_SYMBOL; | ||
397 | +private: | ||
398 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, | ||
399 | const char* className = 0 ); | ||
400 | +public: | ||
401 | #endif | ||
402 | static QFont font( const QWidget* = 0 ); | ||
403 | static void setFont( const QFont &, bool informWidgets=FALSE, | ||
404 | + const char* className = 0 ) QT_WEAK_SYMBOL; | ||
405 | +private: | ||
406 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, | ||
407 | const char* className = 0 ); | ||
408 | +public: | ||
409 | static QFontMetrics fontMetrics(); | ||
410 | |||
411 | QWidget *mainWidget() const; | ||
412 | @@ -207,7 +222,10 @@ | ||
413 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); | ||
414 | #ifndef QT_NO_QWS_MANAGER | ||
415 | static QWSDecoration &qwsDecoration(); | ||
416 | - static void qwsSetDecoration( QWSDecoration *); | ||
417 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; | ||
418 | +private: | ||
419 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); | ||
420 | +public: | ||
421 | #endif | ||
422 | #endif | ||
423 | |||
424 | Only in qte-2.3.7/src/kernel: qapplication.o | ||
425 | diff -ru qte-2.3.7_orig/src/kernel/qapplication_qws.cpp qte-2.3.7/src/kernel/qapplication_qws.cpp | ||
426 | --- qte-2.3.7_orig/src/kernel/qapplication_qws.cppThu Jul 17 03:20:25 2003 | ||
427 | +++ qte-2.3.7/src/kernel/qapplication_qws.cppMon Oct 27 14:21:28 2003 | ||
428 | @@ -2804,6 +2804,11 @@ | ||
429 | */ | ||
430 | void QApplication::qwsSetDecoration( QWSDecoration *d ) | ||
431 | { | ||
432 | +qwsSetDecoration_NonWeak ( d ); | ||
433 | +} | ||
434 | + | ||
435 | +void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) | ||
436 | +{ | ||
437 | if ( d ) { | ||
438 | delete qws_decoration; | ||
439 | qws_decoration = d; | ||
440 | Only in qte-2.3.7/src/kernel: qapplication_qws.cpp~ | ||
441 | Only in qte-2.3.7/src/kernel: qapplication_qws.o | ||
442 | Only in qte-2.3.7/src/kernel: qasyncimageio.o | ||
443 | Only in qte-2.3.7/src/kernel: qasyncio.o | ||
444 | Only in qte-2.3.7/src/kernel: qbitmap.o | ||
445 | Only in qte-2.3.7/src/kernel: qclipboard.o | ||
446 | Only in qte-2.3.7/src/kernel: qclipboard_qws.o | ||
447 | Only in qte-2.3.7/src/kernel: qcolor.o | ||
448 | Only in qte-2.3.7/src/kernel: qcolor_p.o | ||
449 | Only in qte-2.3.7/src/kernel: qcolor_qws.o | ||
450 | Only in qte-2.3.7/src/kernel: qconnection.o | ||
451 | Only in qte-2.3.7/src/kernel: qcopchannel_qws.moc | ||
452 | Only in qte-2.3.7/src/kernel: qcopchannel_qws.o | ||
453 | Only in qte-2.3.7/src/kernel: qcursor.o | ||
454 | Only in qte-2.3.7/src/kernel: qcursor_qws.o | ||
455 | Only in qte-2.3.7/src/kernel: qdialog.o | ||
456 | Only in qte-2.3.7/src/kernel: qdirectpainter_qws.o | ||
457 | Only in qte-2.3.7/src/kernel: qdnd_qws.o | ||
458 | Only in qte-2.3.7/src/kernel: qdragobject.o | ||
459 | Only in qte-2.3.7/src/kernel: qdrawutil.o | ||
460 | Only in qte-2.3.7/src/kernel: qdropsite.o | ||
461 | Only in qte-2.3.7/src/kernel: qevent.o | ||
462 | Only in qte-2.3.7/src/kernel: qfocusdata.o | ||
463 | Only in qte-2.3.7/src/kernel: qfont.o | ||
464 | Only in qte-2.3.7/src/kernel: qfont_qws.o | ||
465 | diff -ru qte-2.3.7_orig/src/kernel/qfontdatabase.cpp qte-2.3.7/src/kernel/qfontdatabase.cpp | ||
466 | --- qte-2.3.7_orig/src/kernel/qfontdatabase.cppThu Jul 17 03:20:25 2003 | ||
467 | +++ qte-2.3.7/src/kernel/qfontdatabase.cppMon Oct 27 14:21:28 2003 | ||
468 | @@ -35,6 +35,8 @@ | ||
469 | ** | ||
470 | **********************************************************************/ | ||
471 | |||
472 | +#define QT_WEAK_SYMBOL __attribute__(( weak )) | ||
473 | + | ||
474 | #include "qfontdatabase.h" | ||
475 | |||
476 | #ifndef QT_NO_FONTDATABASE | ||
477 | @@ -2421,6 +2423,13 @@ | ||
478 | */ | ||
479 | |||
480 | QValueList<int> QFontDatabase::pointSizes( const QString &family, | ||
481 | + const QString &style, | ||
482 | + const QString &charSet ) | ||
483 | +{ | ||
484 | +return pointSizes_NonWeak ( family, style, charSet ); | ||
485 | +} | ||
486 | + | ||
487 | +QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, | ||
488 | const QString &style, | ||
489 | const QString &charSet ) | ||
490 | { | ||
491 | diff -ru qte-2.3.7_orig/src/kernel/qfontdatabase.h qte-2.3.7/src/kernel/qfontdatabase.h | ||
492 | --- qte-2.3.7_orig/src/kernel/qfontdatabase.hThu Jul 17 03:20:25 2003 | ||
493 | +++ qte-2.3.7/src/kernel/qfontdatabase.hMon Oct 27 14:21:28 2003 | ||
494 | @@ -59,6 +59,10 @@ | ||
495 | class QDiskFont; | ||
496 | #endif | ||
497 | |||
498 | +#if !defined( QT_WEAK_SYMBOL ) | ||
499 | +#define QT_WEAK_SYMBOL | ||
500 | +#endif | ||
501 | + | ||
502 | class QFontDatabasePrivate; | ||
503 | |||
504 | class Q_EXPORT QFontDatabase | ||
505 | @@ -67,9 +71,16 @@ | ||
506 | QFontDatabase(); | ||
507 | |||
508 | QStringList families( bool onlyForLocale = TRUE ) const; | ||
509 | + | ||
510 | + | ||
511 | QValueList<int> pointSizes( const QString &family, | ||
512 | const QString &style = QString::null, | ||
513 | - const QString &charSet = QString::null ); | ||
514 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; | ||
515 | +private: | ||
516 | + QValueList<int> pointSizes_NonWeak( const QString &family, | ||
517 | + const QString &style, | ||
518 | + const QString &charSet ); | ||
519 | +public: | ||
520 | QStringList styles( const QString &family, | ||
521 | const QString &charSet = QString::null ) const; | ||
522 | QStringList charSets( const QString &familyName, | ||
523 | Only in qte-2.3.7/src/kernel: qfontdatabase.o | ||
524 | Only in qte-2.3.7/src/kernel: qfontfactorybdf_qws.o | ||
525 | Only in qte-2.3.7/src/kernel: qfontfactoryttf_qws.o | ||
526 | Only in qte-2.3.7/src/kernel: qfontmanager_qws.o | ||
527 | diff -ru qte-2.3.7_orig/src/kernel/qgfx_qws.cpp qte-2.3.7/src/kernel/qgfx_qws.cpp | ||
528 | --- qte-2.3.7_orig/src/kernel/qgfx_qws.cppThu Jul 17 03:20:25 2003 | ||
529 | +++ qte-2.3.7/src/kernel/qgfx_qws.cppMon Oct 27 14:27:25 2003 | ||
530 | @@ -32,7 +32,7 @@ | ||
531 | #include "qgfx_qws.h" | ||
532 | |||
533 | #include <stdio.h> | ||
534 | -#include <dlfcn.h> | ||
535 | +//#include <dlfcn.h> | ||
536 | #include <sys/types.h> | ||
537 | #include <dirent.h> | ||
538 | #include <stdlib.h> | ||
539 | Only in qte-2.3.7/src/kernel: qgfx_qws.o | ||
540 | diff -ru qte-2.3.7_orig/src/kernel/qgfxraster_qws.cpp qte-2.3.7/src/kernel/qgfxraster_qws.cpp | ||
541 | --- qte-2.3.7_orig/src/kernel/qgfxraster_qws.cppThu Jul 17 03:20:25 2003 | ||
542 | +++ qte-2.3.7/src/kernel/qgfxraster_qws.cppMon Oct 27 14:27:25 2003 | ||
543 | @@ -75,7 +75,11 @@ | ||
544 | # if __BYTE_ORDER == __BIG_ENDIAN | ||
545 | # define QWS_BIG_ENDIAN | ||
546 | # endif | ||
547 | +#elif defined(__APPLE__) | ||
548 | +# define QWS_BIG_ENDIAN | ||
549 | #endif | ||
550 | +// AJ: the above (test for __APPLE__) is very hacky, but I can't | ||
551 | +// think of something better at the moment. | ||
552 | |||
553 | // Pull this private function in from qglobal.cpp | ||
554 | extern unsigned int qt_int_sqrt( unsigned int n ); | ||
555 | @@ -3770,6 +3774,19 @@ | ||
556 | b = srcval & 0xff; | ||
557 | |||
558 | unsigned char * tmp=(unsigned char *)&alphabuf[loopc]; | ||
559 | +# ifdef QWS_BIG_ENDIAN | ||
560 | + if(av==255) { | ||
561 | + // Do nothing - we already have source values in r,g,b | ||
562 | + } else if(av==0) { | ||
563 | + r = *(tmp+1); | ||
564 | + g = *(tmp+2); | ||
565 | + b = *(tmp+3); | ||
566 | + } else { | ||
567 | + r = ((r-*(tmp+1)) * av) / 256 + *(tmp+1); | ||
568 | + g = ((g-*(tmp+2)) * av) / 256 + *(tmp+2); | ||
569 | + b = ((b-*(tmp+3)) * av) / 256 + *(tmp+3); | ||
570 | + } | ||
571 | +# else | ||
572 | if(av==255) { | ||
573 | // Do nothing - we already have source values in r,g,b | ||
574 | } else if(av==0) { | ||
575 | @@ -3781,6 +3798,7 @@ | ||
576 | g = ((g-*(tmp+1)) * av) / 256 + *(tmp+1); | ||
577 | b = ((b-*(tmp+0)) * av) / 256 + *(tmp+0); | ||
578 | } | ||
579 | +# endif | ||
580 | *(alphaptr++) = (r << 16) | (g << 8) | b; | ||
581 | } | ||
582 | |||
583 | @@ -4204,7 +4222,7 @@ | ||
584 | |||
585 | } else if ( depth == 1 ) { | ||
586 | if (srctype==SourceImage) { | ||
587 | - static int warn; | ||
588 | + static int warn = 0; | ||
589 | if ( warn++ < 5 ) | ||
590 | qDebug( "bitmap alpha-image not implemented" ); | ||
591 | hImageLineUnclipped( x1, x2, l, srcdata, FALSE ); | ||
592 | @@ -4237,7 +4255,7 @@ | ||
593 | setAlphaType(IgnoreAlpha); | ||
594 | if ( w <= 0 || h <= 0 || !ncliprect ) return; | ||
595 | GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1)) | ||
596 | -#ifdef QWS_EXPERIMENTAL_FASTPATH | ||
597 | +#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !! | ||
598 | // ### fix for 8bpp | ||
599 | // This seems to be reliable now, at least for 16bpp | ||
600 | |||
601 | Only in qte-2.3.7/src/kernel: qgfxraster_qws.cpp~ | ||
602 | Only in qte-2.3.7/src/kernel: qgfxraster_qws.o | ||
603 | Only in qte-2.3.7/src/kernel: qguardedptr.o | ||
604 | Only in qte-2.3.7/src/kernel: qiconset.o | ||
605 | Only in qte-2.3.7/src/kernel: qimage.o | ||
606 | Only in qte-2.3.7/src/kernel: qinputcontext_qws.o | ||
607 | Only in qte-2.3.7/src/kernel: qjpegio.o | ||
608 | diff -ru qte-2.3.7_orig/src/kernel/qkeyboard_qws.cpp qte-2.3.7/src/kernel/qkeyboard_qws.cpp | ||
609 | --- qte-2.3.7_orig/src/kernel/qkeyboard_qws.cppThu Jul 17 03:20:25 2003 | ||
610 | +++ qte-2.3.7/src/kernel/qkeyboard_qws.cppMon Oct 27 14:42:11 2003 | ||
611 | @@ -69,7 +69,7 @@ | ||
612 | #if !defined(_OS_QNX6_) | ||
613 | |||
614 | #include <termios.h> | ||
615 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
616 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
617 | #include <sys/kd.h> | ||
618 | #include <sys/vt.h> | ||
619 | #endif | ||
620 | @@ -468,10 +468,12 @@ | ||
621 | void QWSPC101KeyboardHandler::restoreLeds() | ||
622 | { | ||
623 | char leds; | ||
624 | +#if !defined(_OS_MACX_) | ||
625 | ioctl(0, KDGETLED, &leds); | ||
626 | leds = leds & ~LED_CAP; | ||
627 | if ( caps ) leds |= LED_CAP; | ||
628 | ioctl(0, KDSETLED, leds); | ||
629 | +#endif | ||
630 | } | ||
631 | |||
632 | class QWSTtyKeyboardHandler : public QWSPC101KeyboardHandler | ||
633 | @@ -547,7 +549,7 @@ | ||
634 | |||
635 | static void vtSwitchHandler(int /*sig*/) | ||
636 | { | ||
637 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
638 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
639 | if (vtActive) { | ||
640 | qwsServer->enablePainting(false); | ||
641 | qt_screen->save(); | ||
642 | @@ -880,7 +882,7 @@ | ||
643 | if (term && !release) { | ||
644 | ctrl = false; | ||
645 | alt = false; | ||
646 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
647 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
648 | ioctl(kbdFD, VT_ACTIVATE, term); | ||
649 | #endif | ||
650 | return; | ||
651 | @@ -1031,7 +1033,7 @@ | ||
652 | struct termios termdata; | ||
653 | tcgetattr( kbdFD, &termdata ); | ||
654 | |||
655 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
656 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
657 | ioctl(kbdFD, KDSKBMODE, K_RAW); | ||
658 | #endif | ||
659 | |||
660 | @@ -1047,7 +1049,7 @@ | ||
661 | |||
662 | signal(VTSWITCHSIG, vtSwitchHandler); | ||
663 | |||
664 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
665 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
666 | struct vt_mode vtMode; | ||
667 | ioctl(kbdFD, VT_GETMODE, &vtMode); | ||
668 | |||
669 | @@ -1068,7 +1070,7 @@ | ||
670 | { | ||
671 | if (kbdFD >= 0) | ||
672 | { | ||
673 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
674 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
675 | ioctl(kbdFD, KDSKBMODE, K_XLATE); | ||
676 | #endif | ||
677 | tcsetattr(kbdFD, TCSANOW, &origTermData); | ||
678 | Only in qte-2.3.7/src/kernel: qkeyboard_qws.cpp.rej | ||
679 | Only in qte-2.3.7/src/kernel: qkeyboard_qws.cpp~ | ||
680 | Only in qte-2.3.7/src/kernel: qkeyboard_qws.moc | ||
681 | Only in qte-2.3.7/src/kernel: qkeyboard_qws.o | ||
682 | Only in qte-2.3.7/src/kernel: qlayout.o | ||
683 | Only in qte-2.3.7/src/kernel: qlayoutengine.o | ||
684 | Only in qte-2.3.7/src/kernel: qlocalfs.o | ||
685 | diff -ru qte-2.3.7_orig/src/kernel/qlock_qws.cpp qte-2.3.7/src/kernel/qlock_qws.cpp | ||
686 | --- qte-2.3.7_orig/src/kernel/qlock_qws.cppThu Jul 17 03:20:25 2003 | ||
687 | +++ qte-2.3.7/src/kernel/qlock_qws.cppMon Oct 27 14:27:25 2003 | ||
688 | @@ -38,7 +38,7 @@ | ||
689 | #include <errno.h> | ||
690 | |||
691 | #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) \ | ||
692 | - || defined _OS_FREEBSD_ | ||
693 | + || defined(_OS_FREEBSD_) || defined(_OS_MACX_) | ||
694 | /* union semun is defined by including <sys/sem.h> */ | ||
695 | #else | ||
696 | /* according to X/OPEN we have to define it ourselves */ | ||
697 | Only in qte-2.3.7/src/kernel: qlock_qws.o | ||
698 | Only in qte-2.3.7/src/kernel: qmemorymanager_qws.o | ||
699 | Only in qte-2.3.7/src/kernel: qmetaobject.o | ||
700 | Only in qte-2.3.7/src/kernel: qmime.o | ||
701 | Only in qte-2.3.7/src/kernel: qmngio.o | ||
702 | Only in qte-2.3.7/src/kernel: qmovie.moc | ||
703 | Only in qte-2.3.7/src/kernel: qmovie.o | ||
704 | Only in qte-2.3.7/src/kernel: qnetworkprotocol.o | ||
705 | Only in qte-2.3.7/src/kernel: qobject.o | ||
706 | Only in qte-2.3.7/src/kernel: qpaintdevice_qws.o | ||
707 | Only in qte-2.3.7/src/kernel: qpaintdevicemetrics.o | ||
708 | Only in qte-2.3.7/src/kernel: qpainter.o | ||
709 | Only in qte-2.3.7/src/kernel: qpainter_qws.o | ||
710 | Only in qte-2.3.7/src/kernel: qpalette.o | ||
711 | Only in qte-2.3.7/src/kernel: qpicture.o | ||
712 | Only in qte-2.3.7/src/kernel: qpixmap.o | ||
713 | Only in qte-2.3.7/src/kernel: qpixmap_qws.o | ||
714 | Only in qte-2.3.7/src/kernel: qpixmapcache.o | ||
715 | Only in qte-2.3.7/src/kernel: qpngio.o | ||
716 | Only in qte-2.3.7/src/kernel: qpoint.o | ||
717 | Only in qte-2.3.7/src/kernel: qprinter.o | ||
718 | Only in qte-2.3.7/src/kernel: qprinter_qws.o | ||
719 | Only in qte-2.3.7/src/kernel: qpsprinter.o | ||
720 | Only in qte-2.3.7/src/kernel: qrect.o | ||
721 | Only in qte-2.3.7/src/kernel: qregion.o | ||
722 | Only in qte-2.3.7/src/kernel: qrichtext.o | ||
723 | Only in qte-2.3.7/src/kernel: qsemimodal.o | ||
724 | Only in qte-2.3.7/src/kernel: qsharedmemory.o | ||
725 | Only in qte-2.3.7/src/kernel: qsignal.o | ||
726 | Only in qte-2.3.7/src/kernel: qsignalmapper.o | ||
727 | Only in qte-2.3.7/src/kernel: qsimplerichtext.o | ||
728 | Only in qte-2.3.7/src/kernel: qsize.o | ||
729 | Only in qte-2.3.7/src/kernel: qsizegrip.o | ||
730 | Only in qte-2.3.7/src/kernel: qsocketnotifier.o | ||
731 | Only in qte-2.3.7/src/kernel: qsound.o | ||
732 | Only in qte-2.3.7/src/kernel: qsound_qws.o | ||
733 | Only in qte-2.3.7/src/kernel: qsoundqss_qws.moc | ||
734 | Only in qte-2.3.7/src/kernel: qsoundqss_qws.o | ||
735 | Only in qte-2.3.7/src/kernel: qstyle.o | ||
736 | Only in qte-2.3.7/src/kernel: qstylesheet.o | ||
737 | Only in qte-2.3.7/src/kernel: qthread_unix.moc | ||
738 | Only in qte-2.3.7/src/kernel: qthread_unix.o | ||
739 | Only in qte-2.3.7/src/kernel: qtimer.o | ||
740 | Only in qte-2.3.7/src/kernel: qtranslator.o | ||
741 | Only in qte-2.3.7/src/kernel: qurl.o | ||
742 | Only in qte-2.3.7/src/kernel: qurlinfo.o | ||
743 | Only in qte-2.3.7/src/kernel: qurloperator.o | ||
744 | Only in qte-2.3.7/src/kernel: qvariant.o | ||
745 | Only in qte-2.3.7/src/kernel: qwidget.o | ||
746 | Only in qte-2.3.7/src/kernel: qwidget_qws.o | ||
747 | diff -ru qte-2.3.7_orig/src/kernel/qwindowsystem_qws.cpp qte-2.3.7/src/kernel/qwindowsystem_qws.cpp | ||
748 | --- qte-2.3.7_orig/src/kernel/qwindowsystem_qws.cppThu Jul 17 03:20:26 2003 | ||
749 | +++ qte-2.3.7/src/kernel/qwindowsystem_qws.cppMon Oct 27 14:27:25 2003 | ||
750 | @@ -844,6 +844,18 @@ | ||
751 | { | ||
752 | } | ||
753 | |||
754 | +static void catchSegvSignal( int ) | ||
755 | +{ | ||
756 | +#ifndef QT_NO_QWS_KEYBOARD | ||
757 | + if ( qwsServer ) | ||
758 | +qwsServer->closeKeyboard(); | ||
759 | +#endif | ||
760 | + QWSServer::closedown(); | ||
761 | + fprintf(stderr, "Segmentation fault.\n"); | ||
762 | + exit(1); | ||
763 | +} | ||
764 | + | ||
765 | + | ||
766 | /*! | ||
767 | \class QWSServer qwindowsystem_qws.h | ||
768 | \brief Server-specific functionality in Qt/Embedded | ||
769 | @@ -936,6 +948,7 @@ | ||
770 | } | ||
771 | |||
772 | signal(SIGPIPE, ignoreSignal); //we get it when we read | ||
773 | + signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash | ||
774 | #endif | ||
775 | focusw = 0; | ||
776 | mouseGrabber = 0; | ||
777 | @@ -950,7 +963,7 @@ | ||
778 | |||
779 | #ifndef QT_NO_QWS_MULTIPROCESS | ||
780 | if ( !geteuid() ) { | ||
781 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
782 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
783 | if( mount(0, "/var/shm", "shm", 0, 0) ) { | ||
784 | /* This just confuses people with 2.2 kernels | ||
785 | if ( errno != EBUSY ) | ||
786 | Only in qte-2.3.7/src/kernel: qwindowsystem_qws.cpp~ | ||
787 | Only in qte-2.3.7/src/kernel: qwindowsystem_qws.o | ||
788 | Only in qte-2.3.7/src/kernel: qwmatrix.o | ||
789 | Only in qte-2.3.7/src/kernel: qwsbeosdecoration_qws.o | ||
790 | Only in qte-2.3.7/src/kernel: qwscommand_qws.o | ||
791 | Only in qte-2.3.7/src/kernel: qwscursor_qws.o | ||
792 | Only in qte-2.3.7/src/kernel: qwsdecoration_qws.o | ||
793 | Only in qte-2.3.7/src/kernel: qwsdefaultdecoration_qws.o | ||
794 | Only in qte-2.3.7/src/kernel: qwsevent_qws.o | ||
795 | Only in qte-2.3.7/src/kernel: qwshydrodecoration_qws.o | ||
796 | Only in qte-2.3.7/src/kernel: qwskde2decoration_qws.o | ||
797 | Only in qte-2.3.7/src/kernel: qwskdedecoration_qws.o | ||
798 | Only in qte-2.3.7/src/kernel: qwsmanager_qws.o | ||
799 | diff -ru qte-2.3.7_orig/src/kernel/qwsmouse_qws.cpp qte-2.3.7/src/kernel/qwsmouse_qws.cpp | ||
800 | --- qte-2.3.7_orig/src/kernel/qwsmouse_qws.cppThu Jul 17 03:20:26 2003 | ||
801 | +++ qte-2.3.7/src/kernel/qwsmouse_qws.cppMon Oct 27 14:27:25 2003 | ||
802 | @@ -336,7 +336,7 @@ | ||
803 | tty.c_oflag = 0; | ||
804 | tty.c_lflag = 0; | ||
805 | tty.c_cflag = f | CREAD | CLOCAL | HUPCL; | ||
806 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
807 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
808 | tty.c_line = 0; | ||
809 | #endif | ||
810 | tty.c_cc[VTIME] = 0; | ||
811 | @@ -889,7 +889,7 @@ | ||
812 | tty.c_iflag = IGNBRK | IGNPAR; | ||
813 | tty.c_oflag = 0; | ||
814 | tty.c_lflag = 0; | ||
815 | -#if !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
816 | +#if !defined(_OS_MACX_) && !defined(_OS_FREEBSD_) && !defined(_OS_SOLARIS_) | ||
817 | tty.c_line = 0; | ||
818 | #endif // _OS_FREEBSD_ | ||
819 | tty.c_cc[VTIME] = 0; | ||
820 | Only in qte-2.3.7/src/kernel: qwsmouse_qws.moc | ||
821 | Only in qte-2.3.7/src/kernel: qwsmouse_qws.o | ||
822 | Only in qte-2.3.7/src/kernel: qwsproperty_qws.o | ||
823 | Only in qte-2.3.7/src/kernel: qwsregionmanager_qws.o | ||
824 | Only in qte-2.3.7/src/kernel: qwssocket_qws.o | ||
825 | Only in qte-2.3.7/src/kernel: qwswindowsdecoration_qws.o | ||
826 | Only in qte-2.3.7/src/moc: Makefile | ||
827 | Only in qte-2.3.7/src/moc: moc | ||
828 | Only in qte-2.3.7/src/moc: mocgen.o | ||
829 | Only in qte-2.3.7/src/moc: qbuffer.o | ||
830 | Only in qte-2.3.7/src/moc: qcollection.o | ||
831 | Only in qte-2.3.7/src/moc: qcstring.o | ||
832 | Only in qte-2.3.7/src/moc: qdatastream.o | ||
833 | Only in qte-2.3.7/src/moc: qdatetime.o | ||
834 | Only in qte-2.3.7/src/moc: qfile.o | ||
835 | Only in qte-2.3.7/src/moc: qfile_unix.o | ||
836 | Only in qte-2.3.7/src/moc: qgarray.o | ||
837 | Only in qte-2.3.7/src/moc: qgdict.o | ||
838 | Only in qte-2.3.7/src/moc: qglist.o | ||
839 | Only in qte-2.3.7/src/moc: qglobal.o | ||
840 | Only in qte-2.3.7/src/moc: qgvector.o | ||
841 | Only in qte-2.3.7/src/moc: qiodevice.o | ||
842 | Only in qte-2.3.7/src/moc: qregexp.o | ||
843 | Only in qte-2.3.7/src/moc: qstring.o | ||
844 | Only in qte-2.3.7/src/moc: qtextcodec.o | ||
845 | Only in qte-2.3.7/src/moc: qtextstream.o | ||
846 | Only in qte-2.3.7/src/moc: qutfcodec.o | ||
847 | Only in qte-2.3.7/src/network: qdns.o | ||
848 | Only in qte-2.3.7/src/network: qftp.o | ||
849 | Only in qte-2.3.7/src/network: qhostaddress.o | ||
850 | Only in qte-2.3.7/src/network: qnetwork.o | ||
851 | Only in qte-2.3.7/src/network: qserversocket.o | ||
852 | Only in qte-2.3.7/src/network: qsocket.o | ||
853 | Only in qte-2.3.7/src/network: qsocketdevice.o | ||
854 | Only in qte-2.3.7/src/network: qsocketdevice_unix.o | ||
855 | Only in qte-2.3.7/src/table: qtable.o | ||
856 | Only in qte-2.3.7/src/tools: qbitarray.o | ||
857 | Only in qte-2.3.7/src/tools: qbuffer.o | ||
858 | Only in qte-2.3.7/src/tools: qcollection.o | ||
859 | Only in qte-2.3.7/src/tools: qconfig-qpe.h | ||
860 | Only in qte-2.3.7/src/tools: qconfig-qpe.h~ | ||
861 | diff -ru qte-2.3.7_orig/src/tools/qconfig.h qte-2.3.7/src/tools/qconfig.h | ||
862 | --- qte-2.3.7_orig/src/tools/qconfig.hFri Jan 26 14:43:06 2001 | ||
863 | +++ qte-2.3.7/src/tools/qconfig.hWed Oct 29 22:13:16 2003 | ||
864 | @@ -1,3 +1,26 @@ | ||
865 | +// Copied from qconfig-qpe.h | ||
866 | +/********************************************************************** | ||
867 | +** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
868 | +** | ||
869 | +** This file is part of Qtopia Environment. | ||
870 | +** | ||
871 | +** This file may be distributed and/or modified under the terms of the | ||
872 | +** GNU General Public License version 2 as published by the Free Software | ||
873 | +** Foundation and appearing in the file LICENSE.GPL included in the | ||
874 | +** packaging of this file. | ||
875 | +** | ||
876 | +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
877 | +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
878 | +** | ||
879 | +** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
880 | +** | ||
881 | +** Contact info@trolltech.com if any conditions of this licensing are | ||
882 | +** not clear to you. | ||
883 | +** | ||
884 | +**********************************************************************/ | ||
885 | +#ifndef QT_H | ||
886 | +#endif // QT_H | ||
887 | + | ||
888 | // Empty leaves all features enabled. See doc/html/features.html for choices. | ||
889 | |||
890 | // Note that disabling some features will produce a libqt that is not | ||
891 | @@ -8,3 +31,69 @@ | ||
892 | #ifndef QT_DLL | ||
893 | #define QT_DLL // Internal | ||
894 | #endif | ||
895 | + | ||
896 | +#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SL5XXX) | ||
897 | +# define QT_NO_QWS_CURSOR | ||
898 | +# define QT_NO_QWS_MOUSE_AUTO | ||
899 | +#endif | ||
900 | +#ifndef QT_NO_CODECS | ||
901 | +#define QT_NO_CODECS | ||
902 | +#endif | ||
903 | +#define QT_NO_UNICODETABLES | ||
904 | +//#define QT_NO_IMAGEIO_BMP | ||
905 | +#define QT_NO_IMAGEIO_PPM | ||
906 | +//#define QT_NO_ASYNC_IO | ||
907 | +//#define QT_NO_ASYNC_IMAGE_IO | ||
908 | +#define QT_NO_FREETYPE | ||
909 | +#define QT_NO_BDF | ||
910 | +//#define QT_NO_FONTDATABASE | ||
911 | +#define QT_NO_DRAGANDDROP | ||
912 | +//#define QT_NO_CLIPBOARD | ||
913 | +#define QT_NO_PROPERTIES | ||
914 | +#define QT_NO_NETWORKPROTOCOL | ||
915 | + | ||
916 | +#define QT_NO_IMAGE_TEXT | ||
917 | + | ||
918 | +//#define QT_NO_TOOLTIP | ||
919 | +#define QT_NO_COLORNAMES | ||
920 | +#define QT_NO_TRANSFORMATIONS | ||
921 | +#define QT_NO_TRANSLATION_BUILDER | ||
922 | +#define QT_NO_COMPLEXTEXT | ||
923 | +#define QT_NO_PRINTER | ||
924 | +#define QT_NO_PICTURE | ||
925 | +//#define QT_NO_ICONVIEW | ||
926 | +#define QT_NO_DIAL | ||
927 | +#define QT_NO_SIZEGRIP | ||
928 | +#define QT_NO_WORKSPACE | ||
929 | +//#define QT_NO_TABLE | ||
930 | +//#define QT_NO_ACTION | ||
931 | +//#define QT_NO_SETTINGS | ||
932 | +#define QT_NO_STYLE_POCKETPC | ||
933 | +#ifndef QT_NO_STYLE_AQUA | ||
934 | +# define QT_NO_STYLE_AQUA | ||
935 | +#endif | ||
936 | +#define QT_NO_STYLE_MOTIF | ||
937 | +#define QT_NO_STYLE_PLATINUM | ||
938 | +#define QT_NO_FILEDIALOG | ||
939 | +#define QT_NO_FONTDIALOG | ||
940 | +#define QT_NO_PRINTDIALOG | ||
941 | +#define QT_NO_COLORDIALOG | ||
942 | +#define QT_NO_INPUTDIALOG | ||
943 | +//#define QT_NO_MESSAGEBOX | ||
944 | +#define QT_NO_PROGRESSDIALOG | ||
945 | +//#define QT_NO_TABDIALOG | ||
946 | +#define QT_NO_WIZARD | ||
947 | +#define QT_NO_EFFECTS | ||
948 | +//#define QT_NO_COMPONENT | ||
949 | +#define QT_NO_DOM | ||
950 | +#define QT_NO_SEMIMODAL | ||
951 | +//#define QT_NO_PROGRESSBAR | ||
952 | +#define QT_NO_SPLITTER | ||
953 | + | ||
954 | +//#define QT_NO_QWS_SAVEFONTS | ||
955 | +//#define QT_NO_QWS_PROPERTIES | ||
956 | + | ||
957 | +#define QT_NO_QWS_BEOS_WM_STYLE | ||
958 | +#define QT_NO_QWS_KDE2_WM_STYLE | ||
959 | +#define QT_NO_QWS_KDE_WM_STYLE | ||
960 | +#define QT_NO_QWS_WINDOWS_WM_STYLE | ||
961 | Only in qte-2.3.7/src/tools: qconfig.h~ | ||
962 | Only in qte-2.3.7/src/tools: qcstring.o | ||
963 | Only in qte-2.3.7/src/tools: qdatastream.o | ||
964 | Only in qte-2.3.7/src/tools: qdatetime.o | ||
965 | Only in qte-2.3.7/src/tools: qdir.o | ||
966 | Only in qte-2.3.7/src/tools: qdir_unix.o | ||
967 | Only in qte-2.3.7/src/tools: qfile.o | ||
968 | Only in qte-2.3.7/src/tools: qfile_unix.o | ||
969 | Only in qte-2.3.7/src/tools: qfileinfo.o | ||
970 | Only in qte-2.3.7/src/tools: qfileinfo_unix.o | ||
971 | Only in qte-2.3.7/src/tools: qgarray.o | ||
972 | Only in qte-2.3.7/src/tools: qgcache.o | ||
973 | Only in qte-2.3.7/src/tools: qgdict.o | ||
974 | Only in qte-2.3.7/src/tools: qglist.o | ||
975 | Only in qte-2.3.7/src/tools: qglobal.o | ||
976 | Only in qte-2.3.7/src/tools: qgvector.o | ||
977 | Only in qte-2.3.7/src/tools: qiodevice.o | ||
978 | Only in qte-2.3.7/src/tools: qmap.o | ||
979 | diff -ru qte-2.3.7_orig/src/tools/qmodules.h qte-2.3.7/src/tools/qmodules.h | ||
980 | --- qte-2.3.7_orig/src/tools/qmodules.hFri Aug 31 17:00:56 2001 | ||
981 | +++ qte-2.3.7/src/tools/qmodules.hWed Oct 29 21:57:53 2003 | ||
982 | @@ -1,14 +1,12 @@ | ||
983 | -#ifndef QT_H | ||
984 | -#endif // QT_H | ||
985 | - | ||
986 | +// These modules are licensed to you | ||
987 | #define QT_MODULE_TOOLS | ||
988 | #define QT_MODULE_KERNEL | ||
989 | #define QT_MODULE_WIDGETS | ||
990 | #define QT_MODULE_DIALOGS | ||
991 | - | ||
992 | #define QT_MODULE_ICONVIEW | ||
993 | #define QT_MODULE_WORKSPACE | ||
994 | -#define QT_MODULE_TABLE | ||
995 | +#define QT_MODULE_NETWORK | ||
996 | #define QT_MODULE_CANVAS | ||
997 | +#define QT_MODULE_TABLE | ||
998 | #define QT_MODULE_XML | ||
999 | -#define QT_MODULE_NETWORK | ||
1000 | +#define QT_MODULE_OPENGL | ||
1001 | Only in qte-2.3.7/src/tools: qregexp.o | ||
1002 | Only in qte-2.3.7/src/tools: qstring.o | ||
1003 | Only in qte-2.3.7/src/tools: qstringlist.o | ||
1004 | Only in qte-2.3.7/src/tools: qtextcodec.o | ||
1005 | Only in qte-2.3.7/src/tools: qtextstream.o | ||
1006 | Only in qte-2.3.7/src/tools: qutfcodec.o | ||
1007 | Only in qte-2.3.7/src/widgets: qaction.o | ||
1008 | Only in qte-2.3.7/src/widgets: qbutton.o | ||
1009 | Only in qte-2.3.7/src/widgets: qbuttongroup.o | ||
1010 | Only in qte-2.3.7/src/widgets: qcdestyle.o | ||
1011 | Only in qte-2.3.7/src/widgets: qcheckbox.o | ||
1012 | Only in qte-2.3.7/src/widgets: qcombobox.o | ||
1013 | diff -ru qte-2.3.7_orig/src/widgets/qcommonstyle.cpp qte-2.3.7/src/widgets/qcommonstyle.cpp | ||
1014 | --- qte-2.3.7_orig/src/widgets/qcommonstyle.cppThu Jul 17 03:20:26 2003 | ||
1015 | +++ qte-2.3.7/src/widgets/qcommonstyle.cppMon Oct 27 14:21:28 2003 | ||
1016 | @@ -566,7 +566,7 @@ | ||
1017 | bool enabled, bool active ) | ||
1018 | { | ||
1019 | #ifndef QT_NO_MENUBAR | ||
1020 | -#ifndef QT_NO_STYLE_SGI | ||
1021 | +#if 1 // #ifndef QT_NO_STYLE_SGI | ||
1022 | if (draw_menu_bar_impl != 0) { | ||
1023 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; | ||
1024 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); | ||
1025 | Only in qte-2.3.7/src/widgets: qcommonstyle.o | ||
1026 | Only in qte-2.3.7/src/widgets: qcompactstyle.o | ||
1027 | Only in qte-2.3.7/src/widgets: qdial.o | ||
1028 | Only in qte-2.3.7/src/widgets: qeffects.moc | ||
1029 | Only in qte-2.3.7/src/widgets: qeffects.o | ||
1030 | Only in qte-2.3.7/src/widgets: qframe.o | ||
1031 | Only in qte-2.3.7/src/widgets: qgrid.o | ||
1032 | Only in qte-2.3.7/src/widgets: qgroupbox.o | ||
1033 | Only in qte-2.3.7/src/widgets: qhbox.o | ||
1034 | Only in qte-2.3.7/src/widgets: qhbuttongroup.o | ||
1035 | Only in qte-2.3.7/src/widgets: qheader.o | ||
1036 | Only in qte-2.3.7/src/widgets: qhgroupbox.o | ||
1037 | Only in qte-2.3.7/src/widgets: qinterlacestyle.o | ||
1038 | Only in qte-2.3.7/src/widgets: qlabel.o | ||
1039 | Only in qte-2.3.7/src/widgets: qlcdnumber.o | ||
1040 | Only in qte-2.3.7/src/widgets: qlineedit.o | ||
1041 | Only in qte-2.3.7/src/widgets: qlistbox.o | ||
1042 | diff -ru qte-2.3.7_orig/src/widgets/qlistview.cpp qte-2.3.7/src/widgets/qlistview.cpp | ||
1043 | --- qte-2.3.7_orig/src/widgets/qlistview.cppThu Jul 17 03:20:26 2003 | ||
1044 | +++ qte-2.3.7/src/widgets/qlistview.cppMon Oct 27 14:21:28 2003 | ||
1045 | @@ -4968,9 +4968,9 @@ | ||
1046 | l = l->childItem ? l->childItem : l->siblingItem; | ||
1047 | |||
1048 | if ( l && l->height() ) | ||
1049 | -s.setHeight( s.height() + 10 * l->height() ); | ||
1050 | - else | ||
1051 | -s.setHeight( s.height() + 140 ); | ||
1052 | +s.setHeight( s.height() + 4 /*10*/ * l->height() ); | ||
1053 | + else // ^v much too big for handhelds | ||
1054 | +s.setHeight( s.height() + 30 /*140*/ ); | ||
1055 | |||
1056 | if ( s.width() > s.height() * 3 ) | ||
1057 | s.setHeight( s.width() / 3 ); | ||
1058 | Only in qte-2.3.7/src/widgets: qlistview.o | ||
1059 | Only in qte-2.3.7/src/widgets: qmainwindow.moc | ||
1060 | Only in qte-2.3.7/src/widgets: qmainwindow.o | ||
1061 | Only in qte-2.3.7/src/widgets: qmenubar.o | ||
1062 | Only in qte-2.3.7/src/widgets: qmenudata.o | ||
1063 | Only in qte-2.3.7/src/widgets: qmotifplusstyle.o | ||
1064 | Only in qte-2.3.7/src/widgets: qmotifstyle.o | ||
1065 | Only in qte-2.3.7/src/widgets: qmultilineedit.o | ||
1066 | Only in qte-2.3.7/src/widgets: qplatinumstyle.o | ||
1067 | Only in qte-2.3.7/src/widgets: qpopupmenu.o | ||
1068 | Only in qte-2.3.7/src/widgets: qprogressbar.o | ||
1069 | Only in qte-2.3.7/src/widgets: qpushbutton.o | ||
1070 | Only in qte-2.3.7/src/widgets: qradiobutton.o | ||
1071 | Only in qte-2.3.7/src/widgets: qrangecontrol.o | ||
1072 | Only in qte-2.3.7/src/widgets: qscrollbar.o | ||
1073 | Only in qte-2.3.7/src/widgets: qscrollview.o | ||
1074 | Only in qte-2.3.7/src/widgets: qsgistyle.o | ||
1075 | Only in qte-2.3.7/src/widgets: qslider.o | ||
1076 | Only in qte-2.3.7/src/widgets: qspinbox.o | ||
1077 | Only in qte-2.3.7/src/widgets: qsplitter.o | ||
1078 | Only in qte-2.3.7/src/widgets: qstatusbar.o | ||
1079 | Only in qte-2.3.7/src/widgets: qtabbar.o | ||
1080 | Only in qte-2.3.7/src/widgets: qtableview.o | ||
1081 | Only in qte-2.3.7/src/widgets: qtabwidget.o | ||
1082 | Only in qte-2.3.7/src/widgets: qtextbrowser.o | ||
1083 | Only in qte-2.3.7/src/widgets: qtextview.o | ||
1084 | Only in qte-2.3.7/src/widgets: qtoolbar.moc | ||
1085 | Only in qte-2.3.7/src/widgets: qtoolbar.o | ||
1086 | diff -ru qte-2.3.7_orig/src/widgets/qtoolbutton.cpp qte-2.3.7/src/widgets/qtoolbutton.cpp | ||
1087 | --- qte-2.3.7_orig/src/widgets/qtoolbutton.cppThu Jul 17 03:20:27 2003 | ||
1088 | +++ qte-2.3.7/src/widgets/qtoolbutton.cppMon Oct 27 14:21:28 2003 | ||
1089 | @@ -230,7 +230,7 @@ | ||
1090 | else | ||
1091 | QToolTip::add( this, textLabel ); | ||
1092 | } | ||
1093 | -#endif | ||
1094 | +#endif | ||
1095 | } | ||
1096 | |||
1097 | |||
1098 | @@ -324,12 +324,12 @@ | ||
1099 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); | ||
1100 | w = pm.width(); | ||
1101 | h = pm.height(); | ||
1102 | -if ( w < 32 ) | ||
1103 | - w = 32; | ||
1104 | -if ( h < 32 ) | ||
1105 | - h = 32; | ||
1106 | +if ( w < 24 ) | ||
1107 | + w = 24; | ||
1108 | +if ( h < 24 ) | ||
1109 | + h = 24; | ||
1110 | } else { | ||
1111 | -w = h = 16; | ||
1112 | +w = h = 14; | ||
1113 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); | ||
1114 | w = pm.width(); | ||
1115 | h = pm.height(); | ||
1116 | Only in qte-2.3.7/src/widgets: qtoolbutton.o | ||
1117 | Only in qte-2.3.7/src/widgets: qtooltip.moc | ||
1118 | Only in qte-2.3.7/src/widgets: qtooltip.o | ||
1119 | Only in qte-2.3.7/src/widgets: qvalidator.o | ||
1120 | Only in qte-2.3.7/src/widgets: qvbox.o | ||
1121 | Only in qte-2.3.7/src/widgets: qvbuttongroup.o | ||
1122 | Only in qte-2.3.7/src/widgets: qvgroupbox.o | ||
1123 | Only in qte-2.3.7/src/widgets: qwhatsthis.moc | ||
1124 | Only in qte-2.3.7/src/widgets: qwhatsthis.o | ||
1125 | Only in qte-2.3.7/src/widgets: qwidgetstack.o | ||
1126 | Only in qte-2.3.7/src/widgets: qwindowsstyle.o | ||
1127 | Only in qte-2.3.7/src/workspace: qworkspace.moc | ||
1128 | Only in qte-2.3.7/src/workspace: qworkspace.o | ||
1129 | Only in qte-2.3.7/src/xml: qdom.o | ||
1130 | Only in qte-2.3.7/src/xml: qxml.o | ||
1131 | Only in qte-2.3.7: src-mt.mk | ||
1132 | Only in qte-2.3.7: stamp-headers | ||
1133 | Only in qte-2.3.7/tools: Makefile | ||
1134 | Only in qte-2.3.7/tools/designer: Makefile | ||
1135 | Only in qte-2.3.7/tools/designer/designer: Makefile | ||
1136 | Only in qte-2.3.7/tools/designer/examples/walkthrough: Makefile | ||
1137 | Only in qte-2.3.7/tools/designer/integration/rc2ui: Makefile | ||
1138 | Only in qte-2.3.7/tools/designer/tools/createcw: Makefile | ||
1139 | Only in qte-2.3.7/tools/designer/uic: Makefile | ||
1140 | Only in qte-2.3.7/tools/designer/util: Makefile | ||
1141 | Only in qte-2.3.7/tools/makeqpf: Makefile | ||
1142 | Only in qte-2.3.7/tools/mergetr: Makefile | ||
1143 | Only in qte-2.3.7/tools/msg2qm: Makefile | ||
1144 | Only in qte-2.3.7/tools/qconfig: Makefile | ||
1145 | Only in qte-2.3.7/tools/qembed: Makefile | ||
1146 | Only in qte-2.3.7/tools/qvfb: Makefile | ||
1147 | Only in qte-2.3.7/tutorial: Makefile | ||
1148 | Only in qte-2.3.7/tutorial/t1: Makefile | ||
1149 | Only in qte-2.3.7/tutorial/t10: Makefile | ||
1150 | Only in qte-2.3.7/tutorial/t11: Makefile | ||
1151 | Only in qte-2.3.7/tutorial/t12: Makefile | ||
1152 | Only in qte-2.3.7/tutorial/t13: Makefile | ||
1153 | Only in qte-2.3.7/tutorial/t14: Makefile | ||
1154 | Only in qte-2.3.7/tutorial/t2: Makefile | ||
1155 | Only in qte-2.3.7/tutorial/t3: Makefile | ||
1156 | Only in qte-2.3.7/tutorial/t4: Makefile | ||
1157 | Only in qte-2.3.7/tutorial/t5: Makefile | ||
1158 | Only in qte-2.3.7/tutorial/t6: Makefile | ||
1159 | Only in qte-2.3.7/tutorial/t7: Makefile | ||
1160 | Only in qte-2.3.7/tutorial/t8: Makefile | ||
1161 | Only in qte-2.3.7/tutorial/t9: Makefile | ||
diff --git a/rsync/config_linux.h b/rsync/config_linux.h index e5ff3e4..f488b78 100644 --- a/rsync/config_linux.h +++ b/rsync/config_linux.h | |||
@@ -1,115 +1,115 @@ | |||
1 | /* config.h. Generated automatically by configure. */ | 1 | /* config.h. Generated automatically by configure. */ |
2 | /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ | 2 | /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ |
3 | 3 | ||
4 | /* Define to empty if the keyword does not work. */ | 4 | /* Define to empty if the keyword does not work. */ |
5 | /* #undef const */ | 5 | /* #undef const */ |
6 | 6 | ||
7 | /* Define to `long' if <sys/types.h> doesn't define. */ | 7 | /* Define to `long' if <sys/types.h> doesn't define. */ |
8 | /* #undef off_t */ | 8 | /* #undef off_t */ |
9 | 9 | ||
10 | /* Define to `unsigned' if <sys/types.h> doesn't define. */ | 10 | /* Define to `unsigned' if <sys/types.h> doesn't define. */ |
11 | /* #undef size_t */ | 11 | /* #undef size_t */ |
12 | 12 | ||
13 | /* Define if you have the ANSI C header files. */ | 13 | /* Define if you have the ANSI C header files. */ |
14 | #define STDC_HEADERS 1 | 14 | #define STDC_HEADERS 1 |
15 | 15 | ||
16 | /* Define this if your sockaddr structure contains sin_len */ | 16 | /* Define this if your sockaddr structure contains sin_len */ |
17 | /* #undef HAVE_SOCK_SIN_LEN */ | 17 | /* #undef HAVE_SOCK_SIN_LEN */ |
18 | 18 | ||
19 | /* How many bits would you like to have in an off_t? */ | 19 | /* How many bits would you like to have in an off_t? */ |
20 | #define _FILE_OFFSET_BITS 64 | 20 | #define _FILE_OFFSET_BITS 64 |
21 | 21 | ||
22 | /* Define to include GNU C library extensions. */ | 22 | /* Define to include GNU C library extensions. */ |
23 | #define _GNU_SOURCE 1 | 23 | #define _GNU_SOURCE 1 |
24 | 24 | ||
25 | /* GNU extension of saving argv[0] to program_invocation_short_name */ | 25 | /* GNU extension of saving argv[0] to program_invocation_short_name */ |
26 | #define HAVE_PROGRAM_INVOCATION_NAME 1 | 26 | /* #define HAVE_PROGRAM_INVOCATION_NAME 1 */ |
27 | 27 | ||
28 | /* Define to a replacement type if intmax_t is not a builtin, or in | 28 | /* Define to a replacement type if intmax_t is not a builtin, or in |
29 | sys/types.h or stdlib.h or stddef.h */ | 29 | sys/types.h or stdlib.h or stddef.h */ |
30 | /* #undef intmax_t */ | 30 | /* #undef intmax_t */ |
31 | 31 | ||
32 | /* The number of bytes in a int. */ | 32 | /* The number of bytes in a int. */ |
33 | #define SIZEOF_INT 4 | 33 | #define SIZEOF_INT 4 |
34 | 34 | ||
35 | /* The number of bytes in a long. */ | 35 | /* The number of bytes in a long. */ |
36 | #define SIZEOF_LONG 4 | 36 | #define SIZEOF_LONG 4 |
37 | 37 | ||
38 | /* The number of bytes in a off_t. */ | 38 | /* The number of bytes in a off_t. */ |
39 | #define SIZEOF_OFF_T 8 | 39 | #define SIZEOF_OFF_T 8 |
40 | 40 | ||
41 | /* The number of bytes in a short. */ | 41 | /* The number of bytes in a short. */ |
42 | #define SIZEOF_SHORT 2 | 42 | #define SIZEOF_SHORT 2 |
43 | 43 | ||
44 | /* The number of bytes in a size_t. */ | 44 | /* The number of bytes in a size_t. */ |
45 | #define SIZEOF_SIZE_T 4 | 45 | #define SIZEOF_SIZE_T 4 |
46 | 46 | ||
47 | /* The number of bytes in a unsigned char. */ | 47 | /* The number of bytes in a unsigned char. */ |
48 | #define SIZEOF_UNSIGNED_CHAR 1 | 48 | #define SIZEOF_UNSIGNED_CHAR 1 |
49 | 49 | ||
50 | /* The number of bytes in a unsigned int. */ | 50 | /* The number of bytes in a unsigned int. */ |
51 | #define SIZEOF_UNSIGNED_INT 4 | 51 | #define SIZEOF_UNSIGNED_INT 4 |
52 | 52 | ||
53 | /* The number of bytes in a unsigned long. */ | 53 | /* The number of bytes in a unsigned long. */ |
54 | #define SIZEOF_UNSIGNED_LONG 4 | 54 | #define SIZEOF_UNSIGNED_LONG 4 |
55 | 55 | ||
56 | /* The number of bytes in a unsigned short. */ | 56 | /* The number of bytes in a unsigned short. */ |
57 | #define SIZEOF_UNSIGNED_SHORT 2 | 57 | #define SIZEOF_UNSIGNED_SHORT 2 |
58 | 58 | ||
59 | /* Define if you have the mtrace function. */ | 59 | /* Define if you have the mtrace function. */ |
60 | #define HAVE_MTRACE 1 | 60 | #define HAVE_MTRACE 1 |
61 | 61 | ||
62 | /* Define if you have the snprintf function. */ | 62 | /* Define if you have the snprintf function. */ |
63 | #define HAVE_SNPRINTF 1 | 63 | #define HAVE_SNPRINTF 1 |
64 | 64 | ||
65 | /* Define if you have the strerror function. */ | 65 | /* Define if you have the strerror function. */ |
66 | #define HAVE_STRERROR 1 | 66 | #define HAVE_STRERROR 1 |
67 | 67 | ||
68 | /* Define if you have the vsnprintf function. */ | 68 | /* Define if you have the vsnprintf function. */ |
69 | #define HAVE_VSNPRINTF 1 | 69 | #define HAVE_VSNPRINTF 1 |
70 | 70 | ||
71 | /* Define if you have the <alloca.h> header file. */ | 71 | /* Define if you have the <alloca.h> header file. */ |
72 | #define HAVE_ALLOCA_H 1 | 72 | #define HAVE_ALLOCA_H 1 |
73 | 73 | ||
74 | /* Define if you have the <bzlib.h> header file. */ | 74 | /* Define if you have the <bzlib.h> header file. */ |
75 | #define HAVE_BZLIB_H 1 | 75 | #define HAVE_BZLIB_H 1 |
76 | 76 | ||
77 | /* Define if you have the <config.h> header file. */ | 77 | /* Define if you have the <config.h> header file. */ |
78 | /* #undef HAVE_CONFIG_H */ | 78 | /* #undef HAVE_CONFIG_H */ |
79 | 79 | ||
80 | /* Define if you have the <dlfcn.h> header file. */ | 80 | /* Define if you have the <dlfcn.h> header file. */ |
81 | #define HAVE_DLFCN_H 1 | 81 | #define HAVE_DLFCN_H 1 |
82 | 82 | ||
83 | /* Define if you have the <libintl.h> header file. */ | 83 | /* Define if you have the <libintl.h> header file. */ |
84 | #define HAVE_LIBINTL_H 1 | 84 | #define HAVE_LIBINTL_H 1 |
85 | 85 | ||
86 | /* Define if you have the <mcheck.h> header file. */ | 86 | /* Define if you have the <mcheck.h> header file. */ |
87 | #define HAVE_MCHECK_H 1 | 87 | #define HAVE_MCHECK_H 1 |
88 | 88 | ||
89 | /* Define if you have the <stdint.h> header file. */ | 89 | /* Define if you have the <stdint.h> header file. */ |
90 | #define HAVE_STDINT_H 1 | 90 | #define HAVE_STDINT_H 1 |
91 | 91 | ||
92 | /* Define if you have the <unistd.h> header file. */ | 92 | /* Define if you have the <unistd.h> header file. */ |
93 | #define HAVE_UNISTD_H 1 | 93 | #define HAVE_UNISTD_H 1 |
94 | 94 | ||
95 | /* Define if you have the popt library (-lpopt). */ | 95 | /* Define if you have the popt library (-lpopt). */ |
96 | #define HAVE_LIBPOPT 1 | 96 | #define HAVE_LIBPOPT 1 |
97 | 97 | ||
98 | /* Name of package */ | 98 | /* Name of package */ |
99 | #define PACKAGE "librsync" | 99 | #define PACKAGE "librsync" |
100 | 100 | ||
101 | /* Version number of package */ | 101 | /* Version number of package */ |
102 | #define VERSION "0.9.5" | 102 | #define VERSION "0.9.5" |
103 | 103 | ||
104 | /* Number of bits in a file offset, on hosts where this is settable. */ | 104 | /* Number of bits in a file offset, on hosts where this is settable. */ |
105 | #define _FILE_OFFSET_BITS 64 | 105 | #define _FILE_OFFSET_BITS 64 |
106 | 106 | ||
107 | /* Define to make ftello visible on some hosts (e.g. HP-UX 10.20). */ | 107 | /* Define to make ftello visible on some hosts (e.g. HP-UX 10.20). */ |
108 | /* #undef _LARGEFILE_SOURCE */ | 108 | /* #undef _LARGEFILE_SOURCE */ |
109 | 109 | ||
110 | /* Define for large files, on AIX-style hosts. */ | 110 | /* Define for large files, on AIX-style hosts. */ |
111 | /* #undef _LARGE_FILES */ | 111 | /* #undef _LARGE_FILES */ |
112 | 112 | ||
113 | /* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */ | 113 | /* Define to make ftello visible on some hosts (e.g. glibc 2.1.3). */ |
114 | /* #undef _XOPEN_SOURCE */ | 114 | /* #undef _XOPEN_SOURCE */ |
115 | 115 | ||
diff --git a/rsync/trace.h b/rsync/trace.h index 60a6477..2bb8552 100644 --- a/rsync/trace.h +++ b/rsync/trace.h | |||
@@ -1,122 +1,112 @@ | |||
1 | /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- | 1 | /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- |
2 | * | 2 | * |
3 | * librsync -- generate and apply network deltas | 3 | * librsync -- generate and apply network deltas |
4 | * $Id$ | 4 | * $Id$ |
5 | * | 5 | * |
6 | * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org> | 6 | * Copyright (C) 2000, 2001 by Martin Pool <mbp@samba.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU Lesser General Public License as published by | 9 | * it under the terms of the GNU Lesser General Public License as published by |
10 | * the Free Software Foundation; either version 2.1 of the License, or | 10 | * the Free Software Foundation; either version 2.1 of the License, or |
11 | * (at your option) any later version. | 11 | * (at your option) any later version. |
12 | * | 12 | * |
13 | * This program is distributed in the hope that it will be useful, | 13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Lesser General Public License for more details. | 16 | * GNU Lesser General Public License for more details. |
17 | * | 17 | * |
18 | * You should have received a copy of the GNU Lesser General Public License | 18 | * You should have received a copy of the GNU Lesser General Public License |
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | 23 | ||
24 | /* | 24 | /* |
25 | * TODO: A function like perror that includes strerror output. Apache | 25 | * TODO: A function like perror that includes strerror output. Apache |
26 | * does this by adding flags as well as the severity level which say | 26 | * does this by adding flags as well as the severity level which say |
27 | * whether such information should be included. | 27 | * whether such information should be included. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * trace may be turned off. | 32 | * trace may be turned off. |
33 | * | 33 | * |
34 | * error is always on, but you can return and continue in some way | 34 | * error is always on, but you can return and continue in some way |
35 | * | 35 | * |
36 | * fatal terminates the whole process | 36 | * fatal terminates the whole process |
37 | */ | 37 | */ |
38 | 38 | ||
39 | void rs_fatal0(char const *s, ...); | 39 | #if defined(HAVE_VARARG_MACROS) && defined(__GNUC__) |
40 | void rs_error0(char const *s, ...); | 40 | /* |
41 | void rs_trace0(char const *s, ...); | 41 | * TODO: Don't assume this is a gcc thing; rather test in autoconf for |
42 | 42 | * support for __FUNCTION__. One simple way might just be to try compiling | |
43 | void rs_log0_nofn(int level, char const *fmt, ...); | 43 | * the definition of one of these functions! |
44 | 44 | * | |
45 | #ifdef __GNUC__ | 45 | * TODO: Also look for the C9X predefined identifier `_function', or |
46 | * whatever it's called. | ||
47 | */ | ||
46 | 48 | ||
47 | void rs_log0(int level, char const *fn, char const *fmt, ...) | 49 | void rs_log0(int level, char const *fn, char const *fmt, ...) |
48 | __attribute__ ((format(printf, 3, 4))); | 50 | __attribute__ ((format(printf, 3, 4))); |
49 | 51 | ||
50 | #ifdef DO_RS_TRACE | 52 | #ifdef DO_RS_TRACE |
51 | # define rs_trace(fmt, arg...) \ | 53 | # define rs_trace(fmt, arg...) \ |
52 | do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ | 54 | do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ |
53 | } while (0) | 55 | } while (0) |
54 | #else | 56 | #else |
55 | # define rs_trace(s, str...) | 57 | # define rs_trace(fmt, arg...) |
56 | #endif/* !DO_RS_TRACE */ | 58 | #endif/* !DO_RS_TRACE */ |
57 | 59 | ||
58 | /* | ||
59 | * TODO: Don't assume this is a gcc thing; rather test in autoconf for | ||
60 | * support for __FUNCTION__ and varargs macros. One simple way might | ||
61 | * just be to try compiling the definition of one of these functions! | ||
62 | * | ||
63 | * TODO: Also look for the C9X predefined identifier `_function', or | ||
64 | * whatever it's called. | ||
65 | */ | ||
66 | |||
67 | #define rs_log(l, s, str...) do { \ | 60 | #define rs_log(l, s, str...) do { \ |
68 | rs_log0((l), __FUNCTION__, (s) , ##str); \ | 61 | rs_log0((l), __FUNCTION__, (s) , ##str); \ |
69 | } while (0) | 62 | } while (0) |
70 | 63 | ||
71 | 64 | ||
72 | #define rs_error(s, str...) do { \ | 65 | #define rs_error(s, str...) do { \ |
73 | rs_log0(RS_LOG_ERR, __FUNCTION__, (s) , ##str); \ | 66 | rs_log0(RS_LOG_ERR, __FUNCTION__, (s) , ##str); \ |
74 | } while (0) | 67 | } while (0) |
75 | 68 | ||
76 | 69 | ||
77 | #define rs_fatal(s, str...) do { \ | 70 | #define rs_fatal(s, str...) do { \ |
78 | rs_log0(RS_LOG_CRIT, __FUNCTION__, \ | 71 | rs_log0(RS_LOG_CRIT, __FUNCTION__, \ |
79 | (s) , ##str); \ | 72 | (s) , ##str); \ |
80 | abort(); \ | 73 | abort(); \ |
81 | } while (0) | 74 | } while (0) |
82 | 75 | ||
83 | 76 | ||
84 | #else /************************* ! __GNUC__ */ | 77 | #else /************************* ! __GNUC__ */ |
85 | 78 | # define rs_trace rs_trace0 | |
86 | # define rs_fatal rs_fatal0 | 79 | # define rs_fatal rs_fatal0 |
87 | # define rs_error rs_error0 | 80 | # define rs_error rs_error0 |
88 | # define rs_log rs_log0_nofn | 81 | # define rs_log rs_log0_nofn |
89 | |||
90 | # ifdef DO_RS_TRACE | ||
91 | # define rs_trace rs_trace0 | ||
92 | # endif /* DO_RS_TRACE */ | ||
93 | #endif /* ! __GNUC__ */ | 82 | #endif /* ! __GNUC__ */ |
94 | 83 | ||
95 | 84 | void rs_trace0(char const *s, ...); | |
85 | void rs_fatal0(char const *s, ...); | ||
86 | void rs_error0(char const *s, ...); | ||
96 | void rs_log0(int level, char const *fn, char const *fmt, ...); | 87 | void rs_log0(int level, char const *fn, char const *fmt, ...); |
97 | 88 | void rs_log0_nofn(int level, char const *fmt, ...); | |
98 | 89 | ||
99 | enum { | 90 | enum { |
100 | RS_LOG_PRIMASK = 7, /**< Mask to extract priority | 91 | RS_LOG_PRIMASK = 7, /**< Mask to extract priority |
101 | part. \internal */ | 92 | part. \internal */ |
102 | 93 | ||
103 | RS_LOG_NONAME = 8 /**< \b Don't show function name in | 94 | RS_LOG_NONAME = 8 /**< \b Don't show function name in |
104 | message. */ | 95 | message. */ |
105 | }; | 96 | }; |
106 | 97 | ||
107 | 98 | ||
108 | |||
109 | /** | 99 | /** |
110 | * \macro rs_trace_enabled() | 100 | * \macro rs_trace_enabled() |
111 | * | 101 | * |
112 | * Call this before putting too much effort into generating trace | 102 | * Call this before putting too much effort into generating trace |
113 | * messages. | 103 | * messages. |
114 | */ | 104 | */ |
115 | 105 | ||
116 | extern int rs_trace_level; | 106 | extern int rs_trace_level; |
117 | 107 | ||
118 | #ifdef DO_RS_TRACE | 108 | #ifdef DO_RS_TRACE |
119 | # define rs_trace_enabled() ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) | 109 | # define rs_trace_enabled() ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) |
120 | #else | 110 | #else |
121 | # define rs_trace_enabled() 0 | 111 | # define rs_trace_enabled() 0 |
122 | #endif | 112 | #endif |
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h index 97c7917..e438bd8 100644 --- a/scripts/kconfig/lkc_proto.h +++ b/scripts/kconfig/lkc_proto.h | |||
@@ -1,39 +1,39 @@ | |||
1 | 1 | ||
2 | /* confdata.c */ | 2 | /* confdata.c */ |
3 | P(conf_parse,void,(const char *name)); | 3 | P(conf_parse,void,(const char *name)); |
4 | P(conf_read,int,(const char *name)); | 4 | P(conf_read,int,(const char *name)); |
5 | P(conf_write,int,(const char *name)); | 5 | P(conf_write,int,(const char *name)); |
6 | 6 | ||
7 | /* menu.c */ | 7 | /* menu.c */ |
8 | P(rootmenu,struct menu,); | 8 | extern struct menu rootmenu; |
9 | 9 | ||
10 | P(menu_is_visible,bool,(struct menu *menu)); | 10 | P(menu_is_visible,bool,(struct menu *menu)); |
11 | P(menu_get_prompt,const char *,(struct menu *menu)); | 11 | P(menu_get_prompt,const char *,(struct menu *menu)); |
12 | P(menu_get_root_menu,struct menu *,(struct menu *menu)); | 12 | P(menu_get_root_menu,struct menu *,(struct menu *menu)); |
13 | P(menu_get_parent_menu,struct menu *,(struct menu *menu)); | 13 | P(menu_get_parent_menu,struct menu *,(struct menu *menu)); |
14 | 14 | ||
15 | /* symbol.c */ | 15 | /* symbol.c */ |
16 | P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); | 16 | P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); |
17 | P(sym_change_count,int,); | 17 | extern int sym_change_count; |
18 | 18 | ||
19 | P(sym_lookup,struct symbol *,(const char *name, int isconst)); | 19 | P(sym_lookup,struct symbol *,(const char *name, int isconst)); |
20 | P(sym_find,struct symbol *,(const char *name)); | 20 | P(sym_find,struct symbol *,(const char *name)); |
21 | P(sym_type_name,const char *,(enum symbol_type type)); | 21 | P(sym_type_name,const char *,(enum symbol_type type)); |
22 | P(sym_calc_value,void,(struct symbol *sym)); | 22 | P(sym_calc_value,void,(struct symbol *sym)); |
23 | P(sym_get_type,enum symbol_type,(struct symbol *sym)); | 23 | P(sym_get_type,enum symbol_type,(struct symbol *sym)); |
24 | P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); | 24 | P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); |
25 | P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); | 25 | P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); |
26 | P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); | 26 | P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); |
27 | P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); | 27 | P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); |
28 | P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); | 28 | P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); |
29 | P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); | 29 | P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); |
30 | P(sym_is_changable,bool,(struct symbol *sym)); | 30 | P(sym_is_changable,bool,(struct symbol *sym)); |
31 | P(sym_get_choice_prop,struct property *,(struct symbol *sym)); | 31 | P(sym_get_choice_prop,struct property *,(struct symbol *sym)); |
32 | P(sym_get_default_prop,struct property *,(struct symbol *sym)); | 32 | P(sym_get_default_prop,struct property *,(struct symbol *sym)); |
33 | P(sym_get_string_value,const char *,(struct symbol *sym)); | 33 | P(sym_get_string_value,const char *,(struct symbol *sym)); |
34 | 34 | ||
35 | P(prop_get_type_name,const char *,(enum prop_type type)); | 35 | P(prop_get_type_name,const char *,(enum prop_type type)); |
36 | 36 | ||
37 | /* expr.c */ | 37 | /* expr.c */ |
38 | P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); | 38 | P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); |
39 | P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); | 39 | P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)); |