author | zecke <zecke> | 2004-07-15 19:01:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 19:01:40 (UTC) |
commit | dffb08422497af5ccb0e66fc3434f171d57c2216 (patch) (unidiff) | |
tree | 5d6407302546f769f6017b406efe8fc12ee7a4d5 | |
parent | c96296038ac74083c5bf8009449cb22392cd02dc (diff) | |
download | opie-dffb08422497af5ccb0e66fc3434f171d57c2216.zip opie-dffb08422497af5ccb0e66fc3434f171d57c2216.tar.gz opie-dffb08422497af5ccb0e66fc3434f171d57c2216.tar.bz2 |
-Remove double 'connection' of num/capslock/symbol toggle from launcher.
taskbar itself takes care about it
-Make having the LockKeyState indicator in the taskbar configurable and
have it enabled by default for Sharp Zaurus which actually got a keyboard :)
Initial KeyLock State is still not defined/used from within Sharp
-rw-r--r-- | Rules.make | 3 | ||||
-rw-r--r-- | config.in | 5 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 20 | ||||
-rw-r--r-- | core/launcher/launcher.h | 5 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 2 |
5 files changed, 10 insertions, 25 deletions
@@ -18,128 +18,131 @@ ifneq ($(CONFIG_DEBUG),) | |||
18 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ | 18 | echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ |
19 | echo DEFINES += QT_DEBUG >> $@ | 19 | echo DEFINES += QT_DEBUG >> $@ |
20 | else | 20 | else |
21 | echo CONFIG -= debug >> $@ | 21 | echo CONFIG -= debug >> $@ |
22 | echo CONFIG += release >> $@ | 22 | echo CONFIG += release >> $@ |
23 | echo DEFINES += "OPIE_NO_DEBUG" >> $@ | 23 | echo DEFINES += "OPIE_NO_DEBUG" >> $@ |
24 | endif | 24 | endif |
25 | ifeq ($(CONFIG_STATIC),y) | 25 | ifeq ($(CONFIG_STATIC),y) |
26 | echo CONFIG += staticlib >> $@ | 26 | echo CONFIG += staticlib >> $@ |
27 | endif | 27 | endif |
28 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 | 28 | ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 |
29 | echo CONFIG -= qt3 >> $@ | 29 | echo CONFIG -= qt3 >> $@ |
30 | else | 30 | else |
31 | echo CONFIG += qt3 >> $@ | 31 | echo CONFIG += qt3 >> $@ |
32 | endif | 32 | endif |
33 | ifneq ($(CONFIG_QUICK_LAUNCH),) | 33 | ifneq ($(CONFIG_QUICK_LAUNCH),) |
34 | echo contains\( CONFIG, quick-app \) \{ >> $@ | 34 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
35 | echo CONFIG -= staticlib >> $@ | 35 | echo CONFIG -= staticlib >> $@ |
36 | echo CONFIG -= quick-app >> $@ | 36 | echo CONFIG -= quick-app >> $@ |
37 | echo CONFIG += quick-app-lib >> $@ | 37 | echo CONFIG += quick-app-lib >> $@ |
38 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ | 38 | echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ |
39 | echo \} >> $@ | 39 | echo \} >> $@ |
40 | else | 40 | else |
41 | echo contains\( CONFIG, quick-app \) \{ >> $@ | 41 | echo contains\( CONFIG, quick-app \) \{ >> $@ |
42 | echo CONFIG -= quick-app >> $@ | 42 | echo CONFIG -= quick-app >> $@ |
43 | echo CONFIG += quick-app-bin >> $@ | 43 | echo CONFIG += quick-app-bin >> $@ |
44 | echo \} >> $@ | 44 | echo \} >> $@ |
45 | endif | 45 | endif |
46 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) | 46 | ifeq ($(CONFIG_SQL_PIM_BACKEND),y) |
47 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ | 47 | echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ |
48 | else | 48 | else |
49 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ | 49 | echo ENABLE_SQL_PIM_BACKEND=n >> $@ |
50 | endif | 50 | endif |
51 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) | 51 | ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) |
52 | echo CONFIG += no-override >> $@ | 52 | echo CONFIG += no-override >> $@ |
53 | endif | 53 | endif |
54 | ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) | 54 | ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) |
55 | echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ | 55 | echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ |
56 | endif | 56 | endif |
57 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) | 57 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) |
58 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ | 58 | echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ |
59 | endif | 59 | endif |
60 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) | 60 | ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) |
61 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ | 61 | echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ |
62 | endif | 62 | endif |
63 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) | 63 | ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) |
64 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ | 64 | echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ |
65 | endif | 65 | endif |
66 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) | 66 | ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) |
67 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ | 67 | echo DEFINES += USE_FILE_NOTIFICATION >> $@ |
68 | endif | 68 | endif |
69 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) | 69 | ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) |
70 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ | 70 | echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ |
71 | endif | 71 | endif |
72 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) | 72 | ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) |
73 | echo DEFINES += OPIE_NEW_MALLOC >> $@ | 73 | echo DEFINES += OPIE_NEW_MALLOC >> $@ |
74 | endif | 74 | endif |
75 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) | 75 | ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) |
76 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ | 76 | echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ |
77 | endif | 77 | endif |
78 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ | 78 | echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ |
79 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) | 79 | ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) |
80 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ | 80 | echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ |
81 | endif | 81 | endif |
82 | ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) | ||
83 | echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ | ||
84 | endif | ||
82 | # Write LIB dirs and INC dirs... | 85 | # Write LIB dirs and INC dirs... |
83 | ifeq ($(CONFIG_LIBETPAN_DEP),y) | 86 | ifeq ($(CONFIG_LIBETPAN_DEP),y) |
84 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ | 87 | echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ |
85 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ | 88 | echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ |
86 | endif | 89 | endif |
87 | ifeq ($(CONFIG_LIBPCAP_DEP),y) | 90 | ifeq ($(CONFIG_LIBPCAP_DEP),y) |
88 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ | 91 | echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ |
89 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ | 92 | echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ |
90 | endif | 93 | endif |
91 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) | 94 | ifeq ($(CONFIG_LIBSQLITE_DEP),y) |
92 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ | 95 | echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ |
93 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ | 96 | echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ |
94 | endif | 97 | endif |
95 | ifeq ($(CONFIG_LIBXINE_DEP),y) | 98 | ifeq ($(CONFIG_LIBXINE_DEP),y) |
96 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ | 99 | echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ |
97 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ | 100 | echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ |
98 | endif | 101 | endif |
99 | ifeq ($(CONFIG_LIBIPK_DEP),y) | 102 | ifeq ($(CONFIG_LIBIPK_DEP),y) |
100 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ | 103 | echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ |
101 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ | 104 | echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ |
102 | endif | 105 | endif |
103 | ifeq ($(CONFIG_LIBSDK_DEP),y) | 106 | ifeq ($(CONFIG_LIBSDK_DEP),y) |
104 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ | 107 | echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ |
105 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ | 108 | echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ |
106 | endif | 109 | endif |
107 | ifeq ($(CONFIG_LIBSWORD_DEP),y) | 110 | ifeq ($(CONFIG_LIBSWORD_DEP),y) |
108 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ | 111 | echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ |
109 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ | 112 | echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ |
110 | endif | 113 | endif |
111 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages | 114 | $(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages |
112 | @echo Generating dependency information... | 115 | @echo Generating dependency information... |
113 | # add to subdir-y, and add descend rules | 116 | # add to subdir-y, and add descend rules |
114 | @cat $(TOPDIR)/packages | grep -v '^#' | \ | 117 | @cat $(TOPDIR)/packages | grep -v '^#' | \ |
115 | awk '{print \ | 118 | awk '{print \ |
116 | ".PHONY : " $$2 "\n" \ | 119 | ".PHONY : " $$2 "\n" \ |
117 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ | 120 | "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ |
118 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends | 121 | print $$2 " : " $$2 "/Makefile\n\t$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends |
119 | cat $(TOPDIR)/packages | grep -v '^#' | \ | 122 | cat $(TOPDIR)/packages | grep -v '^#' | \ |
120 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ | 123 | perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ |
121 | >> $(TOPDIR)/.depends | 124 | >> $(TOPDIR)/.depends |
122 | # interpackage dependency generation | 125 | # interpackage dependency generation |
123 | @cat $(TOPDIR)/packages | \ | 126 | @cat $(TOPDIR)/packages | \ |
124 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends | 127 | $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends |
125 | 128 | ||
126 | $(TOPDIR)/.depends.cfgs: | 129 | $(TOPDIR)/.depends.cfgs: |
127 | # config.in interdependencies | 130 | # config.in interdependencies |
128 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs | 131 | @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs |
129 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ | 132 | @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ |
130 | @-rm -f dirs | 133 | @-rm -f dirs |
131 | 134 | ||
132 | $(QTDIR)/stamp-headers : | 135 | $(QTDIR)/stamp-headers : |
133 | @-rm -f $(QTDIR)/stamp-headers* | 136 | @-rm -f $(QTDIR)/stamp-headers* |
134 | ( cd $(QTDIR)/include; \ | 137 | ( cd $(QTDIR)/include; \ |
135 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ | 138 | $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ |
136 | qcopchannel_qws.h qwindowsystem_qws.h \ | 139 | qcopchannel_qws.h qwindowsystem_qws.h \ |
137 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) | 140 | qfontmanager_qws.h qwsdefaultdecoration_qws.h)) |
138 | touch $@ | 141 | touch $@ |
139 | 142 | ||
140 | $(QTDIR)/stamp-headers-x11 : | 143 | $(QTDIR)/stamp-headers-x11 : |
141 | @-rm -f $(QTDIR)/stamp-headers* | 144 | @-rm -f $(QTDIR)/stamp-headers* |
142 | cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) | 145 | cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) |
143 | touch $@ | 146 | touch $@ |
144 | 147 | ||
145 | $(OPIEDIR)/stamp-headers : | 148 | $(OPIEDIR)/stamp-headers : |
@@ -86,128 +86,133 @@ config CUSTOMFILE | |||
86 | default "custom-ipaq.h" if TARGET_IPAQ | 86 | default "custom-ipaq.h" if TARGET_IPAQ |
87 | default "custom-sharp.h" if TARGET_SHARP | 87 | default "custom-sharp.h" if TARGET_SHARP |
88 | default "custom-ramses.h" if TARGET_RAMSES | 88 | default "custom-ramses.h" if TARGET_RAMSES |
89 | default "custom-ipaq.h" if TARGET_SIMPAD | 89 | default "custom-ipaq.h" if TARGET_SIMPAD |
90 | default "custom-yopy.h" if TARGET_YOPY | 90 | default "custom-yopy.h" if TARGET_YOPY |
91 | 91 | ||
92 | config OPTIMIZATIONS | 92 | config OPTIMIZATIONS |
93 | string "Optimization flags" | 93 | string "Optimization flags" |
94 | depends OPTIMIZE | 94 | depends OPTIMIZE |
95 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ | 95 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_IPAQ |
96 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY | 96 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_YOPY |
97 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP | 97 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SHARP |
98 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES | 98 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_RAMSES |
99 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD | 99 | default "-march=armv4 -mtune=strongarm1100 -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_SIMPAD |
100 | default "-march=armv5te -mtune=xscale -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_C700 | 100 | default "-march=armv5te -mtune=xscale -mapcs-32 -fexpensive-optimizations -fomit-frame-pointer -O2" if TARGET_C700 |
101 | 101 | ||
102 | config EXPERIMENTAL | 102 | config EXPERIMENTAL |
103 | bool "Prompt for development and/or incomplete items" | 103 | bool "Prompt for development and/or incomplete items" |
104 | default y | 104 | default y |
105 | 105 | ||
106 | endmenu | 106 | endmenu |
107 | 107 | ||
108 | menu "Configuration" | 108 | menu "Configuration" |
109 | config OPIE_NO_OVERRIDE_QT | 109 | config OPIE_NO_OVERRIDE_QT |
110 | boolean "Build Opie against an unpatched version of Qt" | 110 | boolean "Build Opie against an unpatched version of Qt" |
111 | default n | 111 | default n |
112 | 112 | ||
113 | config OPIE_NO_ERASERECT_FIX | 113 | config OPIE_NO_ERASERECT_FIX |
114 | boolean "Disable Fixup eraseRect for HancomMobileWord,neocal.. to make libopiecore work on Sharps libqpe" | 114 | boolean "Disable Fixup eraseRect for HancomMobileWord,neocal.. to make libopiecore work on Sharps libqpe" |
115 | default n | 115 | default n |
116 | 116 | ||
117 | config OPIE_NO_BUILTIN_SHUTDOWN | 117 | config OPIE_NO_BUILTIN_SHUTDOWN |
118 | boolean "Disable the built in shutdown application" | 118 | boolean "Disable the built in shutdown application" |
119 | default y | 119 | default y |
120 | 120 | ||
121 | config OPIE_NO_BUILTIN_CALIBRATE | 121 | config OPIE_NO_BUILTIN_CALIBRATE |
122 | boolean "Disable the built in calibrate application" | 122 | boolean "Disable the built in calibrate application" |
123 | default y if TARGET_YOPY | 123 | default y if TARGET_YOPY |
124 | default n if ! TARGET_YOPY | 124 | default n if ! TARGET_YOPY |
125 | 125 | ||
126 | config OPIE_SOUND_FRAGMENT_SHIFT | 126 | config OPIE_SOUND_FRAGMENT_SHIFT |
127 | string "The sound fragment used in Opie Player I" | 127 | string "The sound fragment used in Opie Player I" |
128 | default "14" if TARGET_IPAQ | 128 | default "14" if TARGET_IPAQ |
129 | default "16" if ! TARGET_IPAQ | 129 | default "16" if ! TARGET_IPAQ |
130 | 130 | ||
131 | config USE_REALTIME_AUDIO_THREAD | 131 | config USE_REALTIME_AUDIO_THREAD |
132 | boolean "Use a realtime thread in Opie Player I" | 132 | boolean "Use a realtime thread in Opie Player I" |
133 | default y if TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP | 133 | default y if TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP |
134 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) | 134 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) |
135 | 135 | ||
136 | config QT_QWS_ALLOW_OVERCLOCK | 136 | config QT_QWS_ALLOW_OVERCLOCK |
137 | boolean "Allow the user to overclock the device" | 137 | boolean "Allow the user to overclock the device" |
138 | depends TARGET_RAMSES | 138 | depends TARGET_RAMSES |
139 | default n | 139 | default n |
140 | 140 | ||
141 | config USE_FILE_NOTIFICATION | 141 | config USE_FILE_NOTIFICATION |
142 | boolean "Substitute (some) polling interfaces with OFileNotifier" | 142 | boolean "Substitute (some) polling interfaces with OFileNotifier" |
143 | default y | 143 | default y |
144 | 144 | ||
145 | config OPIE_NEW_ALLOC | 145 | config OPIE_NEW_ALLOC |
146 | boolean "Use malloc and free for the implementation" | 146 | boolean "Use malloc and free for the implementation" |
147 | default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP | 147 | default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP |
148 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) | 148 | default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) |
149 | 149 | ||
150 | config OPIE_TASKBAR_LOCK_KEY_STATE | ||
151 | boolean "Have a KeyLock state indicator on the taskbar" | ||
152 | default y if TARGET_SHARP | ||
153 | default n if !TARGET_SHARP | ||
154 | |||
150 | config OPIE_NO_SOUND_PCM_READ_BITS | 155 | config OPIE_NO_SOUND_PCM_READ_BITS |
151 | boolean "There is not a pcm_read_bits io control" | 156 | boolean "There is not a pcm_read_bits io control" |
152 | default y if TARGET_SHARP | 157 | default y if TARGET_SHARP |
153 | default n if ! TARGET_SHARP | 158 | default n if ! TARGET_SHARP |
154 | endmenu | 159 | endmenu |
155 | 160 | ||
156 | menu "Dependencies" | 161 | menu "Dependencies" |
157 | source dependencies.in | 162 | source dependencies.in |
158 | endmenu | 163 | endmenu |
159 | 164 | ||
160 | menu "Base" | 165 | menu "Base" |
161 | choice | 166 | choice |
162 | prompt "Qpe Library Selection" | 167 | prompt "Qpe Library Selection" |
163 | default LIBQPE | 168 | default LIBQPE |
164 | source library/config.in | 169 | source library/config.in |
165 | source x11/config.in | 170 | source x11/config.in |
166 | endchoice | 171 | endchoice |
167 | source libopie/config.in | 172 | source libopie/config.in |
168 | 173 | ||
169 | source libopie2/config.in | 174 | source libopie2/config.in |
170 | source libqtaux/config.in | 175 | source libqtaux/config.in |
171 | source rsync/config.in | 176 | source rsync/config.in |
172 | source core/opie-login/config.in | 177 | source core/opie-login/config.in |
173 | source core/opiealarm/config.in | 178 | source core/opiealarm/config.in |
174 | source core/tools/quicklauncher/config.in | 179 | source core/tools/quicklauncher/config.in |
175 | source core/launcher/config.in | 180 | source core/launcher/config.in |
176 | source core/symlinker/config.in | 181 | source core/symlinker/config.in |
177 | endmenu | 182 | endmenu |
178 | 183 | ||
179 | comment "" | 184 | comment "" |
180 | 185 | ||
181 | menu "Applets" | 186 | menu "Applets" |
182 | source core/applets/config.in | 187 | source core/applets/config.in |
183 | source noncore/applets/config.in | 188 | source noncore/applets/config.in |
184 | endmenu | 189 | endmenu |
185 | 190 | ||
186 | menu "Apps" | 191 | menu "Apps" |
187 | source core/apps/config.in | 192 | source core/apps/config.in |
188 | source noncore/apps/config.in | 193 | source noncore/apps/config.in |
189 | endmenu | 194 | endmenu |
190 | 195 | ||
191 | menu "Communications and Networking" | 196 | menu "Communications and Networking" |
192 | source noncore/comm/config.in | 197 | source noncore/comm/config.in |
193 | source noncore/net/config.in | 198 | source noncore/net/config.in |
194 | endmenu | 199 | endmenu |
195 | 200 | ||
196 | menu "Games" | 201 | menu "Games" |
197 | source noncore/games/config.in | 202 | source noncore/games/config.in |
198 | endmenu | 203 | endmenu |
199 | 204 | ||
200 | menu "Graphics and Multimedia" | 205 | menu "Graphics and Multimedia" |
201 | source freetype/config.in | 206 | source freetype/config.in |
202 | source noncore/graphics/config.in | 207 | source noncore/graphics/config.in |
203 | source core/multimedia/config.in | 208 | source core/multimedia/config.in |
204 | source noncore/multimedia/config.in | 209 | source noncore/multimedia/config.in |
205 | endmenu | 210 | endmenu |
206 | 211 | ||
207 | menu "Input methods" | 212 | menu "Input methods" |
208 | source inputmethods/config.in | 213 | source inputmethods/config.in |
209 | endmenu | 214 | endmenu |
210 | 215 | ||
211 | menu "Pim" | 216 | menu "Pim" |
212 | source core/obex/config.in | 217 | source core/obex/config.in |
213 | source core/pim/config.in | 218 | source core/pim/config.in |
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 87a54bf..aa357ca 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -412,224 +412,204 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & | |||
412 | if ( id == "Documents" ) | 412 | if ( id == "Documents" ) |
413 | docLoadingWidget->setTextColor( QColor(color) ); | 413 | docLoadingWidget->setTextColor( QColor(color) ); |
414 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { | 414 | } else if ( msg == "setFont(QString,QString,int,int,int)" ) { |
415 | QString id; | 415 | QString id; |
416 | stream >> id; | 416 | stream >> id; |
417 | QString fam; | 417 | QString fam; |
418 | stream >> fam; | 418 | stream >> fam; |
419 | int size; | 419 | int size; |
420 | stream >> size; | 420 | stream >> size; |
421 | int weight; | 421 | int weight; |
422 | stream >> weight; | 422 | stream >> weight; |
423 | int italic; | 423 | int italic; |
424 | stream >> italic; | 424 | stream >> italic; |
425 | if ( view(id) ) { | 425 | if ( view(id) ) { |
426 | if ( !fam.isEmpty() ) { | 426 | if ( !fam.isEmpty() ) { |
427 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); | 427 | view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); |
428 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; | 428 | odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; |
429 | } else { | 429 | } else { |
430 | view(id)->clearViewFont(); | 430 | view(id)->clearViewFont(); |
431 | } | 431 | } |
432 | } | 432 | } |
433 | }else if ( msg == "setBusyIndicatorType(QString)" ) { | 433 | }else if ( msg == "setBusyIndicatorType(QString)" ) { |
434 | QString type; | 434 | QString type; |
435 | stream >> type; | 435 | stream >> type; |
436 | setBusyIndicatorType( type ); | 436 | setBusyIndicatorType( type ); |
437 | }else if ( msg == "home()" ) { | 437 | }else if ( msg == "home()" ) { |
438 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { | 438 | if ( isVisibleWindow( static_cast<QWidget*>(parent())->winId() ) ) { |
439 | if (categoryBar) | 439 | if (categoryBar) |
440 | categoryBar->nextTab(); | 440 | categoryBar->nextTab(); |
441 | }else | 441 | }else |
442 | static_cast<QWidget*>(parent())->raise(); | 442 | static_cast<QWidget*>(parent())->raise(); |
443 | } | 443 | } |
444 | } | 444 | } |
445 | 445 | ||
446 | 446 | ||
447 | 447 | ||
448 | //--------------------------------------------------------------------------- | 448 | //--------------------------------------------------------------------------- |
449 | 449 | ||
450 | Launcher::Launcher() | 450 | Launcher::Launcher() |
451 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) | 451 | : QMainWindow( 0, "PDA User Interface", QWidget::WStyle_Customize | QWidget::WGroupLeader ) |
452 | { | 452 | { |
453 | tabs = 0; | 453 | tabs = 0; |
454 | tb = 0; | 454 | tb = 0; |
455 | Config cfg( "Launcher" ); | 455 | Config cfg( "Launcher" ); |
456 | cfg.setGroup( "DocTab" ); | 456 | cfg.setGroup( "DocTab" ); |
457 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); | 457 | docTabEnabled = cfg.readBoolEntry( "Enable", true ); |
458 | } | 458 | } |
459 | 459 | ||
460 | void Launcher::createGUI() | 460 | void Launcher::createGUI() |
461 | { | 461 | { |
462 | setCaption( tr("Launcher") ); | 462 | setCaption( tr("Launcher") ); |
463 | 463 | ||
464 | // we have a pretty good idea how big we'll be | 464 | // we have a pretty good idea how big we'll be |
465 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); | 465 | setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); |
466 | 466 | ||
467 | tb = new TaskBar; | 467 | tb = new TaskBar; |
468 | tabs = new LauncherTabWidget( this ); | 468 | tabs = new LauncherTabWidget( this ); |
469 | setCentralWidget( tabs ); | 469 | setCentralWidget( tabs ); |
470 | 470 | ||
471 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); | 471 | ServerInterface::dockWidget( tb, ServerInterface::Bottom ); |
472 | tb->show(); | 472 | tb->show(); |
473 | 473 | ||
474 | qApp->installEventFilter( this ); | 474 | qApp->installEventFilter( this ); |
475 | 475 | ||
476 | |||
477 | connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); | ||
478 | connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); | ||
479 | connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); | ||
480 | |||
481 | connect( tb, SIGNAL(tabSelected(const QString&)), | 476 | connect( tb, SIGNAL(tabSelected(const QString&)), |
482 | this, SLOT(showTab(const QString&)) ); | 477 | this, SLOT(showTab(const QString&)) ); |
483 | connect( tabs, SIGNAL(selected(const QString&)), | 478 | connect( tabs, SIGNAL(selected(const QString&)), |
484 | this, SLOT(viewSelected(const QString&)) ); | 479 | this, SLOT(viewSelected(const QString&)) ); |
485 | connect( tabs, SIGNAL(clicked(const AppLnk*)), | 480 | connect( tabs, SIGNAL(clicked(const AppLnk*)), |
486 | this, SLOT(select(const AppLnk*))); | 481 | this, SLOT(select(const AppLnk*))); |
487 | connect( tabs, SIGNAL(rightPressed(AppLnk*)), | 482 | connect( tabs, SIGNAL(rightPressed(AppLnk*)), |
488 | this, SLOT(properties(AppLnk*))); | 483 | this, SLOT(properties(AppLnk*))); |
489 | 484 | ||
490 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 485 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
491 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); | 486 | QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); |
492 | connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), | 487 | connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), |
493 | this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); | 488 | this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); |
494 | #endif | 489 | #endif |
495 | 490 | ||
496 | // all documents | 491 | // all documents |
497 | QImage img( Resource::loadImage( "DocsIcon" ) ); | 492 | QImage img( Resource::loadImage( "DocsIcon" ) ); |
498 | QPixmap pm; | 493 | QPixmap pm; |
499 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 494 | pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
500 | // It could add this itself if it handles docs | 495 | // It could add this itself if it handles docs |
501 | 496 | ||
502 | tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); | 497 | tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); |
503 | 498 | ||
504 | QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); | 499 | QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); |
505 | qApp->setMainWidget( this ); | 500 | qApp->setMainWidget( this ); |
506 | QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); | 501 | QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); |
507 | } | 502 | } |
508 | 503 | ||
509 | Launcher::~Launcher() | 504 | Launcher::~Launcher() |
510 | { | 505 | { |
511 | if ( tb ) | 506 | if ( tb ) |
512 | destroyGUI(); | 507 | destroyGUI(); |
513 | } | 508 | } |
514 | 509 | ||
515 | bool Launcher::requiresDocuments() const | 510 | bool Launcher::requiresDocuments() const |
516 | { | 511 | { |
517 | Config cfg( "Launcher" ); | 512 | Config cfg( "Launcher" ); |
518 | cfg.setGroup( "DocTab" ); | 513 | cfg.setGroup( "DocTab" ); |
519 | return cfg.readBoolEntry( "Enable", true ); | 514 | return cfg.readBoolEntry( "Enable", true ); |
520 | } | 515 | } |
521 | 516 | ||
522 | void Launcher::makeVisible() | 517 | void Launcher::makeVisible() |
523 | { | 518 | { |
524 | showMaximized(); | 519 | showMaximized(); |
525 | } | 520 | } |
526 | 521 | ||
527 | void Launcher::destroyGUI() | 522 | void Launcher::destroyGUI() |
528 | { | 523 | { |
529 | delete tb; | 524 | delete tb; |
530 | tb = 0; | 525 | tb = 0; |
531 | delete tabs; | 526 | delete tabs; |
532 | tabs =0; | 527 | tabs =0; |
533 | } | 528 | } |
534 | 529 | ||
535 | bool Launcher::eventFilter( QObject*, QEvent *ev ) | 530 | bool Launcher::eventFilter( QObject*, QEvent *ev ) |
536 | { | 531 | { |
537 | #ifdef QT_QWS_CUSTOM | 532 | #ifdef QT_QWS_CUSTOM |
538 | if ( ev->type() == QEvent::KeyPress ) { | 533 | if ( ev->type() == QEvent::KeyPress ) { |
539 | QKeyEvent *ke = (QKeyEvent *)ev; | 534 | QKeyEvent *ke = (QKeyEvent *)ev; |
540 | if ( ke->key() == Qt::Key_F11 ) { // menu key | 535 | if ( ke->key() == Qt::Key_F11 ) { // menu key |
541 | QWidget *active = qApp->activeWindow(); | 536 | QWidget *active = qApp->activeWindow(); |
542 | if ( active && active->isPopup() ) | 537 | if ( active && active->isPopup() ) |
543 | active->close(); | 538 | active->close(); |
544 | else { | 539 | else { |
545 | Global::terminateBuiltin("calibrate"); // No tr | 540 | Global::terminateBuiltin("calibrate"); // No tr |
546 | tb->launchStartMenu(); | 541 | tb->launchStartMenu(); |
547 | } | 542 | } |
548 | return TRUE; | 543 | return TRUE; |
549 | } | 544 | } |
550 | } | 545 | } |
551 | #else | 546 | #else |
552 | Q_UNUSED(ev); | 547 | Q_UNUSED(ev); |
553 | #endif | 548 | #endif |
554 | return FALSE; | 549 | return FALSE; |
555 | } | 550 | } |
556 | 551 | ||
557 | void Launcher::toggleSymbolInput() | ||
558 | { | ||
559 | tb->toggleSymbolInput(); | ||
560 | } | ||
561 | |||
562 | void Launcher::toggleNumLockState() | ||
563 | { | ||
564 | tb->toggleNumLockState(); | ||
565 | } | ||
566 | |||
567 | void Launcher::toggleCapsLockState() | ||
568 | { | ||
569 | tb->toggleCapsLockState(); | ||
570 | } | ||
571 | |||
572 | static bool isVisibleWindow(int wid) | 552 | static bool isVisibleWindow(int wid) |
573 | { | 553 | { |
574 | #ifdef Q_WS_QWS | 554 | #ifdef Q_WS_QWS |
575 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 555 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
576 | QWSWindow* w; | 556 | QWSWindow* w; |
577 | for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { | 557 | for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { |
578 | if ( w->winId() == wid ) | 558 | if ( w->winId() == wid ) |
579 | return !w->isFullyObscured(); | 559 | return !w->isFullyObscured(); |
580 | } | 560 | } |
581 | #endif | 561 | #endif |
582 | return FALSE; | 562 | return FALSE; |
583 | } | 563 | } |
584 | 564 | ||
585 | void Launcher::viewSelected(const QString& s) | 565 | void Launcher::viewSelected(const QString& s) |
586 | { | 566 | { |
587 | setCaption( s + tr(" - Launcher") ); | 567 | setCaption( s + tr(" - Launcher") ); |
588 | } | 568 | } |
589 | 569 | ||
590 | void Launcher::showTab(const QString& id) | 570 | void Launcher::showTab(const QString& id) |
591 | { | 571 | { |
592 | tabs->categoryBar->showTab(id); | 572 | tabs->categoryBar->showTab(id); |
593 | raise(); | 573 | raise(); |
594 | } | 574 | } |
595 | 575 | ||
596 | void Launcher::select( const AppLnk *appLnk ) | 576 | void Launcher::select( const AppLnk *appLnk ) |
597 | { | 577 | { |
598 | if ( appLnk->type() == "Folder" ) { // No tr | 578 | if ( appLnk->type() == "Folder" ) { // No tr |
599 | // Not supported: flat is simpler for the user | 579 | // Not supported: flat is simpler for the user |
600 | } else { | 580 | } else { |
601 | if ( appLnk->exec().isNull() ) { | 581 | if ( appLnk->exec().isNull() ) { |
602 | int i = QMessageBox::information(this,tr("No application"), | 582 | int i = QMessageBox::information(this,tr("No application"), |
603 | tr("<p>No application is defined for this document." | 583 | tr("<p>No application is defined for this document." |
604 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); | 584 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); |
605 | 585 | ||
606 | /* ### Fixme */ | 586 | /* ### Fixme */ |
607 | if ( i == 1 ) | 587 | if ( i == 1 ) |
608 | Global::execute("textedit",appLnk->file()); | 588 | Global::execute("textedit",appLnk->file()); |
609 | 589 | ||
610 | return; | 590 | return; |
611 | } | 591 | } |
612 | tabs->setBusy(TRUE); | 592 | tabs->setBusy(TRUE); |
613 | emit executing( appLnk ); | 593 | emit executing( appLnk ); |
614 | appLnk->execute(); | 594 | appLnk->execute(); |
615 | } | 595 | } |
616 | } | 596 | } |
617 | 597 | ||
618 | void Launcher::properties( AppLnk *appLnk ) | 598 | void Launcher::properties( AppLnk *appLnk ) |
619 | { | 599 | { |
620 | if ( appLnk->type() == "Folder" ) { // No tr | 600 | if ( appLnk->type() == "Folder" ) { // No tr |
621 | // Not supported: flat is simpler for the user | 601 | // Not supported: flat is simpler for the user |
622 | } else { | 602 | } else { |
623 | /* ### libqtopia FIXME also moving docLnks... */ | 603 | /* ### libqtopia FIXME also moving docLnks... */ |
624 | LnkProperties prop(appLnk,0 ); | 604 | LnkProperties prop(appLnk,0 ); |
625 | 605 | ||
626 | QPEApplication::execDialog( &prop ); | 606 | QPEApplication::execDialog( &prop ); |
627 | } | 607 | } |
628 | } | 608 | } |
629 | 609 | ||
630 | void Launcher::storageChanged( const QList<FileSystem> &fs ) | 610 | void Launcher::storageChanged( const QList<FileSystem> &fs ) |
631 | { | 611 | { |
632 | // ### update combo boxes if we had a combo box for the storage type | 612 | // ### update combo boxes if we had a combo box for the storage type |
633 | } | 613 | } |
634 | 614 | ||
635 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) | 615 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) |
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h index 29bd7db..2eaf77c 100644 --- a/core/launcher/launcher.h +++ b/core/launcher/launcher.h | |||
@@ -74,86 +74,83 @@ protected slots: | |||
74 | void initLayout(); | 74 | void initLayout(); |
75 | 75 | ||
76 | private slots: | 76 | private slots: |
77 | void launcherMessage( const QCString &, const QByteArray &); | 77 | void launcherMessage( const QCString &, const QByteArray &); |
78 | void appMessage( const QCString &, const QByteArray &); | 78 | void appMessage( const QCString &, const QByteArray &); |
79 | void setProgressStyle(); | 79 | void setProgressStyle(); |
80 | 80 | ||
81 | protected: | 81 | protected: |
82 | void paletteChange( const QPalette &p ); | 82 | void paletteChange( const QPalette &p ); |
83 | void styleChange( QStyle & ); | 83 | void styleChange( QStyle & ); |
84 | 84 | ||
85 | private: | 85 | private: |
86 | Launcher *launcher; | 86 | Launcher *launcher; |
87 | LauncherView *docview; | 87 | LauncherView *docview; |
88 | 88 | ||
89 | QWidgetStack *stack; | 89 | QWidgetStack *stack; |
90 | LauncherView *docLoadingWidget; | 90 | LauncherView *docLoadingWidget; |
91 | QProgressBar *docLoadingWidgetProgress; | 91 | QProgressBar *docLoadingWidgetProgress; |
92 | bool docLoadingWidgetEnabled; | 92 | bool docLoadingWidgetEnabled; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | class Launcher : public QMainWindow, public ServerInterface | 95 | class Launcher : public QMainWindow, public ServerInterface |
96 | { | 96 | { |
97 | Q_OBJECT | 97 | Q_OBJECT |
98 | public: | 98 | public: |
99 | Launcher(); | 99 | Launcher(); |
100 | ~Launcher(); | 100 | ~Launcher(); |
101 | 101 | ||
102 | // implementing ServerInterface | 102 | // implementing ServerInterface |
103 | void createGUI(); | 103 | void createGUI(); |
104 | void destroyGUI(); | 104 | void destroyGUI(); |
105 | void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap ); | 105 | void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap ); |
106 | void typeRemoved( const QString& type ); | 106 | void typeRemoved( const QString& type ); |
107 | void applicationAdded( const QString& type, const AppLnk& doc ); | 107 | void applicationAdded( const QString& type, const AppLnk& doc ); |
108 | void applicationRemoved( const QString& type, const AppLnk& doc ); | 108 | void applicationRemoved( const QString& type, const AppLnk& doc ); |
109 | void allApplicationsRemoved(); | 109 | void allApplicationsRemoved(); |
110 | void applicationStateChanged( const QString& name, ApplicationState state ); | 110 | void applicationStateChanged( const QString& name, ApplicationState state ); |
111 | void documentAdded( const DocLnk& doc ); | 111 | void documentAdded( const DocLnk& doc ); |
112 | void documentRemoved( const DocLnk& doc ); | 112 | void documentRemoved( const DocLnk& doc ); |
113 | void aboutToAddBegin(); | 113 | void aboutToAddBegin(); |
114 | void aboutToAddEnd(); | 114 | void aboutToAddEnd(); |
115 | void allDocumentsRemoved(); | 115 | void allDocumentsRemoved(); |
116 | void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); | 116 | void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); |
117 | void storageChanged( const QList<FileSystem> & ); | 117 | void storageChanged( const QList<FileSystem> & ); |
118 | void applicationScanningProgress( int percent ); | 118 | void applicationScanningProgress( int percent ); |
119 | void documentScanningProgress( int percent ); | 119 | void documentScanningProgress( int percent ); |
120 | bool requiresApplications() const { return TRUE; } | 120 | bool requiresApplications() const { return TRUE; } |
121 | bool requiresDocuments() const; | 121 | bool requiresDocuments() const; |
122 | void showLoadingDocs(); | 122 | void showLoadingDocs(); |
123 | void showDocTab(); | 123 | void showDocTab(); |
124 | 124 | ||
125 | QStringList idList() const { return ids; } | 125 | QStringList idList() const { return ids; } |
126 | 126 | ||
127 | public slots: | 127 | public slots: |
128 | void viewSelected(const QString&); | 128 | void viewSelected(const QString&); |
129 | void showTab(const QString&); | 129 | void showTab(const QString&); |
130 | void select( const AppLnk * ); | 130 | void select( const AppLnk * ); |
131 | void properties( AppLnk * ); | 131 | void properties( AppLnk * ); |
132 | void makeVisible(); | 132 | void makeVisible(); |
133 | 133 | ||
134 | signals: | 134 | signals: |
135 | void executing( const AppLnk * ); | 135 | void executing( const AppLnk * ); |
136 | 136 | ||
137 | private slots: | 137 | private slots: |
138 | void systemMessage( const QCString &, const QByteArray &); | 138 | void systemMessage( const QCString &, const QByteArray &); |
139 | void toggleSymbolInput(); | ||
140 | void toggleNumLockState(); | ||
141 | void toggleCapsLockState(); | ||
142 | 139 | ||
143 | protected: | 140 | protected: |
144 | bool eventFilter( QObject *o, QEvent *ev ); | 141 | bool eventFilter( QObject *o, QEvent *ev ); |
145 | 142 | ||
146 | private: | 143 | private: |
147 | void updateApps(); | 144 | void updateApps(); |
148 | void loadDocs(); | 145 | void loadDocs(); |
149 | void updateDocs(); | 146 | void updateDocs(); |
150 | void updateTabs(); | 147 | void updateTabs(); |
151 | 148 | ||
152 | LauncherTabWidget *tabs; | 149 | LauncherTabWidget *tabs; |
153 | QStringList ids; | 150 | QStringList ids; |
154 | TaskBar *tb; | 151 | TaskBar *tb; |
155 | 152 | ||
156 | bool docTabEnabled; | 153 | bool docTabEnabled; |
157 | }; | 154 | }; |
158 | 155 | ||
159 | #endif // LAUNCHERVIEW_H | 156 | #endif // LAUNCHERVIEW_H |
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 86e0d0d..abe238f 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -146,129 +146,129 @@ public: | |||
146 | return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); | 146 | return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); |
147 | } | 147 | } |
148 | void toggleNumLockState() | 148 | void toggleNumLockState() |
149 | { | 149 | { |
150 | nl = !nl; repaint(); | 150 | nl = !nl; repaint(); |
151 | } | 151 | } |
152 | void toggleCapsLockState() | 152 | void toggleCapsLockState() |
153 | { | 153 | { |
154 | cl = !cl; repaint(); | 154 | cl = !cl; repaint(); |
155 | } | 155 | } |
156 | void paintEvent( QPaintEvent * ) | 156 | void paintEvent( QPaintEvent * ) |
157 | { | 157 | { |
158 | int y = (height()-sizeHint().height())/2; | 158 | int y = (height()-sizeHint().height())/2; |
159 | QPainter p(this); | 159 | QPainter p(this); |
160 | if ( nl ) | 160 | if ( nl ) |
161 | p.drawPixmap(1,y,nl_pm); | 161 | p.drawPixmap(1,y,nl_pm); |
162 | if ( cl ) | 162 | if ( cl ) |
163 | p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); | 163 | p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); |
164 | } | 164 | } |
165 | private: | 165 | private: |
166 | QPixmap nl_pm, cl_pm; | 166 | QPixmap nl_pm, cl_pm; |
167 | bool nl, cl; | 167 | bool nl, cl; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | //--------------------------------------------------------------------------- | 170 | //--------------------------------------------------------------------------- |
171 | 171 | ||
172 | TaskBar::~TaskBar() | 172 | TaskBar::~TaskBar() |
173 | { | 173 | { |
174 | } | 174 | } |
175 | 175 | ||
176 | 176 | ||
177 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) | 177 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) |
178 | { | 178 | { |
179 | Config cfg( "Launcher" ); | 179 | Config cfg( "Launcher" ); |
180 | cfg.setGroup( "InputMethods" ); | 180 | cfg.setGroup( "InputMethods" ); |
181 | resizeRunningApp = cfg.readBoolEntry( "Resize", true ); | 181 | resizeRunningApp = cfg.readBoolEntry( "Resize", true ); |
182 | 182 | ||
183 | sm = new StartMenu( this ); | 183 | sm = new StartMenu( this ); |
184 | connect( sm, SIGNAL(tabSelected(const QString&)), this, | 184 | connect( sm, SIGNAL(tabSelected(const QString&)), this, |
185 | SIGNAL(tabSelected(const QString&)) ); | 185 | SIGNAL(tabSelected(const QString&)) ); |
186 | 186 | ||
187 | inputMethods = new InputMethods( this ); | 187 | inputMethods = new InputMethods( this ); |
188 | connect( inputMethods, SIGNAL(inputToggled(bool)), | 188 | connect( inputMethods, SIGNAL(inputToggled(bool)), |
189 | this, SLOT(calcMaxWindowRect()) ); | 189 | this, SLOT(calcMaxWindowRect()) ); |
190 | 190 | ||
191 | stack = new QWidgetStack( this ); | 191 | stack = new QWidgetStack( this ); |
192 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); | 192 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); |
193 | label = new QLabel(stack); | 193 | label = new QLabel(stack); |
194 | 194 | ||
195 | runningAppBar = new RunningAppBar(stack); | 195 | runningAppBar = new RunningAppBar(stack); |
196 | stack->raiseWidget(runningAppBar); | 196 | stack->raiseWidget(runningAppBar); |
197 | 197 | ||
198 | waitIcon = new Wait( this ); | 198 | waitIcon = new Wait( this ); |
199 | (void) new AppIcons( this ); | 199 | (void) new AppIcons( this ); |
200 | 200 | ||
201 | sysTray = new SysTray( this ); | 201 | sysTray = new SysTray( this ); |
202 | 202 | ||
203 | /* ### FIXME plugin loader and safe mode */ | 203 | /* ### FIXME plugin loader and safe mode */ |
204 | #if 0 | 204 | #if 0 |
205 | if (PluginLoader::inSafeMode()) | 205 | if (PluginLoader::inSafeMode()) |
206 | (void)new SafeMode( this ); | 206 | (void)new SafeMode( this ); |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | // ## make customizable in some way? | 209 | // ## make customizable in some way? |
210 | #ifdef QT_QWS_CUSTOM | 210 | #ifdef OPIE_TASKBAR_LOCK_KEY_STATE |
211 | lockState = new LockKeyState( this ); | 211 | lockState = new LockKeyState( this ); |
212 | #else | 212 | #else |
213 | lockState = 0; | 213 | lockState = 0; |
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | #if defined(Q_WS_QWS) | 216 | #if defined(Q_WS_QWS) |
217 | #if !defined(QT_NO_COP) | 217 | #if !defined(QT_NO_COP) |
218 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); | 218 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); |
219 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), | 219 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), |
220 | this, SLOT(receive(const QCString&,const QByteArray&)) ); | 220 | this, SLOT(receive(const QCString&,const QByteArray&)) ); |
221 | #endif | 221 | #endif |
222 | #endif | 222 | #endif |
223 | waitTimer = new QTimer( this ); | 223 | waitTimer = new QTimer( this ); |
224 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); | 224 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); |
225 | clearer = new QTimer( this ); | 225 | clearer = new QTimer( this ); |
226 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); | 226 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); |
227 | 227 | ||
228 | connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); | 228 | connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); |
229 | connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); | 229 | connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); |
230 | connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); | 230 | connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); |
231 | } | 231 | } |
232 | 232 | ||
233 | void TaskBar::setStatusMessage( const QString &text ) | 233 | void TaskBar::setStatusMessage( const QString &text ) |
234 | { | 234 | { |
235 | if ( !text.isEmpty() ) { | 235 | if ( !text.isEmpty() ) { |
236 | label->setText( text ); | 236 | label->setText( text ); |
237 | stack->raiseWidget( label ); | 237 | stack->raiseWidget( label ); |
238 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) | 238 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) |
239 | sysTray->hide(); | 239 | sysTray->hide(); |
240 | clearer->start( 3000, TRUE ); | 240 | clearer->start( 3000, TRUE ); |
241 | } else { | 241 | } else { |
242 | clearStatusBar(); | 242 | clearStatusBar(); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | void TaskBar::clearStatusBar() | 246 | void TaskBar::clearStatusBar() |
247 | { | 247 | { |
248 | label->clear(); | 248 | label->clear(); |
249 | stack->raiseWidget(runningAppBar); | 249 | stack->raiseWidget(runningAppBar); |
250 | if ( sysTray ) | 250 | if ( sysTray ) |
251 | sysTray->show(); | 251 | sysTray->show(); |
252 | // stack->raiseWidget( mru ); | 252 | // stack->raiseWidget( mru ); |
253 | } | 253 | } |
254 | 254 | ||
255 | void TaskBar::startWait() | 255 | void TaskBar::startWait() |
256 | { | 256 | { |
257 | waitIcon->setWaiting( true ); | 257 | waitIcon->setWaiting( true ); |
258 | // a catchall stop after 10 seconds... | 258 | // a catchall stop after 10 seconds... |
259 | waitTimer->start( 10 * 1000, true ); | 259 | waitTimer->start( 10 * 1000, true ); |
260 | } | 260 | } |
261 | 261 | ||
262 | void TaskBar::stopWait(const QString&) | 262 | void TaskBar::stopWait(const QString&) |
263 | { | 263 | { |
264 | waitTimer->stop(); | 264 | waitTimer->stop(); |
265 | waitIcon->setWaiting( false ); | 265 | waitIcon->setWaiting( false ); |
266 | } | 266 | } |
267 | 267 | ||
268 | void TaskBar::stopWait() | 268 | void TaskBar::stopWait() |
269 | { | 269 | { |
270 | waitTimer->stop(); | 270 | waitTimer->stop(); |
271 | waitIcon->setWaiting( false ); | 271 | waitIcon->setWaiting( false ); |
272 | } | 272 | } |
273 | 273 | ||
274 | /* | 274 | /* |