summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/batteryapplet/batteryapplet.pro2
-rw-r--r--core/applets/cardmon/cardmon.pro2
-rw-r--r--core/applets/clipboardapplet/clipboardapplet.pro2
-rw-r--r--core/applets/clockapplet/clockapplet.pro2
-rw-r--r--core/applets/homeapplet/homeapplet.pro2
-rw-r--r--core/applets/irdaapplet/irdaapplet.pro2
-rw-r--r--core/applets/logoutapplet/logoutapplet.pro2
-rw-r--r--core/applets/restartapplet/restartapplet.pro2
-rw-r--r--core/applets/restartapplet2/restartapplet.pro2
-rw-r--r--core/applets/rotateapplet/rotateapplet.pro2
-rw-r--r--core/applets/screenshotapplet/screenshotapplet.pro2
-rw-r--r--core/applets/suspendapplet/suspendapplet.pro2
-rw-r--r--core/applets/vmemo/vmemo.pro2
-rw-r--r--core/applets/volumeapplet/volumeapplet.pro2
-rw-r--r--core/launcher/applauncher.cpp4
-rw-r--r--core/launcher/inputmethods.cpp4
-rw-r--r--core/launcher/irserver.cpp4
-rw-r--r--core/launcher/main.cpp2
-rw-r--r--core/launcher/packageslave.cpp304
-rw-r--r--core/launcher/qprocess_unix.cpp3
-rw-r--r--core/launcher/server.pro5
-rw-r--r--core/launcher/startmenu.cpp4
-rw-r--r--core/launcher/systray.cpp5
-rw-r--r--core/launcher/transferserver.cpp3
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.pro2
-rw-r--r--core/pim/today/plugins/addressbook/addressbook.pro2
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro2
-rw-r--r--core/pim/today/plugins/mail/mail.pro2
-rw-r--r--core/pim/today/plugins/todolist/todolist.pro2
-rw-r--r--core/pim/today/today.cpp7
-rw-r--r--core/qws/transferserver.cpp31
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/taskbarsettings.cpp17
33 files changed, 380 insertions, 55 deletions
diff --git a/core/applets/batteryapplet/batteryapplet.pro b/core/applets/batteryapplet/batteryapplet.pro
index c68ceb7..1bc208b 100644
--- a/core/applets/batteryapplet/batteryapplet.pro
+++ b/core/applets/batteryapplet/batteryapplet.pro
@@ -1,33 +1,33 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= battery.h batterystatus.h batteryappletimpl.h 3 HEADERS= battery.h batterystatus.h batteryappletimpl.h
4 SOURCES= battery.cpp batterystatus.cpp batteryappletimpl.cpp 4 SOURCES= battery.cpp batterystatus.cpp batteryappletimpl.cpp
5 TARGET = batteryapplet 5 TARGET = batteryapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include .. 8DEPENDPATH += ../$(OPIEDIR)/include ..
9LIBS += -lqpe -lopie 9LIBS += -lqpe -lopie
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libbatteryapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libbatteryapplet.ts \
13 ../../../i18n/nl/libbatteryapplet.ts \ 13 ../../../i18n/nl/libbatteryapplet.ts \
14 ../../../i18n/da/libbatteryapplet.ts \ 14 ../../../i18n/da/libbatteryapplet.ts \
15 ../../../i18n/xx/libbatteryapplet.ts \ 15 ../../../i18n/xx/libbatteryapplet.ts \
16 ../../../i18n/en/libbatteryapplet.ts \ 16 ../../../i18n/en/libbatteryapplet.ts \
17 ../../../i18n/es/libbatteryapplet.ts \ 17 ../../../i18n/es/libbatteryapplet.ts \
18 ../../../i18n/fr/libbatteryapplet.ts \ 18 ../../../i18n/fr/libbatteryapplet.ts \
19 ../../../i18n/hu/libbatteryapplet.ts \ 19 ../../../i18n/hu/libbatteryapplet.ts \
20 ../../../i18n/ja/libbatteryapplet.ts \ 20 ../../../i18n/ja/libbatteryapplet.ts \
21 ../../../i18n/ko/libbatteryapplet.ts \ 21 ../../../i18n/ko/libbatteryapplet.ts \
22 ../../../i18n/no/libbatteryapplet.ts \ 22 ../../../i18n/no/libbatteryapplet.ts \
23 ../../../i18n/pl/libbatteryapplet.ts \ 23 ../../../i18n/pl/libbatteryapplet.ts \
24 ../../../i18n/pt/libbatteryapplet.ts \ 24 ../../../i18n/pt/libbatteryapplet.ts \
25 ../../../i18n/pt_BR/libbatteryapplet.ts \ 25 ../../../i18n/pt_BR/libbatteryapplet.ts \
26 ../../../i18n/sl/libbatteryapplet.ts \ 26 ../../../i18n/sl/libbatteryapplet.ts \
27 ../../../i18n/zh_CN/libbatteryapplet.ts \ 27 ../../../i18n/zh_CN/libbatteryapplet.ts \
28 ../../../i18n/zh_TW/libbatteryapplet.ts 28 ../../../i18n/zh_TW/libbatteryapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/cardmon/cardmon.pro b/core/applets/cardmon/cardmon.pro
index 3907aa4..75facde 100644
--- a/core/applets/cardmon/cardmon.pro
+++ b/core/applets/cardmon/cardmon.pro
@@ -1,33 +1,33 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS =cardmon.h cardmonimpl.h 3 HEADERS =cardmon.h cardmonimpl.h
4 SOURCES =cardmon.cpp cardmonimpl.cpp 4 SOURCES =cardmon.cpp cardmonimpl.cpp
5 TARGET = cardmonapplet 5 TARGET = cardmonapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include ../launcher 8DEPENDPATH += $(OPIEDIR)/include ../launcher
9LIBS += -lqpe -lopie 9LIBS += -lqpe -lopie
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libcardmonapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libcardmonapplet.ts \
13 ../../../i18n/nl/libcardmonapplet.ts \ 13 ../../../i18n/nl/libcardmonapplet.ts \
14 ../../../i18n/da/libcardmonapplet.ts \ 14 ../../../i18n/da/libcardmonapplet.ts \
15 ../../../i18n/xx/libcardmonapplet.ts \ 15 ../../../i18n/xx/libcardmonapplet.ts \
16 ../../../i18n/en/libcardmonapplet.ts \ 16 ../../../i18n/en/libcardmonapplet.ts \
17 ../../../i18n/es/libcardmonapplet.ts \ 17 ../../../i18n/es/libcardmonapplet.ts \
18 ../../../i18n/fr/libcardmonapplet.ts \ 18 ../../../i18n/fr/libcardmonapplet.ts \
19 ../../../i18n/hu/libcardmonapplet.ts \ 19 ../../../i18n/hu/libcardmonapplet.ts \
20 ../../../i18n/ja/libcardmonapplet.ts \ 20 ../../../i18n/ja/libcardmonapplet.ts \
21 ../../../i18n/ko/libcardmonapplet.ts \ 21 ../../../i18n/ko/libcardmonapplet.ts \
22 ../../../i18n/no/libcardmonapplet.ts \ 22 ../../../i18n/no/libcardmonapplet.ts \
23 ../../../i18n/pl/libcardmonapplet.ts \ 23 ../../../i18n/pl/libcardmonapplet.ts \
24 ../../../i18n/pt/libcardmonapplet.ts \ 24 ../../../i18n/pt/libcardmonapplet.ts \
25 ../../../i18n/pt_BR/libcardmonapplet.ts \ 25 ../../../i18n/pt_BR/libcardmonapplet.ts \
26 ../../../i18n/sl/libcardmonapplet.ts \ 26 ../../../i18n/sl/libcardmonapplet.ts \
27 ../../../i18n/zh_CN/libcardmonapplet.ts \ 27 ../../../i18n/zh_CN/libcardmonapplet.ts \
28 ../../../i18n/zh_TW/libcardmonapplet.ts 28 ../../../i18n/zh_TW/libcardmonapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/clipboardapplet/clipboardapplet.pro b/core/applets/clipboardapplet/clipboardapplet.pro
index 1e9cc4f..358d658 100644
--- a/core/applets/clipboardapplet/clipboardapplet.pro
+++ b/core/applets/clipboardapplet/clipboardapplet.pro
@@ -1,33 +1,33 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= clipboard.h clipboardappletimpl.h 3 HEADERS= clipboard.h clipboardappletimpl.h
4 SOURCES= clipboard.cpp clipboardappletimpl.cpp 4 SOURCES= clipboard.cpp clipboardappletimpl.cpp
5 TARGET = clipboardapplet 5 TARGET = clipboardapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libclipboardapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libclipboardapplet.ts \
13 ../../../i18n/nl/libclipboardapplet.ts \ 13 ../../../i18n/nl/libclipboardapplet.ts \
14 ../../../i18n/da/libclipboardapplet.ts \ 14 ../../../i18n/da/libclipboardapplet.ts \
15 ../../../i18n/xx/libclipboardapplet.ts \ 15 ../../../i18n/xx/libclipboardapplet.ts \
16 ../../../i18n/en/libclipboardapplet.ts \ 16 ../../../i18n/en/libclipboardapplet.ts \
17 ../../../i18n/es/libclipboardapplet.ts \ 17 ../../../i18n/es/libclipboardapplet.ts \
18 ../../../i18n/fr/libclipboardapplet.ts \ 18 ../../../i18n/fr/libclipboardapplet.ts \
19 ../../../i18n/hu/libclipboardapplet.ts \ 19 ../../../i18n/hu/libclipboardapplet.ts \
20 ../../../i18n/ja/libclipboardapplet.ts \ 20 ../../../i18n/ja/libclipboardapplet.ts \
21 ../../../i18n/ko/libclipboardapplet.ts \ 21 ../../../i18n/ko/libclipboardapplet.ts \
22 ../../../i18n/no/libclipboardapplet.ts \ 22 ../../../i18n/no/libclipboardapplet.ts \
23 ../../../i18n/pl/libclipboardapplet.ts \ 23 ../../../i18n/pl/libclipboardapplet.ts \
24 ../../../i18n/pt/libclipboardapplet.ts \ 24 ../../../i18n/pt/libclipboardapplet.ts \
25 ../../../i18n/pt_BR/libclipboardapplet.ts \ 25 ../../../i18n/pt_BR/libclipboardapplet.ts \
26 ../../../i18n/sl/libclipboardapplet.ts \ 26 ../../../i18n/sl/libclipboardapplet.ts \
27 ../../../i18n/zh_CN/libclipboardapplet.ts \ 27 ../../../i18n/zh_CN/libclipboardapplet.ts \
28 ../../../i18n/zh_TW/libclipboardapplet.ts 28 ../../../i18n/zh_TW/libclipboardapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/clockapplet/clockapplet.pro b/core/applets/clockapplet/clockapplet.pro
index 22c7b55..88092f5 100644
--- a/core/applets/clockapplet/clockapplet.pro
+++ b/core/applets/clockapplet/clockapplet.pro
@@ -1,33 +1,33 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= clock.h clockappletimpl.h 3 HEADERS= clock.h clockappletimpl.h
4 SOURCES= clock.cpp clockappletimpl.cpp 4 SOURCES= clock.cpp clockappletimpl.cpp
5 TARGET = clockapplet 5 TARGET = clockapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include .. 8DEPENDPATH += ../$(OPIEDIR)/include ..
9LIBS += -lqpe 9LIBS += -lqpe
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libclockapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libclockapplet.ts \
13 ../../../i18n/nl/libclockapplet.ts \ 13 ../../../i18n/nl/libclockapplet.ts \
14 ../../../i18n/da/libclockapplet.ts \ 14 ../../../i18n/da/libclockapplet.ts \
15 ../../../i18n/xx/libclockapplet.ts \ 15 ../../../i18n/xx/libclockapplet.ts \
16 ../../../i18n/en/libclockapplet.ts \ 16 ../../../i18n/en/libclockapplet.ts \
17 ../../../i18n/es/libclockapplet.ts \ 17 ../../../i18n/es/libclockapplet.ts \
18 ../../../i18n/fr/libclockapplet.ts \ 18 ../../../i18n/fr/libclockapplet.ts \
19 ../../../i18n/hu/libclockapplet.ts \ 19 ../../../i18n/hu/libclockapplet.ts \
20 ../../../i18n/ja/libclockapplet.ts \ 20 ../../../i18n/ja/libclockapplet.ts \
21 ../../../i18n/ko/libclockapplet.ts \ 21 ../../../i18n/ko/libclockapplet.ts \
22 ../../../i18n/no/libclockapplet.ts \ 22 ../../../i18n/no/libclockapplet.ts \
23 ../../../i18n/pl/libclockapplet.ts \ 23 ../../../i18n/pl/libclockapplet.ts \
24 ../../../i18n/pt/libclockapplet.ts \ 24 ../../../i18n/pt/libclockapplet.ts \
25 ../../../i18n/pt_BR/libclockapplet.ts \ 25 ../../../i18n/pt_BR/libclockapplet.ts \
26 ../../../i18n/sl/libclockapplet.ts \ 26 ../../../i18n/sl/libclockapplet.ts \
27 ../../../i18n/zh_CN/libclockapplet.ts \ 27 ../../../i18n/zh_CN/libclockapplet.ts \
28 ../../../i18n/zh_TW/libclockapplet.ts 28 ../../../i18n/zh_TW/libclockapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/homeapplet/homeapplet.pro b/core/applets/homeapplet/homeapplet.pro
index ac7956b..854050f 100644
--- a/core/applets/homeapplet/homeapplet.pro
+++ b/core/applets/homeapplet/homeapplet.pro
@@ -1,33 +1,33 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = home.h 3HEADERS = home.h
4SOURCES = home.cpp 4SOURCES = home.cpp
5TARGET = homeapplet 5TARGET = homeapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libhomeapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libhomeapplet.ts \
13 ../../../i18n/nl/libhomeapplet.ts \ 13 ../../../i18n/nl/libhomeapplet.ts \
14 ../../../i18n/da/libhomeapplet.ts \ 14 ../../../i18n/da/libhomeapplet.ts \
15 ../../../i18n/xx/libhomeapplet.ts \ 15 ../../../i18n/xx/libhomeapplet.ts \
16 ../../../i18n/en/libhomeapplet.ts \ 16 ../../../i18n/en/libhomeapplet.ts \
17 ../../../i18n/es/libhomeapplet.ts \ 17 ../../../i18n/es/libhomeapplet.ts \
18 ../../../i18n/fr/libhomeapplet.ts \ 18 ../../../i18n/fr/libhomeapplet.ts \
19 ../../../i18n/hu/libhomeapplet.ts \ 19 ../../../i18n/hu/libhomeapplet.ts \
20 ../../../i18n/ja/libhomeapplet.ts \ 20 ../../../i18n/ja/libhomeapplet.ts \
21 ../../../i18n/ko/libhomeapplet.ts \ 21 ../../../i18n/ko/libhomeapplet.ts \
22 ../../../i18n/no/libhomeapplet.ts \ 22 ../../../i18n/no/libhomeapplet.ts \
23 ../../../i18n/pl/libhomeapplet.ts \ 23 ../../../i18n/pl/libhomeapplet.ts \
24 ../../../i18n/pt/libhomeapplet.ts \ 24 ../../../i18n/pt/libhomeapplet.ts \
25 ../../../i18n/pt_BR/libhomeapplet.ts \ 25 ../../../i18n/pt_BR/libhomeapplet.ts \
26 ../../../i18n/sl/libhomeapplet.ts \ 26 ../../../i18n/sl/libhomeapplet.ts \
27 ../../../i18n/zh_CN/libhomeapplet.ts \ 27 ../../../i18n/zh_CN/libhomeapplet.ts \
28 ../../../i18n/zh_TW/libhomeapplet.ts 28 ../../../i18n/zh_TW/libhomeapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/irdaapplet/irdaapplet.pro b/core/applets/irdaapplet/irdaapplet.pro
index 56632ed..be16bad 100644
--- a/core/applets/irdaapplet/irdaapplet.pro
+++ b/core/applets/irdaapplet/irdaapplet.pro
@@ -1,33 +1,33 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = irda.h irdaappletimpl.h 3HEADERS = irda.h irdaappletimpl.h
4SOURCES = irda.cpp irdaappletimpl.cpp 4SOURCES = irda.cpp irdaappletimpl.cpp
5TARGET = irdaapplet 5TARGET = irdaapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libirdaapplet.ts \
13 ../../../i18n/nl/libirdaapplet.ts \ 13 ../../../i18n/nl/libirdaapplet.ts \
14 ../../../i18n/da/libirdaapplet.ts \ 14 ../../../i18n/da/libirdaapplet.ts \
15 ../../../i18n/xx/libirdaapplet.ts \ 15 ../../../i18n/xx/libirdaapplet.ts \
16 ../../../i18n/en/libirdaapplet.ts \ 16 ../../../i18n/en/libirdaapplet.ts \
17 ../../../i18n/es/libirdaapplet.ts \ 17 ../../../i18n/es/libirdaapplet.ts \
18 ../../../i18n/fr/libirdaapplet.ts \ 18 ../../../i18n/fr/libirdaapplet.ts \
19 ../../../i18n/hu/libirdaapplet.ts \ 19 ../../../i18n/hu/libirdaapplet.ts \
20 ../../../i18n/ja/libirdaapplet.ts \ 20 ../../../i18n/ja/libirdaapplet.ts \
21 ../../../i18n/ko/libirdaapplet.ts \ 21 ../../../i18n/ko/libirdaapplet.ts \
22 ../../../i18n/no/libirdaapplet.ts \ 22 ../../../i18n/no/libirdaapplet.ts \
23 ../../../i18n/pl/libirdaapplet.ts \ 23 ../../../i18n/pl/libirdaapplet.ts \
24 ../../../i18n/pt/libirdaapplet.ts \ 24 ../../../i18n/pt/libirdaapplet.ts \
25 ../../../i18n/pt_BR/libirdaapplet.ts \ 25 ../../../i18n/pt_BR/libirdaapplet.ts \
26 ../../../i18n/sl/libirdaapplet.ts \ 26 ../../../i18n/sl/libirdaapplet.ts \
27 ../../../i18n/zh_CN/libirdaapplet.ts \ 27 ../../../i18n/zh_CN/libirdaapplet.ts \
28 ../../../i18n/zh_TW/libirdaapplet.ts 28 ../../../i18n/zh_TW/libirdaapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/logoutapplet/logoutapplet.pro b/core/applets/logoutapplet/logoutapplet.pro
index a019303..7826bb3 100644
--- a/core/applets/logoutapplet/logoutapplet.pro
+++ b/core/applets/logoutapplet/logoutapplet.pro
@@ -1,33 +1,33 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = logout.h 3HEADERS = logout.h
4SOURCES = logout.cpp 4SOURCES = logout.cpp
5TARGET = logoutapplet 5TARGET = logoutapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/liblogoutapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/liblogoutapplet.ts \
13 ../../../i18n/nl/liblogoutapplet.ts \ 13 ../../../i18n/nl/liblogoutapplet.ts \
14 ../../../i18n/da/liblogoutapplet.ts \ 14 ../../../i18n/da/liblogoutapplet.ts \
15 ../../../i18n/xx/liblogoutapplet.ts \ 15 ../../../i18n/xx/liblogoutapplet.ts \
16 ../../../i18n/en/liblogoutapplet.ts \ 16 ../../../i18n/en/liblogoutapplet.ts \
17 ../../../i18n/es/liblogoutapplet.ts \ 17 ../../../i18n/es/liblogoutapplet.ts \
18 ../../../i18n/fr/liblogoutapplet.ts \ 18 ../../../i18n/fr/liblogoutapplet.ts \
19 ../../../i18n/hu/liblogoutapplet.ts \ 19 ../../../i18n/hu/liblogoutapplet.ts \
20 ../../../i18n/ja/liblogoutapplet.ts \ 20 ../../../i18n/ja/liblogoutapplet.ts \
21 ../../../i18n/ko/liblogoutapplet.ts \ 21 ../../../i18n/ko/liblogoutapplet.ts \
22 ../../../i18n/no/liblogoutapplet.ts \ 22 ../../../i18n/no/liblogoutapplet.ts \
23 ../../../i18n/pl/liblogoutapplet.ts \ 23 ../../../i18n/pl/liblogoutapplet.ts \
24 ../../../i18n/pt/liblogoutapplet.ts \ 24 ../../../i18n/pt/liblogoutapplet.ts \
25 ../../../i18n/pt_BR/liblogoutapplet.ts \ 25 ../../../i18n/pt_BR/liblogoutapplet.ts \
26 ../../../i18n/sl/liblogoutapplet.ts \ 26 ../../../i18n/sl/liblogoutapplet.ts \
27 ../../../i18n/zh_CN/liblogoutapplet.ts \ 27 ../../../i18n/zh_CN/liblogoutapplet.ts \
28 ../../../i18n/zh_TW/liblogoutapplet.ts 28 ../../../i18n/zh_TW/liblogoutapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/restartapplet/restartapplet.pro b/core/applets/restartapplet/restartapplet.pro
index bd27b0a..368a0ea 100644
--- a/core/applets/restartapplet/restartapplet.pro
+++ b/core/applets/restartapplet/restartapplet.pro
@@ -1,17 +1,17 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = restart.h restartappletimpl.h 3HEADERS = restart.h restartappletimpl.h
4SOURCES = restart.cpp restartappletimpl.cpp 4SOURCES = restart.cpp restartappletimpl.cpp
5TARGET = restartapplet 5TARGET = restartapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11MOC_DIR=opieobj 11MOC_DIR=opieobj
12OBJECTS_DIR=opieobj 12OBJECTS_DIR=opieobj
13 13
14 14
15 15
16include ( $(OPIEDIR)/include.pro ) 16include ( $(OPIEDIR)/include.pro )
17target.path = $$prefix/plugins/applets 17target.path = $$prefix/plugins/applets
diff --git a/core/applets/restartapplet2/restartapplet.pro b/core/applets/restartapplet2/restartapplet.pro
index 85a3b66..12a7922 100644
--- a/core/applets/restartapplet2/restartapplet.pro
+++ b/core/applets/restartapplet2/restartapplet.pro
@@ -1,17 +1,17 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = restart.h 3HEADERS = restart.h
4SOURCES = restart.cpp 4SOURCES = restart.cpp
5TARGET = restartapplet 5TARGET = restartapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11MOC_DIR=opieobj 11MOC_DIR=opieobj
12OBJECTS_DIR=opieobj 12OBJECTS_DIR=opieobj
13 13
14 14
15 15
16include ( $(OPIEDIR)/include.pro ) 16include ( $(OPIEDIR)/include.pro )
17target.path = $$prefix/plugins/applets 17target.path = $$prefix/plugins/applets
diff --git a/core/applets/rotateapplet/rotateapplet.pro b/core/applets/rotateapplet/rotateapplet.pro
index 9b39dba..2c8de8d 100644
--- a/core/applets/rotateapplet/rotateapplet.pro
+++ b/core/applets/rotateapplet/rotateapplet.pro
@@ -1,31 +1,31 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugn warn_on release
3HEADERS = rotate.h 3HEADERS = rotate.h
4SOURCES = rotate.cpp 4SOURCES = rotate.cpp
5TARGET = rotateapplet 5TARGET = rotateapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/librotateapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/librotateapplet.ts \
13 ../../../i18n/nl/librotateapplet.ts \ 13 ../../../i18n/nl/librotateapplet.ts \
14 ../../../i18n/da/librotateapplet.ts \ 14 ../../../i18n/da/librotateapplet.ts \
15 ../../../i18n/xx/librotateapplet.ts \ 15 ../../../i18n/xx/librotateapplet.ts \
16 ../../../i18n/en/librotateapplet.ts \ 16 ../../../i18n/en/librotateapplet.ts \
17 ../../../i18n/es/librotateapplet.ts \ 17 ../../../i18n/es/librotateapplet.ts \
18 ../../../i18n/fr/librotateapplet.ts \ 18 ../../../i18n/fr/librotateapplet.ts \
19 ../../../i18n/hu/librotateapplet.ts \ 19 ../../../i18n/hu/librotateapplet.ts \
20 ../../../i18n/ja/librotateapplet.ts \ 20 ../../../i18n/ja/librotateapplet.ts \
21 ../../../i18n/ko/librotateapplet.ts \ 21 ../../../i18n/ko/librotateapplet.ts \
22 ../../../i18n/no/librotateapplet.ts \ 22 ../../../i18n/no/librotateapplet.ts \
23 ../../../i18n/pl/librotateapplet.ts \ 23 ../../../i18n/pl/librotateapplet.ts \
24 ../../../i18n/pt/librotateapplet.ts \ 24 ../../../i18n/pt/librotateapplet.ts \
25 ../../../i18n/pt_BR/librotateapplet.ts \ 25 ../../../i18n/pt_BR/librotateapplet.ts \
26 ../../../i18n/sl/librotateapplet.ts \ 26 ../../../i18n/sl/librotateapplet.ts \
27 ../../../i18n/zh_CN/librotateapplet.ts \ 27 ../../../i18n/zh_CN/librotateapplet.ts \
28 ../../../i18n/zh_TW/librotateapplet.ts 28 ../../../i18n/zh_TW/librotateapplet.ts
29 29
30include ( $(OPIEDIR)/include.pro ) 30include ( $(OPIEDIR)/include.pro )
31target.path = $$prefix/plugins/applets 31target.path = $$prefix/plugins/applets
diff --git a/core/applets/screenshotapplet/screenshotapplet.pro b/core/applets/screenshotapplet/screenshotapplet.pro
index fe7b299..a86eff2 100644
--- a/core/applets/screenshotapplet/screenshotapplet.pro
+++ b/core/applets/screenshotapplet/screenshotapplet.pro
@@ -1,35 +1,35 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h 3HEADERS = screenshot.h inputDialog.h screenshotappletimpl.h
4SOURCES = screenshot.cpp inputDialog.cpp screenshotappletimpl.cpp 4SOURCES = screenshot.cpp inputDialog.cpp screenshotappletimpl.cpp
5TARGET = screenshotapplet 5TARGET = screenshotapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11MOC_DIR=opieobj 11MOC_DIR=opieobj
12OBJECTS_DIR=opieobj 12OBJECTS_DIR=opieobj
13 13
14TRANSLATIONS = ../../../i18n/de/libscreenshotapplet.ts \ 14TRANSLATIONS = ../../../i18n/de/libscreenshotapplet.ts \
15 ../../../i18n/nl/libscreenshotapplet.ts \ 15 ../../../i18n/nl/libscreenshotapplet.ts \
16 ../../../i18n/da/libscreenshotapplet.ts \ 16 ../../../i18n/da/libscreenshotapplet.ts \
17 ../../../i18n/xx/libscreenshotapplet.ts \ 17 ../../../i18n/xx/libscreenshotapplet.ts \
18 ../../../i18n/en/libscreenshotapplet.ts \ 18 ../../../i18n/en/libscreenshotapplet.ts \
19 ../../../i18n/es/libscreenshotapplet.ts \ 19 ../../../i18n/es/libscreenshotapplet.ts \
20 ../../../i18n/fr/libscreenshotapplet.ts \ 20 ../../../i18n/fr/libscreenshotapplet.ts \
21 ../../../i18n/hu/libscreenshotapplet.ts \ 21 ../../../i18n/hu/libscreenshotapplet.ts \
22 ../../../i18n/ja/libscreenshotapplet.ts \ 22 ../../../i18n/ja/libscreenshotapplet.ts \
23 ../../../i18n/ko/libscreenshotapplet.ts \ 23 ../../../i18n/ko/libscreenshotapplet.ts \
24 ../../../i18n/no/libscreenshotapplet.ts \ 24 ../../../i18n/no/libscreenshotapplet.ts \
25 ../../../i18n/pl/libscreenshotapplet.ts \ 25 ../../../i18n/pl/libscreenshotapplet.ts \
26 ../../../i18n/pt/libscreenshotapplet.ts \ 26 ../../../i18n/pt/libscreenshotapplet.ts \
27 ../../../i18n/pt_BR/libscreenshotapplet.ts \ 27 ../../../i18n/pt_BR/libscreenshotapplet.ts \
28 ../../../i18n/sl/libscreenshotapplet.ts \ 28 ../../../i18n/sl/libscreenshotapplet.ts \
29 ../../../i18n/zh_CN/libscreenshotapplet.ts \ 29 ../../../i18n/zh_CN/libscreenshotapplet.ts \
30 ../../../i18n/zh_TW/libscreenshotapplet.ts 30 ../../../i18n/zh_TW/libscreenshotapplet.ts
31 31
32 32
33 33
34include ( $(OPIEDIR)/include.pro ) 34include ( $(OPIEDIR)/include.pro )
35target.path = $$prefix/plugins/applets 35target.path = $$prefix/plugins/applets
diff --git a/core/applets/suspendapplet/suspendapplet.pro b/core/applets/suspendapplet/suspendapplet.pro
index 7635d32..f58de63 100644
--- a/core/applets/suspendapplet/suspendapplet.pro
+++ b/core/applets/suspendapplet/suspendapplet.pro
@@ -1,33 +1,33 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = suspend.h 3HEADERS = suspend.h
4SOURCES = suspend.cpp 4SOURCES = suspend.cpp
5TARGET = suspendapplet 5TARGET = suspendapplet
6DESTDIR = $(OPIEDIR)/plugins/applets 6DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libsuspendapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libsuspendapplet.ts \
13 ../../../i18n/nl/libsuspendapplet.ts \ 13 ../../../i18n/nl/libsuspendapplet.ts \
14 ../../../i18n/da/libsuspendapplet.ts \ 14 ../../../i18n/da/libsuspendapplet.ts \
15 ../../../i18n/xx/libsuspendapplet.ts \ 15 ../../../i18n/xx/libsuspendapplet.ts \
16 ../../../i18n/en/libsuspendapplet.ts \ 16 ../../../i18n/en/libsuspendapplet.ts \
17 ../../../i18n/es/libsuspendapplet.ts \ 17 ../../../i18n/es/libsuspendapplet.ts \
18 ../../../i18n/fr/libsuspendapplet.ts \ 18 ../../../i18n/fr/libsuspendapplet.ts \
19 ../../../i18n/hu/libsuspendapplet.ts \ 19 ../../../i18n/hu/libsuspendapplet.ts \
20 ../../../i18n/ja/libsuspendapplet.ts \ 20 ../../../i18n/ja/libsuspendapplet.ts \
21 ../../../i18n/ko/libsuspendapplet.ts \ 21 ../../../i18n/ko/libsuspendapplet.ts \
22 ../../../i18n/no/libsuspendapplet.ts \ 22 ../../../i18n/no/libsuspendapplet.ts \
23 ../../../i18n/pl/libsuspendapplet.ts \ 23 ../../../i18n/pl/libsuspendapplet.ts \
24 ../../../i18n/pt/libsuspendapplet.ts \ 24 ../../../i18n/pt/libsuspendapplet.ts \
25 ../../../i18n/pt_BR/libsuspendapplet.ts \ 25 ../../../i18n/pt_BR/libsuspendapplet.ts \
26 ../../../i18n/sl/libsuspendapplet.ts \ 26 ../../../i18n/sl/libsuspendapplet.ts \
27 ../../../i18n/zh_CN/libsuspendapplet.ts \ 27 ../../../i18n/zh_CN/libsuspendapplet.ts \
28 ../../../i18n/zh_TW/libsuspendapplet.ts 28 ../../../i18n/zh_TW/libsuspendapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/vmemo/vmemo.pro b/core/applets/vmemo/vmemo.pro
index 8cf1f07..43cb767 100644
--- a/core/applets/vmemo/vmemo.pro
+++ b/core/applets/vmemo/vmemo.pro
@@ -1,33 +1,33 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt plugin warn_on release
3HEADERS = vmemo.h vmemoimpl.h adpcm.h 3HEADERS = vmemo.h vmemoimpl.h adpcm.h
4SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c 4SOURCES = vmemo.cpp vmemoimpl.cpp adpcm.c
5TARGET = vmemoapplet 5TARGET = vmemoapplet
6DESTDIR =$(OPIEDIR)/plugins/applets 6DESTDIR =$(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += $(OPIEDIR)/include 8DEPENDPATH += $(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10VERSION = 1.0.0 10VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libvmemoapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libvmemoapplet.ts \
13 ../../../i18n/nl/libvmemoapplet.ts \ 13 ../../../i18n/nl/libvmemoapplet.ts \
14 ../../../i18n/da/libvmemoapplet.ts \ 14 ../../../i18n/da/libvmemoapplet.ts \
15 ../../../i18n/xx/libvmemoapplet.ts \ 15 ../../../i18n/xx/libvmemoapplet.ts \
16 ../../../i18n/en/libvmemoapplet.ts \ 16 ../../../i18n/en/libvmemoapplet.ts \
17 ../../../i18n/es/libvmemoapplet.ts \ 17 ../../../i18n/es/libvmemoapplet.ts \
18 ../../../i18n/fr/libvmemoapplet.ts \ 18 ../../../i18n/fr/libvmemoapplet.ts \
19 ../../../i18n/hu/libvmemoapplet.ts \ 19 ../../../i18n/hu/libvmemoapplet.ts \
20 ../../../i18n/ja/libvmemoapplet.ts \ 20 ../../../i18n/ja/libvmemoapplet.ts \
21 ../../../i18n/ko/libvmemoapplet.ts \ 21 ../../../i18n/ko/libvmemoapplet.ts \
22 ../../../i18n/no/libvmemoapplet.ts \ 22 ../../../i18n/no/libvmemoapplet.ts \
23 ../../../i18n/pl/libvmemoapplet.ts \ 23 ../../../i18n/pl/libvmemoapplet.ts \
24 ../../../i18n/pt/libvmemoapplet.ts \ 24 ../../../i18n/pt/libvmemoapplet.ts \
25 ../../../i18n/pt_BR/libvmemoapplet.ts \ 25 ../../../i18n/pt_BR/libvmemoapplet.ts \
26 ../../../i18n/sl/libvmemoapplet.ts \ 26 ../../../i18n/sl/libvmemoapplet.ts \
27 ../../../i18n/zh_CN/libvmemoapplet.ts \ 27 ../../../i18n/zh_CN/libvmemoapplet.ts \
28 ../../../i18n/zh_TW/libvmemoapplet.ts 28 ../../../i18n/zh_TW/libvmemoapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro
index d30567c..68d9eff 100644
--- a/core/applets/volumeapplet/volumeapplet.pro
+++ b/core/applets/volumeapplet/volumeapplet.pro
@@ -1,33 +1,33 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS= volume.h volumeappletimpl.h oledbox.h 3 HEADERS= volume.h volumeappletimpl.h oledbox.h
4 SOURCES= volume.cpp volumeappletimpl.cpp oledbox.cpp 4 SOURCES= volume.cpp volumeappletimpl.cpp oledbox.cpp
5 TARGET = volumeapplet 5 TARGET = volumeapplet
6 DESTDIR = $(OPIEDIR)/plugins/applets 6 DESTDIR = $(OPIEDIR)/plugins/applets
7INCLUDEPATH += $(OPIEDIR)/include 7INCLUDEPATH += $(OPIEDIR)/include
8DEPENDPATH += ../$(OPIEDIR)/include 8DEPENDPATH += ../$(OPIEDIR)/include
9LIBS += -lqpe 9LIBS += -lqpe
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../i18n/de/libvolumeapplet.ts \ 12TRANSLATIONS = ../../../i18n/de/libvolumeapplet.ts \
13 ../../../i18n/nl/libvolumeapplet.ts \ 13 ../../../i18n/nl/libvolumeapplet.ts \
14 ../../../i18n/da/libvolumeapplet.ts \ 14 ../../../i18n/da/libvolumeapplet.ts \
15 ../../../i18n/xx/libvolumeapplet.ts \ 15 ../../../i18n/xx/libvolumeapplet.ts \
16 ../../../i18n/en/libvolumeapplet.ts \ 16 ../../../i18n/en/libvolumeapplet.ts \
17 ../../../i18n/es/libvolumeapplet.ts \ 17 ../../../i18n/es/libvolumeapplet.ts \
18 ../../../i18n/fr/libvolumeapplet.ts \ 18 ../../../i18n/fr/libvolumeapplet.ts \
19 ../../../i18n/hu/libvolumeapplet.ts \ 19 ../../../i18n/hu/libvolumeapplet.ts \
20 ../../../i18n/ja/libvolumeapplet.ts \ 20 ../../../i18n/ja/libvolumeapplet.ts \
21 ../../../i18n/ko/libvolumeapplet.ts \ 21 ../../../i18n/ko/libvolumeapplet.ts \
22 ../../../i18n/no/libvolumeapplet.ts \ 22 ../../../i18n/no/libvolumeapplet.ts \
23 ../../../i18n/pl/libvolumeapplet.ts \ 23 ../../../i18n/pl/libvolumeapplet.ts \
24 ../../../i18n/pt/libvolumeapplet.ts \ 24 ../../../i18n/pt/libvolumeapplet.ts \
25 ../../../i18n/pt_BR/libvolumeapplet.ts \ 25 ../../../i18n/pt_BR/libvolumeapplet.ts \
26 ../../../i18n/sl/libvolumeapplet.ts \ 26 ../../../i18n/sl/libvolumeapplet.ts \
27 ../../../i18n/zh_CN/libvolumeapplet.ts \ 27 ../../../i18n/zh_CN/libvolumeapplet.ts \
28 ../../../i18n/zh_TW/libvolumeapplet.ts 28 ../../../i18n/zh_TW/libvolumeapplet.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
33target.path = $$prefix/plugins/applets 33target.path = $$prefix/plugins/applets
diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp
index d6f93da..0ac043b 100644
--- a/core/launcher/applauncher.cpp
+++ b/core/launcher/applauncher.cpp
@@ -453,193 +453,197 @@ bool AppLauncher::executeBuiltin(const QString &c, const QString &document)
453 if (builtin) { 453 if (builtin) {
454 for (int i = 0; builtin[i].file; i++) { 454 for (int i = 0; builtin[i].file; i++) {
455 if ( builtin[i].file == c ) { 455 if ( builtin[i].file == c ) {
456 if ( running[i] ) { 456 if ( running[i] ) {
457 if ( !document.isNull() && builtin[i].documentary ) 457 if ( !document.isNull() && builtin[i].documentary )
458 Global::setDocument(running[i], document); 458 Global::setDocument(running[i], document);
459 running[i]->raise(); 459 running[i]->raise();
460 running[i]->show(); 460 running[i]->show();
461 running[i]->setActiveWindow(); 461 running[i]->setActiveWindow();
462 } else { 462 } else {
463 running[i] = builtin[i].func( builtin[i].maximized ); 463 running[i] = builtin[i].func( builtin[i].maximized );
464 } 464 }
465#ifndef QT_NO_COP 465#ifndef QT_NO_COP
466 QCopEnvelope e("QPE/System", "notBusy(QString)" ); 466 QCopEnvelope e("QPE/System", "notBusy(QString)" );
467 e << c; // that was quick ;-) 467 e << c; // that was quick ;-)
468#endif 468#endif
469 return TRUE; 469 return TRUE;
470 } 470 }
471 } 471 }
472 } 472 }
473 473
474 // Convert the command line in to a list of arguments 474 // Convert the command line in to a list of arguments
475 QStringList list = QStringList::split(QRegExp(" *"),c); 475 QStringList list = QStringList::split(QRegExp(" *"),c);
476 QString ap=list[0]; 476 QString ap=list[0];
477 477
478 if ( ap == "suspend" ) { // No tr 478 if ( ap == "suspend" ) { // No tr
479 QWSServer::processKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); 479 QWSServer::processKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE );
480 return TRUE; 480 return TRUE;
481 } 481 }
482 482
483 return FALSE; 483 return FALSE;
484} 484}
485 485
486bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise) 486bool AppLauncher::execute(const QString &c, const QString &docParam, bool noRaise)
487{ 487{
488 qWarning("AppLauncher::execute"); 488 qWarning("AppLauncher::execute");
489 // Convert the command line in to a list of arguments 489 // Convert the command line in to a list of arguments
490 QStringList list = QStringList::split(QRegExp(" *"),c); 490 QStringList list = QStringList::split(QRegExp(" *"),c);
491 if ( !docParam.isEmpty() ) 491 if ( !docParam.isEmpty() )
492 list.append( docParam ); 492 list.append( docParam );
493 493
494 QString appName = list[0]; 494 QString appName = list[0];
495 if ( isRunning(appName) ) { 495 if ( isRunning(appName) ) {
496 QCString channel = "QPE/Application/"; 496 QCString channel = "QPE/Application/";
497 channel += appName.latin1(); 497 channel += appName.latin1();
498 498
499 // Need to lock it to avoid race conditions with QPEApplication::processQCopFile 499 // Need to lock it to avoid race conditions with QPEApplication::processQCopFile
500 QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName); 500 QFile f(Opie::Global::tempDir() + "qcop-msg-" + appName);
501 if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) { 501 if ( !noRaise && f.open(IO_WriteOnly | IO_Append) ) {
502#ifndef Q_OS_WIN32 502#ifndef Q_OS_WIN32
503 flock(f.handle(), LOCK_EX); 503 flock(f.handle(), LOCK_EX);
504#endif 504#endif
505 505
506 QDataStream ds(&f); 506 QDataStream ds(&f);
507 QByteArray b; 507 QByteArray b;
508 QDataStream bstream(b, IO_WriteOnly); 508 QDataStream bstream(b, IO_WriteOnly);
509 if ( !f.size() ) { 509 if ( !f.size() ) {
510 ds << channel << QCString("raise()") << b; 510 ds << channel << QCString("raise()") << b;
511 if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) { 511 if ( !waitingHeartbeat.contains( appName ) && appKillerName != appName ) {
512 int id = startTimer(RAISE_TIMEOUT_MS); 512 int id = startTimer(RAISE_TIMEOUT_MS);
513 waitingHeartbeat.insert( appName, id ); 513 waitingHeartbeat.insert( appName, id );
514 } 514 }
515 } 515 }
516 if ( !docParam.isEmpty() ) { 516 if ( !docParam.isEmpty() ) {
517 bstream << docParam; 517 bstream << docParam;
518 ds << channel << QCString("setDocument(QString)") << b; 518 ds << channel << QCString("setDocument(QString)") << b;
519 } 519 }
520 520
521 f.flush(); 521 f.flush();
522#ifndef Q_OS_WIN32 522#ifndef Q_OS_WIN32
523 flock(f.handle(), LOCK_UN); 523 flock(f.handle(), LOCK_UN);
524#endif 524#endif
525 f.close(); 525 f.close();
526 } 526 }
527 if ( QCopChannel::isRegistered(channel) ) // avoid unnecessary warnings 527 if ( QCopChannel::isRegistered(channel) ) // avoid unnecessary warnings
528 QCopChannel::send(channel,"QPEProcessQCop()"); 528 QCopChannel::send(channel,"QPEProcessQCop()");
529 529
530 return TRUE; 530 return TRUE;
531 } 531 }
532 532
533#ifdef QT_NO_QWS_MULTIPROCESS 533#ifdef QT_NO_QWS_MULTIPROCESS
534 QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c), 534 QMessageBox::warning( 0, tr("Error"), tr("<qt>Could not find the application %1</qt>").arg(c),
535 tr("OK"), 0, 0, 0, 1 ); 535 tr("OK"), 0, 0, 0, 1 );
536#else 536#else
537 537
538 QStrList slist; 538 QStrList slist;
539 unsigned j; 539 unsigned j;
540 for ( j = 0; j < list.count(); j++ ) 540 for ( j = 0; j < list.count(); j++ )
541 slist.append( list[j].utf8() ); 541 slist.append( list[j].utf8() );
542 542
543 const char **args = new const char *[slist.count() + 1]; 543 const char **args = new const char *[slist.count() + 1];
544 for ( j = 0; j < slist.count(); j++ ) 544 for ( j = 0; j < slist.count(); j++ )
545 args[j] = slist.at(j); 545 args[j] = slist.at(j);
546 args[j] = NULL; 546 args[j] = NULL;
547 547
548#ifndef Q_OS_WIN32 548#ifndef Q_OS_WIN32
549#ifdef Q_OS_MACX
550 if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".dylib" ) ) {
551#else
549 if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) { 552 if ( qlPid && qlReady && QFile::exists( QPEApplication::qpeDir()+"plugins/application/lib"+args[0] + ".so" ) ) {
553#endif /* Q_OS_MACX */
550 qDebug( "Quick launching: %s", args[0] ); 554 qDebug( "Quick launching: %s", args[0] );
551 if ( getuid() == 0 ) 555 if ( getuid() == 0 )
552 setpriority( PRIO_PROCESS, qlPid, 0 ); 556 setpriority( PRIO_PROCESS, qlPid, 0 );
553 QCString qlch("QPE/QuickLauncher-"); 557 QCString qlch("QPE/QuickLauncher-");
554 qlch += QString::number(qlPid); 558 qlch += QString::number(qlPid);
555 QCopEnvelope env( qlch, "execute(QStrList)" ); 559 QCopEnvelope env( qlch, "execute(QStrList)" );
556 env << slist; 560 env << slist;
557 runningApps[qlPid] = QString(args[0]); 561 runningApps[qlPid] = QString(args[0]);
558 emit launched(qlPid, QString(args[0])); 562 emit launched(qlPid, QString(args[0]));
559 QCopEnvelope e("QPE/System", "busy()"); 563 QCopEnvelope e("QPE/System", "busy()");
560 qlPid = 0; 564 qlPid = 0;
561 qlReady = FALSE; 565 qlReady = FALSE;
562 QTimer::singleShot( getuid() == 0 ? 800 : 1500, this, SLOT(createQuickLauncher()) ); 566 QTimer::singleShot( getuid() == 0 ? 800 : 1500, this, SLOT(createQuickLauncher()) );
563 } else { 567 } else {
564 int pid = ::vfork(); 568 int pid = ::vfork();
565 if ( !pid ) { 569 if ( !pid ) {
566 for ( int fd = 3; fd < 100; fd++ ) 570 for ( int fd = 3; fd < 100; fd++ )
567 ::close( fd ); 571 ::close( fd );
568 ::setpgid( ::getpid(), ::getppid() ); 572 ::setpgid( ::getpid(), ::getppid() );
569 // Try bindir first, so that foo/bar works too 573 // Try bindir first, so that foo/bar works too
570 ::execv( QPEApplication::qpeDir()+"bin/"+args[0], (char * const *)args ); 574 ::execv( QPEApplication::qpeDir()+"bin/"+args[0], (char * const *)args );
571 ::execvp( args[0], (char * const *)args ); 575 ::execvp( args[0], (char * const *)args );
572 _exit( -1 ); 576 _exit( -1 );
573 } 577 }
574 578
575 runningApps[pid] = QString(args[0]); 579 runningApps[pid] = QString(args[0]);
576 emit launched(pid, QString(args[0])); 580 emit launched(pid, QString(args[0]));
577 QCopEnvelope e("QPE/System", "busy()"); 581 QCopEnvelope e("QPE/System", "busy()");
578 } 582 }
579#else 583#else
580 QProcess *proc = new QProcess(this); 584 QProcess *proc = new QProcess(this);
581 if (proc){ 585 if (proc){
582 for (int i=0; i < slist.count(); i++) 586 for (int i=0; i < slist.count(); i++)
583 proc->addArgument(args[i]); 587 proc->addArgument(args[i]);
584 connect(proc, SIGNAL(processExited()), this, SLOT(processExited())); 588 connect(proc, SIGNAL(processExited()), this, SLOT(processExited()));
585 if (!proc->start()){ 589 if (!proc->start()){
586 qDebug("Unable to start application %s", args[0]); 590 qDebug("Unable to start application %s", args[0]);
587 }else{ 591 }else{
588 PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier(); 592 PROCESS_INFORMATION *procInfo = (PROCESS_INFORMATION *)proc->processIdentifier();
589 if (procInfo){ 593 if (procInfo){
590 DWORD pid = procInfo->dwProcessId; 594 DWORD pid = procInfo->dwProcessId;
591 runningApps[pid] = QString(args[0]); 595 runningApps[pid] = QString(args[0]);
592 runningAppsProc.append(proc); 596 runningAppsProc.append(proc);
593 emit launched(pid, QString(args[0])); 597 emit launched(pid, QString(args[0]));
594 QCopEnvelope e("QPE/System", "busy()"); 598 QCopEnvelope e("QPE/System", "busy()");
595 }else{ 599 }else{
596 qDebug("Unable to read process inforation #1 for %s", args[0]); 600 qDebug("Unable to read process inforation #1 for %s", args[0]);
597 } 601 }
598 } 602 }
599 }else{ 603 }else{
600 qDebug("Unable to create process for application %s", args[0]); 604 qDebug("Unable to create process for application %s", args[0]);
601 return FALSE; 605 return FALSE;
602 } 606 }
603#endif 607#endif
604#endif //QT_NO_QWS_MULTIPROCESS 608#endif //QT_NO_QWS_MULTIPROCESS
605 609
606 delete [] args; 610 delete [] args;
607 return TRUE; 611 return TRUE;
608} 612}
609 613
610void AppLauncher::kill( int pid ) 614void AppLauncher::kill( int pid )
611{ 615{
612#ifndef Q_OS_WIN32 616#ifndef Q_OS_WIN32
613 ::kill( pid, SIGTERM ); 617 ::kill( pid, SIGTERM );
614#else 618#else
615 for ( QProcess *proc = runningAppsProc.first(); proc; proc = runningAppsProc.next() ) { 619 for ( QProcess *proc = runningAppsProc.first(); proc; proc = runningAppsProc.next() ) {
616 if ( proc->processIdentifier() == pid ) { 620 if ( proc->processIdentifier() == pid ) {
617 proc->kill(); 621 proc->kill();
618 break; 622 break;
619 } 623 }
620 } 624 }
621#endif 625#endif
622} 626}
623 627
624int AppLauncher::pidForName( const QString &appName ) 628int AppLauncher::pidForName( const QString &appName )
625{ 629{
626 int pid = -1; 630 int pid = -1;
627 631
628 QMap<int, QString>::Iterator it; 632 QMap<int, QString>::Iterator it;
629 for (it = runningApps.begin(); it!= runningApps.end(); ++it) { 633 for (it = runningApps.begin(); it!= runningApps.end(); ++it) {
630 if (*it == appName) { 634 if (*it == appName) {
631 pid = it.key(); 635 pid = it.key();
632 break; 636 break;
633 } 637 }
634 } 638 }
635 639
636 return pid; 640 return pid;
637} 641}
638 642
639void AppLauncher::createQuickLauncher() 643void AppLauncher::createQuickLauncher()
640{ 644{
641 static bool disabled = FALSE; 645 static bool disabled = FALSE;
642 if (disabled) 646 if (disabled)
643 return; 647 return;
644 648
645 qlReady = FALSE; 649 qlReady = FALSE;
diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp
index 8f3e812..62e316c 100644
--- a/core/launcher/inputmethods.cpp
+++ b/core/launcher/inputmethods.cpp
@@ -134,193 +134,197 @@ InputMethods::InputMethods( QWidget *parent ) :
134 134
135 imButton = new QWidgetStack( this ); // later a widget stack 135 imButton = new QWidgetStack( this ); // later a widget stack
136 imButton->setFocusPolicy(NoFocus); 136 imButton->setFocusPolicy(NoFocus);
137 if (parent->sizeHint().height() > 0) 137 if (parent->sizeHint().height() > 0)
138 imButton->setFixedHeight( parent->sizeHint().height() ); 138 imButton->setFixedHeight( parent->sizeHint().height() );
139 hbox->addWidget(imButton); 139 hbox->addWidget(imButton);
140 140
141 imChoice = new QToolButton( this ); 141 imChoice = new QToolButton( this );
142 imChoice->setFocusPolicy(NoFocus); 142 imChoice->setFocusPolicy(NoFocus);
143 imChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); 143 imChoice->setPixmap( QPixmap( (const char **)tri_xpm ) );
144 if (parent->sizeHint().height() > 0) 144 if (parent->sizeHint().height() > 0)
145 imChoice->setFixedHeight( parent->sizeHint().height() ); 145 imChoice->setFixedHeight( parent->sizeHint().height() );
146 imChoice->setFixedWidth( 13 ); 146 imChoice->setFixedWidth( 13 );
147 imChoice->setAutoRaise( TRUE ); 147 imChoice->setAutoRaise( TRUE );
148 hbox->addWidget( imChoice ); 148 hbox->addWidget( imChoice );
149 connect( imChoice, SIGNAL(clicked()), this, SLOT(chooseIm()) ); 149 connect( imChoice, SIGNAL(clicked()), this, SLOT(chooseIm()) );
150 150
151 loadInputMethods(); 151 loadInputMethods();
152 152
153 QCopChannel *channel = new QCopChannel( "QPE/IME", this ); 153 QCopChannel *channel = new QCopChannel( "QPE/IME", this );
154 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 154 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
155 this, SLOT(qcopReceive(const QCString&, const QByteArray&)) ); 155 this, SLOT(qcopReceive(const QCString&, const QByteArray&)) );
156} 156}
157 157
158InputMethods::~InputMethods() 158InputMethods::~InputMethods()
159{ 159{
160 Config cfg("qpe"); 160 Config cfg("qpe");
161 cfg.setGroup("InputMethod"); 161 cfg.setGroup("InputMethod");
162 if (imethod) 162 if (imethod)
163 cfg.writeEntry("im", imethod->name() ); 163 cfg.writeEntry("im", imethod->name() );
164 if (mkeyboard) 164 if (mkeyboard)
165 cfg.writeEntry("current", mkeyboard->name() ); 165 cfg.writeEntry("current", mkeyboard->name() );
166 166
167 unloadInputMethods(); 167 unloadInputMethods();
168} 168}
169 169
170void InputMethods::hideInputMethod() 170void InputMethods::hideInputMethod()
171{ 171{
172 kbdButton->setOn( FALSE ); 172 kbdButton->setOn( FALSE );
173} 173}
174 174
175void InputMethods::showInputMethod() 175void InputMethods::showInputMethod()
176{ 176{
177 kbdButton->setOn( TRUE ); 177 kbdButton->setOn( TRUE );
178} 178}
179 179
180void InputMethods::showInputMethod(const QString& name) 180void InputMethods::showInputMethod(const QString& name)
181{ 181{
182 int i = 0; 182 int i = 0;
183 QValueList<InputMethod>::Iterator it; 183 QValueList<InputMethod>::Iterator it;
184 InputMethod *im = 0; 184 InputMethod *im = 0;
185 for ( it = inputMethodList.begin(); it != inputMethodList.end(); ++it, i++ ) { 185 for ( it = inputMethodList.begin(); it != inputMethodList.end(); ++it, i++ ) {
186 QString lname = (*it).libName.mid((*it).libName.findRev('/') + 1); 186 QString lname = (*it).libName.mid((*it).libName.findRev('/') + 1);
187 if ( (*it).name() == name || lname == name ) { 187 if ( (*it).name() == name || lname == name ) {
188 im = &(*it); 188 im = &(*it);
189 break; 189 break;
190 } 190 }
191 } 191 }
192 if ( im ) 192 if ( im )
193 chooseKeyboard(im); 193 chooseKeyboard(im);
194} 194}
195 195
196void InputMethods::resetStates() 196void InputMethods::resetStates()
197{ 197{
198 if ( mkeyboard && !mkeyboard->newIM ) 198 if ( mkeyboard && !mkeyboard->newIM )
199 mkeyboard->interface->resetState(); 199 mkeyboard->interface->resetState();
200} 200}
201 201
202QRect InputMethods::inputRect() const 202QRect InputMethods::inputRect() const
203{ 203{
204 if ( !mkeyboard || !mkeyboard->widget || !mkeyboard->widget->isVisible() ) 204 if ( !mkeyboard || !mkeyboard->widget || !mkeyboard->widget->isVisible() )
205 return QRect(); 205 return QRect();
206 else 206 else
207 return mkeyboard->widget->geometry(); 207 return mkeyboard->widget->geometry();
208} 208}
209 209
210void InputMethods::unloadInputMethods() 210void InputMethods::unloadInputMethods()
211{ 211{
212 unloadMethod( inputMethodList ); 212 unloadMethod( inputMethodList );
213 unloadMethod( inputModifierList ); 213 unloadMethod( inputModifierList );
214 inputMethodList.clear(); 214 inputMethodList.clear();
215 inputModifierList.clear(); 215 inputModifierList.clear();
216 216
217} 217}
218 218
219void InputMethods::unloadMethod( QValueList<InputMethod>& list ) { 219void InputMethods::unloadMethod( QValueList<InputMethod>& list ) {
220 QValueList<InputMethod>::Iterator it; 220 QValueList<InputMethod>::Iterator it;
221 221
222 for (it = list.begin(); it != list.end(); ++it ) 222 for (it = list.begin(); it != list.end(); ++it )
223 (*it).releaseInterface(); 223 (*it).releaseInterface();
224 224
225} 225}
226 226
227 227
228QStringList InputMethods::plugins()const { 228QStringList InputMethods::plugins()const {
229 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; 229 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
230#ifdef Q_OS_MACX
231 QDir dir( path, "lib*.dylib" );
232#else
230 QDir dir( path, "lib*.so" ); 233 QDir dir( path, "lib*.so" );
234#endif /* Q_OS_MACX */
231 return dir.entryList(); 235 return dir.entryList();
232} 236}
233 237
234void InputMethods::installTranslator( const QString& type ) { 238void InputMethods::installTranslator( const QString& type ) {
235 QStringList langs = Global::languageList(); 239 QStringList langs = Global::languageList();
236 QStringList::ConstIterator lit; 240 QStringList::ConstIterator lit;
237 for ( lit= langs.begin(); lit!=langs.end(); ++lit) { 241 for ( lit= langs.begin(); lit!=langs.end(); ++lit) {
238 QString lang = *lit; 242 QString lang = *lit;
239 QTranslator * trans = new QTranslator(qApp); 243 QTranslator * trans = new QTranslator(qApp);
240 244
241 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 245 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
242 246
243 if ( trans->load( tfn )) 247 if ( trans->load( tfn ))
244 qApp->installTranslator( trans ); 248 qApp->installTranslator( trans );
245 else 249 else
246 delete trans; 250 delete trans;
247 } 251 }
248} 252}
249 253
250void InputMethods::setPreferedHandlers() { 254void InputMethods::setPreferedHandlers() {
251 Config cfg("qpe"); 255 Config cfg("qpe");
252 cfg.setGroup("InputMethod"); 256 cfg.setGroup("InputMethod");
253 QString current = cfg.readEntry("current"); 257 QString current = cfg.readEntry("current");
254 QString im = cfg.readEntry("im"); 258 QString im = cfg.readEntry("im");
255 259
256 QValueList<InputMethod>::Iterator it; 260 QValueList<InputMethod>::Iterator it;
257 if (!inputModifierList.isEmpty() && !im.isEmpty() ) { 261 if (!inputModifierList.isEmpty() && !im.isEmpty() ) {
258 for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it ) 262 for (it = inputModifierList.begin(); it != inputModifierList.end(); ++it )
259 if ( (*it).name() == im ) { 263 if ( (*it).name() == im ) {
260 imethod = &(*it); break; 264 imethod = &(*it); break;
261 } 265 }
262 266
263 } 267 }
264 if (!inputMethodList.isEmpty() && !current.isEmpty() ) { 268 if (!inputMethodList.isEmpty() && !current.isEmpty() ) {
265 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it ) 269 for (it = inputMethodList.begin(); it != inputMethodList.end(); ++it )
266 if ( (*it).name() == current ) { 270 if ( (*it).name() == current ) {
267 qWarning("preferred keyboard is %s", current.latin1() ); 271 qWarning("preferred keyboard is %s", current.latin1() );
268 mkeyboard = &(*it); 272 mkeyboard = &(*it);
269 kbdButton->setPixmap( *mkeyboard->icon() ); 273 kbdButton->setPixmap( *mkeyboard->icon() );
270 break; 274 break;
271 } 275 }
272 } 276 }
273 277
274} 278}
275 279
276void InputMethods::loadInputMethods() 280void InputMethods::loadInputMethods()
277{ 281{
278#ifndef QT_NO_COMPONENT 282#ifndef QT_NO_COMPONENT
279 hideInputMethod(); 283 hideInputMethod();
280 mkeyboard = 0; 284 mkeyboard = 0;
281 285
282 unloadInputMethods(); 286 unloadInputMethods();
283 287
284 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods"; 288 QString path = QPEApplication::qpeDir() + "/plugins/inputmethods";
285 QStringList list = plugins(); 289 QStringList list = plugins();
286 QStringList::Iterator it; 290 QStringList::Iterator it;
287 for ( it = list.begin(); it != list.end(); ++it ) { 291 for ( it = list.begin(); it != list.end(); ++it ) {
288 InputMethodInterface *iface = 0; 292 InputMethodInterface *iface = 0;
289 ExtInputMethodInterface *eface = 0; 293 ExtInputMethodInterface *eface = 0;
290 QLibrary *lib = new QLibrary( path + "/" + *it ); 294 QLibrary *lib = new QLibrary( path + "/" + *it );
291 295
292 if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) { 296 if ( lib->queryInterface( IID_InputMethod, (QUnknownInterface**)&iface ) == QS_OK ) {
293 InputMethod input; 297 InputMethod input;
294 input.newIM = FALSE; 298 input.newIM = FALSE;
295 input.library = lib; 299 input.library = lib;
296 input.libName = *it; 300 input.libName = *it;
297 input.interface = iface; 301 input.interface = iface;
298 input.widget = input.interface->inputMethod( 0, inputWidgetStyle ); 302 input.widget = input.interface->inputMethod( 0, inputWidgetStyle );
299 input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) ); 303 input.interface->onKeyPress( this, SLOT(sendKey(ushort,ushort,ushort,bool,bool)) );
300 inputMethodList.append( input ); 304 inputMethodList.append( input );
301 } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) { 305 } else if ( lib->queryInterface( IID_ExtInputMethod, (QUnknownInterface**)&eface ) == QS_OK ) {
302 InputMethod input; 306 InputMethod input;
303 input.newIM = TRUE; 307 input.newIM = TRUE;
304 input.library = lib; 308 input.library = lib;
305 input.libName = *it; 309 input.libName = *it;
306 input.extInterface = eface; 310 input.extInterface = eface;
307 input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle ); 311 input.widget = input.extInterface->keyboardWidget( 0, inputWidgetStyle );
308 // may be either a simple, or advanced. 312 // may be either a simple, or advanced.
309 if (input.widget) { 313 if (input.widget) {
310 //qDebug("its a keyboard"); 314 //qDebug("its a keyboard");
311 inputMethodList.append( input ); 315 inputMethodList.append( input );
312 } else { 316 } else {
313 //qDebug("its a real im"); 317 //qDebug("its a real im");
314 input.widget = input.extInterface->statusWidget( 0, 0 ); 318 input.widget = input.extInterface->statusWidget( 0, 0 );
315 if (input.widget) { 319 if (input.widget) {
316 //qDebug("blah"); 320 //qDebug("blah");
317 inputModifierList.append( input ); 321 inputModifierList.append( input );
318 imButton->addWidget(input.widget, inputModifierList.count()); 322 imButton->addWidget(input.widget, inputModifierList.count());
319 } 323 }
320 } 324 }
321 }else{ 325 }else{
322 delete lib; 326 delete lib;
323 lib = 0l; 327 lib = 0l;
324 } 328 }
325 installTranslator( (*it).left( (*it).find(".") ) ); 329 installTranslator( (*it).left( (*it).find(".") ) );
326 } 330 }
diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp
index 579c78c..63f8d05 100644
--- a/core/launcher/irserver.cpp
+++ b/core/launcher/irserver.cpp
@@ -1,73 +1,77 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "irserver.h" 22#include "irserver.h"
23 23
24#include <qtopia/qlibrary.h> 24#include <qtopia/qlibrary.h>
25#include <qtopia/qpeapplication.h> 25#include <qtopia/qpeapplication.h>
26 26
27#include <qtranslator.h> 27#include <qtranslator.h>
28 28
29#include "obexinterface.h" 29#include "obexinterface.h"
30 30
31#include <qdir.h> 31#include <qdir.h>
32 32
33IrServer::IrServer( QObject *parent, const char *name ) 33IrServer::IrServer( QObject *parent, const char *name )
34 : QObject( parent, name ), obexIface(0) 34 : QObject( parent, name ), obexIface(0)
35{ 35{
36 lib = 0; 36 lib = 0;
37 obexIface = 0; 37 obexIface = 0;
38 QString path = QPEApplication::qpeDir() + "/plugins/obex/"; 38 QString path = QPEApplication::qpeDir() + "/plugins/obex/";
39#ifdef Q_OS_MACX
40 QDir dir( path, "lib*.dylib" );
41#else
39 QDir dir( path, "lib*.so" ); 42 QDir dir( path, "lib*.so" );
43#endif /* Q_OS_MACX */
40 QStringList list = dir.entryList(); 44 QStringList list = dir.entryList();
41 QStringList::Iterator it; 45 QStringList::Iterator it;
42 for ( it = list.begin(); it != list.end(); ++it ) { 46 for ( it = list.begin(); it != list.end(); ++it ) {
43 QLibrary *trylib = new QLibrary( path + *it ); 47 QLibrary *trylib = new QLibrary( path + *it );
44 //qDebug("trying lib %s", (path + (*it)).latin1() ); 48 //qDebug("trying lib %s", (path + (*it)).latin1() );
45 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { 49 if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) {
46 lib = trylib; 50 lib = trylib;
47 //qDebug("found obex lib" ); 51 //qDebug("found obex lib" );
48 QString lang = getenv( "LANG" ); 52 QString lang = getenv( "LANG" );
49 QTranslator * trans = new QTranslator(qApp); 53 QTranslator * trans = new QTranslator(qApp);
50 QString type = (*it).left( (*it).find(".") ); 54 QString type = (*it).left( (*it).find(".") );
51 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 55 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
52 //qDebug("tr fpr obex: %s", tfn.latin1() ); 56 //qDebug("tr fpr obex: %s", tfn.latin1() );
53 if ( trans->load( tfn )) 57 if ( trans->load( tfn ))
54 qApp->installTranslator( trans ); 58 qApp->installTranslator( trans );
55 else 59 else
56 delete trans; 60 delete trans;
57 61
58 break; 62 break;
59 } else { 63 } else {
60 delete lib; 64 delete lib;
61 } 65 }
62 } 66 }
63 if ( !lib ) 67 if ( !lib )
64 qDebug("could not load IR plugin" ); 68 qDebug("could not load IR plugin" );
65} 69}
66 70
67IrServer::~IrServer() 71IrServer::~IrServer()
68{ 72{
69 if ( obexIface ) 73 if ( obexIface )
70 obexIface->release(); 74 obexIface->release();
71 delete lib; 75 delete lib;
72} 76}
73 77
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 74965df..5416d33 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -183,172 +183,174 @@ void initEnvironment()
183static void initKeyboard() 183static void initKeyboard()
184{ 184{
185 Config config("qpe"); 185 Config config("qpe");
186 186
187 config.setGroup( "Keyboard" ); 187 config.setGroup( "Keyboard" );
188 188
189 int ard = config.readNumEntry( "RepeatDelay" ); 189 int ard = config.readNumEntry( "RepeatDelay" );
190 int arp = config.readNumEntry( "RepeatPeriod" ); 190 int arp = config.readNumEntry( "RepeatPeriod" );
191 if ( ard > 0 && arp > 0 ) 191 if ( ard > 0 && arp > 0 )
192 qwsSetKeyboardAutoRepeat( ard, arp ); 192 qwsSetKeyboardAutoRepeat( ard, arp );
193 193
194 QString layout = config.readEntry( "Layout", "us101" ); 194 QString layout = config.readEntry( "Layout", "us101" );
195 Server::setKeyboardLayout( layout ); 195 Server::setKeyboardLayout( layout );
196} 196}
197 197
198static bool firstUse() 198static bool firstUse()
199{ 199{
200 bool needFirstUse = FALSE; 200 bool needFirstUse = FALSE;
201 if ( QWSServer::mouseHandler() && 201 if ( QWSServer::mouseHandler() &&
202 QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { 202 QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
203 if ( !QFile::exists( "/etc/pointercal" ) ) 203 if ( !QFile::exists( "/etc/pointercal" ) )
204 needFirstUse = TRUE; 204 needFirstUse = TRUE;
205 } 205 }
206 206
207 { 207 {
208 Config config( "qpe" ); 208 Config config( "qpe" );
209 config.setGroup( "Startup" ); 209 config.setGroup( "Startup" );
210 needFirstUse |= config.readBoolEntry( "FirstUse", TRUE ); 210 needFirstUse |= config.readBoolEntry( "FirstUse", TRUE );
211 } 211 }
212 212
213 if ( !needFirstUse ) 213 if ( !needFirstUse )
214 return FALSE; 214 return FALSE;
215 215
216 FirstUse *fu = new FirstUse(); 216 FirstUse *fu = new FirstUse();
217 fu->exec(); 217 fu->exec();
218 bool rs = fu->restartNeeded(); 218 bool rs = fu->restartNeeded();
219 delete fu; 219 delete fu;
220 return rs; 220 return rs;
221} 221}
222 222
223int initApplication( int argc, char ** argv ) 223int initApplication( int argc, char ** argv )
224{ 224{
225 cleanup(); 225 cleanup();
226 226
227 227
228 initEnvironment(); 228 initEnvironment();
229 229
230 //Don't flicker at startup: 230 //Don't flicker at startup:
231#ifdef QWS 231#ifdef QWS
232 QWSServer::setDesktopBackground( QImage() ); 232 QWSServer::setDesktopBackground( QImage() );
233#endif 233#endif
234 ServerApplication a( argc, argv, QApplication::GuiServer ); 234 ServerApplication a( argc, argv, QApplication::GuiServer );
235 235
236 refreshTimeZoneConfig(); 236 refreshTimeZoneConfig();
237 237
238 initKeyboard(); 238 initKeyboard();
239 239
240 // Don't use first use under Windows 240 // Don't use first use under Windows
241 if ( firstUse() ) { 241 if ( firstUse() ) {
242 a.restart(); 242 a.restart();
243 return 0; 243 return 0;
244 } 244 }
245 245
246 ODevice::inst ( )-> setSoftSuspend ( true ); 246 ODevice::inst ( )-> setSoftSuspend ( true );
247 247
248 { 248 {
249 QCopEnvelope e("QPE/System", "setBacklight(int)" ); 249 QCopEnvelope e("QPE/System", "setBacklight(int)" );
250 e << -3; // Forced on 250 e << -3; // Forced on
251 } 251 }
252 252
253 AlarmServer::initialize(); 253 AlarmServer::initialize();
254 254
255 255
256 256
257 Server *s = new Server(); 257 Server *s = new Server();
258 258
259 (void)new SysFileMonitor(s); 259 (void)new SysFileMonitor(s);
260#ifdef QWS 260#ifdef QWS
261 Network::createServer(s); 261 Network::createServer(s);
262#endif 262#endif
263 263
264 s->show(); 264 s->show();
265 265
266 /* THE ARM rtc has problem holdings the time on reset */ 266 /* THE ARM rtc has problem holdings the time on reset */
267 if ( QDate::currentDate ( ). year ( ) < 2000 ) { 267 if ( QDate::currentDate ( ). year ( ) < 2000 ) {
268 if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { 268 if ( QMessageBox::information ( 0, ServerApplication::tr( "Information" ), ServerApplication::tr( "<p>The system date doesn't seem to be valid.\n(%1)</p><p>Do you want to correct the clock ?</p>" ). arg( TimeString::dateString ( QDate::currentDate ( ))), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
269 QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" ); 269 QCopEnvelope e ( "QPE/Application/systemtime", "setDocument(QString)" );
270 e << QString ( ); 270 e << QString ( );
271 } 271 }
272 } 272 }
273 273
274 int rv = a.exec(); 274 int rv = a.exec();
275 275
276 qDebug("exiting..."); 276 qDebug("exiting...");
277 delete s; 277 delete s;
278 278
279#ifndef Q_OS_MACX
279 ODevice::inst()->setSoftSuspend( false ); 280 ODevice::inst()->setSoftSuspend( false );
281#endif
280 282
281 return rv; 283 return rv;
282} 284}
283 285
284static const char *pidfile_path = "/var/run/opie.pid"; 286static const char *pidfile_path = "/var/run/opie.pid";
285 287
286void create_pidfile ( ) 288void create_pidfile ( )
287{ 289{
288 FILE *f; 290 FILE *f;
289 291
290 if (( f = ::fopen ( pidfile_path, "w" ))) { 292 if (( f = ::fopen ( pidfile_path, "w" ))) {
291 ::fprintf ( f, "%d", getpid ( )); 293 ::fprintf ( f, "%d", getpid ( ));
292 ::fclose ( f ); 294 ::fclose ( f );
293 } 295 }
294} 296}
295 297
296void remove_pidfile ( ) 298void remove_pidfile ( )
297{ 299{
298 ::unlink ( pidfile_path ); 300 ::unlink ( pidfile_path );
299} 301}
300 302
301void handle_sigterm ( int /* sig */ ) 303void handle_sigterm ( int /* sig */ )
302{ 304{
303 if ( qApp ) 305 if ( qApp )
304 qApp-> quit ( ); 306 qApp-> quit ( );
305} 307}
306 308
307#ifndef Q_OS_WIN32 309#ifndef Q_OS_WIN32
308int main( int argc, char ** argv ) 310int main( int argc, char ** argv )
309{ 311{
310 312
311 ::signal ( SIGCHLD, SIG_IGN ); 313 ::signal ( SIGCHLD, SIG_IGN );
312 314
313 ::signal ( SIGTERM, handle_sigterm ); 315 ::signal ( SIGTERM, handle_sigterm );
314 ::signal ( SIGINT, handle_sigterm ); 316 ::signal ( SIGINT, handle_sigterm );
315 317
316 ::setsid ( ); 318 ::setsid ( );
317 ::setpgid ( 0, 0 ); 319 ::setpgid ( 0, 0 );
318 320
319 ::atexit ( remove_pidfile ); 321 ::atexit ( remove_pidfile );
320 create_pidfile ( ); 322 create_pidfile ( );
321 323
322 int retVal = initApplication( argc, argv ); 324 int retVal = initApplication( argc, argv );
323 325
324 // Have we been asked to restart? 326 // Have we been asked to restart?
325 if ( ServerApplication::doRestart ) { 327 if ( ServerApplication::doRestart ) {
326 for ( int fd = 3; fd < 100; fd++ ) 328 for ( int fd = 3; fd < 100; fd++ )
327 close( fd ); 329 close( fd );
328 330
329 execl( (QPEApplication::qpeDir()+"bin/qpe").latin1(), "qpe", 0 ); 331 execl( (QPEApplication::qpeDir()+"bin/qpe").latin1(), "qpe", 0 );
330 } 332 }
331 333
332 // Kill them. Kill them all. 334 // Kill them. Kill them all.
333 ::kill ( 0, SIGTERM ); 335 ::kill ( 0, SIGTERM );
334 ::sleep ( 1 ); 336 ::sleep ( 1 );
335 ::kill ( 0, SIGKILL ); 337 ::kill ( 0, SIGKILL );
336 338
337 return retVal; 339 return retVal;
338} 340}
339#else 341#else
340 342
341int main( int argc, char ** argv ) 343int main( int argc, char ** argv )
342{ 344{
343 int retVal = initApplication( argc, argv ); 345 int retVal = initApplication( argc, argv );
344 346
345 if ( DesktopApplication::doRestart ) { 347 if ( DesktopApplication::doRestart ) {
346 qDebug("Trying to restart"); 348 qDebug("Trying to restart");
347 execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 ); 349 execl( (QPEApplication::qpeDir()+"bin\\qpe").latin1(), "qpe", 0 );
348 } 350 }
349 351
350 return retVal; 352 return retVal;
351} 353}
352 354
353#endif 355#endif
354 356
diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp
index 4f149a5..bf34368 100644
--- a/core/launcher/packageslave.cpp
+++ b/core/launcher/packageslave.cpp
@@ -1,97 +1,341 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "packageslave.h" 21#include "packageslave.h"
22#include <qtopia/qprocess.h>
22 23
23#include <qpe/process.h> 24#ifdef Q_WS_QWS
24#include <qpe/qcopenvelope_qws.h> 25#include <qtopia/qcopenvelope_qws.h>
26#endif
25 27
26#include <qdatastream.h> 28#include <qdatastream.h>
29#ifdef Q_WS_QWS
27#include <qcopchannel_qws.h> 30#include <qcopchannel_qws.h>
31#endif
28 32
33#include <qtextstream.h>
34#include <qdir.h>
35
36#include <stdlib.h>
37#include <sys/stat.h> // mkdir()
38
39#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
40#include <unistd.h>
41#include <sys/vfs.h>
42#include <mntent.h>
43#elif defined(Q_OS_WIN32)
44#include <windows.h>
45#include <winbase.h>
46#elif defined(Q_OS_MACX)
29#include <unistd.h> 47#include <unistd.h>
48#endif
30 49
31PackageSlave::PackageSlave( QObject *parent, char* name ) 50
32 : QObject( parent, name ), packageChannel( 0 ) 51PackageHandler::PackageHandler( QObject *parent, char* name )
52 : QObject( parent, name ), packageChannel( 0 ), currentProcess( 0 ), mNoSpaceLeft( FALSE )
33{ 53{
34 // setup qcop channel 54 // setup qcop channel
55#ifndef QT_NO_COP
35 packageChannel = new QCopChannel( "QPE/Package", this ); 56 packageChannel = new QCopChannel( "QPE/Package", this );
36 connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), 57 connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ),
37 this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); 58 this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) );
59#endif
38} 60}
39 61
40void PackageSlave::qcopMessage( const QCString &msg, const QByteArray &data ) 62void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data )
41{ 63{
42 QDataStream stream( data, IO_ReadOnly ); 64 QDataStream stream( data, IO_ReadOnly );
43 65
44 if ( msg == "installPackage(QString)" ) { 66 if ( msg == "installPackage(QString)" ) {
45 QString file; 67 QString file;
46 stream >> file; 68 stream >> file;
47 installPackage( file ); 69 installPackage( file );
48 } 70 } else if ( msg == "removePackage(QString)" ) {
49 else if ( msg == "removePackage(QString)" ) {
50 QString file; 71 QString file;
51 stream >> file; 72 stream >> file;
52 removePackage( file ); 73 removePackage( file );
74 } else if ( msg == "addPackageFiles(QString,QString)" ) {
75 QString location, listfile;
76 stream >> location >> listfile;
77 addPackageFiles( location, listfile);
78 } else if ( msg == "addPackages(QString)" ) {
79 QString location;
80 stream >> location;
81 addPackages( location );
82 } else if ( msg == "cleanupPackageFiles(QString)" ) {
83 QString listfile;
84 stream >> listfile;
85 cleanupPackageFiles( listfile );
86 } else if ( msg == "cleanupPackages(QString)" ) {
87 QString location;
88 stream >> location;
89 cleanupPackages( location );
90 } else if ( msg == "prepareInstall(QString,QString)" ) {
91 QString size, path;
92 stream >> size;
93 stream >> path;
94 prepareInstall( size, path );
53 } 95 }
54} 96}
55 97
56void PackageSlave::installPackage( const QString &package ) 98void PackageHandler::installPackage( const QString &package )
57{ 99{
58 Process proc( QStringList() << "ipkg" << "install" << package ); 100 if ( mNoSpaceLeft ) {
101 mNoSpaceLeft = FALSE;
102 // Don't emit that for now, I still couldn't test it (Wener)
103 //sendReply( "installFailed(QString)", package );
104 //return;
105 }
106
107 currentProcess = new QProcess( QStringList() << "ipkg" << "install" << package ); // No tr
108 connect( currentProcess, SIGNAL( processExited() ), SLOT( iProcessExited() ) );
109 connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) );
110 connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) );
111 currentPackage = package;
59 112
113 currentProcessError="";
60 sendReply( "installStarted(QString)", package ); 114 sendReply( "installStarted(QString)", package );
115 currentProcess->start();
116}
117
118void PackageHandler::removePackage( const QString &package )
119{
120 currentProcess = new QProcess( QStringList() << "ipkg" << "remove" << package ); // No tr
121 connect( currentProcess, SIGNAL( processExited() ), SLOT( rmProcessExited() ) );
122 connect( currentProcess, SIGNAL( readyReadStdout() ), SLOT( readyReadStdout() ) );
123 connect( currentProcess, SIGNAL( readyReadStderr() ), SLOT( readyReadStderr() ) );
124 currentPackage = package;
61 125
62 QString output; 126 currentProcessError="";
63 if ( proc.exec( "", output ) ) { 127 sendReply( "removeStarted(QString)", package );
64 sendReply( "installDone(QString)", package ); 128 currentProcess->start();
65 } 129 }
66 else { 130
67 sendReply( "installFailed(QString)", package ); 131void PackageHandler::sendReply( const QCString& msg, const QString& arg )
132{
133#ifndef QT_NO_COP
134 QCopEnvelope e( "QPE/Desktop", msg );
135 e << arg;
136#endif
137}
138
139void PackageHandler::addPackageFiles( const QString &location,
140 const QString &listfile )
141{
142 QFile f(listfile);
143#ifndef Q_OS_WIN32
144 //make a copy so we can remove the symlinks later
145 mkdir( ("/usr/lib/ipkg/info/"+location).ascii(), 0777 );
146 system(("cp " + f.name() + " /usr/lib/ipkg/info/"+location).ascii());
147#else
148 QDir d;
149 //#### revise
150 qDebug("Copy file at %s: %s", __FILE__, __LINE__ );
151 d.mkdir(("/usr/lib/ipkg/info/" + location).ascii());
152 system(("copy " + f.name() + " /usr/lib/ipkg/info/"+location).ascii());
153#endif
154
155
156 if ( f.open(IO_ReadOnly) ) {
157 QTextStream ts(&f);
158
159 QString s;
160 while ( !ts.eof() ) { // until end of file...
161 s = ts.readLine(); // line of text excluding '\n'
162 // for s, do link/mkdir.
163 if ( s.right(1) == "/" ) {
164 qDebug("do mkdir for %s", s.ascii());
165#ifndef Q_OS_WIN32
166 mkdir( s.ascii(), 0777 );
167 //possible optimization: symlink directories
168 //that don't exist already. -- Risky.
169#else
170 d.mkdir( s.ascii());
171#endif
172
173 } else {
174#ifndef Q_OS_WIN32
175 qDebug("do symlink for %s", s.ascii());
176 symlink( (location + s).ascii(), s.ascii() );
177#else
178 qDebug("Copy file instead of a symlink for WIN32");
179 if (!CopyFile((TCHAR*)qt_winTchar((location + s), TRUE), (TCHAR*)qt_winTchar(s, TRUE), FALSE))
180 qWarning("Unable to create symlinkfor %s",
181 (location + s).ascii());
182#endif
183 }
184 }
185 f.close();
68 } 186 }
69 QCopEnvelope e("QPE/System", "linkChanged(QString)");
70 QString lf = QString::null;
71 e << lf;
72 unlink( package );
73} 187}
74 188
75void PackageSlave::removePackage( const QString &package ) 189void PackageHandler::addPackages( const QString &location )
76{ 190{
77 Process proc( QStringList() << "ipkg" << "remove" << package ); 191 // get list of *.list in location/usr/lib/ipkg/info/*.list
192 QDir dir(location + "/usr/lib/ipkg/info", "*.list", // No tr
193 QDir::Name, QDir::Files);
194 if ( !dir.exists() )
195 return;
78 196
79 sendReply( "removeStarted(QString)", package ); 197 QStringList packages = dir.entryList();
198 for ( QStringList::Iterator it = packages.begin();
199 it != packages.end(); ++it ) {
200 addPackageFiles( location, *it );
201 }
202}
203
204
205void PackageHandler::cleanupPackageFiles( const QString &listfile )
206{
207 QFile f(listfile);
80 208
81 QString output; 209 if ( f.open(IO_ReadOnly) ) {
82 if ( proc.exec( "", output ) ) { 210 QTextStream ts(&f);
83 sendReply( "removeDone(QString)", package ); 211
212 QString s;
213 while ( !ts.eof() ) { // until end of file...
214 s = ts.readLine(); // line of text excluding '\n'
215 // for s, do link/mkdir.
216 if ( s.right(1) == "/" ) {
217 //should rmdir if empty, after all files have been removed
218 } else {
219#ifndef Q_OS_WIN32
220 qDebug("remove symlink for %s", s.ascii());
221 //check if it is a symlink first (don't remove /etc/passwd...)
222 char buf[10]; //we don't care about the contents
223 if ( ::readlink( s.ascii(),buf, 10 >= 0 ) )
224 ::unlink( s.ascii() );
225 #else
226 // ### revise
227 qWarning("Unable to remove symlink %s:%s", __FILE__, __LINE__);
228#endif
229 }
84 } 230 }
231 f.close();
232
233 //remove the list file
234 ::unlink( listfile.ascii() );
235
236 }
237}
238
239void PackageHandler::cleanupPackages( const QString &location )
240{
241 // get list of *.list in location/usr/lib/ipkg/info/*.list
242 QDir dir( "/usr/lib/ipkg/info/"+location, "*.list", // No tr
243 QDir::Name, QDir::Files);
244 if ( !dir.exists() )
245 return;
246
247 QStringList packages = dir.entryList();
248 for ( QStringList::Iterator it = packages.begin();
249 it != packages.end(); ++it ) {
250 cleanupPackageFiles( *it );
251 }
252
253 //remove the backup directory
254 //###
255}
256
257void PackageHandler::prepareInstall( const QString& size, const QString& path )
258{
259 // Check whether there will be enough space to install the next package.
260 bool ok;
261 unsigned int s = size.toUInt( &ok );
262
263 if ( !ok )
264 return;
265
266 // Shamelessly stolen from the sysinfo application (Werner)
267#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
268 struct statfs fs;
269 if ( statfs( path.latin1(), &fs ) == 0 )
270 if ( s > fs.f_bsize * fs.f_bavail ) {
271 //qDebug("############### Not enough space left ###############");
272 mNoSpaceLeft = TRUE;
273 }
274#endif
275}
276
277void PackageHandler::iProcessExited()
278{
279 if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 )
280 sendReply( "installDone(QString)", currentPackage );
85 else { 281 else {
86 sendReply( "removeFailed(QString)", package ); 282#ifndef QT_NO_COP
283 QCopEnvelope e( "QPE/Desktop", "installFailed(QString,int,QString)" );
284 e << currentPackage << currentProcess->exitStatus()
285 << currentProcessError;
286#endif
87 } 287 }
288
289 delete currentProcess;
290 currentProcess = 0;
291
292#ifndef QT_NO_COP
88 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 293 QCopEnvelope e("QPE/System", "linkChanged(QString)");
89 QString lf = QString::null; 294 QString lf = QString::null;
90 e << lf; 295 e << lf;
296#endif
297 unlink( currentPackage );
91} 298}
92 299
93void PackageSlave::sendReply( const QCString& msg, const QString& arg ) 300void PackageHandler::rmProcessExited()
94{ 301{
95 QCopEnvelope e( "QPE/Desktop", msg ); 302 if ( currentProcess->normalExit() && currentProcess->exitStatus() == 0 )
96 e << arg; 303 sendReply( "removeDone(QString)", currentPackage );
304 else
305 sendReply( "removeFailed(QString)", currentPackage );
306
307#ifndef QT_NO_COP
308 QCopEnvelope e("QPE/System", "linkChanged(QString)");
309 QString lf = QString::null;
310 e << lf;
311#endif
312}
313
314void PackageHandler::readyReadStdout()
315{
316 while ( currentProcess->canReadLineStdout() ) {
317 QString line = currentProcess->readLineStdout();
318 currentProcessError.append("OUT:"+line);
319 if ( line.contains( "Unpacking" ) ) // No tr
320 sendReply( "installStep(QString)", "one" ); // No tr
321 else if ( line.contains( "Configuring" ) ) // No tr
322 sendReply( "installStep(QString)", "two" ); // No tr
323 }
324}
325
326void PackageHandler::readyReadStderr()
327{
328 while ( currentProcess->canReadLineStderr() ) {
329 QString line = currentProcess->readLineStderr();
330 currentProcessError.append("ERR:"+line);
331 }
332}
333
334void PackageHandler::redoPackages()
335{
336 //get list of filesystems
337
338 //call cleanupPackages for the ones that have disappeared
339
340 //call addPackageFiles for the new ones
97} 341}
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index a07bf64..19a8c93 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -1,148 +1,151 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21//#include "qplatformdefs.h" 21//#include "qplatformdefs.h"
22 22
23// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. 23// Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED.
24#if defined(connect) 24#if defined(connect)
25#undef connect 25#undef connect
26#endif 26#endif
27 27
28#include "qprocess.h" 28#include "qprocess.h"
29 29
30#ifndef QT_NO_PROCESS 30#ifndef QT_NO_PROCESS
31 31
32#include "qapplication.h" 32#include "qapplication.h"
33#include "qqueue.h" 33#include "qqueue.h"
34#include "qlist.h" 34#include "qlist.h"
35#include "qsocketnotifier.h" 35#include "qsocketnotifier.h"
36#include "qtimer.h" 36#include "qtimer.h"
37#include "qregexp.h" 37#include "qregexp.h"
38 38
39#include "qcleanuphandler_p.h" 39#include "qcleanuphandler_p.h"
40 40
41#include <stdlib.h> 41#include <stdlib.h>
42 42
43// ### FOR Qt 2.3 compat 43// ### FOR Qt 2.3 compat
44#include <unistd.h> 44#include <unistd.h>
45#include <signal.h> 45#include <signal.h>
46#include <sys/socket.h> 46#include <sys/socket.h>
47#include <sys/ioctl.h> 47#include <sys/ioctl.h>
48#include <sys/wait.h> 48#include <sys/wait.h>
49#include <sys/fcntl.h> 49#include <sys/fcntl.h>
50 50
51#include <errno.h> 51#include <errno.h>
52 52
53#ifdef Q_OS_MACX
54#include <sys/time.h>
55#endif
53#include <sys/resource.h> 56#include <sys/resource.h>
54 57
55#ifdef __MIPSEL__ 58#ifdef __MIPSEL__
56# ifndef SOCK_DGRAM 59# ifndef SOCK_DGRAM
57# define SOCK_DGRAM 1 60# define SOCK_DGRAM 1
58# endif 61# endif
59# ifndef SOCK_STREAM 62# ifndef SOCK_STREAM
60# define SOCK_STREAM 2 63# define SOCK_STREAM 2
61# endif 64# endif
62#endif 65#endif
63 66
64//#define QT_QPROCESS_DEBUG 67//#define QT_QPROCESS_DEBUG
65 68
66 69
67#ifdef Q_C_CALLBACKS 70#ifdef Q_C_CALLBACKS
68extern "C" { 71extern "C" {
69#endif // Q_C_CALLBACKS 72#endif // Q_C_CALLBACKS
70 73
71#define QT_SIGNAL_RETTYPE void 74#define QT_SIGNAL_RETTYPE void
72#define QT_SIGNAL_ARGS int 75#define QT_SIGNAL_ARGS int
73#define QT_SIGNAL_IGNORE SIG_IGN 76#define QT_SIGNAL_IGNORE SIG_IGN
74 77
75 QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS); 78 QT_SIGNAL_RETTYPE qt_C_sigchldHnd(QT_SIGNAL_ARGS);
76 QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS); 79 QT_SIGNAL_RETTYPE qt_C_sigpipeHnd(QT_SIGNAL_ARGS);
77 80
78#ifdef Q_C_CALLBACKS 81#ifdef Q_C_CALLBACKS
79} 82}
80#endif // Q_C_CALLBACKS 83#endif // Q_C_CALLBACKS
81 84
82 85
83class QProc; 86class QProc;
84class QProcessManager; 87class QProcessManager;
85class QProcessPrivate 88class QProcessPrivate
86{ 89{
87public: 90public:
88 QProcessPrivate(); 91 QProcessPrivate();
89 ~QProcessPrivate(); 92 ~QProcessPrivate();
90 93
91 void closeOpenSocketsForChild(); 94 void closeOpenSocketsForChild();
92 void newProc( pid_t pid, QProcess *process ); 95 void newProc( pid_t pid, QProcess *process );
93 96
94 QByteArray bufStdout; 97 QByteArray bufStdout;
95 QByteArray bufStderr; 98 QByteArray bufStderr;
96 99
97 QQueue<QByteArray> stdinBuf; 100 QQueue<QByteArray> stdinBuf;
98 101
99 QSocketNotifier *notifierStdin; 102 QSocketNotifier *notifierStdin;
100 QSocketNotifier *notifierStdout; 103 QSocketNotifier *notifierStdout;
101 QSocketNotifier *notifierStderr; 104 QSocketNotifier *notifierStderr;
102 105
103 ssize_t stdinBufRead; 106 ssize_t stdinBufRead;
104 QProc *proc; 107 QProc *proc;
105 108
106 bool exitValuesCalculated; 109 bool exitValuesCalculated;
107 bool socketReadCalled; 110 bool socketReadCalled;
108 111
109 static QProcessManager *procManager; 112 static QProcessManager *procManager;
110}; 113};
111 114
112 115
113/*********************************************************************** 116/***********************************************************************
114 * 117 *
115 * QProc 118 * QProc
116 * 119 *
117 **********************************************************************/ 120 **********************************************************************/
118/* 121/*
119 The class QProcess does not necessarily map exactly to the running 122 The class QProcess does not necessarily map exactly to the running
120 child processes: if the process is finished, the QProcess class may still be 123 child processes: if the process is finished, the QProcess class may still be
121 there; furthermore a user can use QProcess to start more than one process. 124 there; furthermore a user can use QProcess to start more than one process.
122 125
123 The helper-class QProc has the semantics that one instance of this class maps 126 The helper-class QProc has the semantics that one instance of this class maps
124 directly to a running child process. 127 directly to a running child process.
125*/ 128*/
126class QProc 129class QProc
127{ 130{
128public: 131public:
129 QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc) 132 QProc( pid_t p, QProcess *proc=0 ) : pid(p), process(proc)
130 { 133 {
131#if defined(QT_QPROCESS_DEBUG) 134#if defined(QT_QPROCESS_DEBUG)
132 qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process ); 135 qDebug( "QProc: Constructor for pid %d and QProcess %p", pid, process );
133#endif 136#endif
134 socketStdin = 0; 137 socketStdin = 0;
135 socketStdout = 0; 138 socketStdout = 0;
136 socketStderr = 0; 139 socketStderr = 0;
137 } 140 }
138 ~QProc() 141 ~QProc()
139 { 142 {
140#if defined(QT_QPROCESS_DEBUG) 143#if defined(QT_QPROCESS_DEBUG)
141 qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process ); 144 qDebug( "QProc: Destructor for pid %d and QProcess %p", pid, process );
142#endif 145#endif
143 if ( process != 0 ) { 146 if ( process != 0 ) {
144 if ( process->d->notifierStdin ) 147 if ( process->d->notifierStdin )
145 process->d->notifierStdin->setEnabled( FALSE ); 148 process->d->notifierStdin->setEnabled( FALSE );
146 if ( process->d->notifierStdout ) 149 if ( process->d->notifierStdout )
147 process->d->notifierStdout->setEnabled( FALSE ); 150 process->d->notifierStdout->setEnabled( FALSE );
148 if ( process->d->notifierStderr ) 151 if ( process->d->notifierStderr )
diff --git a/core/launcher/server.pro b/core/launcher/server.pro
index 93baeb4..0513536 100644
--- a/core/launcher/server.pro
+++ b/core/launcher/server.pro
@@ -22,99 +22,104 @@ HEADERS += server.h \
22 $$(OPIEDIR)/core/apps/calibrate/calibrate.h \ 22 $$(OPIEDIR)/core/apps/calibrate/calibrate.h \
23 startmenu.h \ 23 startmenu.h \
24 transferserver.h \ 24 transferserver.h \
25 qcopbridge.h \ 25 qcopbridge.h \
26 packageslave.h \ 26 packageslave.h \
27 irserver.h \ 27 irserver.h \
28 firstuse.h \ 28 firstuse.h \
29 $$(OPIEDIR)/rsync/buf.h \ 29 $$(OPIEDIR)/rsync/buf.h \
30 $$(OPIEDIR)/rsync/checksum.h \ 30 $$(OPIEDIR)/rsync/checksum.h \
31 $$(OPIEDIR)/rsync/command.h \ 31 $$(OPIEDIR)/rsync/command.h \
32 $$(OPIEDIR)/rsync/emit.h \ 32 $$(OPIEDIR)/rsync/emit.h \
33 $$(OPIEDIR)/rsync/job.h \ 33 $$(OPIEDIR)/rsync/job.h \
34 $$(OPIEDIR)/rsync/netint.h \ 34 $$(OPIEDIR)/rsync/netint.h \
35 $$(OPIEDIR)/rsync/protocol.h \ 35 $$(OPIEDIR)/rsync/protocol.h \
36 $$(OPIEDIR)/rsync/prototab.h \ 36 $$(OPIEDIR)/rsync/prototab.h \
37 $$(OPIEDIR)/rsync/rsync.h \ 37 $$(OPIEDIR)/rsync/rsync.h \
38 $$(OPIEDIR)/rsync/search.h \ 38 $$(OPIEDIR)/rsync/search.h \
39 $$(OPIEDIR)/rsync/stream.h \ 39 $$(OPIEDIR)/rsync/stream.h \
40 $$(OPIEDIR)/rsync/sumset.h \ 40 $$(OPIEDIR)/rsync/sumset.h \
41 $$(OPIEDIR)/rsync/trace.h \ 41 $$(OPIEDIR)/rsync/trace.h \
42 $$(OPIEDIR)/rsync/types.h \ 42 $$(OPIEDIR)/rsync/types.h \
43 $$(OPIEDIR)/rsync/util.h \ 43 $$(OPIEDIR)/rsync/util.h \
44 $$(OPIEDIR)/rsync/whole.h \ 44 $$(OPIEDIR)/rsync/whole.h \
45 $$(OPIEDIR)/rsync/config_rsync.h \ 45 $$(OPIEDIR)/rsync/config_rsync.h \
46 $$(OPIEDIR)/rsync/qrsync.h \ 46 $$(OPIEDIR)/rsync/qrsync.h \
47 syncdialog.h \ 47 syncdialog.h \
48 serverapp.h \ 48 serverapp.h \
49 launcherglobal.h \ 49 launcherglobal.h \
50 qprocess.h \ 50 qprocess.h \
51 screensaver.h 51 screensaver.h
52 52
53 SOURCES += server.cpp \ 53 SOURCES += server.cpp \
54 serverinterface.cpp \ 54 serverinterface.cpp \
55 launchertab.cpp \ 55 launchertab.cpp \
56 documentlist.cpp \ 56 documentlist.cpp \
57 appicons.cpp \ 57 appicons.cpp \
58 taskbar.cpp \ 58 taskbar.cpp \
59 runningappbar.cpp \ 59 runningappbar.cpp \
60 applauncher.cpp \ 60 applauncher.cpp \
61 stabmon.cpp \ 61 stabmon.cpp \
62 inputmethods.cpp \ 62 inputmethods.cpp \
63 systray.cpp \ 63 systray.cpp \
64 wait.cpp \ 64 wait.cpp \
65 shutdownimpl.cpp \ 65 shutdownimpl.cpp \
66 launcher.cpp \ 66 launcher.cpp \
67 launcherview.cpp \ 67 launcherview.cpp \
68 $$(OPIEDIR)/core/apps/calibrate/calibrate.cpp \ 68 $$(OPIEDIR)/core/apps/calibrate/calibrate.cpp \
69 transferserver.cpp \ 69 transferserver.cpp \
70 packageslave.cpp \ 70 packageslave.cpp \
71 irserver.cpp \ 71 irserver.cpp \
72 qcopbridge.cpp \ 72 qcopbridge.cpp \
73 startmenu.cpp \ 73 startmenu.cpp \
74 main.cpp \ 74 main.cpp \
75 firstuse.cpp \ 75 firstuse.cpp \
76 $$(OPIEDIR)/rsync/base64.c \ 76 $$(OPIEDIR)/rsync/base64.c \
77 $$(OPIEDIR)/rsync/buf.c \ 77 $$(OPIEDIR)/rsync/buf.c \
78 $$(OPIEDIR)/rsync/checksum.c \ 78 $$(OPIEDIR)/rsync/checksum.c \
79 $$(OPIEDIR)/rsync/command.c \ 79 $$(OPIEDIR)/rsync/command.c \
80 $$(OPIEDIR)/rsync/delta.c \ 80 $$(OPIEDIR)/rsync/delta.c \
81 $$(OPIEDIR)/rsync/emit.c \ 81 $$(OPIEDIR)/rsync/emit.c \
82 $$(OPIEDIR)/rsync/hex.c \ 82 $$(OPIEDIR)/rsync/hex.c \
83 $$(OPIEDIR)/rsync/job.c \ 83 $$(OPIEDIR)/rsync/job.c \
84 $$(OPIEDIR)/rsync/mdfour.c \ 84 $$(OPIEDIR)/rsync/mdfour.c \
85 $$(OPIEDIR)/rsync/mksum.c \ 85 $$(OPIEDIR)/rsync/mksum.c \
86 $$(OPIEDIR)/rsync/msg.c \ 86 $$(OPIEDIR)/rsync/msg.c \
87 $$(OPIEDIR)/rsync/netint.c \ 87 $$(OPIEDIR)/rsync/netint.c \
88 $$(OPIEDIR)/rsync/patch.c \ 88 $$(OPIEDIR)/rsync/patch.c \
89 $$(OPIEDIR)/rsync/prototab.c \ 89 $$(OPIEDIR)/rsync/prototab.c \
90 $$(OPIEDIR)/rsync/readsums.c \ 90 $$(OPIEDIR)/rsync/readsums.c \
91 $$(OPIEDIR)/rsync/scoop.c \ 91 $$(OPIEDIR)/rsync/scoop.c \
92 $$(OPIEDIR)/rsync/search.c \ 92 $$(OPIEDIR)/rsync/search.c \
93 $$(OPIEDIR)/rsync/stats.c \ 93 $$(OPIEDIR)/rsync/stats.c \
94 $$(OPIEDIR)/rsync/stream.c \ 94 $$(OPIEDIR)/rsync/stream.c \
95 $$(OPIEDIR)/rsync/sumset.c \ 95 $$(OPIEDIR)/rsync/sumset.c \
96 $$(OPIEDIR)/rsync/trace.c \ 96 $$(OPIEDIR)/rsync/trace.c \
97 $$(OPIEDIR)/rsync/tube.c \ 97 $$(OPIEDIR)/rsync/tube.c \
98 $$(OPIEDIR)/rsync/util.c \ 98 $$(OPIEDIR)/rsync/util.c \
99 $$(OPIEDIR)/rsync/version.c \ 99 $$(OPIEDIR)/rsync/version.c \
100 $$(OPIEDIR)/rsync/whole.c \ 100 $$(OPIEDIR)/rsync/whole.c \
101 $$(OPIEDIR)/rsync/qrsync.cpp \ 101 $$(OPIEDIR)/rsync/qrsync.cpp \
102 syncdialog.cpp \ 102 syncdialog.cpp \
103 serverapp.cpp \ 103 serverapp.cpp \
104 launcherglobal.cpp \ 104 launcherglobal.cpp \
105 qprocess.cpp \ 105 qprocess.cpp \
106 qprocess_unix.cpp \ 106 qprocess_unix.cpp \
107 screensaver.cpp 107 screensaver.cpp
108 108
109 109
110INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate 110INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate
111 DEPENDPATH+= $(OPIEDIR)/core/apps/calibrate 111 DEPENDPATH+= $(OPIEDIR)/core/apps/calibrate
112 112
113INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync 113INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync
114 DEPENDPATH+= $(OPIEDIR)/rsync 114 DEPENDPATH+= $(OPIEDIR)/rsync
115 115
116 TARGET = qpe 116 TARGET = qpe
117 117
118CONFTEST = $$system( echo $CONFIG_TARGET_MACOSX )
119contains( CONFTEST, y ){
120 LIBS += -lqpe -lopie
121}else{
118 LIBS+= -lcrypt -lqpe -lopie 122 LIBS+= -lcrypt -lqpe -lopie
123}
119 124
120include ( $(OPIEDIR)/include.pro ) 125include ( $(OPIEDIR)/include.pro )
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index 014418d..08ae885 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -163,171 +163,175 @@ bool StartMenu::loadMenu( QPopupMenu *menu )
163 if ( cfg.isValid() ) { 163 if ( cfg.isValid() ) {
164 QString nm = cfg.readEntry("Name"); 164 QString nm = cfg.readEntry("Name");
165 QString ic = cfg.readEntry("Icon"); 165 QString ic = cfg.readEntry("Icon");
166 if ( !!nm && !!ic ) { 166 if ( !!nm && !!ic ) {
167 tabs.append(d); 167 tabs.append(d);
168 menu->insertItem( Resource::loadIconSet(ic), nm, ntabs++ ); 168 menu->insertItem( Resource::loadIconSet(ic), nm, ntabs++ );
169 } 169 }
170 } else if ( lot && d.right(8)==".desktop") { 170 } else if ( lot && d.right(8)==".desktop") {
171 AppLnk* applnk = new AppLnk(dir.path()+"/"+d); 171 AppLnk* applnk = new AppLnk(dir.path()+"/"+d);
172 if ( applnk->isValid() ) { 172 if ( applnk->isValid() ) {
173 if ( applnk->type() == "Separator" ) { // No tr 173 if ( applnk->type() == "Separator" ) { // No tr
174 if ( lot ) { 174 if ( lot ) {
175 menu->insertSeparator(); 175 menu->insertSeparator();
176 sepfirst = f && !ltabs; 176 sepfirst = f && !ltabs;
177 } 177 }
178 delete applnk; 178 delete applnk;
179 } else { 179 } else {
180 f = FALSE; 180 f = FALSE;
181 other.append(applnk); 181 other.append(applnk);
182 menu->insertItem( Resource::loadIconSet(applnk->icon()), 182 menu->insertItem( Resource::loadIconSet(applnk->icon()),
183 applnk->name(), 20+nother++ ); 183 applnk->name(), 20+nother++ );
184 } 184 }
185 } else { 185 } else {
186 delete applnk; 186 delete applnk;
187 } 187 }
188 } 188 }
189 } 189 }
190 190
191 if ( !menu->count() ) 191 if ( !menu->count() )
192 sepfirst = TRUE; 192 sepfirst = TRUE;
193 } 193 }
194 194
195 launchMenu->setName(sepfirst ? "accessories" : "accessories_need_sep"); // No tr 195 launchMenu->setName(sepfirst ? "accessories" : "accessories_need_sep"); // No tr
196 196
197 return (nother || ntabs ); 197 return (nother || ntabs );
198} 198}
199 199
200 200
201void StartMenu::launch() 201void StartMenu::launch()
202{ 202{
203 int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); 203 int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height();
204 204
205 if ( launchMenu->isVisible() ) 205 if ( launchMenu->isVisible() )
206 launchMenu->hide(); 206 launchMenu->hide();
207 else 207 else
208 launchMenu->popup( QPoint( 1, y ) ); 208 launchMenu->popup( QPoint( 1, y ) );
209} 209}
210 210
211 211
212 212
213 213
214static int compareAppletPositions(const void *a, const void *b) 214static int compareAppletPositions(const void *a, const void *b)
215{ 215{
216 const MenuApplet* aa = *(const MenuApplet**)a; 216 const MenuApplet* aa = *(const MenuApplet**)a;
217 const MenuApplet* ab = *(const MenuApplet**)b; 217 const MenuApplet* ab = *(const MenuApplet**)b;
218 int d = aa->iface->position() - ab->iface->position(); 218 int d = aa->iface->position() - ab->iface->position();
219 if ( d ) return d; 219 if ( d ) return d;
220 return QString::compare(aa->library->library(),ab->library->library()); 220 return QString::compare(aa->library->library(),ab->library->library());
221} 221}
222 222
223void StartMenu::clearApplets() 223void StartMenu::clearApplets()
224{ 224{
225 if (launchMenu ) 225 if (launchMenu )
226 launchMenu-> hide(); 226 launchMenu-> hide();
227 227
228 for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { 228 for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) {
229 MenuApplet *applet = it. current ( ); 229 MenuApplet *applet = it. current ( );
230 if ( launchMenu ) { 230 if ( launchMenu ) {
231 launchMenu-> removeItem ( applet-> id ); 231 launchMenu-> removeItem ( applet-> id );
232 delete applet-> popup; 232 delete applet-> popup;
233 } 233 }
234 234
235 applet-> iface-> release(); 235 applet-> iface-> release();
236 applet-> library-> unload(); 236 applet-> library-> unload();
237 delete applet-> library; 237 delete applet-> library;
238 } 238 }
239 m_applets.clear(); 239 m_applets.clear();
240} 240}
241 241
242 242
243 243
244 244
245void StartMenu::loadApplets() 245void StartMenu::loadApplets()
246{ 246{
247 Config cfg( "StartMenu" ); 247 Config cfg( "StartMenu" );
248 cfg.setGroup( "Applets" ); 248 cfg.setGroup( "Applets" );
249 249
250 // SafeMode causes too much problems, so we disable it for now -- 250 // SafeMode causes too much problems, so we disable it for now --
251 // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 251 // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02
252 // removed in the remerge PluginManager could handle it 252 // removed in the remerge PluginManager could handle it
253 // we don't currently use it -zecke 253 // we don't currently use it -zecke
254 254
255 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); 255 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
256 256
257 QString lang = getenv( "LANG" ); 257 QString lang = getenv( "LANG" );
258 QString path = QPEApplication::qpeDir() + "/plugins/applets"; 258 QString path = QPEApplication::qpeDir() + "/plugins/applets";
259#ifdef Q_OS_MACX
260 QDir dir( path, "lib*.dylib" );
261#else
259 QDir dir( path, "lib*.so" ); 262 QDir dir( path, "lib*.so" );
263#endif /* Q_OS_MACX */
260 QStringList list = dir.entryList(); 264 QStringList list = dir.entryList();
261 QStringList::Iterator it; 265 QStringList::Iterator it;
262 int napplets=0; 266 int napplets=0;
263 MenuApplet* *xapplets = new MenuApplet*[list.count()]; 267 MenuApplet* *xapplets = new MenuApplet*[list.count()];
264 for ( it = list.begin(); it != list.end(); ++it ) { 268 for ( it = list.begin(); it != list.end(); ++it ) {
265 if ( exclude.find( *it ) != exclude.end() ) 269 if ( exclude.find( *it ) != exclude.end() )
266 continue; 270 continue;
267 MenuAppletInterface *iface = 0; 271 MenuAppletInterface *iface = 0;
268 QLibrary *lib = new QLibrary( path + "/" + *it ); 272 QLibrary *lib = new QLibrary( path + "/" + *it );
269 if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { 273 if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
270 MenuApplet *applet = new MenuApplet; 274 MenuApplet *applet = new MenuApplet;
271 xapplets[napplets++] = applet; 275 xapplets[napplets++] = applet;
272 applet->library = lib; 276 applet->library = lib;
273 applet->iface = iface; 277 applet->iface = iface;
274 278
275 QTranslator *trans = new QTranslator(qApp); 279 QTranslator *trans = new QTranslator(qApp);
276 QString type = (*it).left( (*it).find(".") ); 280 QString type = (*it).left( (*it).find(".") );
277 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 281 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
278 if ( trans->load( tfn )) 282 if ( trans->load( tfn ))
279 qApp->installTranslator( trans ); 283 qApp->installTranslator( trans );
280 else 284 else
281 delete trans; 285 delete trans;
282 } else { 286 } else {
283 exclude += *it; 287 exclude += *it;
284 delete lib; 288 delete lib;
285 } 289 }
286 } 290 }
287 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 291 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
288 qsort(xapplets,napplets,sizeof(m_applets[0]),compareAppletPositions); 292 qsort(xapplets,napplets,sizeof(m_applets[0]),compareAppletPositions);
289 293
290 294
291 int foo = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0; 295 int foo = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0;
292 296
293 while (napplets--) { 297 while (napplets--) {
294 MenuApplet *applet = xapplets[napplets]; 298 MenuApplet *applet = xapplets[napplets];
295 299
296 applet-> popup = applet-> iface-> popup ( this ); 300 applet-> popup = applet-> iface-> popup ( this );
297 301
298 if ( applet-> popup ) 302 if ( applet-> popup )
299 applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); 303 applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup );
300 else 304 else
301 applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); 305 applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) );
302 306
303 307
304 m_applets.insert ( applet-> id, new MenuApplet(*applet)); 308 m_applets.insert ( applet-> id, new MenuApplet(*applet));
305 } 309 }
306 delete [] xapplets; 310 delete [] xapplets;
307 311
308} 312}
309 313
310 314
311/* 315/*
312 * Launcher calls loadMenu too often fix that 316 * Launcher calls loadMenu too often fix that
313 */ 317 */
314void StartMenu::addApplets(QPopupMenu* pop) { 318void StartMenu::addApplets(QPopupMenu* pop) {
315 QIntDict<MenuApplet> dict; 319 QIntDict<MenuApplet> dict;
316 if( pop-> count ( )) 320 if( pop-> count ( ))
317 pop-> insertSeparator ( ); 321 pop-> insertSeparator ( );
318 322
319 for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) { 323 for ( QIntDictIterator<MenuApplet> it ( m_applets ); it. current ( ); ++it ) {
320 MenuApplet *applet = it. current ( ); 324 MenuApplet *applet = it. current ( );
321 if ( applet-> popup ) 325 if ( applet-> popup )
322 applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); 326 applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup );
323 else 327 else
324 applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); 328 applet-> id = pop-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) );
325 329
326 dict.insert( applet->id, new MenuApplet(*applet) ); 330 dict.insert( applet->id, new MenuApplet(*applet) );
327 } 331 }
328 /* need to update the key */ 332 /* need to update the key */
329 m_applets.setAutoDelete( true ); 333 m_applets.setAutoDelete( true );
330 m_applets.clear(); 334 m_applets.clear();
331 m_applets.setAutoDelete( false ); 335 m_applets.setAutoDelete( false );
332 m_applets = dict; 336 m_applets = dict;
333} 337}
diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp
index 6122770..691f6b8 100644
--- a/core/launcher/systray.cpp
+++ b/core/launcher/systray.cpp
@@ -9,141 +9,146 @@
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qtopia/qpeapplication.h> 21#include <qtopia/qpeapplication.h>
22#include <qtopia/qlibrary.h> 22#include <qtopia/qlibrary.h>
23#include <qtopia/config.h> 23#include <qtopia/config.h>
24 24
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qdir.h> 26#include <qdir.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtranslator.h> 28#include <qtranslator.h>
29 29
30#include "systray.h" 30#include "systray.h"
31 31
32#include <stdlib.h> 32#include <stdlib.h>
33 33
34/* ### Single build floppies ### */ 34/* ### Single build floppies ### */
35#if 0 35#if 0
36#ifdef QT_NO_COMPONENTS 36#ifdef QT_NO_COMPONENTS
37#include "../plugins/applets/clockapplet/clockappletimpl.h" 37#include "../plugins/applets/clockapplet/clockappletimpl.h"
38#endif 38#endif
39#endif 39#endif
40 40
41SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) 41SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0)
42{ 42{
43 //setFrameStyle( QFrame::Panel | QFrame::Sunken ); 43 //setFrameStyle( QFrame::Panel | QFrame::Sunken );
44 loadApplets(); 44 loadApplets();
45} 45}
46 46
47SysTray::~SysTray() 47SysTray::~SysTray()
48{ 48{
49 clearApplets(); 49 clearApplets();
50} 50}
51 51
52static int compareAppletPositions(const void *a, const void *b) 52static int compareAppletPositions(const void *a, const void *b)
53{ 53{
54 const TaskbarApplet* aa = *(const TaskbarApplet**)a; 54 const TaskbarApplet* aa = *(const TaskbarApplet**)a;
55 const TaskbarApplet* ab = *(const TaskbarApplet**)b; 55 const TaskbarApplet* ab = *(const TaskbarApplet**)b;
56 int d = ab->iface->position() - aa->iface->position(); 56 int d = ab->iface->position() - aa->iface->position();
57 if ( d ) return d; 57 if ( d ) return d;
58 return QString::compare(ab->name,aa->name); 58 return QString::compare(ab->name,aa->name);
59} 59}
60 60
61void SysTray::loadApplets() 61void SysTray::loadApplets()
62{ 62{
63 hide(); 63 hide();
64 clearApplets(); 64 clearApplets();
65 addApplets(); 65 addApplets();
66} 66}
67 67
68void SysTray::clearApplets() 68void SysTray::clearApplets()
69{ 69{
70#ifndef QT_NO_COMPONENTS 70#ifndef QT_NO_COMPONENTS
71 71
72 /* 72 /*
73 * Note on clearing. SOme applets delete their 73 * Note on clearing. SOme applets delete their
74 * applets themselves some don't do it 74 * applets themselves some don't do it
75 * and on restart this can crash. If we delete it 75 * and on restart this can crash. If we delete it
76 * here we might end up in a double deletion. We could 76 * here we might end up in a double deletion. We could
77 * use QGuardedPtr but that would be one QOBject 77 * use QGuardedPtr but that would be one QOBject
78 * for every applet more but only useful for restart 78 * for every applet more but only useful for restart
79 */ 79 */
80 QValueList<TaskbarApplet>::Iterator mit; 80 QValueList<TaskbarApplet>::Iterator mit;
81 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) { 81 for ( mit = appletList.begin(); mit != appletList.end(); ++mit ) {
82 (*mit).iface->release(); 82 (*mit).iface->release();
83 (*mit).library->unload(); 83 (*mit).library->unload();
84 delete (*mit).library; 84 delete (*mit).library;
85 } 85 }
86 86
87#endif 87#endif
88 appletList.clear(); 88 appletList.clear();
89 if ( layout ) 89 if ( layout )
90 delete layout; 90 delete layout;
91 layout = new QHBoxLayout( this, 0, 1 ); 91 layout = new QHBoxLayout( this, 0, 1 );
92 layout->setAutoAdd(TRUE); 92 layout->setAutoAdd(TRUE);
93} 93}
94 94
95void SysTray::addApplets() 95void SysTray::addApplets()
96{ 96{
97 hide(); 97 hide();
98#ifndef QT_NO_COMPONENTS 98#ifndef QT_NO_COMPONENTS
99 Config cfg( "Taskbar" ); 99 Config cfg( "Taskbar" );
100 cfg.setGroup( "Applets" ); 100 cfg.setGroup( "Applets" );
101 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); 101 QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' );
102 102
103 QString lang = getenv( "LANG" ); 103 QString lang = getenv( "LANG" );
104 QString path = QPEApplication::qpeDir() + "/plugins/applets"; 104 QString path = QPEApplication::qpeDir() + "/plugins/applets";
105#ifdef Q_OS_MACX
106 QDir dir( path, "lib*.dylib" );
107#else
105 QDir dir( path, "lib*.so" ); 108 QDir dir( path, "lib*.so" );
109#endif /* Q_OS_MACX */
106 QStringList list = dir.entryList(); 110 QStringList list = dir.entryList();
107 QStringList::Iterator it; 111 QStringList::Iterator it;
108 int napplets=0; 112 int napplets=0;
109 TaskbarApplet* *applets = new TaskbarApplet*[list.count()]; 113 TaskbarApplet* *applets = new TaskbarApplet*[list.count()];
110 for ( it = list.begin(); it != list.end(); ++it ) { 114 for ( it = list.begin(); it != list.end(); ++it ) {
111 if ( exclude.find( *it ) != exclude.end() ) 115 if ( exclude.find( *it ) != exclude.end() )
112 continue; 116 continue;
117 qWarning( "Found Applet: %s", (*it).latin1() );
113 TaskbarAppletInterface *iface = 0; 118 TaskbarAppletInterface *iface = 0;
114 QLibrary *lib = new QLibrary( path + "/" + *it ); 119 QLibrary *lib = new QLibrary( path + "/" + *it );
115 if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { 120 if (( lib->queryInterface( IID_TaskbarApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) {
116 TaskbarApplet *applet = new TaskbarApplet; 121 TaskbarApplet *applet = new TaskbarApplet;
117 applets[napplets++] = applet; 122 applets[napplets++] = applet;
118 applet->library = lib; 123 applet->library = lib;
119 applet->iface = iface; 124 applet->iface = iface;
120 125
121 QTranslator *trans = new QTranslator(qApp); 126 QTranslator *trans = new QTranslator(qApp);
122 QString type = (*it).left( (*it).find(".") ); 127 QString type = (*it).left( (*it).find(".") );
123 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; 128 QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
124 if ( trans->load( tfn )) 129 if ( trans->load( tfn ))
125 qApp->installTranslator( trans ); 130 qApp->installTranslator( trans );
126 else 131 else
127 delete trans; 132 delete trans;
128 } else { 133 } else {
129 exclude += *it; 134 exclude += *it;
130 delete lib; 135 delete lib;
131 } 136 }
132 } 137 }
133 cfg.writeEntry( "ExcludeApplets", exclude, ',' ); 138 cfg.writeEntry( "ExcludeApplets", exclude, ',' );
134 qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); 139 qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions);
135 while (napplets--) { 140 while (napplets--) {
136 TaskbarApplet *applet = applets[napplets]; 141 TaskbarApplet *applet = applets[napplets];
137 applet->applet = applet->iface->applet( this ); 142 applet->applet = applet->iface->applet( this );
138 appletList.append(*applet); 143 appletList.append(*applet);
139 } 144 }
140 delete [] applets; 145 delete [] applets;
141#else /* ## FIXME single app */ 146#else /* ## FIXME single app */
142 TaskbarApplet * const applet = new TaskbarApplet(); 147 TaskbarApplet * const applet = new TaskbarApplet();
143 applet->iface = new ClockAppletImpl(); 148 applet->iface = new ClockAppletImpl();
144 applet->applet = applet->iface->applet( this ); 149 applet->applet = applet->iface->applet( this );
145 appletList.append( applet ); 150 appletList.append( applet );
146#endif 151#endif
147 show(); 152 show();
148} 153}
149 154
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index c69df2d..439e110 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -1,128 +1,131 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20//#define _XOPEN_SOURCE 20//#define _XOPEN_SOURCE
21 21
22#include <qtopia/global.h> 22#include <qtopia/global.h>
23#include <qtopia/qpeapplication.h> 23#include <qtopia/qpeapplication.h>
24 24
25#ifndef Q_OS_WIN32 25#ifndef Q_OS_WIN32
26#include <pwd.h> 26#include <pwd.h>
27#include <sys/types.h> 27#include <sys/types.h>
28#include <unistd.h> 28#include <unistd.h>
29#include <stdlib.h> 29#include <stdlib.h>
30#include <time.h> 30#include <time.h>
31
32#ifndef Q_OS_MACX
31#include <shadow.h> 33#include <shadow.h>
32#include <crypt.h> 34#include <crypt.h>
35#endif /* Q_OS_MACX */
33 36
34#else 37#else
35#include <stdlib.h> 38#include <stdlib.h>
36#include <time.h> 39#include <time.h>
37#endif 40#endif
38 41
39 42
40#if defined(_OS_LINUX_) 43#if defined(_OS_LINUX_)
41#include <shadow.h> 44#include <shadow.h>
42#endif 45#endif
43 46
44#include <qdir.h> 47#include <qdir.h>
45#include <qfile.h> 48#include <qfile.h>
46#include <qtextstream.h> 49#include <qtextstream.h>
47#include <qdatastream.h> 50#include <qdatastream.h>
48#include <qmessagebox.h> 51#include <qmessagebox.h>
49#include <qstringlist.h> 52#include <qstringlist.h>
50#include <qfileinfo.h> 53#include <qfileinfo.h>
51#include <qregexp.h> 54#include <qregexp.h>
52//#include <qtopia/qcopchannel_qws.h> 55//#include <qtopia/qcopchannel_qws.h>
53#include <qtopia/process.h> 56#include <qtopia/process.h>
54#include <qtopia/global.h> 57#include <qtopia/global.h>
55#include <qtopia/config.h> 58#include <qtopia/config.h>
56#include <qtopia/private/contact.h> 59#include <qtopia/private/contact.h>
57#include <qtopia/quuid.h> 60#include <qtopia/quuid.h>
58#include <qtopia/version.h> 61#include <qtopia/version.h>
59#ifdef Q_WS_QWS 62#ifdef Q_WS_QWS
60#include <qtopia/qcopenvelope_qws.h> 63#include <qtopia/qcopenvelope_qws.h>
61#endif 64#endif
62 65
63#include "launcherglobal.h" 66#include "launcherglobal.h"
64 67
65#include "transferserver.h" 68#include "transferserver.h"
66#include <qtopia/qprocess.h> 69#include <qtopia/qprocess.h>
67 70
68const int block_size = 51200; 71const int block_size = 51200;
69 72
70TransferServer::TransferServer( Q_UINT16 port, QObject *parent, 73TransferServer::TransferServer( Q_UINT16 port, QObject *parent,
71 const char* name) 74 const char* name)
72 : QServerSocket( port, 1, parent, name ) 75 : QServerSocket( port, 1, parent, name )
73{ 76{
74 connections.setAutoDelete( TRUE ); 77 connections.setAutoDelete( TRUE );
75 if ( !ok() ) 78 if ( !ok() )
76 qWarning( "Failed to bind to port %d", port ); 79 qWarning( "Failed to bind to port %d", port );
77} 80}
78 81
79void TransferServer::authorizeConnections() 82void TransferServer::authorizeConnections()
80{ 83{
81 QListIterator<ServerPI> it(connections); 84 QListIterator<ServerPI> it(connections);
82 while ( it.current() ) { 85 while ( it.current() ) {
83 if ( !it.current()->verifyAuthorised() ) { 86 if ( !it.current()->verifyAuthorised() ) {
84 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); 87 disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) );
85 connections.removeRef( it.current() ); 88 connections.removeRef( it.current() );
86 } else 89 } else
87 ++it; 90 ++it;
88 } 91 }
89} 92}
90 93
91void TransferServer::closed(ServerPI *item) 94void TransferServer::closed(ServerPI *item)
92{ 95{
93 connections.removeRef(item); 96 connections.removeRef(item);
94} 97}
95 98
96TransferServer::~TransferServer() 99TransferServer::~TransferServer()
97{ 100{
98} 101}
99 102
100void TransferServer::newConnection( int socket ) 103void TransferServer::newConnection( int socket )
101{ 104{
102 ServerPI *ptr = new ServerPI( socket, this ); 105 ServerPI *ptr = new ServerPI( socket, this );
103 connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); 106 connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) );
104 connections.append( ptr ); 107 connections.append( ptr );
105} 108}
106 109
107QString SyncAuthentication::serverId() 110QString SyncAuthentication::serverId()
108{ 111{
109 Config cfg("Security"); 112 Config cfg("Security");
110 cfg.setGroup("Sync"); 113 cfg.setGroup("Sync");
111 QString r = cfg.readEntry("serverid"); 114 QString r = cfg.readEntry("serverid");
112 115
113 if ( r.isEmpty() ) { 116 if ( r.isEmpty() ) {
114 r = Opie::Global::uuid(); 117 r = Opie::Global::uuid();
115 cfg.writeEntry("serverid", r ); 118 cfg.writeEntry("serverid", r );
116 } 119 }
117 return r; 120 return r;
118} 121}
119 122
120QString SyncAuthentication::ownerName() 123QString SyncAuthentication::ownerName()
121{ 124{
122 QString vfilename = Global::applicationFileName("addressbook", 125 QString vfilename = Global::applicationFileName("addressbook",
123 "businesscard.vcf"); 126 "businesscard.vcf");
124 if (QFile::exists(vfilename)) { 127 if (QFile::exists(vfilename)) {
125 Contact c; 128 Contact c;
126 c = Contact::readVCard( vfilename )[0]; 129 c = Contact::readVCard( vfilename )[0];
127 return c.fullName(); 130 return c.fullName();
128 } 131 }
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.pro b/core/multimedia/opieplayer/wavplugin/wavplugin.pro
index 0366542..db41ad4 100644
--- a/core/multimedia/opieplayer/wavplugin/wavplugin.pro
+++ b/core/multimedia/opieplayer/wavplugin/wavplugin.pro
@@ -1,32 +1,32 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on release 2 CONFIG += qt plugin warn_on release
3 HEADERS = wavplugin.h wavpluginimpl.h 3 HEADERS = wavplugin.h wavpluginimpl.h
4 SOURCES = wavplugin.cpp wavpluginimpl.cpp 4 SOURCES = wavplugin.cpp wavpluginimpl.cpp
5 TARGET = wavplugin 5 TARGET = wavplugin
6 DESTDIR = $(OPIEDIR)/plugins/codecs 6 DESTDIR = $(OPIEDIR)/plugins/codecs
7INCLUDEPATH += $(OPIEDIR)/include .. 7INCLUDEPATH += $(OPIEDIR)/include ..
8DEPENDPATH += ../$(OPIEDIR)/include .. 8DEPENDPATH += ../$(OPIEDIR)/include ..
9LIBS += -lqpe 9LIBS += -lqpe
10 VERSION = 1.0.0 10 VERSION = 1.0.0
11 11
12TRANSLATIONS = ../../../../i18n/de/libwavplugin.ts \ 12TRANSLATIONS = ../../../../i18n/de/libwavplugin.ts \
13 ../../../../i18n/nl/libwavplugin.ts \ 13 ../../../../i18n/nl/libwavplugin.ts \
14 ../../../../i18n/da/libwavplugin.ts \ 14 ../../../../i18n/da/libwavplugin.ts \
15 ../../../../i18n/xx/libwavplugin.ts \ 15 ../../../../i18n/xx/libwavplugin.ts \
16 ../../../../i18n/en/libwavplugin.ts \ 16 ../../../../i18n/en/libwavplugin.ts \
17 ../../../../i18n/es/libwavplugin.ts \ 17 ../../../../i18n/es/libwavplugin.ts \
18 ../../../../i18n/fr/libwavplugin.ts \ 18 ../../../../i18n/fr/libwavplugin.ts \
19 ../../../../i18n/hu/libwavplugin.ts \ 19 ../../../../i18n/hu/libwavplugin.ts \
20 ../../../../i18n/ja/libwavplugin.ts \ 20 ../../../../i18n/ja/libwavplugin.ts \
21 ../../../../i18n/ko/libwavplugin.ts \ 21 ../../../../i18n/ko/libwavplugin.ts \
22 ../../../../i18n/no/libwavplugin.ts \ 22 ../../../../i18n/no/libwavplugin.ts \
23 ../../../../i18n/pl/libwavplugin.ts \ 23 ../../../../i18n/pl/libwavplugin.ts \
24 ../../../../i18n/pt/libwavplugin.ts \ 24 ../../../../i18n/pt/libwavplugin.ts \
25 ../../../../i18n/pt_BR/libwavplugin.ts \ 25 ../../../../i18n/pt_BR/libwavplugin.ts \
26 ../../../../i18n/sl/libwavplugin.ts \ 26 ../../../../i18n/sl/libwavplugin.ts \
27 ../../../../i18n/zh_CN/libwavplugin.ts \ 27 ../../../../i18n/zh_CN/libwavplugin.ts \
28 ../../../../i18n/zh_TW/libwavplugin.ts 28 ../../../../i18n/zh_TW/libwavplugin.ts
29 29
30 30
31 31
32include ( $(OPIEDIR)/include.pro ) 32include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/addressbook/addressbook.pro b/core/pim/today/plugins/addressbook/addressbook.pro
index 4ebbc9e..54aaff2 100644
--- a/core/pim/today/plugins/addressbook/addressbook.pro
+++ b/core/pim/today/plugins/addressbook/addressbook.pro
@@ -1,43 +1,43 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt plugin release
4 4
5# Input 5# Input
6HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ 6HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \
7 addresspluginwidget.h 7 addresspluginwidget.h
8SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ 8SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \
9 addresspluginwidget.cpp 9 addresspluginwidget.cpp
10 10
11INCLUDEPATH += $(OPIEDIR)/include \ 11INCLUDEPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13DEPENDPATH += $(OPIEDIR)/include \ 13DEPENDPATH += $(OPIEDIR)/include \
14 ../ ../library 14 ../ ../library
15 15
16LIBS+= -lqpe -lopie 16LIBS+= -lqpe -lopie
17 17
18DESTDIR = $(OPIEDIR)/plugins/today 18DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todayaddressbookplugin 19TARGET = todayaddressbookplugin
20 20
21TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \ 21TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \
22 ../../../../../i18n/nl/libtodayaddressbookplugin.ts \ 22 ../../../../../i18n/nl/libtodayaddressbookplugin.ts \
23 ../../../../../i18n/xx/libtodayaddressbookplugin.ts \ 23 ../../../../../i18n/xx/libtodayaddressbookplugin.ts \
24 ../../../../../i18n/en/libtodayaddressbookplugin.ts \ 24 ../../../../../i18n/en/libtodayaddressbookplugin.ts \
25 ../../../../../i18n/es/libtodayaddressbookplugin.ts \ 25 ../../../../../i18n/es/libtodayaddressbookplugin.ts \
26 ../../../../../i18n/fr/libtodayaddressbookplugin.ts \ 26 ../../../../../i18n/fr/libtodayaddressbookplugin.ts \
27 ../../../../../i18n/hu/libtodayaddressbookplugin.ts \ 27 ../../../../../i18n/hu/libtodayaddressbookplugin.ts \
28 ../../../../../i18n/ja/libtodayaddressbookplugin.ts \ 28 ../../../../../i18n/ja/libtodayaddressbookplugin.ts \
29 ../../../../../i18n/ko/libtodayaddressbookplugin.ts \ 29 ../../../../../i18n/ko/libtodayaddressbookplugin.ts \
30 ../../../../../i18n/no/libtodayaddressbookplugin.ts \ 30 ../../../../../i18n/no/libtodayaddressbookplugin.ts \
31 ../../../../../i18n/pl/libtodayaddressbookplugin.ts \ 31 ../../../../../i18n/pl/libtodayaddressbookplugin.ts \
32 ../../../../../i18n/pt/libtodayaddressbookplugin.ts \ 32 ../../../../../i18n/pt/libtodayaddressbookplugin.ts \
33 ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \ 33 ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \
34 ../../../../../i18n/sl/libtodayaddressbookplugin.ts \ 34 ../../../../../i18n/sl/libtodayaddressbookplugin.ts \
35 ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \ 35 ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \
36 ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \ 36 ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \
37 ../../../../../i18n/it/libtodayaddressbookplugin.ts \ 37 ../../../../../i18n/it/libtodayaddressbookplugin.ts \
38 ../../../../../i18n/da/libtodayaddressbookplugin.ts 38 ../../../../../i18n/da/libtodayaddressbookplugin.ts
39 39
40 40
41 41
42 42
43include ( $(OPIEDIR)/include.pro ) 43include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index e0a1dcb..2139f63 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -1,39 +1,39 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt plugin release
4# Input 4# Input
5HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ 5HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \
6 datebookevent.h datebookpluginwidget.h 6 datebookevent.h datebookpluginwidget.h
7SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ 7SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \
8 datebookevent.cpp datebookpluginwidget.cpp 8 datebookevent.cpp datebookpluginwidget.cpp
9 9
10INCLUDEPATH += $(OPIEDIR)/include \ 10INCLUDEPATH += $(OPIEDIR)/include \
11 ../ ../library 11 ../ ../library
12DEPENDPATH += $(OPIEDIR)/include \ 12DEPENDPATH += $(OPIEDIR)/include \
13 ../ ../library 13 ../ ../library
14 14
15LIBS+= -lqpe -lopie 15LIBS+= -lqpe -lopie
16 16
17DESTDIR = $(OPIEDIR)/plugins/today 17DESTDIR = $(OPIEDIR)/plugins/today
18TARGET = todaydatebookplugin 18TARGET = todaydatebookplugin
19 19
20TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ 20TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
21 ../../../../../i18n/nl/libtodaydatebookplugin.ts \ 21 ../../../../../i18n/nl/libtodaydatebookplugin.ts \
22 ../../../../../i18n/xx/libtodaydatebookplugin.ts \ 22 ../../../../../i18n/xx/libtodaydatebookplugin.ts \
23 ../../../../../i18n/en/libtodaydatebookplugin.ts \ 23 ../../../../../i18n/en/libtodaydatebookplugin.ts \
24 ../../../../../i18n/es/libtodaydatebookplugin.ts \ 24 ../../../../../i18n/es/libtodaydatebookplugin.ts \
25 ../../../../../i18n/fr/libtodaydatebookplugin.ts \ 25 ../../../../../i18n/fr/libtodaydatebookplugin.ts \
26 ../../../../../i18n/hu/libtodaydatebookplugin.ts \ 26 ../../../../../i18n/hu/libtodaydatebookplugin.ts \
27 ../../../../../i18n/ja/libtodaydatebookplugin.ts \ 27 ../../../../../i18n/ja/libtodaydatebookplugin.ts \
28 ../../../../../i18n/ko/libtodaydatebookplugin.ts \ 28 ../../../../../i18n/ko/libtodaydatebookplugin.ts \
29 ../../../../../i18n/no/libtodaydatebookplugin.ts \ 29 ../../../../../i18n/no/libtodaydatebookplugin.ts \
30 ../../../../../i18n/pl/libtodaydatebookplugin.ts \ 30 ../../../../../i18n/pl/libtodaydatebookplugin.ts \
31 ../../../../../i18n/pt/libtodaydatebookplugin.ts \ 31 ../../../../../i18n/pt/libtodaydatebookplugin.ts \
32 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ 32 ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
33 ../../../../../i18n/sl/libtodaydatebookplugin.ts \ 33 ../../../../../i18n/sl/libtodaydatebookplugin.ts \
34 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ 34 ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
35 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ 35 ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
36 ../../../../../i18n/it/libtodaydatebookplugin.ts \ 36 ../../../../../i18n/it/libtodaydatebookplugin.ts \
37 ../../../../../i18n/da/libtodaydatebookplugin.ts 37 ../../../../../i18n/da/libtodaydatebookplugin.ts
38 38
39include ( $(OPIEDIR)/include.pro ) 39include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro
index 70c484d..421b3a5 100644
--- a/core/pim/today/plugins/mail/mail.pro
+++ b/core/pim/today/plugins/mail/mail.pro
@@ -1,37 +1,37 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt plugin release
4 4
5# Input 5# Input
6HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h 6HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h
7SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp 7SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp
8 8
9INCLUDEPATH += $(OPIEDIR)/include \ 9INCLUDEPATH += $(OPIEDIR)/include \
10 ../ ../library 10 ../ ../library
11DEPENDPATH += $(OPIEDIR)/include \ 11DEPENDPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13 13
14LIBS+= -lqpe -lopie 14LIBS+= -lqpe -lopie
15 15
16DESTDIR = $(OPIEDIR)/plugins/today 16DESTDIR = $(OPIEDIR)/plugins/today
17TARGET = todaymailplugin 17TARGET = todaymailplugin
18 18
19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \ 19TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
20 ../../../../../i18n/nl/libtodaymailplugin.ts \ 20 ../../../../../i18n/nl/libtodaymailplugin.ts \
21 ../../../../../i18n/xx/libtodaymailplugin.ts \ 21 ../../../../../i18n/xx/libtodaymailplugin.ts \
22 ../../../../../i18n/en/libtodaymailplugin.ts \ 22 ../../../../../i18n/en/libtodaymailplugin.ts \
23 ../../../../../i18n/es/libtodaymailplugin.ts \ 23 ../../../../../i18n/es/libtodaymailplugin.ts \
24 ../../../../../i18n/fr/libtodaymailplugin.ts \ 24 ../../../../../i18n/fr/libtodaymailplugin.ts \
25 ../../../../../i18n/hu/libtodaymailplugin.ts \ 25 ../../../../../i18n/hu/libtodaymailplugin.ts \
26 ../../../../../i18n/ja/libtodaymailplugin.ts \ 26 ../../../../../i18n/ja/libtodaymailplugin.ts \
27 ../../../../../i18n/ko/libtodaymailplugin.ts \ 27 ../../../../../i18n/ko/libtodaymailplugin.ts \
28 ../../../../../i18n/no/libtodaymailplugin.ts \ 28 ../../../../../i18n/no/libtodaymailplugin.ts \
29 ../../../../../i18n/pl/libtodaymailplugin.ts \ 29 ../../../../../i18n/pl/libtodaymailplugin.ts \
30 ../../../../../i18n/pt/libtodaymailplugin.ts \ 30 ../../../../../i18n/pt/libtodaymailplugin.ts \
31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \ 31 ../../../../../i18n/pt_BR/libtodaymailplugin.ts \
32 ../../../../../i18n/sl/libtodaymailplugin.ts \ 32 ../../../../../i18n/sl/libtodaymailplugin.ts \
33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \ 33 ../../../../../i18n/zh_CN/libtodaymailplugin.ts \
34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \ 34 ../../../../../i18n/zh_TW/libtodaymailplugin.ts \
35 ../../../../../i18n/it/libtodaymailplugin.ts \ 35 ../../../../../i18n/it/libtodaymailplugin.ts \
36 ../../../../../i18n/da/libtodaymailplugin.ts 36 ../../../../../i18n/da/libtodaymailplugin.ts
37include ( $(OPIEDIR)/include.pro ) 37include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro
index 31a6a27..c8730bb 100644
--- a/core/pim/today/plugins/todolist/todolist.pro
+++ b/core/pim/today/plugins/todolist/todolist.pro
@@ -1,40 +1,40 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt release 3CONFIG += qt plugin release
4 4
5# Input 5# Input
6HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ 6HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \
7 todopluginwidget.h 7 todopluginwidget.h
8SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ 8SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \
9 todopluginwidget.cpp 9 todopluginwidget.cpp
10 10
11INCLUDEPATH += $(OPIEDIR)/include \ 11INCLUDEPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13DEPENDPATH += $(OPIEDIR)/include \ 13DEPENDPATH += $(OPIEDIR)/include \
14 ../ ../library 14 ../ ../library
15 15
16LIBS+= -lqpe -lopie 16LIBS+= -lqpe -lopie
17 17
18DESTDIR = $(OPIEDIR)/plugins/today 18DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todaytodolistplugin 19TARGET = todaytodolistplugin
20 20
21TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ 21TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \
22 ../../../../../i18n/nl/libtodaytodolistplugin.ts \ 22 ../../../../../i18n/nl/libtodaytodolistplugin.ts \
23 ../../../../../i18n/xx/libtodaytodolistplugin.ts \ 23 ../../../../../i18n/xx/libtodaytodolistplugin.ts \
24 ../../../../../i18n/en/libtodaytodolistplugin.ts \ 24 ../../../../../i18n/en/libtodaytodolistplugin.ts \
25 ../../../../../i18n/es/libtodaytodolistplugin.ts \ 25 ../../../../../i18n/es/libtodaytodolistplugin.ts \
26 ../../../../../i18n/fr/libtodaytodolistplugin.ts \ 26 ../../../../../i18n/fr/libtodaytodolistplugin.ts \
27 ../../../../../i18n/hu/libtodaytodolistplugin.ts \ 27 ../../../../../i18n/hu/libtodaytodolistplugin.ts \
28 ../../../../../i18n/ja/libtodaytodolistplugin.ts \ 28 ../../../../../i18n/ja/libtodaytodolistplugin.ts \
29 ../../../../../i18n/ko/libtodaytodolistplugin.ts \ 29 ../../../../../i18n/ko/libtodaytodolistplugin.ts \
30 ../../../../../i18n/no/libtodaytodolistplugin.ts \ 30 ../../../../../i18n/no/libtodaytodolistplugin.ts \
31 ../../../../../i18n/pl/libtodaytodolistplugin.ts \ 31 ../../../../../i18n/pl/libtodaytodolistplugin.ts \
32 ../../../../../i18n/pt/libtodaytodolistplugin.ts \ 32 ../../../../../i18n/pt/libtodaytodolistplugin.ts \
33 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ 33 ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \
34 ../../../../../i18n/sl/libtodaytodolistplugin.ts \ 34 ../../../../../i18n/sl/libtodaytodolistplugin.ts \
35 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ 35 ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \
36 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ 36 ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \
37 ../../../../../i18n/it/libtodaytodolistplugin.ts \ 37 ../../../../../i18n/it/libtodaytodolistplugin.ts \
38 ../../../../../i18n/da/libtodaytodolistplugin.ts 38 ../../../../../i18n/da/libtodaytodolistplugin.ts
39 39
40include ( $(OPIEDIR)/include.pro ) 40include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index f213943..cb18c1c 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -81,197 +81,204 @@ void Today::channelReceived( const QCString &msg, const QByteArray & data ) {
81 stream >> message; 81 stream >> message;
82 setOwnerField( message ); 82 setOwnerField( message );
83 } 83 }
84} 84}
85 85
86void Today::setRefreshTimer( int interval ) { 86void Today::setRefreshTimer( int interval ) {
87 87
88 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 88 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
89 89
90 // 0 is "never" case 90 // 0 is "never" case
91 if ( !interval == 0 ) { 91 if ( !interval == 0 ) {
92 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 92 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
93 m_refreshTimer->changeInterval( interval ); 93 m_refreshTimer->changeInterval( interval );
94 } 94 }
95} 95}
96 96
97 97
98/** 98/**
99 * Initialises the owner field with the default value, the username 99 * Initialises the owner field with the default value, the username
100 */ 100 */
101void Today::setOwnerField() { 101void Today::setOwnerField() {
102 QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); 102 QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" );
103 if ( QFile::exists( file ) ) { 103 if ( QFile::exists( file ) ) {
104 Contact cont = Contact::readVCard( file )[0]; 104 Contact cont = Contact::readVCard( file )[0];
105 QString returnString = cont.fullName(); 105 QString returnString = cont.fullName();
106 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); 106 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" );
107 } else { 107 } else {
108 OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); 108 OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" );
109 } 109 }
110} 110}
111 111
112/** 112/**
113 * Set the owner field with a given QString, for example per qcop. 113 * Set the owner field with a given QString, for example per qcop.
114 */ 114 */
115void Today::setOwnerField( QString &message ) { 115void Today::setOwnerField( QString &message ) {
116 if ( !message.isEmpty() ) { 116 if ( !message.isEmpty() ) {
117 OwnerField->setText( "<b>" + message + "</b>" ); 117 OwnerField->setText( "<b>" + message + "</b>" );
118 } 118 }
119} 119}
120 120
121/** 121/**
122 * Init stuff needed for today. Reads the config file. 122 * Init stuff needed for today. Reads the config file.
123 */ 123 */
124void Today::init() { 124void Today::init() {
125 // read config 125 // read config
126 Config cfg( "today" ); 126 Config cfg( "today" );
127 127
128 cfg.setGroup( "Plugins" ); 128 cfg.setGroup( "Plugins" );
129 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 129 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
130 m_allApplets = cfg.readListEntry( "AllApplets", ',' ); 130 m_allApplets = cfg.readListEntry( "AllApplets", ',' );
131 131
132 cfg.setGroup( "General" ); 132 cfg.setGroup( "General" );
133 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 133 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
134 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 ); 134 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
135 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); 135 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
136 136
137 // set the date in top label 137 // set the date in top label
138 QDate date = QDate::currentDate(); 138 QDate date = QDate::currentDate();
139 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) ); 139 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) );
140 140
141 if ( layout ) { 141 if ( layout ) {
142 delete layout; 142 delete layout;
143 } 143 }
144 144
145 if ( m_hideBanner ) { 145 if ( m_hideBanner ) {
146 Opiezilla->hide(); 146 Opiezilla->hide();
147 TodayLabel->hide(); 147 TodayLabel->hide();
148 } else { 148 } else {
149 Opiezilla->show(); 149 Opiezilla->show();
150 TodayLabel->show(); 150 TodayLabel->show();
151 } 151 }
152 152
153 layout = new QVBoxLayout( this ); 153 layout = new QVBoxLayout( this );
154 layout->addWidget( Frame ); 154 layout->addWidget( Frame );
155 layout->addWidget( OwnerField ); 155 layout->addWidget( OwnerField );
156} 156}
157 157
158/** 158/**
159 * Load the plugins 159 * Load the plugins
160 */ 160 */
161void Today::loadPlugins() { 161void Today::loadPlugins() {
162 162
163 init(); 163 init();
164 QValueList<TodayPlugin>::Iterator tit; 164 QValueList<TodayPlugin>::Iterator tit;
165 if ( !pluginList.isEmpty() ) { 165 if ( !pluginList.isEmpty() ) {
166 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 166 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
167 (*tit).guiBox->hide(); 167 (*tit).guiBox->hide();
168 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); 168 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) );
169 delete (*tit).guiBox; 169 delete (*tit).guiBox;
170 (*tit).library->unload(); 170 (*tit).library->unload();
171 delete (*tit).library; 171 delete (*tit).library;
172 } 172 }
173 pluginList.clear(); 173 pluginList.clear();
174 } 174 }
175 175
176 QString path = QPEApplication::qpeDir() + "/plugins/today"; 176 QString path = QPEApplication::qpeDir() + "/plugins/today";
177 qWarning("Searching for Plugins in: %s", path.latin1());
178#ifdef Q_OS_MACX
179 QDir dir( path, "lib*.dylib" );
180#else
177 QDir dir( path, "lib*.so" ); 181 QDir dir( path, "lib*.so" );
182#endif
178 183
179 QStringList list = dir.entryList(); 184 QStringList list = dir.entryList();
180 QStringList::Iterator it; 185 QStringList::Iterator it;
181 186
187 qWarning("Found: %d entries !", list.count() );
188
182 QMap<QString, TodayPlugin> tempList; 189 QMap<QString, TodayPlugin> tempList;
183 190
184 for ( it = list.begin(); it != list.end(); ++it ) { 191 for ( it = list.begin(); it != list.end(); ++it ) {
185 QInterfacePtr<TodayPluginInterface> iface; 192 QInterfacePtr<TodayPluginInterface> iface;
186 QLibrary *lib = new QLibrary( path + "/" + *it ); 193 QLibrary *lib = new QLibrary( path + "/" + *it );
187 194
188 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 195 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
189 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 196 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
190 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 197 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
191 qDebug( QString(*it) ); 198 qDebug( QString(*it) );
192 199
193 TodayPlugin plugin; 200 TodayPlugin plugin;
194 plugin.library = lib; 201 plugin.library = lib;
195 plugin.iface = iface; 202 plugin.iface = iface;
196 plugin.name = QString(*it); 203 plugin.name = QString(*it);
197 204
198 QString type = (*it).left( (*it).find(".") ); 205 QString type = (*it).left( (*it).find(".") );
199 206
200 // grr, sharp rom does not know Global::languageList(); 207 // grr, sharp rom does not know Global::languageList();
201 // QStringList langs = Global::languageList(); 208 // QStringList langs = Global::languageList();
202 QString tfn = QPEApplication::qpeDir() + "/i18n/"; 209 QString tfn = QPEApplication::qpeDir() + "/i18n/";
203 QDir langDir = tfn; 210 QDir langDir = tfn;
204 QStringList langs = langDir.entryList("*", QDir::Dirs ); 211 QStringList langs = langDir.entryList("*", QDir::Dirs );
205 212
206 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) { 213 for (QStringList::ConstIterator lit = langs.begin(); lit!=langs.end(); ++lit) {
207 QString lang = *lit; 214 QString lang = *lit;
208 qDebug( "Languages: " + lang ); 215 qDebug( "Languages: " + lang );
209 QTranslator * trans = new QTranslator( qApp ); 216 QTranslator * trans = new QTranslator( qApp );
210 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm"; 217 QString tfn = QPEApplication::qpeDir()+"/i18n/" + lang + "/" + type + ".qm";
211 if ( trans->load( tfn ) ) { 218 if ( trans->load( tfn ) ) {
212 qApp->installTranslator( trans ); 219 qApp->installTranslator( trans );
213 } else { 220 } else {
214 delete trans; 221 delete trans;
215 } 222 }
216 } 223 }
217 224
218 // find out if plugins should be shown 225 // find out if plugins should be shown
219 if ( m_excludeApplets.grep( *it ).isEmpty() ) { 226 if ( m_excludeApplets.grep( *it ).isEmpty() ) {
220 plugin.active = true; 227 plugin.active = true;
221 } else { 228 } else {
222 plugin.active = false; 229 plugin.active = false;
223 } 230 }
224 231
225 plugin.guiPart = plugin.iface->guiPart(); 232 plugin.guiPart = plugin.iface->guiPart();
226 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh(); 233 plugin.excludeRefresh = plugin.guiPart->excludeFromRefresh();
227 234
228 // package the whole thing into a qwidget so it can be shown and hidden 235 // package the whole thing into a qwidget so it can be shown and hidden
229 plugin.guiBox = new QWidget( this ); 236 plugin.guiBox = new QWidget( this );
230 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox ); 237 QHBoxLayout *boxLayout = new QHBoxLayout( plugin.guiBox );
231 QPixmap plugPix; 238 QPixmap plugPix;
232 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 ); 239 plugPix.convertFromImage( Resource::loadImage( plugin.guiPart->pixmapNameWidget() ).smoothScale( m_iconSize, m_iconSize ), 0 );
233 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox ); 240 OClickableLabel* plugIcon = new OClickableLabel( plugin.guiBox );
234 plugIcon->setPixmap( plugPix ); 241 plugIcon->setPixmap( plugPix );
235 QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") ); 242 QWhatsThis::add( plugIcon, tr("Click here to launch the associated app") );
236 plugIcon->setName( plugin.guiPart->appName() ); 243 plugIcon->setName( plugin.guiPart->appName() );
237 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) ); 244 connect( plugIcon, SIGNAL( clicked() ), this, SLOT( startApplication() ) );
238 // a scrollview for each plugin 245 // a scrollview for each plugin
239 QScrollView* sv = new QScrollView( plugin.guiBox ); 246 QScrollView* sv = new QScrollView( plugin.guiBox );
240 QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() ); 247 QWidget *plugWidget = plugin.guiPart->widget( sv->viewport() );
241 // not sure if that is good .-) 248 // not sure if that is good .-)
242 sv->setMinimumHeight( 12 ); 249 sv->setMinimumHeight( 12 );
243 sv->setResizePolicy( QScrollView::AutoOneFit ); 250 sv->setResizePolicy( QScrollView::AutoOneFit );
244 sv->setHScrollBarMode( QScrollView::AlwaysOff ); 251 sv->setHScrollBarMode( QScrollView::AlwaysOff );
245 sv->setFrameShape( QFrame::NoFrame ); 252 sv->setFrameShape( QFrame::NoFrame );
246 sv->addChild( plugWidget ); 253 sv->addChild( plugWidget );
247 // make sure the icon is on the top alligned 254 // make sure the icon is on the top alligned
248 boxLayout->addWidget( plugIcon, 0, AlignTop ); 255 boxLayout->addWidget( plugIcon, 0, AlignTop );
249 boxLayout->addWidget( sv, 0, AlignTop ); 256 boxLayout->addWidget( sv, 0, AlignTop );
250 boxLayout->setStretchFactor( plugIcon, 1 ); 257 boxLayout->setStretchFactor( plugIcon, 1 );
251 boxLayout->setStretchFactor( sv, 9 ); 258 boxLayout->setStretchFactor( sv, 9 );
252 // "prebuffer" it in one more list, to get the sorting done 259 // "prebuffer" it in one more list, to get the sorting done
253 tempList.insert( plugin.name, plugin ); 260 tempList.insert( plugin.name, plugin );
254 261
255 // on first start the list is off course empty 262 // on first start the list is off course empty
256 if ( m_allApplets.isEmpty() ) { 263 if ( m_allApplets.isEmpty() ) {
257 layout->addWidget( plugin.guiBox ); 264 layout->addWidget( plugin.guiBox );
258 pluginList.append( plugin ); 265 pluginList.append( plugin );
259 } 266 }
260 267
261 // if plugin is not yet in the list, add it to the layout too 268 // if plugin is not yet in the list, add it to the layout too
262 else if ( !m_allApplets.contains( plugin.name ) ) { 269 else if ( !m_allApplets.contains( plugin.name ) ) {
263 layout->addWidget( plugin.guiBox ); 270 layout->addWidget( plugin.guiBox );
264 pluginList.append( plugin ); 271 pluginList.append( plugin );
265 } 272 }
266 } else { 273 } else {
267 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); 274 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
268 delete lib; 275 delete lib;
269 } 276 }
270 } 277 }
271 278
272 if ( !m_allApplets.isEmpty() ) { 279 if ( !m_allApplets.isEmpty() ) {
273 TodayPlugin tempPlugin; 280 TodayPlugin tempPlugin;
274 QStringList::Iterator stringit; 281 QStringList::Iterator stringit;
275 282
276 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) { 283 for( stringit = m_allApplets.begin(); stringit != m_allApplets.end(); ++stringit ) {
277 tempPlugin = ( tempList.find( *stringit ) ).data(); 284 tempPlugin = ( tempList.find( *stringit ) ).data();
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp
index 0337a94..239c824 100644
--- a/core/qws/transferserver.cpp
+++ b/core/qws/transferserver.cpp
@@ -1,212 +1,231 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#define _XOPEN_SOURCE 20#define _XOPEN_SOURCE
21#include <pwd.h> 21#include <pwd.h>
22#include <sys/types.h> 22#include <sys/types.h>
23#include <unistd.h> 23#include <unistd.h>
24#include <stdlib.h> 24#include <stdlib.h>
25#include <time.h> 25#include <time.h>
26
27#ifndef Q_OS_MACX
26#include <shadow.h> 28#include <shadow.h>
29#endif /* Q_OS_MACX */
27 30
28/* we need the _OS_LINUX stuff first ! */ 31/* we need the _OS_LINUX stuff first ! */
29#include <qglobal.h> 32#include <qglobal.h>
30 33
31#ifndef _OS_LINUX_ 34#ifndef _OS_LINUX_
35// Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found
36// anywhere ? Therfore I removed it completely..
37// I think it should be made permanentyl !? (eilers)
38#warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)"
39#if 0
32 40
33extern "C" 41extern "C"
34{ 42{
35#include <uuid/uuid.h> 43#include <uuid/uuid.h>
36#define UUID_H_INCLUDED 44#define UUID_H_INCLUDED
37} 45}
38 46
47#endif
48
39#endif // not defined linux 49#endif // not defined linux
40 50
41#if defined(_OS_LINUX_) 51#if defined(_OS_LINUX_)
42#include <shadow.h> 52#include <shadow.h>
53#elif defined(Q_OS_MACX)
54#include <stdlib.h>
43#endif 55#endif
44 56
45#include <qdir.h> 57#include <qdir.h>
46#include <qfile.h> 58#include <qfile.h>
47#include <qtextstream.h> 59#include <qtextstream.h>
48#include <qdatastream.h> 60#include <qdatastream.h>
49#include <qmessagebox.h> 61#include <qmessagebox.h>
50#include <qstringlist.h> 62#include <qstringlist.h>
51#include <qfileinfo.h> 63#include <qfileinfo.h>
52#include <qregexp.h> 64#include <qregexp.h>
53//#include <qpe/qcopchannel_qws.h> 65//#include <qpe/qcopchannel_qws.h>
54#include <qpe/process.h> 66#include <qpe/process.h>
55#include <qpe/global.h> 67#include <qpe/global.h>
56#include <qpe/config.h> 68#include <qpe/config.h>
57#include <qpe/contact.h> 69#include <qpe/contact.h>
58#include <qpe/quuid.h> 70#include <qpe/quuid.h>
59#include <qpe/version.h> 71#include <qpe/version.h>
60#include <qpe/qcopenvelope_qws.h> 72#include <qpe/qcopenvelope_qws.h>
61 73
62#include "transferserver.h" 74#include "transferserver.h"
63#include <opie/oprocess.h> 75#include <opie/oprocess.h>
64 76
65const int block_size = 51200; 77const int block_size = 51200;
66 78
67TransferServer::TransferServer( Q_UINT16 port, QObject *parent , 79TransferServer::TransferServer( Q_UINT16 port, QObject *parent ,
68 const char* name ) 80 const char* name )
69 : QServerSocket( port, 1, parent, name ) 81 : QServerSocket( port, 1, parent, name )
70{ 82{
71 if ( !ok() ) 83 if ( !ok() )
72 qWarning( "Failed to bind to port %d", port ); 84 qWarning( "Failed to bind to port %d", port );
73} 85}
74 86
75TransferServer::~TransferServer() 87TransferServer::~TransferServer()
76{ 88{
77} 89}
78 90
79void TransferServer::newConnection( int socket ) 91void TransferServer::newConnection( int socket )
80{ 92{
81 (void) new ServerPI( socket, this ); 93 (void) new ServerPI( socket, this );
82} 94}
83 95
84/* 96/*
85 * small class in anonymous namespace 97 * small class in anonymous namespace
86 * to generate a QUUid for us 98 * to generate a QUUid for us
87 */ 99 */
88namespace 100namespace
89{ 101{
90struct UidGen 102struct UidGen
91{ 103{
92 QString uuid(); 104 QString uuid();
93}; 105};
94#if !defined(_OS_LINUX_) 106#if defined(Q_OS_MACX)
95
96QString UidGen::uuid() 107QString UidGen::uuid()
97{ 108{
98 uuid_t uuid; 109 srandom( random() );
99 uuid_generate( uuid ); 110 QString numStr = QString::number( random() );
100 return QUUid( uuid ).toString(); 111
112 return "{" + numStr + "}";
101} 113}
102#else 114#elif defined(_OS_LINUX_)
103/* 115/*
104* linux got a /proc/sys/kernel/random/uuid file 116* linux got a /proc/sys/kernel/random/uuid file
105* it'll generate the uuids for us 117* it'll generate the uuids for us
106*/ 118*/
107QString UidGen::uuid() 119QString UidGen::uuid()
108{ 120{
109 QFile file( "/proc/sys/kernel/random/uuid" ); 121 QFile file( "/proc/sys/kernel/random/uuid" );
110 if (!file.open(IO_ReadOnly ) ) 122 if (!file.open(IO_ReadOnly ) )
111 return QString::null; 123 return QString::null;
112 124
113 QTextStream stream(&file); 125 QTextStream stream(&file);
114 126
115 return "{" + stream.read().stripWhiteSpace() + "}"; 127 return "{" + stream.read().stripWhiteSpace() + "}";
116} 128}
129#else
130QString UidGen::uuid()
131{
132 uuid_t uuid;
133 ::uuid_generate( uuid );
134 return QUUid( uuid ).toString();
135}
117#endif 136#endif
118} 137}
119 138
120QString SyncAuthentication::serverId() 139QString SyncAuthentication::serverId()
121{ 140{
122 Config cfg("Security"); 141 Config cfg("Security");
123 cfg.setGroup("Sync"); 142 cfg.setGroup("Sync");
124 QString r = cfg.readEntry("serverid"); 143 QString r = cfg.readEntry("serverid");
125 if ( r.isEmpty() ) { 144 if ( r.isEmpty() ) {
126 UidGen gen; 145 UidGen gen;
127 r = gen.uuid(); 146 r = gen.uuid();
128 cfg.writeEntry("serverid", r ); 147 cfg.writeEntry("serverid", r );
129 } 148 }
130 return r; 149 return r;
131} 150}
132 151
133QString SyncAuthentication::ownerName() 152QString SyncAuthentication::ownerName()
134{ 153{
135 QString vfilename = Global::applicationFileName("addressbook", 154 QString vfilename = Global::applicationFileName("addressbook",
136 "businesscard.vcf"); 155 "businesscard.vcf");
137 if (QFile::exists(vfilename)) { 156 if (QFile::exists(vfilename)) {
138 Contact c; 157 Contact c;
139 c = Contact::readVCard( vfilename )[0]; 158 c = Contact::readVCard( vfilename )[0];
140 return c.fullName(); 159 return c.fullName();
141 } 160 }
142 161
143 return ""; 162 return "";
144} 163}
145 164
146QString SyncAuthentication::loginName() 165QString SyncAuthentication::loginName()
147{ 166{
148 struct passwd *pw; 167 struct passwd *pw;
149 pw = getpwuid( geteuid() ); 168 pw = getpwuid( geteuid() );
150 return QString::fromLocal8Bit( pw->pw_name ); 169 return QString::fromLocal8Bit( pw->pw_name );
151} 170}
152 171
153int SyncAuthentication::isAuthorized(QHostAddress peeraddress) 172int SyncAuthentication::isAuthorized(QHostAddress peeraddress)
154{ 173{
155 Config cfg("Security"); 174 Config cfg("Security");
156 cfg.setGroup("Sync"); 175 cfg.setGroup("Sync");
157 // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); 176 // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0");
158 uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100); 177 uint auth_peer = cfg.readNumEntry("auth_peer", 0xc0a80100);
159 178
160 // QHostAddress allowed; 179 // QHostAddress allowed;
161 // allowed.setAddress(allowedstr); 180 // allowed.setAddress(allowedstr);
162 // uint auth_peer = allowed.ip4Addr(); 181 // uint auth_peer = allowed.ip4Addr();
163 uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24); 182 uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits", 24);
164 uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined 183 uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined
165 ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits)); 184 ? 0xffffffff : (((1 << auth_peer_bits) - 1) << (32 - auth_peer_bits));
166 return (peeraddress.ip4Addr() & mask) == auth_peer; 185 return (peeraddress.ip4Addr() & mask) == auth_peer;
167} 186}
168 187
169bool SyncAuthentication::checkUser( const QString& user ) 188bool SyncAuthentication::checkUser( const QString& user )
170{ 189{
171 if ( user.isEmpty() ) 190 if ( user.isEmpty() )
172 return FALSE; 191 return FALSE;
173 QString euser = loginName(); 192 QString euser = loginName();
174 return user == euser; 193 return user == euser;
175} 194}
176 195
177bool SyncAuthentication::checkPassword( const QString& password ) 196bool SyncAuthentication::checkPassword( const QString& password )
178{ 197{
179#ifdef ALLOW_UNIX_USER_FTP 198#ifdef ALLOW_UNIX_USER_FTP
180 // First, check system password... 199 // First, check system password...
181 200
182 struct passwd *pw = 0; 201 struct passwd *pw = 0;
183 struct spwd *spw = 0; 202 struct spwd *spw = 0;
184 203
185 pw = getpwuid( geteuid() ); 204 pw = getpwuid( geteuid() );
186 spw = getspnam( pw->pw_name ); 205 spw = getspnam( pw->pw_name );
187 206
188 QString cpwd = QString::fromLocal8Bit( pw->pw_passwd ); 207 QString cpwd = QString::fromLocal8Bit( pw->pw_passwd );
189 if ( cpwd == "x" && spw ) 208 if ( cpwd == "x" && spw )
190 cpwd = QString::fromLocal8Bit( spw->sp_pwdp ); 209 cpwd = QString::fromLocal8Bit( spw->sp_pwdp );
191 210
192 // Note: some systems use more than crypt for passwords. 211 // Note: some systems use more than crypt for passwords.
193 QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) ); 212 QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) );
194 if ( cpwd == cpassword ) 213 if ( cpwd == cpassword )
195 return TRUE; 214 return TRUE;
196#endif 215#endif
197 216
198 static int lastdenial = 0; 217 static int lastdenial = 0;
199 static int denials = 0; 218 static int denials = 0;
200 int now = time(0); 219 int now = time(0);
201 220
202 // Detect old Qtopia Desktop (no password) 221 // Detect old Qtopia Desktop (no password)
203 if ( password.isEmpty() ) { 222 if ( password.isEmpty() ) {
204 if ( denials < 1 || now > lastdenial + 600 ) { 223 if ( denials < 1 || now > lastdenial + 600 ) {
205 QMessageBox::warning( 0, tr("Sync Connection"), 224 QMessageBox::warning( 0, tr("Sync Connection"),
206 tr("<p>An unauthorized system is requesting access to this device." 225 tr("<p>An unauthorized system is requesting access to this device."
207 "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " 226 "<p>If you are using a version of Qtopia Desktop older than 1.5.1, "
208 "please upgrade."), 227 "please upgrade."),
209 tr("Deny") ); 228 tr("Deny") );
210 denials++; 229 denials++;
211 lastdenial = now; 230 lastdenial = now;
212 } 231 }
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 5a9fada..6fca621 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -1,159 +1,163 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> 3 =. Copyright (c) 2002 Trolltech AS <info@trolltech.com>
4             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 4             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "menusettings.h" 29#include "menusettings.h"
30 30
31#include <qpe/config.h> 31#include <qpe/config.h>
32#include <qpe/qlibrary.h> 32#include <qpe/qlibrary.h>
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#include <qpe/menuappletinterface.h> 34#include <qpe/menuappletinterface.h>
35#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qlistview.h> 38#include <qlistview.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qheader.h> 40#include <qheader.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qlabel.h> 42#include <qlabel.h>
43#include <qwhatsthis.h> 43#include <qwhatsthis.h>
44 44
45#include <stdlib.h> 45#include <stdlib.h>
46 46
47 47
48MenuSettings::MenuSettings ( QWidget *parent, const char *name ) 48MenuSettings::MenuSettings ( QWidget *parent, const char *name )
49 : QWidget ( parent, name ) 49 : QWidget ( parent, name )
50{ 50{
51 m_applets_changed = false; 51 m_applets_changed = false;
52 52
53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
54 54
55 QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); 55 QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this );
56 lay-> addWidget ( l ); 56 lay-> addWidget ( l );
57 57
58 m_list = new QListView ( this ); 58 m_list = new QListView ( this );
59 m_list-> addColumn ( "foobar" ); 59 m_list-> addColumn ( "foobar" );
60 m_list-> header ( )-> hide ( ); 60 m_list-> header ( )-> hide ( );
61 61
62 lay-> addWidget ( m_list ); 62 lay-> addWidget ( m_list );
63 63
64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); 64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this );
65 lay-> addWidget ( m_menutabs ); 65 lay-> addWidget ( m_menutabs );
66 66
67 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); 67 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
68 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); 68 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
69 69
70 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); 70 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( )));
71 71
72 init ( ); 72 init ( );
73} 73}
74 74
75void MenuSettings::init ( ) 75void MenuSettings::init ( )
76{ 76{
77 Config cfg ( "StartMenu" ); 77 Config cfg ( "StartMenu" );
78 cfg. setGroup ( "Applets" ); 78 cfg. setGroup ( "Applets" );
79 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 79 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
80 80
81 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 81 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
82#ifdef Q_OS_MACX
83 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
84#else
82 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 85 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
86#endif /* Q_OS_MACX */
83 87
84 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 88 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
85 QString name; 89 QString name;
86 QPixmap icon; 90 QPixmap icon;
87 MenuAppletInterface *iface = 0; 91 MenuAppletInterface *iface = 0;
88 92
89 QLibrary *lib = new QLibrary ( path + "/" + *it ); 93 QLibrary *lib = new QLibrary ( path + "/" + *it );
90 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); 94 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface );
91 if ( iface ) { 95 if ( iface ) {
92 QString lang = getenv( "LANG" ); 96 QString lang = getenv( "LANG" );
93 QTranslator *trans = new QTranslator ( qApp ); 97 QTranslator *trans = new QTranslator ( qApp );
94 QString type = (*it). left ((*it). find (".")); 98 QString type = (*it). left ((*it). find ("."));
95 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; 99 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm";
96 if ( trans-> load ( tfn )) 100 if ( trans-> load ( tfn ))
97 qApp-> installTranslator ( trans ); 101 qApp-> installTranslator ( trans );
98 else 102 else
99 delete trans; 103 delete trans;
100 name = iface-> name ( ); 104 name = iface-> name ( );
101 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); 105 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal );
102 iface-> release ( ); 106 iface-> release ( );
103 lib-> unload ( ); 107 lib-> unload ( );
104 108
105 QCheckListItem *item; 109 QCheckListItem *item;
106 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); 110 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
107 if ( !icon. isNull ( )) 111 if ( !icon. isNull ( ))
108 item-> setPixmap ( 0, icon ); 112 item-> setPixmap ( 0, icon );
109 item-> setOn ( exclude. find ( *it ) == exclude. end ( )); 113 item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
110 m_applets [*it] = item; 114 m_applets [*it] = item;
111 } else { 115 } else {
112 delete lib; 116 delete lib;
113 } 117 }
114 } 118 }
115 119
116 cfg. setGroup ( "Menu" ); 120 cfg. setGroup ( "Menu" );
117 m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); 121 m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true ));
118} 122}
119 123
120void MenuSettings::appletChanged() 124void MenuSettings::appletChanged()
121{ 125{
122 m_applets_changed = true; 126 m_applets_changed = true;
123} 127}
124 128
125void MenuSettings::accept ( ) 129void MenuSettings::accept ( )
126{ 130{
127 bool apps_changed = false; 131 bool apps_changed = false;
128 132
129 Config cfg ( "StartMenu" ); 133 Config cfg ( "StartMenu" );
130 cfg. setGroup ( "Applets" ); 134 cfg. setGroup ( "Applets" );
131 if ( m_applets_changed ) { 135 if ( m_applets_changed ) {
132 QStringList exclude; 136 QStringList exclude;
133 QMap <QString, QCheckListItem *>::Iterator it; 137 QMap <QString, QCheckListItem *>::Iterator it;
134 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { 138 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) {
135 if ( !(*it)-> isOn ( )) 139 if ( !(*it)-> isOn ( ))
136 exclude << it. key ( ); 140 exclude << it. key ( );
137 } 141 }
138 cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); 142 cfg. writeEntry ( "ExcludeApplets", exclude, ',' );
139 } 143 }
140 cfg. writeEntry ( "SafeMode", false ); 144 cfg. writeEntry ( "SafeMode", false );
141 145
142 cfg. setGroup ( "Menu" ); 146 cfg. setGroup ( "Menu" );
143 147
144 if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { 148 if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) {
145 apps_changed = true; 149 apps_changed = true;
146 cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); 150 cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( ));
147 } 151 }
148 152
149 cfg. write ( ); 153 cfg. write ( );
150 154
151 if ( m_applets_changed ) { 155 if ( m_applets_changed ) {
152 QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); 156 QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" );
153 m_applets_changed = false; 157 m_applets_changed = false;
154 } 158 }
155 if ( apps_changed ) { 159 if ( apps_changed ) {
156 QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); 160 QCopEnvelope ( "QPE/TaskBar", "reloadApps()" );
157 } 161 }
158} 162}
159 163
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index b3e302a..d03ea49 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -1,156 +1,173 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> 3 =. Copyright (c) 2002 Trolltech AS <info@trolltech.com>
4             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 4             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "taskbarsettings.h" 29#include "taskbarsettings.h"
30 30
31#include <qpe/config.h> 31#include <qpe/config.h>
32#include <qpe/qlibrary.h> 32#include <qpe/qlibrary.h>
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#include <qpe/taskbarappletinterface.h> 34#include <qpe/taskbarappletinterface.h>
35#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qlistview.h> 38#include <qlistview.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qheader.h> 40#include <qheader.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qlabel.h> 42#include <qlabel.h>
43#include <qwhatsthis.h> 43#include <qwhatsthis.h>
44 44
45#include <stdlib.h> 45#include <stdlib.h>
46 46
47 47
48TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) 48TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name )
49 : QWidget ( parent, name ) 49 : QWidget ( parent, name )
50{ 50{
51 m_applets_changed = false; 51 m_applets_changed = false;
52 52
53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
54 54
55 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); 55 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this );
56 lay-> addWidget ( l ); 56 lay-> addWidget ( l );
57 57
58 m_list = new QListView ( this ); 58 m_list = new QListView ( this );
59 m_list-> addColumn ( "foobar" ); 59 m_list-> addColumn ( "foobar" );
60 m_list-> header ( )-> hide ( ); 60 m_list-> header ( )-> hide ( );
61 61
62 lay-> addWidget ( m_list ); 62 lay-> addWidget ( m_list );
63 63
64 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); 64 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." ));
65 65
66 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); 66 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( )));
67 67
68 init ( ); 68 init ( );
69} 69}
70 70
71void TaskbarSettings::init ( ) 71void TaskbarSettings::init ( )
72{ 72{
73 Config cfg ( "Taskbar" ); 73 Config cfg ( "Taskbar" );
74 cfg. setGroup ( "Applets" ); 74 cfg. setGroup ( "Applets" );
75 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 75 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
76 76
77 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 77 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
78#ifdef Q_OS_MACX
79 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
80#else
78 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 81 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
82#endif /* Q_OS_MACX */
79 83
80 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 84 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
81 QString name; 85 QString name;
82 QPixmap icon; 86 QPixmap icon;
83 TaskbarNamedAppletInterface *iface = 0; 87 TaskbarNamedAppletInterface *iface = 0;
84 88
89 qWarning("Load applet: %s", (*it).latin1() );
85 QLibrary *lib = new QLibrary ( path + "/" + *it ); 90 QLibrary *lib = new QLibrary ( path + "/" + *it );
86 lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); 91 lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface );
92 qWarning("<1>");
87 if ( iface ) { 93 if ( iface ) {
94 qWarning("<2>");
88 QString lang = getenv( "LANG" ); 95 QString lang = getenv( "LANG" );
89 QTranslator *trans = new QTranslator ( qApp ); 96 QTranslator *trans = new QTranslator ( qApp );
90 QString type = (*it). left ((*it). find (".")); 97 QString type = (*it). left ((*it). find ("."));
91 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; 98 QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm";
92 if ( trans-> load ( tfn )) 99 if ( trans-> load ( tfn ))
93 qApp-> installTranslator ( trans ); 100 qApp-> installTranslator ( trans );
94 else 101 else
95 delete trans; 102 delete trans;
96 name = iface-> name ( ); 103 name = iface-> name ( );
97 icon = iface-> icon ( ); 104 icon = iface-> icon ( );
98 iface-> release ( ); 105 iface-> release ( );
99 } 106 }
107 qWarning("<3>");
100 if ( !iface ) { 108 if ( !iface ) {
109 qWarning("<4>");
101 lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); 110 lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface );
102 111
103 if ( iface ) { 112 if ( iface ) {
113 qWarning("<5>");
104 name = (*it). mid ( 3 ); 114 name = (*it). mid ( 3 );
115 qWarning("Found applet: %s", name.latin1() );
116#ifdef Q_OS_MACX
117 int sep = name. find( ".dylib" );
118#else
105 int sep = name. find( ".so" ); 119 int sep = name. find( ".so" );
120#endif /* Q_OS_MACX */
106 if ( sep > 0 ) 121 if ( sep > 0 )
107 name. truncate ( sep ); 122 name. truncate ( sep );
108 sep = name. find ( "applet" ); 123 sep = name. find ( "applet" );
109 if ( sep == (int) name.length ( ) - 6 ) 124 if ( sep == (int) name.length ( ) - 6 )
110 name. truncate ( sep ); 125 name. truncate ( sep );
111 name[0] = name[0]. upper ( ); 126 name[0] = name[0]. upper ( );
112 iface-> release ( ); 127 iface-> release ( );
113 } 128 }
114 } 129 }
130 qWarning("<6>");
115 131
116 if ( iface ) { 132 if ( iface ) {
133 qWarning("<7>");
117 QCheckListItem *item; 134 QCheckListItem *item;
118 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); 135 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
119 if ( !icon. isNull ( )) 136 if ( !icon. isNull ( ))
120 item-> setPixmap ( 0, icon ); 137 item-> setPixmap ( 0, icon );
121 item-> setOn ( exclude. find ( *it ) == exclude. end ( )); 138 item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
122 m_applets [*it] = item; 139 m_applets [*it] = item;
123 } 140 }
124 lib-> unload ( ); 141 lib-> unload ( );
125 delete lib; 142 delete lib;
126 } 143 }
127} 144}
128 145
129void TaskbarSettings::appletChanged() 146void TaskbarSettings::appletChanged()
130{ 147{
131 m_applets_changed = true; 148 m_applets_changed = true;
132} 149}
133 150
134void TaskbarSettings::accept ( ) 151void TaskbarSettings::accept ( )
135{ 152{
136 Config cfg ( "Taskbar" ); 153 Config cfg ( "Taskbar" );
137 cfg. setGroup ( "Applets" ); 154 cfg. setGroup ( "Applets" );
138 155
139 if ( m_applets_changed ) { 156 if ( m_applets_changed ) {
140 QStringList exclude; 157 QStringList exclude;
141 QMap <QString, QCheckListItem *>::Iterator it; 158 QMap <QString, QCheckListItem *>::Iterator it;
142 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { 159 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) {
143 if ( !(*it)-> isOn ( )) 160 if ( !(*it)-> isOn ( ))
144 exclude << it. key ( ); 161 exclude << it. key ( );
145 } 162 }
146 cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); 163 cfg. writeEntry ( "ExcludeApplets", exclude, ',' );
147 } 164 }
148 cfg. writeEntry ( "SafeMode", false ); 165 cfg. writeEntry ( "SafeMode", false );
149 cfg. write ( ); 166 cfg. write ( );
150 167
151 if ( m_applets_changed ) { 168 if ( m_applets_changed ) {
152 QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" ); 169 QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" );
153 m_applets_changed = false; 170 m_applets_changed = false;
154 } 171 }
155} 172}
156 173