summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-11-06 04:50:40 (UTC)
committer kergoth <kergoth>2002-11-06 04:50:40 (UTC)
commit21f27ec4a1f18321ac00d28d93cb1cb7dc957d1f (patch) (unidiff)
treebbe53dd1f3749541be4f1616f20d9a0d9ee6ea0b
parentac1509552bf764ff136690e0e7014d37a59d073e (diff)
downloadopie-21f27ec4a1f18321ac00d28d93cb1cb7dc957d1f.zip
opie-21f27ec4a1f18321ac00d28d93cb1cb7dc957d1f.tar.gz
opie-21f27ec4a1f18321ac00d28d93cb1cb7dc957d1f.tar.bz2
Changing sharp define. if someone doesnt like it, let me know :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configs/linux-sharp-g++-shared2
-rw-r--r--configs/linux-sharp-g++-shared-debug2
-rw-r--r--configs/linux-sharp-g++-static2
-rw-r--r--configs/linux-sharp-g++-static-debug2
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp2
-rw-r--r--core/launcher/desktop.cpp2
-rw-r--r--core/launcher/main.cpp2
-rw-r--r--core/launcher/shutdownimpl.cpp2
-rw-r--r--core/launcher/taskbar.cpp4
-rw-r--r--core/multimedia/opieplayer/loopcontrol_threaded.cpp2
-rw-r--r--library/alarmserver.cpp2
-rw-r--r--library/power.cpp4
-rw-r--r--library/storage.cpp2
-rw-r--r--qt/qte233-for-opie091-keyboard.patch4
14 files changed, 17 insertions, 17 deletions
diff --git a/configs/linux-sharp-g++-shared b/configs/linux-sharp-g++-shared
index 9c1dd03..862ee34 100644
--- a/configs/linux-sharp-g++-shared
+++ b/configs/linux-sharp-g++-shared
@@ -32,63 +32,63 @@ SYSCONF_LIBS_OPENGL =
32 SYSCONF_LIBS_YACC= 32 SYSCONF_LIBS_YACC=
33 33
34# Linking applications 34# Linking applications
35 SYSCONF_LINK = arm-linux-gcc 35 SYSCONF_LINK = arm-linux-gcc
36 SYSCONF_LFLAGS = 36 SYSCONF_LFLAGS =
37 SYSCONF_LIBS = 37 SYSCONF_LIBS =
38 38
39# Link flags for shared objects 39# Link flags for shared objects
40 SYSCONF_LFLAGS_SHOBJ= -shared 40 SYSCONF_LFLAGS_SHOBJ= -shared
41 41
42# Flags for threading 42# Flags for threading
43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT 43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT 44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
45 SYSCONF_LFLAGS_THREAD= 45 SYSCONF_LFLAGS_THREAD=
46 SYSCONF_LIBS_THREAD= -lpthread 46 SYSCONF_LIBS_THREAD= -lpthread
47 47
48# Meta-object compiler 48# Meta-object compiler
49 SYSCONF_MOC = $(QTDIR)/bin/moc 49 SYSCONF_MOC = $(QTDIR)/bin/moc
50 50
51# UI compiler 51# UI compiler
52 SYSCONF_UIC = $(QTDIR)/bin/uic 52 SYSCONF_UIC = $(QTDIR)/bin/uic
53 53
54# Linking shared libraries 54# Linking shared libraries
55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
56# - Place target in $(DESTDIR) - which has a trailing / 56# - Place target in $(DESTDIR) - which has a trailing /
57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) 57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
58# 58#
59 SYSCONF_LINK_SHLIB= arm-linux-gcc 59 SYSCONF_LINK_SHLIB= arm-linux-gcc
60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) 60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ 61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ 62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
63 $(OBJECTS) $(OBJMOC) $(LIBS) && \ 63 $(OBJECTS) $(OBJMOC) $(LIBS) && \
64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ 64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
65 cd $(DESTDIR) && \ 65 cd $(DESTDIR) && \
66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ 66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ 67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ 68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) 69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
70 70
71# Linking static libraries 71# Linking static libraries
72# - Build the $(TARGET) library, eg. lib$(TARGET).a 72# - Build the $(TARGET) library, eg. lib$(TARGET).a
73# - Place target in $(DESTDIR) - which has a trailing / 73# - Place target in $(DESTDIR) - which has a trailing /
74# 74#
75 SYSCONF_AR = arm-linux-ar cqs 75 SYSCONF_AR = arm-linux-ar cqs
76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a 76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ 77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) 78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
79# Compiling application source 79# Compiling application source
80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W 80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W
81 SYSCONF_CFLAGS = -pipe -O2 -Wall -W 81 SYSCONF_CFLAGS = -pipe -O2 -Wall -W
82# Default link type (static linking is still be used where required) 82# Default link type (static linking is still be used where required)
83 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED) 83 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED)
84 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED) 84 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED)
85# Compiling library source 85# Compiling library source
86 SYSCONF_CXXFLAGS_LIB= -fPIC 86 SYSCONF_CXXFLAGS_LIB= -fPIC
87 SYSCONF_CFLAGS_LIB= -fPIC 87 SYSCONF_CFLAGS_LIB= -fPIC
88# Compiling shared-object source 88# Compiling shared-object source
89 SYSCONF_CXXFLAGS_SHOBJ= -fPIC 89 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
90 SYSCONF_CFLAGS_SHOBJ= -fPIC 90 SYSCONF_CFLAGS_SHOBJ= -fPIC
91# Linking Qt 91# Linking Qt
92 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) 92 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
93# Linking Qt applications 93# Linking Qt applications
94 SYSCONF_LIBS_QTAPP= 94 SYSCONF_LIBS_QTAPP=
diff --git a/configs/linux-sharp-g++-shared-debug b/configs/linux-sharp-g++-shared-debug
index 810eef5..5e7819c 100644
--- a/configs/linux-sharp-g++-shared-debug
+++ b/configs/linux-sharp-g++-shared-debug
@@ -32,63 +32,63 @@ SYSCONF_LIBS_OPENGL =
32 SYSCONF_LIBS_YACC= 32 SYSCONF_LIBS_YACC=
33 33
34# Linking applications 34# Linking applications
35 SYSCONF_LINK = arm-linux-gcc 35 SYSCONF_LINK = arm-linux-gcc
36 SYSCONF_LFLAGS = 36 SYSCONF_LFLAGS =
37 SYSCONF_LIBS = 37 SYSCONF_LIBS =
38 38
39# Link flags for shared objects 39# Link flags for shared objects
40 SYSCONF_LFLAGS_SHOBJ= -shared 40 SYSCONF_LFLAGS_SHOBJ= -shared
41 41
42# Flags for threading 42# Flags for threading
43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT 43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT 44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
45 SYSCONF_LFLAGS_THREAD= 45 SYSCONF_LFLAGS_THREAD=
46 SYSCONF_LIBS_THREAD= -lpthread 46 SYSCONF_LIBS_THREAD= -lpthread
47 47
48# Meta-object compiler 48# Meta-object compiler
49 SYSCONF_MOC = $(QTDIR)/bin/moc 49 SYSCONF_MOC = $(QTDIR)/bin/moc
50 50
51# UI compiler 51# UI compiler
52 SYSCONF_UIC = $(QTDIR)/bin/uic 52 SYSCONF_UIC = $(QTDIR)/bin/uic
53 53
54# Linking shared libraries 54# Linking shared libraries
55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
56# - Place target in $(DESTDIR) - which has a trailing / 56# - Place target in $(DESTDIR) - which has a trailing /
57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) 57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
58# 58#
59 SYSCONF_LINK_SHLIB= arm-linux-gcc 59 SYSCONF_LINK_SHLIB= arm-linux-gcc
60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) 60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ 61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ 62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
63 $(OBJECTS) $(OBJMOC) $(LIBS) && \ 63 $(OBJECTS) $(OBJMOC) $(LIBS) && \
64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ 64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
65 cd $(DESTDIR) && \ 65 cd $(DESTDIR) && \
66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ 66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ 67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ 68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) 69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
70 70
71# Linking static libraries 71# Linking static libraries
72# - Build the $(TARGET) library, eg. lib$(TARGET).a 72# - Build the $(TARGET) library, eg. lib$(TARGET).a
73# - Place target in $(DESTDIR) - which has a trailing / 73# - Place target in $(DESTDIR) - which has a trailing /
74# 74#
75 SYSCONF_AR = arm-linux-ar cqs 75 SYSCONF_AR = arm-linux-ar cqs
76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a 76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ 77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) 78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
79# Compiling application source 79# Compiling application source
80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -g -Wall -W 80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -g -Wall -W
81 SYSCONF_CFLAGS = -pipe -g -Wall -W 81 SYSCONF_CFLAGS = -pipe -g -Wall -W
82# Default link type (static linking is still be used where required) 82# Default link type (static linking is still be used where required)
83 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED) 83 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED)
84 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED) 84 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED)
85# Compiling library source 85# Compiling library source
86 SYSCONF_CXXFLAGS_LIB= -fPIC 86 SYSCONF_CXXFLAGS_LIB= -fPIC
87 SYSCONF_CFLAGS_LIB= -fPIC 87 SYSCONF_CFLAGS_LIB= -fPIC
88# Compiling shared-object source 88# Compiling shared-object source
89 SYSCONF_CXXFLAGS_SHOBJ= -fPIC 89 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
90 SYSCONF_CFLAGS_SHOBJ= -fPIC 90 SYSCONF_CFLAGS_SHOBJ= -fPIC
91# Linking Qt 91# Linking Qt
92 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) 92 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
93# Linking Qt applications 93# Linking Qt applications
94 SYSCONF_LIBS_QTAPP= 94 SYSCONF_LIBS_QTAPP=
diff --git a/configs/linux-sharp-g++-static b/configs/linux-sharp-g++-static
index 15e4c7f..22d3d04 100644
--- a/configs/linux-sharp-g++-static
+++ b/configs/linux-sharp-g++-static
@@ -32,62 +32,62 @@ SYSCONF_LIBS_OPENGL =
32 SYSCONF_LIBS_YACC= 32 SYSCONF_LIBS_YACC=
33 33
34# Linking applications 34# Linking applications
35 SYSCONF_LINK = arm-linux-gcc 35 SYSCONF_LINK = arm-linux-gcc
36 SYSCONF_LFLAGS = 36 SYSCONF_LFLAGS =
37 SYSCONF_LIBS = 37 SYSCONF_LIBS =
38 38
39# Link flags for shared objects 39# Link flags for shared objects
40 SYSCONF_LFLAGS_SHOBJ= -shared 40 SYSCONF_LFLAGS_SHOBJ= -shared
41 41
42# Flags for threading 42# Flags for threading
43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT 43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT 44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
45 SYSCONF_LFLAGS_THREAD= 45 SYSCONF_LFLAGS_THREAD=
46 SYSCONF_LIBS_THREAD= -lpthread 46 SYSCONF_LIBS_THREAD= -lpthread
47 47
48# Meta-object compiler 48# Meta-object compiler
49 SYSCONF_MOC = $(QTDIR)/bin/moc 49 SYSCONF_MOC = $(QTDIR)/bin/moc
50 50
51# UI compiler 51# UI compiler
52 SYSCONF_UIC = $(QTDIR)/bin/uic 52 SYSCONF_UIC = $(QTDIR)/bin/uic
53 53
54# Linking shared libraries 54# Linking shared libraries
55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
56# - Place target in $(DESTDIR) - which has a trailing / 56# - Place target in $(DESTDIR) - which has a trailing /
57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) 57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
58# 58#
59 SYSCONF_LINK_SHLIB= arm-linux-gcc 59 SYSCONF_LINK_SHLIB= arm-linux-gcc
60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) 60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ 61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ 62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
63 $(OBJECTS) $(OBJMOC) $(LIBS) && \ 63 $(OBJECTS) $(OBJMOC) $(LIBS) && \
64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ 64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
65 cd $(DESTDIR) && \ 65 cd $(DESTDIR) && \
66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ 66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ 67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ 68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) 69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
70 70
71# Linking static libraries 71# Linking static libraries
72# - Build the $(TARGET) library, eg. lib$(TARGET).a 72# - Build the $(TARGET) library, eg. lib$(TARGET).a
73# - Place target in $(DESTDIR) - which has a trailing / 73# - Place target in $(DESTDIR) - which has a trailing /
74# 74#
75 SYSCONF_AR = arm-linux-ar cqs 75 SYSCONF_AR = arm-linux-ar cqs
76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a 76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ 77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) 78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
79# Compiling application source 79# Compiling application source
80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W 80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W
81 SYSCONF_CFLAGS = -pipe -O2 -Wall -W 81 SYSCONF_CFLAGS = -pipe -O2 -Wall -W
82 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_STATIC) 82 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_STATIC)
83 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_STATIC) 83 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_STATIC)
84# Compiling library source 84# Compiling library source
85 SYSCONF_CXXFLAGS_LIB= 85 SYSCONF_CXXFLAGS_LIB=
86 SYSCONF_CFLAGS_LIB= 86 SYSCONF_CFLAGS_LIB=
87# Compiling shared-object source 87# Compiling shared-object source
88 SYSCONF_CXXFLAGS_SHOBJ= -fPIC 88 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
89 SYSCONF_CFLAGS_SHOBJ= -fPIC 89 SYSCONF_CFLAGS_SHOBJ= -fPIC
90# Linking Qt 90# Linking Qt
91 SYSCONF_LIBS_QTLIB= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) 91 SYSCONF_LIBS_QTLIB= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
92# Linking Qt applications 92# Linking Qt applications
93 SYSCONF_LIBS_QTAPP= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11) 93 SYSCONF_LIBS_QTAPP= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11)
diff --git a/configs/linux-sharp-g++-static-debug b/configs/linux-sharp-g++-static-debug
index d7715ed..9c1afd3 100644
--- a/configs/linux-sharp-g++-static-debug
+++ b/configs/linux-sharp-g++-static-debug
@@ -32,62 +32,62 @@ SYSCONF_LIBS_OPENGL =
32 SYSCONF_LIBS_YACC= 32 SYSCONF_LIBS_YACC=
33 33
34# Linking applications 34# Linking applications
35 SYSCONF_LINK = arm-linux-gcc 35 SYSCONF_LINK = arm-linux-gcc
36 SYSCONF_LFLAGS = 36 SYSCONF_LFLAGS =
37 SYSCONF_LIBS = 37 SYSCONF_LIBS =
38 38
39# Link flags for shared objects 39# Link flags for shared objects
40 SYSCONF_LFLAGS_SHOBJ= -shared 40 SYSCONF_LFLAGS_SHOBJ= -shared
41 41
42# Flags for threading 42# Flags for threading
43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT 43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT 44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
45 SYSCONF_LFLAGS_THREAD= 45 SYSCONF_LFLAGS_THREAD=
46 SYSCONF_LIBS_THREAD= -lpthread 46 SYSCONF_LIBS_THREAD= -lpthread
47 47
48# Meta-object compiler 48# Meta-object compiler
49 SYSCONF_MOC = $(QTDIR)/bin/moc 49 SYSCONF_MOC = $(QTDIR)/bin/moc
50 50
51# UI compiler 51# UI compiler
52 SYSCONF_UIC = $(QTDIR)/bin/uic 52 SYSCONF_UIC = $(QTDIR)/bin/uic
53 53
54# Linking shared libraries 54# Linking shared libraries
55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2 55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
56# - Place target in $(DESTDIR) - which has a trailing / 56# - Place target in $(DESTDIR) - which has a trailing /
57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH) 57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
58# 58#
59 SYSCONF_LINK_SHLIB= arm-linux-gcc 59 SYSCONF_LINK_SHLIB= arm-linux-gcc
60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH) 60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \ 61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \ 62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
63 $(OBJECTS) $(OBJMOC) $(LIBS) && \ 63 $(OBJECTS) $(OBJMOC) $(LIBS) && \
64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ 64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
65 cd $(DESTDIR) && \ 65 cd $(DESTDIR) && \
66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \ 66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \ 67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \ 68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) 69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
70 70
71# Linking static libraries 71# Linking static libraries
72# - Build the $(TARGET) library, eg. lib$(TARGET).a 72# - Build the $(TARGET) library, eg. lib$(TARGET).a
73# - Place target in $(DESTDIR) - which has a trailing / 73# - Place target in $(DESTDIR) - which has a trailing /
74# 74#
75 SYSCONF_AR = arm-linux-ar cqs 75 SYSCONF_AR = arm-linux-ar cqs
76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a 76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \ 77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC) 78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
79# Compiling application source 79# Compiling application source
80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -g -Wall -W 80 SYSCONF_CXXFLAGS= -pipe -DQT_QWS_EBX -DQT_QWS_SHARP -DQWS -fno-exceptions -fno-rtti -g -Wall -W
81 SYSCONF_CFLAGS = -pipe -g -Wall -W 81 SYSCONF_CFLAGS = -pipe -g -Wall -W
82 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_STATIC) 82 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_STATIC)
83 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_STATIC) 83 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_STATIC)
84# Compiling library source 84# Compiling library source
85 SYSCONF_CXXFLAGS_LIB= 85 SYSCONF_CXXFLAGS_LIB=
86 SYSCONF_CFLAGS_LIB= 86 SYSCONF_CFLAGS_LIB=
87# Compiling shared-object source 87# Compiling shared-object source
88 SYSCONF_CXXFLAGS_SHOBJ= -fPIC 88 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
89 SYSCONF_CFLAGS_SHOBJ= -fPIC 89 SYSCONF_CFLAGS_SHOBJ= -fPIC
90# Linking Qt 90# Linking Qt
91 SYSCONF_LIBS_QTLIB= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) 91 SYSCONF_LIBS_QTLIB= $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
92# Linking Qt applications 92# Linking Qt applications
93 SYSCONF_LIBS_QTAPP= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11) 93 SYSCONF_LIBS_QTAPP= $(SYSCONF_LFLAGS_X11) $(SYSCONF_CXXFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT) $(SYSCONF_LIBS_X11)
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index d6ee6e8..cacc3c4 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -1060,97 +1060,97 @@ bool TEWidget::eventFilter( QObject *obj, QEvent *e )
1060 if( ke->state() == ShiftButton && ke->key() == Key_Tab) { 1060 if( ke->state() == ShiftButton && ke->key() == Key_Tab) {
1061 //lets hardcode this sucker 1061 //lets hardcode this sucker
1062 1062
1063// qDebug("key pressed 2 is 0x%x", ke->key()); 1063// qDebug("key pressed 2 is 0x%x", ke->key());
1064 emitText("\\"); // expose 1064 emitText("\\"); // expose
1065 } 1065 }
1066 else if( ke->state() == ControlButton && ke->key() == Key_V) { 1066 else if( ke->state() == ControlButton && ke->key() == Key_V) {
1067 pasteClipboard(); 1067 pasteClipboard();
1068 } 1068 }
1069 else 1069 else
1070 emit keyPressedSignal(ke); // expose 1070 emit keyPressedSignal(ke); // expose
1071 ke->accept(); 1071 ke->accept();
1072#ifdef FAKE_CTRL_AND_ALT 1072#ifdef FAKE_CTRL_AND_ALT
1073 if ( dele ) delete e; 1073 if ( dele ) delete e;
1074#endif 1074#endif
1075 return true; // stop the event 1075 return true; // stop the event
1076 } 1076 }
1077 if ( e->type() == QEvent::Enter ) { 1077 if ( e->type() == QEvent::Enter ) {
1078 QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()), 1078 QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()),
1079 this, SLOT(onClearSelection()) ); 1079 this, SLOT(onClearSelection()) );
1080 } 1080 }
1081 if ( e->type() == QEvent::Leave ) { 1081 if ( e->type() == QEvent::Leave ) {
1082 QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), 1082 QObject::connect( (QObject*)cb, SIGNAL(dataChanged()),
1083 this, SLOT(onClearSelection()) ); 1083 this, SLOT(onClearSelection()) );
1084 } 1084 }
1085 return QFrame::eventFilter( obj, e ); 1085 return QFrame::eventFilter( obj, e );
1086} 1086}
1087 1087
1088/* ------------------------------------------------------------------------- */ 1088/* ------------------------------------------------------------------------- */
1089/* */ 1089/* */
1090/* Frame */ 1090/* Frame */
1091/* */ 1091/* */
1092/* ------------------------------------------------------------------------- */ 1092/* ------------------------------------------------------------------------- */
1093 1093
1094void TEWidget::frameChanged() 1094void TEWidget::frameChanged()
1095{ 1095{
1096 propagateSize(); 1096 propagateSize();
1097 update(); 1097 update();
1098} 1098}
1099 1099
1100/* ------------------------------------------------------------------------- */ 1100/* ------------------------------------------------------------------------- */
1101/* */ 1101/* */
1102/* Sound */ 1102/* Sound */
1103/* */ 1103/* */
1104/* ------------------------------------------------------------------------- */ 1104/* ------------------------------------------------------------------------- */
1105 1105
1106void TEWidget::Bell() 1106void TEWidget::Bell()
1107{ 1107{
1108//#ifdef QT_QWS_CUSTOM 1108//#ifdef QT_QWS_SHARP
1109//# ifndef QT_NO_COP 1109//# ifndef QT_NO_COP
1110 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); 1110 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
1111//# endif 1111//# endif
1112//#else 1112//#else
1113//# ifndef QT_NO_SOUND 1113//# ifndef QT_NO_SOUND
1114// QSound::play(Resource::findSound("alarm")); 1114// QSound::play(Resource::findSound("alarm"));
1115//# endif 1115//# endif
1116//#endif 1116//#endif
1117 1117
1118// QApplication::beep(); 1118// QApplication::beep();
1119} 1119}
1120 1120
1121/* ------------------------------------------------------------------------- */ 1121/* ------------------------------------------------------------------------- */
1122/* */ 1122/* */
1123/* Auxiluary */ 1123/* Auxiluary */
1124/* */ 1124/* */
1125/* ------------------------------------------------------------------------- */ 1125/* ------------------------------------------------------------------------- */
1126 1126
1127void TEWidget::clearImage() 1127void TEWidget::clearImage()
1128// initialize the image 1128// initialize the image
1129// for internal use only 1129// for internal use only
1130{ 1130{
1131 for (int y = 0; y < lines; y++) 1131 for (int y = 0; y < lines; y++)
1132 for (int x = 0; x < columns; x++) 1132 for (int x = 0; x < columns; x++)
1133 { 1133 {
1134 image[loc(x,y)].c = 0xff; //' '; 1134 image[loc(x,y)].c = 0xff; //' ';
1135 image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR; 1135 image[loc(x,y)].f = 0xff; //DEFAULT_FORE_COLOR;
1136 image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR; 1136 image[loc(x,y)].b = 0xff; //DEFAULT_BACK_COLOR;
1137 image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION; 1137 image[loc(x,y)].r = 0xff; //DEFAULT_RENDITION;
1138 } 1138 }
1139} 1139}
1140 1140
1141// Create Image /////////////////////////////////////////////////////// 1141// Create Image ///////////////////////////////////////////////////////
1142 1142
1143void TEWidget::calcGeometry() 1143void TEWidget::calcGeometry()
1144{ 1144{
1145 int showhscrollbar = 1; 1145 int showhscrollbar = 1;
1146 int hwidth = 0; 1146 int hwidth = 0;
1147 int dcolumns; 1147 int dcolumns;
1148 Config cfg("Konsole"); 1148 Config cfg("Konsole");
1149 cfg.setGroup("ScrollBar"); 1149 cfg.setGroup("ScrollBar");
1150 useHorzScroll=cfg.readBoolEntry("HorzScroll",0); 1150 useHorzScroll=cfg.readBoolEntry("HorzScroll",0);
1151 1151
1152 if(vcolumns == 0) showhscrollbar = 0; 1152 if(vcolumns == 0) showhscrollbar = 0;
1153 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); 1153 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width();
1154 1154
1155 scrollbar->resize(QApplication::style().scrollBarExtent().width(), 1155 scrollbar->resize(QApplication::style().scrollBarExtent().width(),
1156 contentsRect().height() - hwidth); 1156 contentsRect().height() - hwidth);
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index f2e00d8..3e8c731 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -1,91 +1,91 @@
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 "desktop.h" 21#include "desktop.h"
22#include "info.h" 22#include "info.h"
23#include "launcher.h" 23#include "launcher.h"
24#include "qcopbridge.h" 24#include "qcopbridge.h"
25#include "shutdownimpl.h" 25#include "shutdownimpl.h"
26#include "startmenu.h" 26#include "startmenu.h"
27#include "taskbar.h" 27#include "taskbar.h"
28#include "transferserver.h" 28#include "transferserver.h"
29#include "irserver.h" 29#include "irserver.h"
30#include "packageslave.h" 30#include "packageslave.h"
31#include "screensaver.h" 31#include "screensaver.h"
32 32
33#include <qpe/applnk.h> 33#include <qpe/applnk.h>
34#include <qpe/mimetype.h> 34#include <qpe/mimetype.h>
35#include <qpe/password.h> 35#include <qpe/password.h>
36#include <qpe/config.h> 36#include <qpe/config.h>
37#include <qpe/power.h> 37#include <qpe/power.h>
38#include <qpe/timeconversion.h> 38#include <qpe/timeconversion.h>
39#include <qpe/qcopenvelope_qws.h> 39#include <qpe/qcopenvelope_qws.h>
40#include <qpe/network.h> 40#include <qpe/network.h>
41#include <qpe/global.h> 41#include <qpe/global.h>
42 42
43#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) 43#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ )
44#include <qpe/custom.h> 44#include <qpe/custom.h>
45#endif 45#endif
46 46
47#include <opie/odevice.h> 47#include <opie/odevice.h>
48 48
49#include <qgfx_qws.h> 49#include <qgfx_qws.h>
50#include <qmainwindow.h> 50#include <qmainwindow.h>
51#include <qmessagebox.h> 51#include <qmessagebox.h>
52#include <qtimer.h> 52#include <qtimer.h>
53#include <qwindowsystem_qws.h> 53#include <qwindowsystem_qws.h>
54 54
55#include <qvaluelist.h> 55#include <qvaluelist.h>
56 56
57#include <stdlib.h> 57#include <stdlib.h>
58#include <unistd.h> 58#include <unistd.h>
59#include <fcntl.h> 59#include <fcntl.h>
60 60
61using namespace Opie; 61using namespace Opie;
62 62
63class QCopKeyRegister 63class QCopKeyRegister
64{ 64{
65public: 65public:
66 QCopKeyRegister() : keyCode( 0 ) 66 QCopKeyRegister() : keyCode( 0 )
67 { } 67 { }
68 QCopKeyRegister( int k, const QString &c, const QString &m ) 68 QCopKeyRegister( int k, const QString &c, const QString &m )
69 : keyCode( k ), channel( c ), message( m ) 69 : keyCode( k ), channel( c ), message( m )
70 { } 70 { }
71 71
72 int getKeyCode() const 72 int getKeyCode() const
73 { 73 {
74 return keyCode; 74 return keyCode;
75 } 75 }
76 QString getChannel() const 76 QString getChannel() const
77 { 77 {
78 return channel; 78 return channel;
79 } 79 }
80 QString getMessage() const 80 QString getMessage() const
81 { 81 {
82 return message; 82 return message;
83 } 83 }
84 84
85private: 85private:
86 int keyCode; 86 int keyCode;
87 QString channel, message; 87 QString channel, message;
88}; 88};
89 89
90typedef QValueList<QCopKeyRegister> KeyRegisterList; 90typedef QValueList<QCopKeyRegister> KeyRegisterList;
91KeyRegisterList keyRegisterList; 91KeyRegisterList keyRegisterList;
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index b517c7d..8b91f5d 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -1,76 +1,76 @@
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 "desktop.h" 21#include "desktop.h"
22#include "taskbar.h" 22#include "taskbar.h"
23#include "stabmon.h" 23#include "stabmon.h"
24 24
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/network.h> 26#include <qpe/network.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) 28#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ )
29#include <qpe/custom.h> 29#include <qpe/custom.h>
30#endif 30#endif
31 31
32#include <opie/odevice.h> 32#include <opie/odevice.h>
33 33
34#include <qmessagebox.h> 34#include <qmessagebox.h>
35#include <qfile.h> 35#include <qfile.h>
36#include <qimage.h> 36#include <qimage.h>
37#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
38#include <qpe/qcopenvelope_qws.h> 38#include <qpe/qcopenvelope_qws.h>
39#include <qpe/alarmserver.h> 39#include <qpe/alarmserver.h>
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42#include <stdio.h> 42#include <stdio.h>
43#include <signal.h> 43#include <signal.h>
44#include <unistd.h> 44#include <unistd.h>
45 45
46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 46#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
47#include "../calibrate/calibrate.h" 47#include "../calibrate/calibrate.h"
48#endif 48#endif
49 49
50using namespace Opie; 50using namespace Opie;
51 51
52void initEnvironment() 52void initEnvironment()
53{ 53{
54 Config config("locale"); 54 Config config("locale");
55 config.setGroup( "Location" ); 55 config.setGroup( "Location" );
56 QString tz = config.readEntry( "Timezone", getenv("TZ") ); 56 QString tz = config.readEntry( "Timezone", getenv("TZ") );
57 57
58 // if not timezone set, pick New York 58 // if not timezone set, pick New York
59 if (tz.isNull()) 59 if (tz.isNull())
60 tz = "America/New_York"; 60 tz = "America/New_York";
61 61
62 setenv( "TZ", tz, 1 ); 62 setenv( "TZ", tz, 1 );
63 config.writeEntry( "Timezone", tz); 63 config.writeEntry( "Timezone", tz);
64 64
65 config.setGroup( "Language" ); 65 config.setGroup( "Language" );
66 QString lang = config.readEntry( "Language", getenv("LANG") ); 66 QString lang = config.readEntry( "Language", getenv("LANG") );
67 if ( !lang.isNull() ) 67 if ( !lang.isNull() )
68 setenv( "LANG", lang, 1 ); 68 setenv( "LANG", lang, 1 );
69} 69}
70 70
71 71
72int initApplication( int argc, char ** argv ) 72int initApplication( int argc, char ** argv )
73{ 73{
74 initEnvironment(); 74 initEnvironment();
75 75
76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX) 76#if !defined(QT_QWS_CASSIOPEIA) && !defined(QT_QWS_IPAQ) && !defined(QT_QWS_EBX)
diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp
index 9292bb8..a202b7b 100644
--- a/core/launcher/shutdownimpl.cpp
+++ b/core/launcher/shutdownimpl.cpp
@@ -70,97 +70,97 @@ ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl )
70 btngrp-> insert ( quit, 4 ); 70 btngrp-> insert ( quit, 4 );
71 grid-> addWidget ( quit, 1, 1 ); 71 grid-> addWidget ( quit, 1, 1 );
72 72
73 QPushButton *reboot = new QPushButton ( tr( "Reboot" ), btngrp, "reboot" ); 73 QPushButton *reboot = new QPushButton ( tr( "Reboot" ), btngrp, "reboot" );
74 changeButtonColor ( reboot, QColor( 236, 183, 181 ) ); 74 changeButtonColor ( reboot, QColor( 236, 183, 181 ) );
75 btngrp-> insert ( reboot, 2 ); 75 btngrp-> insert ( reboot, 2 );
76 grid-> addWidget( reboot, 1, 0 ); 76 grid-> addWidget( reboot, 1, 0 );
77 77
78 QPushButton *restart = new QPushButton ( tr( "Restart Opie" ), btngrp, "restart" ); 78 QPushButton *restart = new QPushButton ( tr( "Restart Opie" ), btngrp, "restart" );
79 changeButtonColor ( restart, QColor( 236, 236, 179 ) ); 79 changeButtonColor ( restart, QColor( 236, 236, 179 ) );
80 btngrp-> insert ( restart, 3 ); 80 btngrp-> insert ( restart, 3 );
81 grid-> addWidget ( restart, 0, 1 ); 81 grid-> addWidget ( restart, 0, 1 );
82 82
83 QPushButton *shutdown = new QPushButton( tr( "Shutdown" ), btngrp, "shutdown" ); 83 QPushButton *shutdown = new QPushButton( tr( "Shutdown" ), btngrp, "shutdown" );
84 changeButtonColor ( shutdown, QColor( 236, 183, 181 ) ); 84 changeButtonColor ( shutdown, QColor( 236, 183, 181 ) );
85 btngrp-> insert ( shutdown, 1 ); 85 btngrp-> insert ( shutdown, 1 );
86 grid-> addWidget ( shutdown, 0, 0 ); 86 grid-> addWidget ( shutdown, 0, 0 );
87 87
88 vbox-> addWidget ( btngrp ); 88 vbox-> addWidget ( btngrp );
89 89
90 m_info = new QLabel ( this, "info" ); 90 m_info = new QLabel ( this, "info" );
91 m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) ); 91 m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) );
92 vbox-> addWidget ( m_info ); 92 vbox-> addWidget ( m_info );
93 93
94 m_progress = new QProgressBar ( this, "progressBar" ); 94 m_progress = new QProgressBar ( this, "progressBar" );
95 m_progress-> setFrameShape ( QProgressBar::Panel ); 95 m_progress-> setFrameShape ( QProgressBar::Panel );
96 m_progress-> setFrameShadow ( QProgressBar::Sunken ); 96 m_progress-> setFrameShadow ( QProgressBar::Sunken );
97 m_progress-> setTotalSteps ( 20 ); 97 m_progress-> setTotalSteps ( 20 );
98 m_progress-> setIndicatorFollowsStyle ( false ); 98 m_progress-> setIndicatorFollowsStyle ( false );
99 vbox-> addWidget ( m_progress ); 99 vbox-> addWidget ( m_progress );
100 100
101 vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 101 vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
102 102
103 QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" ); 103 QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" );
104 changeButtonColor ( cancel, QColor( 181, 222, 178 ) ); 104 changeButtonColor ( cancel, QColor( 181, 222, 178 ) );
105 cancel-> setDefault ( true ); 105 cancel-> setDefault ( true );
106 cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) ); 106 cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) );
107 vbox-> addWidget ( cancel ); 107 vbox-> addWidget ( cancel );
108 108
109 m_timer = new QTimer ( this ); 109 m_timer = new QTimer ( this );
110 connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) ); 110 connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) );
111 111
112 connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) ); 112 connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) );
113 connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) ); 113 connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) );
114 114
115 m_progress-> hide ( ); 115 m_progress-> hide ( );
116 Global::hideInputMethod ( ); 116 Global::hideInputMethod ( );
117 117
118#ifdef QT_QWS_CUSTOM 118#ifdef QT_QWS_SHARP
119 119
120 shutdown-> hide ( ); 120 shutdown-> hide ( );
121#endif 121#endif
122} 122}
123 123
124void ShutdownImpl::buttonClicked ( int b ) 124void ShutdownImpl::buttonClicked ( int b )
125{ 125{
126 m_counter = 0; 126 m_counter = 0;
127 127
128 switch ( b ) { 128 switch ( b ) {
129 case 1: 129 case 1:
130 m_operation = ShutdownSystem; 130 m_operation = ShutdownSystem;
131 break; 131 break;
132 case 2: 132 case 2:
133 m_operation = RebootSystem; 133 m_operation = RebootSystem;
134 break; 134 break;
135 case 3: 135 case 3:
136 m_operation = RestartDesktop; 136 m_operation = RestartDesktop;
137 break; 137 break;
138 case 4: 138 case 4:
139 m_operation = TerminateDesktop; 139 m_operation = TerminateDesktop;
140 break; 140 break;
141 } 141 }
142 m_info-> hide ( ); 142 m_info-> hide ( );
143 m_progress-> show ( ); 143 m_progress-> show ( );
144 m_timer-> start ( 300 ); 144 m_timer-> start ( 300 );
145 timeout ( ); 145 timeout ( );
146} 146}
147 147
148void ShutdownImpl::cancelClicked ( ) 148void ShutdownImpl::cancelClicked ( )
149{ 149{
150 m_progress-> hide ( ); 150 m_progress-> hide ( );
151 m_info-> show ( ); 151 m_info-> show ( );
152 if ( m_timer-> isActive ( ) ) 152 if ( m_timer-> isActive ( ) )
153 m_timer-> stop ( ); 153 m_timer-> stop ( );
154 else 154 else
155 close ( ); 155 close ( );
156} 156}
157 157
158void ShutdownImpl::timeout ( ) 158void ShutdownImpl::timeout ( )
159{ 159{
160 if ( ( m_counter += 2 ) > m_progress-> totalSteps ( ) ) { 160 if ( ( m_counter += 2 ) > m_progress-> totalSteps ( ) ) {
161 m_progress-> hide ( ); 161 m_progress-> hide ( );
162 m_timer-> stop ( ); 162 m_timer-> stop ( );
163 emit shutdown ( m_operation ); 163 emit shutdown ( m_operation );
164 } 164 }
165 else 165 else
166 m_progress-> setProgress ( m_counter ); 166 m_progress-> setProgress ( m_counter );
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 7d1aaf1..1e6b74e 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -1,84 +1,84 @@
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 "startmenu.h" 21#include "startmenu.h"
22#include "inputmethods.h" 22#include "inputmethods.h"
23#include "runningappbar.h" 23#include "runningappbar.h"
24#include "systray.h" 24#include "systray.h"
25#include "calibrate.h" 25#include "calibrate.h"
26#include "wait.h" 26#include "wait.h"
27#include "appicons.h" 27#include "appicons.h"
28 28
29#include "taskbar.h" 29#include "taskbar.h"
30#include "desktop.h" 30#include "desktop.h"
31 31
32#include <qpe/qpeapplication.h> 32#include <qpe/qpeapplication.h>
33#include <qpe/qcopenvelope_qws.h> 33#include <qpe/qcopenvelope_qws.h>
34#include <qpe/global.h> 34#include <qpe/global.h>
35 35
36#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) 36#if defined( QT_QWS_SHARP ) || defined( QT_QWS_IPAQ )
37#include <qpe/custom.h> 37#include <qpe/custom.h>
38#endif 38#endif
39 39
40#include <opie/odevice.h> 40#include <opie/odevice.h>
41 41
42#include <qlabel.h> 42#include <qlabel.h>
43#include <qlayout.h> 43#include <qlayout.h>
44#include <qtimer.h> 44#include <qtimer.h>
45#include <qwindowsystem_qws.h> 45#include <qwindowsystem_qws.h>
46#include <qwidgetstack.h> 46#include <qwidgetstack.h>
47 47
48#if defined( Q_WS_QWS ) 48#if defined( Q_WS_QWS )
49#include <qwsdisplay_qws.h> 49#include <qwsdisplay_qws.h>
50#include <qgfx_qws.h> 50#include <qgfx_qws.h>
51#endif 51#endif
52 52
53 53
54using namespace Opie; 54using namespace Opie;
55 55
56#define FACTORY(T) \ 56#define FACTORY(T) \
57 static QWidget *new##T( bool maximized ) { \ 57 static QWidget *new##T( bool maximized ) { \
58 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ 58 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \
59 if ( maximized ) { \ 59 if ( maximized ) { \
60 if ( qApp->desktop()->width() <= 350 ) { \ 60 if ( qApp->desktop()->width() <= 350 ) { \
61 w->showMaximized(); \ 61 w->showMaximized(); \
62 } else { \ 62 } else { \
63 w->resize( QSize( 300, 300 ) ); \ 63 w->resize( QSize( 300, 300 ) ); \
64 } \ 64 } \
65 } \ 65 } \
66 w->show(); \ 66 w->show(); \
67 return w; \ 67 return w; \
68 } 68 }
69 69
70 70
71#ifdef SINGLE_APP 71#ifdef SINGLE_APP
72#define APP(a,b,c,d) FACTORY(b) 72#define APP(a,b,c,d) FACTORY(b)
73#include "../launcher/apps.h" 73#include "../launcher/apps.h"
74#undef APP 74#undef APP
75#endif // SINGLE_APP 75#endif // SINGLE_APP
76 76
77static Global::Command builtins[] = { 77static Global::Command builtins[] = {
78 78
79#ifdef SINGLE_APP 79#ifdef SINGLE_APP
80#define APP(a,b,c,d) { a, new##b, c }, 80#define APP(a,b,c,d) { a, new##b, c },
81#include "../launcher/apps.h" 81#include "../launcher/apps.h"
82#undef APP 82#undef APP
83#endif 83#endif
84 84
@@ -124,97 +124,97 @@ public:
124 cl = !cl; repaint(); 124 cl = !cl; repaint();
125 } 125 }
126 void paintEvent( QPaintEvent * ) 126 void paintEvent( QPaintEvent * )
127 { 127 {
128 int y = (height()-sizeHint().height())/2; 128 int y = (height()-sizeHint().height())/2;
129 QPainter p(this); 129 QPainter p(this);
130 if ( nl ) 130 if ( nl )
131 p.drawPixmap(1,y,nl_pm); 131 p.drawPixmap(1,y,nl_pm);
132 if ( cl ) 132 if ( cl )
133 p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); 133 p.drawPixmap(1,y+nl_pm.height()+1,cl_pm);
134 } 134 }
135private: 135private:
136 QPixmap nl_pm, cl_pm; 136 QPixmap nl_pm, cl_pm;
137 bool nl, cl; 137 bool nl, cl;
138}; 138};
139 139
140TaskBar::~TaskBar() 140TaskBar::~TaskBar()
141{ 141{
142} 142}
143 143
144 144
145TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) 145TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader)
146{ 146{
147 Global::setBuiltinCommands(builtins); 147 Global::setBuiltinCommands(builtins);
148 148
149 sm = new StartMenu( this ); 149 sm = new StartMenu( this );
150 150
151 inputMethods = new InputMethods( this ); 151 inputMethods = new InputMethods( this );
152 connect( inputMethods, SIGNAL(inputToggled(bool)), 152 connect( inputMethods, SIGNAL(inputToggled(bool)),
153 this, SLOT(calcMaxWindowRect()) ); 153 this, SLOT(calcMaxWindowRect()) );
154 //new QuickLauncher( this ); 154 //new QuickLauncher( this );
155 155
156 stack = new QWidgetStack( this ); 156 stack = new QWidgetStack( this );
157 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 157 stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
158 label = new QLabel(stack); 158 label = new QLabel(stack);
159 159
160 //mru = new MRUList( stack ); 160 //mru = new MRUList( stack );
161 //stack->raiseWidget( mru ); 161 //stack->raiseWidget( mru );
162 162
163 runningAppBar = new RunningAppBar(stack); 163 runningAppBar = new RunningAppBar(stack);
164 stack->raiseWidget(runningAppBar); 164 stack->raiseWidget(runningAppBar);
165 165
166 waitIcon = new Wait( this ); 166 waitIcon = new Wait( this );
167 (void) new AppIcons( this ); 167 (void) new AppIcons( this );
168 168
169 sysTray = new SysTray( this ); 169 sysTray = new SysTray( this );
170 170
171 // ## make customizable in some way? 171 // ## make customizable in some way?
172#ifdef QT_QWS_CUSTOM 172#ifdef QT_QWS_SHARP
173 lockState = new LockKeyState( this ); 173 lockState = new LockKeyState( this );
174#else 174#else
175 lockState = 0; 175 lockState = 0;
176#endif 176#endif
177 177
178#if defined(Q_WS_QWS) 178#if defined(Q_WS_QWS)
179#if !defined(QT_NO_COP) 179#if !defined(QT_NO_COP)
180 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); 180 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this );
181 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 181 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
182 this, SLOT(receive(const QCString&, const QByteArray&)) ); 182 this, SLOT(receive(const QCString&, const QByteArray&)) );
183#endif 183#endif
184#endif 184#endif
185 waitTimer = new QTimer( this ); 185 waitTimer = new QTimer( this );
186 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); 186 connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) );
187 clearer = new QTimer( this ); 187 clearer = new QTimer( this );
188 QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); 188 QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar()));
189 QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); 189 QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show()));
190} 190}
191 191
192void TaskBar::setStatusMessage( const QString &text ) 192void TaskBar::setStatusMessage( const QString &text )
193{ 193{
194 if ( !text.isEmpty() ) { 194 if ( !text.isEmpty() ) {
195 label->setText( text ); 195 label->setText( text );
196 stack->raiseWidget( label ); 196 stack->raiseWidget( label );
197 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) 197 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) )
198 sysTray->hide(); 198 sysTray->hide();
199 clearer->start( 3000, TRUE ); 199 clearer->start( 3000, TRUE );
200 } else { 200 } else {
201 clearStatusBar(); 201 clearStatusBar();
202 } 202 }
203} 203}
204 204
205void TaskBar::clearStatusBar() 205void TaskBar::clearStatusBar()
206{ 206{
207 label->clear(); 207 label->clear();
208 stack->raiseWidget(runningAppBar); 208 stack->raiseWidget(runningAppBar);
209 // stack->raiseWidget( mru ); 209 // stack->raiseWidget( mru );
210} 210}
211 211
212void TaskBar::startWait() 212void TaskBar::startWait()
213{ 213{
214 waitIcon->setWaiting( true ); 214 waitIcon->setWaiting( true );
215 // a catchall stop after 10 seconds... 215 // a catchall stop after 10 seconds...
216 waitTimer->start( 10 * 1000, true ); 216 waitTimer->start( 10 * 1000, true );
217} 217}
218 218
219void TaskBar::stopWait(const QString& /*app*/) 219void TaskBar::stopWait(const QString& /*app*/)
220{ 220{
diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
index c7dc7a8..1b89bc8 100644
--- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp
+++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp
@@ -1,90 +1,90 @@
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#define _REENTRANT 20#define _REENTRANT
21 21
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qimage.h> 23#include <qimage.h>
24#include <qpainter.h> 24#include <qpainter.h>
25#ifdef Q_WS_QWS 25#ifdef Q_WS_QWS
26#include <qpe/qcopenvelope_qws.h> 26#include <qpe/qcopenvelope_qws.h>
27#endif 27#endif
28#include "mediaplayerplugininterface.h" 28#include "mediaplayerplugininterface.h"
29#include <stdio.h> 29#include <stdio.h>
30#include <stdlib.h> 30#include <stdlib.h>
31#include <string.h> 31#include <string.h>
32#include <time.h> 32#include <time.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <pthread.h> 34#include <pthread.h>
35#include "loopcontrol.h" 35#include "loopcontrol.h"
36#include "audiodevice.h" 36#include "audiodevice.h"
37#include "videowidget.h" 37#include "videowidget.h"
38#include "audiowidget.h" 38#include "audiowidget.h"
39#include "mediaplayerstate.h" 39#include "mediaplayerstate.h"
40 40
41 41
42#if defined(QT_QWS_CUSTOM) || defined(QT_QWS_IPAQ) 42#if defined(QT_QWS_SHARP) || defined(QT_QWS_IPAQ)
43#define USE_REALTIME_AUDIO_THREAD 43#define USE_REALTIME_AUDIO_THREAD
44#endif 44#endif
45 45
46 46
47extern VideoWidget *videoUI; // now only needed to tell it to play a frame 47extern VideoWidget *videoUI; // now only needed to tell it to play a frame
48extern MediaPlayerState *mediaPlayerState; 48extern MediaPlayerState *mediaPlayerState;
49 49
50 50
51#define DecodeLoopDebug(x) qDebug x 51#define DecodeLoopDebug(x) qDebug x
52//#define DecodeLoopDebug(x) 52//#define DecodeLoopDebug(x)
53 53
54 54
55 static char *audioBuffer = NULL; 55 static char *audioBuffer = NULL;
56static AudioDevice *audioDevice = NULL; 56static AudioDevice *audioDevice = NULL;
57 static bool disabledSuspendScreenSaver = FALSE; 57 static bool disabledSuspendScreenSaver = FALSE;
58 58
59 59
60 pthread_tvideo_tid; 60 pthread_tvideo_tid;
61pthread_attr_t video_attr; 61pthread_attr_t video_attr;
62 pthread_taudio_tid; 62 pthread_taudio_tid;
63pthread_attr_t audio_attr; 63pthread_attr_t audio_attr;
64 64
65 65
66bool emitPlayFinished = FALSE; 66bool emitPlayFinished = FALSE;
67bool emitChangePos = FALSE; 67bool emitChangePos = FALSE;
68 68
69 69
70class Mutex { 70class Mutex {
71public: 71public:
72 Mutex() { 72 Mutex() {
73 pthread_mutexattr_t attr; 73 pthread_mutexattr_t attr;
74 pthread_mutexattr_init( &attr ); 74 pthread_mutexattr_init( &attr );
75 pthread_mutex_init( &mutex, &attr ); 75 pthread_mutex_init( &mutex, &attr );
76 pthread_mutexattr_destroy( &attr ); 76 pthread_mutexattr_destroy( &attr );
77 } 77 }
78 78
79 ~Mutex() { 79 ~Mutex() {
80 pthread_mutex_destroy( &mutex ); 80 pthread_mutex_destroy( &mutex );
81 } 81 }
82 82
83 void lock() { 83 void lock() {
84 pthread_mutex_lock( &mutex ); 84 pthread_mutex_lock( &mutex );
85 } 85 }
86 86
87 void unlock() { 87 void unlock() {
88 pthread_mutex_unlock( &mutex ); 88 pthread_mutex_unlock( &mutex );
89 } 89 }
90/* 90/*
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp
index 02bca3d..7e6e515 100644
--- a/library/alarmserver.cpp
+++ b/library/alarmserver.cpp
@@ -113,97 +113,97 @@ static void saveState()
113 } 113 }
114 114
115 115
116 savefile.close(); 116 savefile.close();
117 unlink( savefilename ); 117 unlink( savefilename );
118 QDir d; d.rename(savefilename+".new",savefilename); 118 QDir d; d.rename(savefilename+".new",savefilename);
119 119
120 } 120 }
121} 121}
122 122
123/*! 123/*!
124 Sets up the alarm server. Restoring to previous state (session management). 124 Sets up the alarm server. Restoring to previous state (session management).
125 */ 125 */
126void AlarmServer::initialize() 126void AlarmServer::initialize()
127{ 127{
128 //read autosave file and put events in timerEventList 128 //read autosave file and put events in timerEventList
129 129
130 QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" ); 130 QString savefilename = Global::applicationFileName( "AlarmServer", "saveFile" );
131 131
132 QFile savefile(savefilename); 132 QFile savefile(savefilename);
133 if ( savefile.open(IO_ReadOnly) ) { 133 if ( savefile.open(IO_ReadOnly) ) {
134 QDataStream ds( &savefile ); 134 QDataStream ds( &savefile );
135 while ( !ds.atEnd() ) { 135 while ( !ds.atEnd() ) {
136 timerEventItem *newTimerEventItem = new timerEventItem; 136 timerEventItem *newTimerEventItem = new timerEventItem;
137 ds >> newTimerEventItem->UTCtime; 137 ds >> newTimerEventItem->UTCtime;
138 ds >> newTimerEventItem->channel; 138 ds >> newTimerEventItem->channel;
139 ds >> newTimerEventItem->message; 139 ds >> newTimerEventItem->message;
140 ds >> newTimerEventItem->data; 140 ds >> newTimerEventItem->data;
141 timerEventList.append( newTimerEventItem ); 141 timerEventList.append( newTimerEventItem );
142 } 142 }
143 savefile.close(); 143 savefile.close();
144 if (!timerEventReceiver) 144 if (!timerEventReceiver)
145 timerEventReceiver = new TimerReceiverObject; 145 timerEventReceiver = new TimerReceiverObject;
146 setNearestTimerEvent(); 146 setNearestTimerEvent();
147 } 147 }
148} 148}
149 149
150 150
151 151
152 152
153static const char* atdir = "/var/spool/at/"; 153static const char* atdir = "/var/spool/at/";
154 154
155static bool triggerAtd( bool writeHWClock = FALSE ) 155static bool triggerAtd( bool writeHWClock = FALSE )
156{ 156{
157 QFile trigger(QString(atdir) + "trigger"); 157 QFile trigger(QString(atdir) + "trigger");
158 if ( trigger.open(IO_WriteOnly|IO_Raw) ) { 158 if ( trigger.open(IO_WriteOnly|IO_Raw) ) {
159 159
160 const char* data = 160 const char* data =
161#ifdef QT_QWS_CUSTOM 161#ifdef QT_QWS_SHARP
162 //custom atd only writes HW Clock if we write a 'W' 162 //custom atd only writes HW Clock if we write a 'W'
163 ( writeHWClock ) ? "W\n" : 163 ( writeHWClock ) ? "W\n" :
164#endif 164#endif
165 data = "\n"; 165 data = "\n";
166 int len = strlen(data); 166 int len = strlen(data);
167 int total_written = trigger.writeBlock(data,len); 167 int total_written = trigger.writeBlock(data,len);
168 if ( total_written != len ) { 168 if ( total_written != len ) {
169 QMessageBox::critical( 0, QObject::tr( "Out of Space" ), 169 QMessageBox::critical( 0, QObject::tr( "Out of Space" ),
170 QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) ); 170 QObject::tr( "Unable to schedule alarm.\nFree some memory and try again." ) );
171 trigger.close(); 171 trigger.close();
172 QFile::remove( trigger.name() ); 172 QFile::remove( trigger.name() );
173 return FALSE; 173 return FALSE;
174 } 174 }
175 return TRUE; 175 return TRUE;
176 } 176 }
177 return FALSE; 177 return FALSE;
178} 178}
179 179
180void TimerReceiverObject::deleteTimer() 180void TimerReceiverObject::deleteTimer()
181{ 181{
182 if ( !atfilename.isEmpty() ) { 182 if ( !atfilename.isEmpty() ) {
183 unlink( atfilename ); 183 unlink( atfilename );
184 atfilename = QString::null; 184 atfilename = QString::null;
185 triggerAtd( FALSE ); 185 triggerAtd( FALSE );
186 } 186 }
187} 187}
188 188
189void TimerReceiverObject::resetTimer() 189void TimerReceiverObject::resetTimer()
190{ 190{
191 const int maxsecs = 2147000; 191 const int maxsecs = 2147000;
192 int total_written; 192 int total_written;
193 QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime); 193 QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime);
194 QDateTime now = QDateTime::currentDateTime(); 194 QDateTime now = QDateTime::currentDateTime();
195 if ( nearest < now ) 195 if ( nearest < now )
196 nearest = now; 196 nearest = now;
197 int secs = TimeConversion::secsTo( now, nearest ); 197 int secs = TimeConversion::secsTo( now, nearest );
198 if ( secs > maxsecs ) { 198 if ( secs > maxsecs ) {
199 // too far for millisecond timing 199 // too far for millisecond timing
200 secs = maxsecs; 200 secs = maxsecs;
201 } 201 }
202 202
203 // System timer (needed so that we wake from deep sleep), 203 // System timer (needed so that we wake from deep sleep),
204 // from the Epoch in seconds. 204 // from the Epoch in seconds.
205 // 205 //
206 int at_secs = TimeConversion::toUTC(nearest); 206 int at_secs = TimeConversion::toUTC(nearest);
207 // qDebug("reset timer to %d seconds from Epoch",at_secs); 207 // qDebug("reset timer to %d seconds from Epoch",at_secs);
208 QString fn = atdir + QString::number(at_secs) + "." 208 QString fn = atdir + QString::number(at_secs) + "."
209 + QString::number(getpid()); 209 + QString::number(getpid());
diff --git a/library/power.cpp b/library/power.cpp
index d53ecfe..ec5b309 100644
--- a/library/power.cpp
+++ b/library/power.cpp
@@ -1,71 +1,71 @@
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 "power.h" 21#include "power.h"
22 22
23#ifdef QT_QWS_CUSTOM 23#ifdef QT_QWS_SHARP
24#include "custom.h" 24#include "custom.h"
25#endif 25#endif
26 26
27#include <unistd.h> 27#include <unistd.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <stdio.h> 29#include <stdio.h>
30#include <fcntl.h> 30#include <fcntl.h>
31#include <sys/ioctl.h> 31#include <sys/ioctl.h>
32 32
33#ifdef QT_QWS_IPAQ_NO_APM 33#ifdef QT_QWS_IPAQ_NO_APM
34#include <linux/h3600_ts.h> 34#include <linux/h3600_ts.h>
35#endif 35#endif
36 36
37PowerStatusManager *PowerStatusManager::powerManager = 0; 37PowerStatusManager *PowerStatusManager::powerManager = 0;
38PowerStatus *PowerStatusManager::ps = 0; 38PowerStatus *PowerStatusManager::ps = 0;
39 39
40static bool haveProcApm = false; 40static bool haveProcApm = false;
41 41
42PowerStatusManager::PowerStatusManager() 42PowerStatusManager::PowerStatusManager()
43{ 43{
44 powerManager = this; 44 powerManager = this;
45 ps = new PowerStatus; 45 ps = new PowerStatus;
46 FILE *f = fopen("/proc/apm", "r"); 46 FILE *f = fopen("/proc/apm", "r");
47 if ( f ) { 47 if ( f ) {
48 fclose(f); 48 fclose(f);
49 haveProcApm = TRUE; 49 haveProcApm = TRUE;
50 } 50 }
51} 51}
52 52
53const PowerStatus &PowerStatusManager::readStatus() 53const PowerStatus &PowerStatusManager::readStatus()
54{ 54{
55 if ( !powerManager ) 55 if ( !powerManager )
56 (void)new PowerStatusManager; 56 (void)new PowerStatusManager;
57 57
58 powerManager->getStatus(); 58 powerManager->getStatus();
59 59
60 return *ps; 60 return *ps;
61} 61}
62 62
63// Standard /proc/apm reader 63// Standard /proc/apm reader
64bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec ) 64bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, int &sec )
65{ 65{
66 bool ok = false; 66 bool ok = false;
67 67
68 ac = 0xff; 68 ac = 0xff;
69 bs = 0xff; 69 bs = 0xff;
70 bf = 0xff; 70 bf = 0xff;
71 pc = -1; 71 pc = -1;
@@ -87,97 +87,97 @@ bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, i
87 // extract data 87 // extract data
88 switch ( bs ) { 88 switch ( bs ) {
89 case 0x00: 89 case 0x00:
90 ps->bs = PowerStatus::High; 90 ps->bs = PowerStatus::High;
91 break; 91 break;
92 case 0x01: 92 case 0x01:
93 ps->bs = PowerStatus::Low; 93 ps->bs = PowerStatus::Low;
94 break; 94 break;
95 case 0x7f: 95 case 0x7f:
96 ps->bs = PowerStatus::VeryLow; 96 ps->bs = PowerStatus::VeryLow;
97 break; 97 break;
98 case 0x02: 98 case 0x02:
99 ps->bs = PowerStatus::Critical; 99 ps->bs = PowerStatus::Critical;
100 break; 100 break;
101 case 0x03: 101 case 0x03:
102 ps->bs = PowerStatus::Charging; 102 ps->bs = PowerStatus::Charging;
103 break; 103 break;
104 case 0x04: 104 case 0x04:
105 case 0xff: // 0xff is Unknown but we map to NotPresent 105 case 0xff: // 0xff is Unknown but we map to NotPresent
106 default: 106 default:
107 ps->bs = PowerStatus::NotPresent; 107 ps->bs = PowerStatus::NotPresent;
108 break; 108 break;
109 } 109 }
110 110
111 switch ( ac ) { 111 switch ( ac ) {
112 case 0x00: 112 case 0x00:
113 ps->ac = PowerStatus::Offline; 113 ps->ac = PowerStatus::Offline;
114 break; 114 break;
115 case 0x01: 115 case 0x01:
116 ps->ac = PowerStatus::Online; 116 ps->ac = PowerStatus::Online;
117 break; 117 break;
118 case 0x02: 118 case 0x02:
119 ps->ac = PowerStatus::Backup; 119 ps->ac = PowerStatus::Backup;
120 break; 120 break;
121 } 121 }
122 122
123 if ( pc > 100 ) 123 if ( pc > 100 )
124 pc = -1; 124 pc = -1;
125 125
126 ps->percentRemain = pc; 126 ps->percentRemain = pc;
127 ps->secsRemain = sec; 127 ps->secsRemain = sec;
128 128
129 ok = true; 129 ok = true;
130 } 130 }
131 131
132 return ok; 132 return ok;
133} 133}
134 134
135#ifdef QT_QWS_CUSTOM 135#ifdef QT_QWS_SHARP
136 136
137void PowerStatusManager::getStatus() 137void PowerStatusManager::getStatus()
138{ 138{
139 int ac, bs, bf, pc, sec; 139 int ac, bs, bf, pc, sec;
140 ps->percentAccurate = TRUE; // not for long... 140 ps->percentAccurate = TRUE; // not for long...
141 141
142 if ( haveProcApm && getProcApmStatus( ac, bs, bf, pc, sec ) ) { 142 if ( haveProcApm && getProcApmStatus( ac, bs, bf, pc, sec ) ) {
143 // special case 143 // special case
144 if ( bs == 0x7f ) 144 if ( bs == 0x7f )
145 ps->bs = PowerStatus::VeryLow; 145 ps->bs = PowerStatus::VeryLow;
146 pc = -1; // fake percentage 146 pc = -1; // fake percentage
147 if ( pc < 0 ) { 147 if ( pc < 0 ) {
148 switch ( bs ) { 148 switch ( bs ) {
149 case 0x00: ps->percentRemain = 100; break; // High 149 case 0x00: ps->percentRemain = 100; break; // High
150 case 0x01: ps->percentRemain = 30; break; // Low 150 case 0x01: ps->percentRemain = 30; break; // Low
151 case 0x7f: ps->percentRemain = 10; break; // Very Low 151 case 0x7f: ps->percentRemain = 10; break; // Very Low
152 case 0x02: ps->percentRemain = 5; break; // Critical 152 case 0x02: ps->percentRemain = 5; break; // Critical
153 case 0x03: ps->percentRemain = -1; break; // Charging 153 case 0x03: ps->percentRemain = -1; break; // Charging
154 } 154 }
155 ps->percentAccurate = FALSE; 155 ps->percentAccurate = FALSE;
156 } 156 }
157 } 157 }
158 158
159 char *device = "/dev/apm_bios"; 159 char *device = "/dev/apm_bios";
160 int fd = ::open (device, O_WRONLY); 160 int fd = ::open (device, O_WRONLY);
161 if ( fd >= 0 ) { 161 if ( fd >= 0 ) {
162 int bbat_status = ioctl( fd, APM_IOC_BATTERY_BACK_CHK, 0 ); 162 int bbat_status = ioctl( fd, APM_IOC_BATTERY_BACK_CHK, 0 );
163 switch ( bbat_status ) { 163 switch ( bbat_status ) {
164 case 0x00: 164 case 0x00:
165 ps->bbs = PowerStatus::High; 165 ps->bbs = PowerStatus::High;
166 break; 166 break;
167 case 0x01: 167 case 0x01:
168 ps->bbs = PowerStatus::Low; 168 ps->bbs = PowerStatus::Low;
169 break; 169 break;
170 case 0x7f: 170 case 0x7f:
171 ps->bbs = PowerStatus::VeryLow; 171 ps->bbs = PowerStatus::VeryLow;
172 break; 172 break;
173 case 0x02: 173 case 0x02:
174 ps->bbs = PowerStatus::Critical; 174 ps->bbs = PowerStatus::Critical;
175 break; 175 break;
176 case 0x03: 176 case 0x03:
177 ps->bbs = PowerStatus::Charging; 177 ps->bbs = PowerStatus::Charging;
178 break; 178 break;
179 case 0x04: 179 case 0x04:
180 ps->bbs = PowerStatus::NotPresent; 180 ps->bbs = PowerStatus::NotPresent;
181 break; 181 break;
182 } 182 }
183 ::close(fd); 183 ::close(fd);
diff --git a/library/storage.cpp b/library/storage.cpp
index 937908d..3668d29 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -1,71 +1,71 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org> 2** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org>
3** Copyright (C) 2000 Trolltech AS. All rights reserved. 3** Copyright (C) 2000 Trolltech AS. All rights reserved.
4** 4**
5** This file is part of Qtopia Environment. 5** This file is part of Qtopia Environment.
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 16**
17** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 18** not clear to you.
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22#include <qpe/storage.h> 22#include <qpe/storage.h>
23#ifdef QT_QWS_CUSTOM 23#ifdef QT_QWS_SHARP
24#include <qpe/custom.h> 24#include <qpe/custom.h>
25#endif 25#endif
26 26
27#include <qfile.h> 27#include <qfile.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qcopchannel_qws.h> 29#include <qcopchannel_qws.h>
30 30
31#include <stdio.h> 31#include <stdio.h>
32 32
33#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 33#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
34#include <sys/vfs.h> 34#include <sys/vfs.h>
35#include <mntent.h> 35#include <mntent.h>
36#endif 36#endif
37 37
38#include <qstringlist.h> 38#include <qstringlist.h>
39 39
40static bool isCF(const QString& m) 40static bool isCF(const QString& m)
41{ 41{
42 FILE* f = fopen("/var/run/stab", "r"); 42 FILE* f = fopen("/var/run/stab", "r");
43 if (!f) f = fopen("/var/state/pcmcia/stab", "r"); 43 if (!f) f = fopen("/var/state/pcmcia/stab", "r");
44 if (!f) f = fopen("/var/lib/pcmcia/stab", "r"); 44 if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
45 if ( f ) { 45 if ( f ) {
46 char line[1024]; 46 char line[1024];
47 char devtype[80]; 47 char devtype[80];
48 char devname[80]; 48 char devname[80];
49 while ( fgets( line, 1024, f ) ) { 49 while ( fgets( line, 1024, f ) ) {
50 // 0 ide ide-cs 0 hda 3 0 50 // 0 ide ide-cs 0 hda 3 0
51 if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 ) 51 if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 )
52 { 52 {
53 if ( QString(devtype) == "ide" && m.find(devname)>0 ) { 53 if ( QString(devtype) == "ide" && m.find(devname)>0 ) {
54 fclose(f); 54 fclose(f);
55 return TRUE; 55 return TRUE;
56 } 56 }
57 } 57 }
58 } 58 }
59 fclose(f); 59 fclose(f);
60 } 60 }
61 return FALSE; 61 return FALSE;
62} 62}
63 63
64StorageInfo::StorageInfo( QObject *parent ) 64StorageInfo::StorageInfo( QObject *parent )
65 : QObject( parent ) 65 : QObject( parent )
66{ 66{
67 mFileSystems.setAutoDelete( TRUE ); 67 mFileSystems.setAutoDelete( TRUE );
68 channel = new QCopChannel( "QPE/Card", this ); 68 channel = new QCopChannel( "QPE/Card", this );
69 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), 69 connect( channel, SIGNAL(received(const QCString &, const QByteArray &)),
70 this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); 70 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
71 update(); 71 update();
diff --git a/qt/qte233-for-opie091-keyboard.patch b/qt/qte233-for-opie091-keyboard.patch
index 9d76a64..c1b85b6 100644
--- a/qt/qte233-for-opie091-keyboard.patch
+++ b/qt/qte233-for-opie091-keyboard.patch
@@ -1,145 +1,145 @@
1 --- src.orig/kernel/qkeyboard_qws.cppMon Mar 18 02:11:25 2002 1 --- src.orig/kernel/qkeyboard_qws.cppMon Mar 18 02:11:25 2002
2 +++ src/kernel/qkeyboard_qws.cppFri Aug 30 04:28:39 2002 2 +++ src/kernel/qkeyboard_qws.cppFri Aug 30 04:28:39 2002
3@@ -269,7 +269,7 @@ 3@@ -269,7 +269,7 @@
4 { Qt::Key_O, 'o' , 'O' , 'O'-64 }, 4 { Qt::Key_O, 'o' , 'O' , 'O'-64 },
5 { Qt::Key_P, 'p' , 'P' , 'P'-64 }, 5 { Qt::Key_P, 'p' , 'P' , 'P'-64 },
6 { Qt::Key_BraceLeft, '[' , '{' , 0xffff }, 6 { Qt::Key_BraceLeft, '[' , '{' , 0xffff },
7- { Qt::Key_Escape, ']' , '}' , 0xffff }, 7- { Qt::Key_Escape, ']' , '}' , 0xffff },
8+ { Qt::Key_BraceRight, ']' , '}' , 0xffff }, 8+ { Qt::Key_BraceRight, ']' , '}' , 0xffff },
9 { Qt::Key_Return, 13 , 13 , 0xffff }, 9 { Qt::Key_Return, 13 , 13 , 0xffff },
10 { Qt::Key_Control, 0xffff , 0xffff , 0xffff }, 10 { Qt::Key_Control, 0xffff , 0xffff , 0xffff },
11 { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30 11 { Qt::Key_A, 'a' , 'A' , 'A'-64 }, // 30
12@@ -394,7 +394,7 @@ 12@@ -394,7 +394,7 @@
13 bool numLock; 13 bool numLock;
14 #endif 14 #endif
15 bool caps; 15 bool caps;
16- bool extended; 16- bool extended;
17+ int extended; 17+ int extended;
18 int modifiers; 18 int modifiers;
19 int prevuni; 19 int prevuni;
20 int prevkey; 20 int prevkey;
21@@ -524,7 +524,7 @@ 21@@ -524,7 +524,7 @@
22 shift = false; 22 shift = false;
23 alt = false; 23 alt = false;
24 ctrl = false; 24 ctrl = false;
25- extended = false; 25- extended = false;
26+ extended = 0; 26+ extended = 0;
27 prevuni = 0; 27 prevuni = 0;
28 prevkey = 0; 28 prevkey = 0;
29 caps = FALSE; 29 caps = FALSE;
30@@ -561,10 +561,24 @@ 30@@ -561,10 +561,24 @@
31 int keyCode = Qt::Key_unknown; 31 int keyCode = Qt::Key_unknown;
32 bool release = false; 32 bool release = false;
33 int keypad = 0; 33 int keypad = 0;
34+#if defined(QT_QWS_IPAQ) 34+#if defined(QT_QWS_IPAQ)
35+ static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 ! 35+ static int ipaq_return_pressed = false; // iPAQ Action Key has ScanCode 0x60: 0x60|0x80 = 0xe0 == extended mode 1 !
36+#endif 36+#endif
37+ 37+
38 #if !defined(QT_QWS_CUSTOM) 38 #if !defined(QT_QWS_SHARP)
39- if (code == 224) { 39- if (code == 224) {
40+ if ((code == 224) 40+ if ((code == 224)
41+#if defined(QT_QWS_IPAQ) 41+#if defined(QT_QWS_IPAQ)
42+ && !ipaq_return_pressed 42+ && !ipaq_return_pressed
43+#endif 43+#endif
44+ ) 44+ )
45+ { 45+ {
46 // extended 46 // extended
47 -extended = true; 47 -extended = true;
48 +extended = 1; 48 +extended = 1;
49 +return; 49 +return;
50+ } 50+ }
51+ else if (code == 225) { 51+ else if (code == 225) {
52 + // extended 2 52 + // extended 2
53 + extended = 2; 53 + extended = 2;
54 return; 54 return;
55 } 55 }
56 #endif 56 #endif
57@@ -574,7 +588,7 @@ 57@@ -574,7 +588,7 @@
58 code &= 0x7f; 58 code &= 0x7f;
59 } 59 }
60 60
61- if (extended) { 61- if (extended) {
62+ if (extended == 1) { 62+ if (extended == 1) {
63 switch (code) { 63 switch (code) {
64 case 72: 64 case 72:
65 keyCode = Qt::Key_Up; 65 keyCode = Qt::Key_Up;
66@@ -612,6 +626,32 @@ 66@@ -612,6 +626,32 @@
67 case 53: 67 case 53:
68 keyCode = Qt::Key_Slash; 68 keyCode = Qt::Key_Slash;
69 break; 69 break;
70 +case 0x1d: 70 +case 0x1d:
71 + keyCode = Qt::Key_Control; 71 + keyCode = Qt::Key_Control;
72 + break; 72 + break;
73 +case 0x2a: 73 +case 0x2a:
74 + keyCode = Qt::Key_SysReq; 74 + keyCode = Qt::Key_SysReq;
75 + break; 75 + break;
76 +case 0x38: 76 +case 0x38:
77 + keyCode = Qt::Key_Alt; 77 + keyCode = Qt::Key_Alt;
78 + break; 78 + break;
79 +case 0x5b: 79 +case 0x5b:
80 + keyCode = Qt::Key_Super_L; 80 + keyCode = Qt::Key_Super_L;
81 + break; 81 + break;
82 +case 0x5c: 82 +case 0x5c:
83 + keyCode = Qt::Key_Super_R; 83 + keyCode = Qt::Key_Super_R;
84 + break; 84 + break;
85 +case 0x5d: 85 +case 0x5d:
86 + keyCode = Qt::Key_Menu; 86 + keyCode = Qt::Key_Menu;
87 + break; 87 + break;
88 +} 88 +}
89+ } else if (extended == 2) { 89+ } else if (extended == 2) {
90 +switch (code) { 90 +switch (code) {
91 +case 0x1d: 91 +case 0x1d:
92 + return; 92 + return;
93 +case 0x45: 93 +case 0x45:
94 + keyCode = Qt::Key_Pause; 94 + keyCode = Qt::Key_Pause;
95 + break; 95 + break;
96 } 96 }
97 } else { 97 } else {
98 #if defined(QT_QWS_CUSTOM) 98 #if defined(QT_QWS_SHARP)
99@@ -650,6 +690,7 @@ 99@@ -650,6 +690,7 @@
100 repeatable = FALSE; 100 repeatable = FALSE;
101 break; 101 break;
102 case 0x60: 102 case 0x60:
103 + ipaq_return_pressed = !release; 103 + ipaq_return_pressed = !release;
104 keyCode = Key_Return; 104 keyCode = Key_Return;
105 break; 105 break;
106 case 0x67: 106 case 0x67:
107@@ -687,13 +728,19 @@ 107@@ -687,13 +728,19 @@
108 else 108 else
109 repeater->stop(); 109 repeater->stop();
110 #endif 110 #endif
111+ 111+
112 +/* 112 +/*
113 + Translate shift+Key_Tab to Key_Backtab 113 + Translate shift+Key_Tab to Key_Backtab
114 +*/ 114 +*/
115 +if (( keyCode == Key_Tab ) && shift ) 115 +if (( keyCode == Key_Tab ) && shift )
116 + keyCode = Key_Backtab; 116 + keyCode = Key_Backtab;
117 } 117 }
118 118
119 /* 119 /*
120 Keypad consists of extended keys 53 and 28, 120 Keypad consists of extended keys 53 and 28,
121 and non-extended keys 55 and 71 through 83. 121 and non-extended keys 55 and 71 through 83.
122 */ 122 */
123- if ( extended ? (code == 53 || code == 28) : 123- if ( extended ? (code == 53 || code == 28) :
124+ if ((extended == 1) ? (code == 53 || code == 28) : 124+ if ((extended == 1) ? (code == 53 || code == 28) :
125 (code == 55 || ( code >= 71 && code <= 83 )) ) 125 (code == 55 || ( code >= 71 && code <= 83 )) )
126 keypad = Qt::Keypad; 126 keypad = Qt::Keypad;
127 127
128@@ -803,7 +850,7 @@ 128@@ -803,7 +850,7 @@
129 unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff; 129 unicode = QWSServer::keyMap()[code].shift_unicode ? QWSServer::keyMap()[code].shift_unicode : 0xffff;
130 else 130 else
131 unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff; 131 unicode = QWSServer::keyMap()[code].unicode ? QWSServer::keyMap()[code].unicode : 0xffff;
132 - } else { 132 - } else {
133 + } else if (extended == 1) { 133 + } else if (extended == 1) {
134 if ( code == 53 ) 134 if ( code == 53 )
135 unicode = '/'; 135 unicode = '/';
136 } 136 }
137@@ -829,7 +876,7 @@ 137@@ -829,7 +876,7 @@
138 prevkey = prevuni = 0; 138 prevkey = prevuni = 0;
139 } 139 }
140 } 140 }
141- extended = false; 141- extended = false;
142+ extended = 0; 142+ extended = 0;
143 } 143 }
144 144
145 145