OSDN Git Service

reimport bluedevil
authorIvailo Monev <xakepa10@gmail.com>
Wed, 10 Dec 2014 22:52:10 +0000 (22:52 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 10 Dec 2014 22:52:10 +0000 (22:52 +0000)
60 files changed:
bluedevil/README
bluedevil/src/XmlMessages.sh [new file with mode: 0755]
bluedevil/src/bluedevil-mime.xml
bluedevil/src/bluedevil.notifyrc
bluedevil/src/daemon/helpers/authorize/CMakeLists.txt
bluedevil/src/daemon/helpers/requestpin/dialogWidget.ui
bluedevil/src/daemon/helpers/requestpin/requestpin.cpp
bluedevil/src/daemon/helpers/requestpin/requestpin.h
bluedevil/src/daemon/kded/BlueDevilDaemon.cpp
bluedevil/src/daemon/kded/BlueDevilDaemon.h
bluedevil/src/daemon/kded/CMakeLists.txt
bluedevil/src/daemon/kded/bluedevil.desktop
bluedevil/src/daemon/kded/bluezagent.cpp
bluedevil/src/daemon/kded/filereceiver/filereceiver.cpp
bluedevil/src/daemon/kded/filereceiver/filereceiver.h
bluedevil/src/daemon/kded/filereceiver/receivefilejob.cpp
bluedevil/src/daemon/kded/filereceiver/receivefilejob.h
bluedevil/src/fileitemactionplugin/CMakeLists.txt
bluedevil/src/fileitemactionplugin/bluedevilsendfile.desktop
bluedevil/src/kcmodule/CMakeLists.txt
bluedevil/src/kcmodule/bluedeviladapters.cpp
bluedevil/src/kcmodule/bluedeviladapters.desktop
bluedevil/src/kcmodule/bluedevildevices.cpp
bluedevil/src/kcmodule/bluedevildevices.desktop
bluedevil/src/kcmodule/bluedeviltransfer.cpp
bluedevil/src/kcmodule/bluedeviltransfer.desktop
bluedevil/src/kcmodule/bluedeviltransfer.h
bluedevil/src/kcmodule/columnresizer.cpp [deleted file]
bluedevil/src/kcmodule/columnresizer.h [deleted file]
bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp [deleted file]
bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h [deleted file]
bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui [deleted file]
bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp [deleted file]
bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h [deleted file]
bluedevil/src/kcmodule/transfer.ui
bluedevil/src/kio/bluetooth/CMakeLists.txt
bluedevil/src/kio/bluetooth/kiobluetooth.cpp
bluedevil/src/kio/obexftp/CMakeLists.txt
bluedevil/src/kio/obexftp/daemon/CMakeLists.txt
bluedevil/src/kio/obexftp/daemon/obexftpdaemon.desktop
bluedevil/src/kio/obexftp/kio_obexftp.cpp
bluedevil/src/monolithic/CMakeLists.txt
bluedevil/src/monolithic/bluedevil-monolithic.desktop
bluedevil/src/monolithic/monolithic.cpp
bluedevil/src/monolithic/monolithic.h
bluedevil/src/sendfile/CMakeLists.txt
bluedevil/src/sendfile/bluedevil-sendfile.desktop
bluedevil/src/sendfile/discoverwidget.cpp
bluedevil/src/settings/filereceiver.kcfg
bluedevil/src/wizard/CMakeLists.txt
bluedevil/src/wizard/bluedevil-wizard.desktop
bluedevil/src/wizard/bluewizard.cpp
bluedevil/src/wizard/main.cpp
bluedevil/src/wizard/pages/discover.ui
bluedevil/src/wizard/pages/discoverpage.cpp
bluedevil/src/wizard/pages/fail.cpp
bluedevil/src/wizard/pages/fail.ui
bluedevil/src/wizard/pin-code-database.xml
bluedevil/src/wizard/wizardagent.cpp
bluedevil/src/wizard/wizardagent.h

index b701b77..b819ed7 100644 (file)
@@ -1,14 +1,11 @@
 BlueDevil runtime dependencies:
-    -obex-data-server
+    -bluez5
+        -General Bluetooth management
+
+    -bluez-obexd
         -Be able to "Browse File" aka kio_obexftp
+        -Be able to "Send Files" (bluedevil-sendfile)
         -Be able to receive files
 
-    -obexd-client
-        -Be able to Send files (bluedevil-sendfile)
-
-    -If you're using Alsa:
-        The best way of having "automagical headset configuration" is having the bluetooth.conf hook
-        enabled
-
-    NOTE: Be sure to install only obexd-client and not obexd-server, since the last will conflic
-    with obex-data-server.
\ No newline at end of file
+    -pulseaudio-module-bluetooth
+        -Be able to connect A2DP profile
diff --git a/bluedevil/src/XmlMessages.sh b/bluedevil/src/XmlMessages.sh
new file mode 100755 (executable)
index 0000000..05651f5
--- /dev/null
@@ -0,0 +1,22 @@
+function get_files
+{
+    echo bluedevil-mime.xml
+}
+
+function po_for_file
+{
+    case "$1" in
+       bluedevil-mime.xml)
+           echo bluedevil_xml_mimetypes.po
+       ;;
+    esac
+}
+
+function tags_for_file
+{
+    case "$1" in
+       bluedevil-mime.xml)
+           echo comment
+       ;;
+    esac
+}
index 669147d..567e3fe 100644 (file)
@@ -17,27 +17,167 @@ Notes:
     <sub-class-of type="inode/directory"/>
     <generic-icon name="video-display"/>
     <comment>Known Device</comment>
+    <comment xml:lang="ca">Dispositiu conegut</comment>
+    <comment xml:lang="cs">Známé zařízení</comment>
+    <comment xml:lang="da">Kendt enhed</comment>
+    <comment xml:lang="de">Bekanntes Gerät</comment>
+    <comment xml:lang="el">Γνωστή συσκευή</comment>
+    <comment xml:lang="en_GB">Known Device</comment>
+    <comment xml:lang="es">Dispositivo conocido</comment>
+    <comment xml:lang="fi">Tunnettu laite</comment>
+    <comment xml:lang="it">Dispositivo conosciuto</comment>
+    <comment xml:lang="nl">Bekend apparaat</comment>
+    <comment xml:lang="pl">Znane urządzenie</comment>
+    <comment xml:lang="pt">Dispositivo Conhecido</comment>
+    <comment xml:lang="pt_BR">Dispositivo conhecido</comment>
+    <comment xml:lang="sk">Známe zariadenie</comment>
+    <comment xml:lang="sl">Znana naprava</comment>
+    <comment xml:lang="sr">познати уређај</comment>
+    <comment xml:lang="sr@ijekavian">познати уређај</comment>
+    <comment xml:lang="sr@ijekavianlatin">poznati uređaj</comment>
+    <comment xml:lang="sr@latin">poznati uređaj</comment>
+    <comment xml:lang="uk">Відомий пристрій</comment>
   </mime-type>
   <mime-type type="inode/vnd.kde.bluedevil.device.discovered">
     <sub-class-of type="inode/vnd.kde.bluedevil.device"/>
     <generic-icon name="video-display"/>
     <comment>Discovered Device</comment>
+    <comment xml:lang="ca">Dispositiu descobert</comment>
+    <comment xml:lang="cs">Objevené zařízení</comment>
+    <comment xml:lang="da">Opdaget enhed</comment>
+    <comment xml:lang="de">Erkanntes Gerät</comment>
+    <comment xml:lang="el">Ευρεθείσα συσκευή</comment>
+    <comment xml:lang="en_GB">Discovered Device</comment>
+    <comment xml:lang="es">Dispositivo descubierto</comment>
+    <comment xml:lang="fi">Löydetty palvelu</comment>
+    <comment xml:lang="it">Dispositivo scoperto</comment>
+    <comment xml:lang="nl">Gevonden apparaat</comment>
+    <comment xml:lang="pl">Odkryte urządzenie</comment>
+    <comment xml:lang="pt">Dispositivo Descoberto</comment>
+    <comment xml:lang="pt_BR">Dispositivo descoberto</comment>
+    <comment xml:lang="sk">Objavené zariadenie</comment>
+    <comment xml:lang="sl">Odkrita naprava</comment>
+    <comment xml:lang="sr">откривени уређај</comment>
+    <comment xml:lang="sr@ijekavian">откривени уређај</comment>
+    <comment xml:lang="sr@ijekavianlatin">otkriveni uređaj</comment>
+    <comment xml:lang="sr@latin">otkriveni uređaj</comment>
+    <comment xml:lang="uk">Виявлений пристрій</comment>
   </mime-type>
   <mime-type type="inode/vnd.kde.bluedevil.service">
     <sub-class-of type="inode/directory"/>
     <generic-icon name="preferences-system-bluetooth"/>
     <comment>Service</comment>
+    <comment xml:lang="ca">Servei</comment>
+    <comment xml:lang="cs">Služba</comment>
+    <comment xml:lang="da">Tjeneste</comment>
+    <comment xml:lang="de">Dienst</comment>
+    <comment xml:lang="el">Υπηρεσία</comment>
+    <comment xml:lang="en_GB">Service</comment>
+    <comment xml:lang="es">Servicio</comment>
+    <comment xml:lang="fi">Palvelu</comment>
+    <comment xml:lang="it">Servizio</comment>
+    <comment xml:lang="nl">Service</comment>
+    <comment xml:lang="pl">Usługa</comment>
+    <comment xml:lang="pt">Serviço</comment>
+    <comment xml:lang="pt_BR">Serviço</comment>
+    <comment xml:lang="sk">Služba</comment>
+    <comment xml:lang="sl">Storitev</comment>
+    <comment xml:lang="sr">сервис</comment>
+    <comment xml:lang="sr@ijekavian">сервис</comment>
+    <comment xml:lang="sr@ijekavianlatin">servis</comment>
+    <comment xml:lang="sr@latin">servis</comment>
+    <comment xml:lang="uk">Служба</comment>
   </mime-type>
   <mime-type type="application/vnd.kde.bluedevil-audio">
     <comment>Service</comment>
+    <comment xml:lang="ca">Servei</comment>
+    <comment xml:lang="cs">Služba</comment>
+    <comment xml:lang="da">Tjeneste</comment>
+    <comment xml:lang="de">Dienst</comment>
+    <comment xml:lang="el">Υπηρεσία</comment>
+    <comment xml:lang="en_GB">Service</comment>
+    <comment xml:lang="es">Servicio</comment>
+    <comment xml:lang="fi">Palvelu</comment>
+    <comment xml:lang="it">Servizio</comment>
+    <comment xml:lang="nl">Service</comment>
+    <comment xml:lang="pl">Usługa</comment>
+    <comment xml:lang="pt">Serviço</comment>
+    <comment xml:lang="pt_BR">Serviço</comment>
+    <comment xml:lang="sk">Služba</comment>
+    <comment xml:lang="sl">Storitev</comment>
+    <comment xml:lang="sr">сервис</comment>
+    <comment xml:lang="sr@ijekavian">сервис</comment>
+    <comment xml:lang="sr@ijekavianlatin">servis</comment>
+    <comment xml:lang="sr@latin">servis</comment>
+    <comment xml:lang="uk">Служба</comment>
   </mime-type>
   <mime-type type="application/vnd.kde.bluedevil-network-panu">
     <comment>Service</comment>
+    <comment xml:lang="ca">Servei</comment>
+    <comment xml:lang="cs">Služba</comment>
+    <comment xml:lang="da">Tjeneste</comment>
+    <comment xml:lang="de">Dienst</comment>
+    <comment xml:lang="el">Υπηρεσία</comment>
+    <comment xml:lang="en_GB">Service</comment>
+    <comment xml:lang="es">Servicio</comment>
+    <comment xml:lang="fi">Palvelu</comment>
+    <comment xml:lang="it">Servizio</comment>
+    <comment xml:lang="nl">Service</comment>
+    <comment xml:lang="pl">Usługa</comment>
+    <comment xml:lang="pt">Serviço</comment>
+    <comment xml:lang="pt_BR">Serviço</comment>
+    <comment xml:lang="sk">Služba</comment>
+    <comment xml:lang="sl">Storitev</comment>
+    <comment xml:lang="sr">сервис</comment>
+    <comment xml:lang="sr@ijekavian">сервис</comment>
+    <comment xml:lang="sr@ijekavianlatin">servis</comment>
+    <comment xml:lang="sr@latin">servis</comment>
+    <comment xml:lang="uk">Служба</comment>
   </mime-type>
   <mime-type type="application/vnd.kde.bluedevil-network-dun">
     <comment>Service</comment>
+    <comment xml:lang="ca">Servei</comment>
+    <comment xml:lang="cs">Služba</comment>
+    <comment xml:lang="da">Tjeneste</comment>
+    <comment xml:lang="de">Dienst</comment>
+    <comment xml:lang="el">Υπηρεσία</comment>
+    <comment xml:lang="en_GB">Service</comment>
+    <comment xml:lang="es">Servicio</comment>
+    <comment xml:lang="fi">Palvelu</comment>
+    <comment xml:lang="it">Servizio</comment>
+    <comment xml:lang="nl">Service</comment>
+    <comment xml:lang="pl">Usługa</comment>
+    <comment xml:lang="pt">Serviço</comment>
+    <comment xml:lang="pt_BR">Serviço</comment>
+    <comment xml:lang="sk">Služba</comment>
+    <comment xml:lang="sl">Storitev</comment>
+    <comment xml:lang="sr">сервис</comment>
+    <comment xml:lang="sr@ijekavian">сервис</comment>
+    <comment xml:lang="sr@ijekavianlatin">servis</comment>
+    <comment xml:lang="sr@latin">servis</comment>
+    <comment xml:lang="uk">Служба</comment>
   </mime-type>
   <mime-type type="application/vnd.kde.bluedevil-sendfile">
       <comment>Service</comment>
+      <comment xml:lang="ca">Servei</comment>
+      <comment xml:lang="cs">Služba</comment>
+      <comment xml:lang="da">Tjeneste</comment>
+      <comment xml:lang="de">Dienst</comment>
+      <comment xml:lang="el">Υπηρεσία</comment>
+      <comment xml:lang="en_GB">Service</comment>
+      <comment xml:lang="es">Servicio</comment>
+      <comment xml:lang="fi">Palvelu</comment>
+      <comment xml:lang="it">Servizio</comment>
+      <comment xml:lang="nl">Service</comment>
+      <comment xml:lang="pl">Usługa</comment>
+      <comment xml:lang="pt">Serviço</comment>
+      <comment xml:lang="pt_BR">Serviço</comment>
+      <comment xml:lang="sk">Služba</comment>
+      <comment xml:lang="sl">Storitev</comment>
+      <comment xml:lang="sr">сервис</comment>
+      <comment xml:lang="sr@ijekavian">сервис</comment>
+      <comment xml:lang="sr@ijekavianlatin">servis</comment>
+      <comment xml:lang="sr@latin">servis</comment>
+      <comment xml:lang="uk">Служба</comment>
   </mime-type>
 </mime-info>
index 31ed157..0fcc564 100644 (file)
@@ -1,22 +1,28 @@
 [Global]
 IconName=preferences-system-bluetooth
 Comment=Bluetooth system
+Comment[bs]=Blutut  sistem
 Comment[ca]=Sistema Bluetooth
 Comment[ca@valencia]=Sistema Bluetooth
 Comment[cs]=Systém Bluetooth
 Comment[da]=Bluetooth-system
 Comment[de]=Bluetooth-System
 Comment[el]=Σύστημα Bluetooth
+Comment[en_GB]=Bluetooth system
 Comment[es]=Sistema Bluetooth
+Comment[et]=Bluetoothi süsteem
 Comment[fi]=Bluetooth-järjestelmä
 Comment[fr]=Système Bluetooth
 Comment[gl]=Sistema Bluetooth
 Comment[hu]=Bluetooth rendszer
 Comment[it]=Sistema Bluetooth
+Comment[ja]=Bluetooth システム
 Comment[kk]=Bluetooth жүйесі
+Comment[ko]=블루투스 시스템
 Comment[lt]=Bluetooth
 Comment[mr]=ब्लूटूथ प्रणाली
 Comment[nb]=Blåtann-system
+Comment[nds]=Bluetooth-Systeem
 Comment[nl]=Bluetooth-systeem
 Comment[pa]=ਬਲਿਊਟੁੱਥ ਸਿਸਟਮ
 Comment[pl]=System Bluetooth
@@ -37,22 +43,28 @@ Comment[uk]=Система Bluetooth
 Comment[x-test]=xxBluetooth systemxx
 Comment[zh_TW]=藍牙系統
 Name=Bluetooth
+Name[bs]=Bluetooth
 Name[ca]=Bluetooth
 Name[ca@valencia]=Bluetooth
 Name[cs]=Bluetooth
 Name[da]=Bluetooth
 Name[de]=Bluetooth
 Name[el]=Bluetooth
+Name[en_GB]=Bluetooth
 Name[es]=Bluetooth
+Name[et]=Bluetooth
 Name[fi]=Bluetooth
 Name[fr]=Bluetooth
 Name[gl]=Bluetooth
 Name[hu]=Bluetooth
 Name[it]=Bluetooth
+Name[ja]=Bluetooth
 Name[kk]=Bluetooth
+Name[ko]=블루투스
 Name[lt]=Bluetooth
 Name[mr]=ब्लूटूथ
 Name[nb]=Blåtann
+Name[nds]=Bluetooth
 Name[nl]=Bluetooth
 Name[pa]=ਬਲਿਊਟੁੱਥ
 Name[pl]=Bluetooth
@@ -76,22 +88,27 @@ Ignore=true
 
 [Event/bluedevilAuthorize]
 Name=Authorization Requested
+Name[bs]=Zahtijeva odobrenje
 Name[ca]=Sol·licitud d'autorització
 Name[ca@valencia]=Sol·licitud d'autorització
 Name[cs]=Je vyžadováno udělení oprávnění
 Name[da]=Godkendelse kræves
 Name[de]=Autorisierung gefordert
 Name[el]=Απαιτείται ταυτοποίηση
+Name[en_GB]=Authorisation Requested
 Name[es]=Se ha solicitado autorización
+Name[et]=Autentimise nõue
 Name[fi]=Valtuutusta pyydetty
 Name[fr]=Autorisation demandée
 Name[gl]=Requírese autorización
 Name[hu]=Felhatalmazás kérve
 Name[it]=Richiesta autorizzazione
 Name[kk]=Авторизация сұралды
+Name[ko]=인증 요청됨
 Name[lt]=Prašoma prieigos teisių
 Name[mr]=अधिप्रमाणाची विनंती केली
 Name[nb]=Autorisasjon kreves
+Name[nds]=Identiteetprööv anfraagt
 Name[nl]=Autorisatie gevraagd
 Name[pa]=ਪਰਮਾਣਕਿਤਾ ਚਾਹੀਦੀ ਹੈ
 Name[pl]=Wymagane uwierzytelnienie
@@ -112,22 +129,27 @@ Name[uk]=Слід пройти розпізнавання
 Name[x-test]=xxAuthorization Requestedxx
 Name[zh_TW]=請求認證
 Comment=A device wants to connect
+Comment[bs]=Uređaj se zeli konektovati
 Comment[ca]=Un dispositiu es vol connectar
 Comment[ca@valencia]=Un dispositiu es vol connectar
 Comment[cs]=Zařízení se chce připojit
 Comment[da]=En enhed prøver at forbinde
 Comment[de]=Ein Gerät möchte sich verbinden
 Comment[el]=Μία συσκευή επιθυμεί να συνδεθεί
+Comment[en_GB]=A device wants to connect
 Comment[es]=Un dispositivo desea conectarse
+Comment[et]=Seade soovib ühendust luua
 Comment[fi]=Laite haluaa ottaa yhteyden
 Comment[fr]=Un périphérique veut se connecter
 Comment[gl]=Un dispositivo quere conectarse
 Comment[hu]=Egy eszköz szeretne csatlakozni
 Comment[it]=Un dispositivo vuole connettersi
 Comment[kk]=Бір құрылғы байланысуды қалайды
+Comment[ko]=장치가 연결하려고 함
 Comment[lt]=Įrenginys nori prijungti prie Jūsų
 Comment[mr]=एक साधन जोडू इच्छिते
 Comment[nb]=En enhet vil koble til
+Comment[nds]=En Reedschap will sik tokoppeln
 Comment[nl]=Een apparaat wil een verbinding maken
 Comment[pa]=ਜੰਤਰ ਕੁਨੈਕਟ ਹੋਣਾ ਚਾਹੁੰਦਾ ਹੈ
 Comment[pl]=Urządzenie chce się podłączyć
@@ -150,22 +172,27 @@ Action=Popup
 
 [Event/bluedevilConfirmModechange]
 Name=Confirm Mode Change
+Name[bs]=Povrdi promijene moda
 Name[ca]=Confirmació del canvi de mode
 Name[ca@valencia]=Confirmació del canvi de mode
 Name[cs]=Potvrdit změnu režimu
 Name[da]=Bekræft tilstandsændring
 Name[de]=Moduswechsel bestätigen
 Name[el]=Επιβεβαίωση αλλαγής λειτουργίας
+Name[en_GB]=Confirm Mode Change
 Name[es]=Confirmar el cambio de modo
+Name[et]=Režiimimuutuse kinnitus
 Name[fi]=Vahvistan tilan vaihto
 Name[fr]=Confirmer le changement de mode
 Name[gl]=Confirmación do cambio de modo
 Name[hu]=Módváltoztatás megerősítése
 Name[it]=Conferma cambio di modalità
 Name[kk]=Күйін өзгертуді құптау
+Name[ko]=모드 변경 확인
 Name[lt]=Patvirtinti veiksenos pakeitimą
 Name[mr]=पद्धत बदल खात्री करा
 Name[nb]=Bekreft endring i kjøremåte
+Name[nds]=Bedriefännern-Beglöven
 Name[nl]=Moduswisseling bevestigen
 Name[pl]=Potwierdź zmianę trybu
 Name[pt]=Confirmar a Mudança de Modo
@@ -202,6 +229,7 @@ Comment[hu]=Megváltozik a bluetooth üzemmód (pl. normál vagy repülési)
 Comment[it]=La modalità del Bluetooth sta per essere cambiata (da «normale» a «flight», ad esempio)
 Comment[kk]=Bluetooth режімі өзгертілмек (мысалы, кәдімгіден ұшқандағыға)
 Comment[km]=របៀប​ប៊្លូធូស​ដែល​ហៀបនឹង​ផ្លាស់ប្ដូរ​ (​ឧទាហរណ៍​របៀប​ហោះហើរ​ធម្មតា​)
+Comment[ko]=블루투스 모드가 변경될 예정 (예: 일반에서 비행기 모드로)
 Comment[lt]=Bluetooth veiksena bus pakeista (pvz. iš normalaus į skrydžio)
 Comment[mr]=ब्लूटूथ पद्धतीत बदल होत आहे (उदा. सामान्य ते फ्लाइट)
 Comment[nb]=Blåtann-kjøremåte skal til å bli endret (f.eks. normal til fly)
@@ -231,22 +259,27 @@ Action=Popup
 
 [Event/bluedevilRequestConfirmation]
 Name=Confirm PIN
+Name[bs]=Potvrdi pin
 Name[ca]=Confirmació del PIN
 Name[ca@valencia]=Confirmació del PIN
 Name[cs]=Potvrdit PIN
 Name[da]=Bekræft PIN-kode
 Name[de]=PIN bestätigen
 Name[el]=Επιβεβαίωση PIN
+Name[en_GB]=Confirm PIN
 Name[es]=Confirmar PIN
+Name[et]=PIN-i kinnitus
 Name[fi]=Vahvista PIN
 Name[fr]=Confirmer le code « PIN »
 Name[gl]=Confirmación do PIN
 Name[hu]=PIN megerősítése
 Name[it]=Conferma PIN
 Name[kk]=PIN-кодын құптау
+Name[ko]=PIN 확인
 Name[lt]=Patvirtinti PIN
 Name[mr]=पिनची खात्री करा
 Name[nb]=Bekreft PIN
+Name[nds]=Beglöven-PIN
 Name[nl]=PIN bevestigen
 Name[pa]=ਪਿੰਨ ਪੁਸ਼ਟੀ
 Name[pl]=Potwierdź numer PIN
@@ -267,22 +300,27 @@ Name[uk]=Підтвердження PIN
 Name[x-test]=xxConfirm PINxx
 Name[zh_TW]=確認 PIN 碼
 Comment=Confirm a device request using matching PINs
+Comment[bs]=Potvrdi zahtjev uređaja koristeci odgovarajuce pinove
 Comment[ca]=Confirma una sol·licitud d'un dispositiu usant PIN que coincideixin
 Comment[ca@valencia]=Confirma una sol·licitud d'un dispositiu usant PIN que coincidisquen
 Comment[cs]=Potvrďte požadavek zařízení použitím odpovídajících PINů
 Comment[da]=Bekræft en enhedsanmodning med brug af matchende PIN-koder
 Comment[de]=Eine Geräteanforderung mit passenden PINs bestätigen
 Comment[el]=Επιβεβαίωση αίτησης συσκευής που χρησιμοποιεί ταιριαστά PIN
+Comment[en_GB]=Confirm a device request using matching PINs
 Comment[es]=Confirmar la petición de un dispositivo usando PIN emparejados
+Comment[et]=Seadme nõude kinnitamine sobivate PIN-idega
 Comment[fi]=Vahvista laitepyyntö käyttämällä samoja PIN-lukuja
 Comment[fr]=Confirme une demande d'un périphérique utilisant une correspondance de codes « PIN »
 Comment[gl]=Confirmar a solicitude dun dispositivo empregando PIN coincidentes
 Comment[hu]=Eszközkérés megerősítése egyező PIN-ek használatával
 Comment[it]=Conferma la richiesta di un dispositivo usando PIN corrispondenti
 Comment[kk]=Сәйкесті PIN-дерді келтіріп құрылғының талабын құптау
+Comment[ko]=장치 요청을 PIN 일치로 확인
 Comment[lt]=Pavirtinti įrenginio užklausą naudojant atitinkančius PIN
 Comment[mr]=एक साधन विनंती पिन जुळवणी वापरून खात्री करा
 Comment[nb]=Bekreft en enhetsforespørsel med samsvarende PIN-er
+Comment[nds]=En Reedschap-Anfraag mit passen PINs beglöven
 Comment[nl]=Een apparaataanvraag bevestigen met overeenkomstige PIN's
 Comment[pl]=Potwierdź żądanie urządzenia przy użyciu zgodnych numerów PIN
 Comment[pt]=Confirmar o pedido de um dispositivo com PIN's correspondentes
@@ -322,6 +360,7 @@ Name[hu]=PIN-kód kérés
 Name[it]=Richiesta PIN
 Name[kk]=PIN талабы
 Name[km]=ស្នើ PIN
+Name[ko]=PIN 요청
 Name[lt]=Prašyti PIN
 Name[mr]=PIN ची विनंती करा
 Name[nb]=Be om PIN
@@ -364,8 +403,10 @@ Comment[fr]=Un code « PIN » est nécessaire
 Comment[gl]=Necesítase un PIN.
 Comment[hu]=PIN-kód szükséges
 Comment[it]=Un PIN è richiesto
+Comment[ja]=PIN が必要です
 Comment[kk]=PIN -коды керек
 Comment[km]=ត្រូវការ PIN
+Comment[ko]=PIN이 필요함
 Comment[lt]=Reikia PIN
 Comment[mr]=PIN ची गरज आहे
 Comment[nb]=En PIN kreves
@@ -413,6 +454,7 @@ Name[hu]=Beérkező fájl
 Name[it]=File in arrivo
 Name[kk]=Файлды қабылдау
 Name[km]=ឯកសារ​ចូល​
+Name[ko]=파일 들어옴
 Name[lt]=Atsiunčiamas failas
 Name[mr]=आत येणारी फाईल
 Name[nb]=Innkommende fil
@@ -439,22 +481,27 @@ Name[x-test]=xxIncoming Filexx
 Name[zh_CN]=正在传入的文件
 Name[zh_TW]=要傳進來的檔案
 Comment=Incoming file transfer
+Comment[bs]=Prijenos dolazne datoteke
 Comment[ca]=Transferència de fitxer entrant
 Comment[ca@valencia]=Transferència de fitxer entrant
 Comment[cs]=Příchozí přenos souboru
 Comment[da]=Indkommende filoverførsel
 Comment[de]=Eingehende Dateiübertragung
 Comment[el]=Μεταφορά εισερχόμενου αρχείου
+Comment[en_GB]=Incoming file transfer
 Comment[es]=Transferencia de archivo entrante
+Comment[et]=Sisenev failiedastus
 Comment[fi]=Saapuva tiedostonsiirto
 Comment[fr]=Transfert de fichier entrant
 Comment[gl]=Transferencia de ficheiros entrante
 Comment[hu]=Bejövő fájlátvitel
 Comment[it]=Trasferimento di file in arrivo
 Comment[kk]=Кіріс файл тасымалы
+Comment[ko]=들어오는 파일 전송 요청
 Comment[lt]=Gaunamo failo perdavimas
 Comment[mr]=आत येणारी फाईल बदली
 Comment[nb]=Innkommende filoverføring
+Comment[nds]=Ankamen Dateiöverdregen
 Comment[nl]=Inkomende bestandsoverdracht
 Comment[pa]=ਆ ਰਹੀ ਫਾਇਲ ਟਰਾਂਸਫਰ
 Comment[pl]=Przychodzące przesyłanie pliku
index 02e7d9e..d307c9b 100644 (file)
@@ -6,7 +6,7 @@ set(authorize_SRCS
 kde4_add_executable(bluedevil-authorize ${authorize_SRCS})
 
 target_link_libraries(bluedevil-authorize
-                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
 
 install(TARGETS bluedevil-authorize
         DESTINATION ${LIBEXEC_INSTALL_DIR})
index 6f6c5b9..1714e78 100644 (file)
@@ -6,79 +6,82 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>273</width>
-    <height>95</height>
+    <width>259</width>
+    <height>113</height>
    </rect>
   </property>
-  <widget class="QWidget" name="gridLayoutWidget">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>271</width>
-     <height>91</height>
-    </rect>
-   </property>
-   <layout class="QGridLayout" name="gridLayout">
-    <item row="0" column="0">
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <item>
-       <widget class="QLabel" name="pixmap">
-        <property name="text">
-         <string/>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item row="1" column="0">
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <widget class="QLabel" name="label">
-        <property name="text">
-         <string>PIN:</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item row="1" column="1">
-     <widget class="KLineEdit" name="pin">
-      <property name="inputMask">
-       <string notr="true">99999999; </string>
-      </property>
-      <property name="maxLength">
-       <number>8</number>
-      </property>
-      <property name="urlDropsEnabled">
-       <bool>false</bool>
-      </property>
-      <property name="trapEnterKeyEvent" stdset="0">
-       <bool>true</bool>
-      </property>
-      <property name="clickMessage">
-       <string extracomment="Introduce PIN"/>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="1">
-     <widget class="QLabel" name="descLabel">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="text">
-       <string notr="true"/>
-      </property>
-      <property name="wordWrap">
-       <bool>true</bool>
-      </property>
-     </widget>
-    </item>
-   </layout>
-  </widget>
+  <property name="minimumSize">
+   <size>
+    <width>0</width>
+    <height>0</height>
+   </size>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QLabel" name="pixmap">
+     <property name="minimumSize">
+      <size>
+       <width>64</width>
+       <height>64</height>
+      </size>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QLabel" name="descLabel">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text">
+      <string notr="true"/>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>PIN:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="KLineEdit" name="pin">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="inputMask">
+      <string notr="true"/>
+     </property>
+     <property name="maxLength">
+      <number>32767</number>
+     </property>
+     <property name="placeholderText">
+      <string>1234</string>
+     </property>
+     <property name="urlDropsEnabled">
+      <bool>false</bool>
+     </property>
+     <property name="trapEnterKeyEvent" stdset="0">
+      <bool>true</bool>
+     </property>
+     <property name="clickMessage">
+      <string extracomment="Introduce PIN"/>
+     </property>
+    </widget>
+   </item>
+  </layout>
  </widget>
  <customwidgets>
   <customwidget>
index 96648f5..8986458 100644 (file)
@@ -27,6 +27,9 @@
 #include <QtCore/QDebug>
 #include <QtCore/QCoreApplication>
 #include <QtCore/QTimer>
+#include <QValidator>
+#include <QRegExpValidator>
+#include <QRegExp>
 
 #include <KIcon>
 #include <knotification.h>
@@ -58,15 +61,21 @@ RequestPin::RequestPin() : QObject()
     connect(m_notification, SIGNAL(ignored()), this, SLOT(quit()));
 
     //We're using persistent notifications so we have to use our own timeout (10s)
-    QTimer::singleShot(10000, m_notification, SLOT(close()));
+    m_timer.setSingleShot(true);
+    m_timer.setInterval(10000);
+    m_timer.start();
+    connect(&m_timer, SIGNAL(timeout()), m_notification, SLOT(close()));
+
     m_notification->setPixmap(KIcon("preferences-system-bluetooth").pixmap(42,42));
     m_notification->sendEvent();
 }
 
 void RequestPin::introducePin()
 {
-    disconnect(m_notification, SIGNAL(closed()), this, SLOT(quit()));
-    disconnect(m_notification, SIGNAL(ignored()), this, SLOT(quit()));
+    m_timer.stop();
+    m_notification->disconnect();
+    m_notification->close();
+    m_notification->deleteLater();
 
     KIcon icon("preferences-system-bluetooth");
 
@@ -80,36 +89,46 @@ void RequestPin::introducePin()
     );
     dialogWidget->pixmap->setPixmap(icon.pixmap(64,64));
 
-    KDialog *dialog = new KDialog();
-    dialog->setMainWidget(mainWidget);
-
-    dialog->setCaption(i18nc(
+    m_dialog = new KDialog();
+    m_dialog->setMainWidget(mainWidget);
+    m_dialog->setCaption(i18nc(
         "Shown in the caption of a dialog where the user introduce the PIN",
         "Introduce PIN"
     ));
 
-    QObject::connect(dialogWidget->pin, SIGNAL(returnPressed()),
-                     dialog, SLOT(accept()));
+    connect(dialogWidget->pin, SIGNAL(textChanged(QString)), SLOT(checkPin(QString)));
+    connect(dialogWidget->pin, SIGNAL(returnPressed()),
+                     m_dialog, SLOT(accept()));
 
-    dialog->setButtons(KDialog::Ok | KDialog::Cancel);
-    dialog->setMinimumWidth(300);
-    dialog->setMinimumHeight(150);
-    dialog->setMaximumWidth(300);
-    dialog->setMaximumHeight(150);
+    m_dialog->setButtons(KDialog::Ok | KDialog::Cancel);
 
     dialogWidget->pin->setFocus(Qt::ActiveWindowFocusReason);
+    qDebug() << qApp->arguments();
+    if (qApp->arguments().count() > 2 && qApp->arguments()[2] == QLatin1String("numeric")) {
+        dialogWidget->pin->setValidator(new QRegExpValidator(QRegExp("[0-9]{1,6}"), this ));
+    } else {
+        dialogWidget->pin->setValidator(new QRegExpValidator(QRegExp("[A-Za-z0-9]{1,16}"), this ));
+    }
 
-    if (dialog->exec()) {
-        cout << dialogWidget->pin->text().toLatin1().data();
+    m_dialog->enableButtonOk(false);
+    m_dialog->setMinimumSize(m_dialog->sizeHint());
+    m_dialog->setMaximumSize(m_dialog->sizeHint());
+    if (m_dialog->exec()) {
+        cout << dialogWidget->pin->text().toLatin1().constData();
         flush(cout);
         qApp->exit(0);
         return;
     }
 
-    delete dialog;
+    delete m_dialog;
     qApp->exit(1);
 }
 
+void RequestPin::checkPin(const QString& pin)
+{
+    m_dialog->enableButtonOk(!pin.isEmpty());
+}
+
 void RequestPin::quit()
 {
     qApp->exit(1);
index 32c02b3..0b19ece 100644 (file)
@@ -23,6 +23,9 @@
 #define REQUESTPIN_H
 
 #include <QtCore/QObject>
+#include <QTimer>
+
+class KDialog;
 class KNotification;
 
 /**
@@ -57,8 +60,11 @@ private Q_SLOTS:
      * If the notification is ignored or closed, then we have to quit the helper
      */
     void quit();
+    void checkPin(const QString &pin);
 
 private:
+    QTimer m_timer;
+    KDialog *m_dialog;
     KNotification *m_notification;
 };
 #endif //REQUESTPIN_H
index 32da700..3e87d1b 100644 (file)
@@ -65,6 +65,7 @@ struct BlueDevilDaemon::Private
     QList <DeviceInfo>                m_discovered;
     QTimer                           m_timer;
     KComponentData                  m_componentData;
+    QHash<QString, bool>            m_adapterPoweredHash;
 };
 
 BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList<QVariant>&)
@@ -106,12 +107,20 @@ BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList<QVariant>&)
     connect(Manager::self(), SIGNAL(usableAdapterChanged(Adapter*)),
             this, SLOT(usableAdapterChanged(Adapter*)));
 
-    connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(Device*)), this, SLOT(deviceFound(Device*)));
-    connect(&d->m_timer, SIGNAL(timeout()), Manager::self()->usableAdapter(), SLOT(stopDiscovery()));
+    // Catch suspend/resume events
+    QDBusConnection::systemBus().connect("org.freedesktop.login1",
+                                         "/org/freedesktop/login1",
+                                         "org.freedesktop.login1.Manager",
+                                         "PrepareForSleep",
+                                         this,
+                                         SLOT(login1PrepareForSleep(bool))
+                                         );
 
     d->m_status = Private::Offline;
-    if (Manager::self()->usableAdapter()) {
-        onlineMode();
+    usableAdapterChanged(Manager::self()->usableAdapter());
+
+    if (!Manager::self()->adapters().isEmpty()) {
+        executeMonolithic();
     }
 }
 
@@ -124,6 +133,40 @@ BlueDevilDaemon::~BlueDevilDaemon()
     delete d;
 }
 
+static Adapter *adapterForAddress(const QString &address)
+{
+    Q_FOREACH (Adapter *adapter, Manager::self()->adapters()) {
+        if (adapter->address() == address) {
+            return adapter;
+        }
+    }
+    return 0;
+}
+
+void BlueDevilDaemon::login1PrepareForSleep(bool active)
+{
+    if (active) {
+        kDebug(dblue()) << "About to suspend";
+        d->m_adapterPoweredHash.clear();
+        Q_FOREACH (Adapter *adapter, Manager::self()->adapters()) {
+            kDebug(dblue()) << "Saving" << adapter->address() << adapter->isPowered();
+            d->m_adapterPoweredHash.insert(adapter->address(), adapter->isPowered());
+        }
+    } else {
+        kDebug(dblue()) << "About to resume";
+        QHashIterator<QString, bool> it(d->m_adapterPoweredHash);
+        while (it.hasNext()) {
+            it.next();
+            Adapter *adapter = adapterForAddress(it.key());
+            if (adapter) {
+                kDebug(dblue()) << "Restoring" << adapter->address() << it.value();
+                adapter->setPowered(it.value());
+            }
+        }
+        d->m_adapterPoweredHash.clear();
+    }
+}
+
 bool BlueDevilDaemon::isOnline()
 {
     if (d->m_status == Private::Offline) {
@@ -204,7 +247,8 @@ void BlueDevilDaemon::onlineMode()
     d->m_bluezAgent = new BluezAgent(new QObject());
     connect(d->m_bluezAgent, SIGNAL(agentReleased()), this, SLOT(agentReleased()));
 
-    d->m_adapter = Manager::self()->usableAdapter();
+    connect(d->m_adapter, SIGNAL(deviceFound(Device*)), this, SLOT(deviceFound(Device*)));
+    connect(&d->m_timer, SIGNAL(timeout()), d->m_adapter, SLOT(stopDiscovery()));
 
     FileReceiverSettings::self()->readConfig();
     if (!d->m_fileReceiver && FileReceiverSettings::self()->enabled()) {
@@ -270,7 +314,9 @@ void BlueDevilDaemon::offlineMode()
         d->m_placesModel->removePlace(index);
     }
 
-    killMonolithic();
+    if (BlueDevil::Manager::self()->adapters().isEmpty()) {
+        killMonolithic();
+    }
     d->m_status = Private::Offline;
 }
 
@@ -327,4 +373,4 @@ DeviceInfo BlueDevilDaemon::deviceToInfo(Device *const device) const
     return info;
 }
 
-extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
\ No newline at end of file
+extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
index be52e9f..0e55997 100644 (file)
@@ -87,6 +87,8 @@ private Q_SLOTS:
      */
     void agentReleased();
 
+    void login1PrepareForSleep(bool active);
+
     void deviceFound(Device*);
     void monolithicQuit(QDBusPendingCallWatcher* watcher);
     void monolithicFinished(const QString &);
index 452c495..c3960c0 100644 (file)
@@ -32,7 +32,7 @@ target_link_libraries(kded_bluedevil
     ${KDE4_KDECORE_LIBS}
     ${KDE4_KDEUI_LIBS}
     ${KDE4_KFILE_LIBS}
-    bluedevil
+    ${LibBlueDevil_LIBRARIES}
 )
 
 install(TARGETS kded_bluedevil DESTINATION ${PLUGIN_INSTALL_DIR})
index f871a18..2b84e98 100644 (file)
@@ -9,22 +9,28 @@ X-KDE-Kded-load-on-demand=false
 X-KDE-Kded-phase=1
 
 Name=Bluetooth
+Name[bs]=Bluetooth
 Name[ca]=Bluetooth
 Name[ca@valencia]=Bluetooth
 Name[cs]=Bluetooth
 Name[da]=Bluetooth
 Name[de]=Bluetooth
 Name[el]=Bluetooth
+Name[en_GB]=Bluetooth
 Name[es]=Bluetooth
+Name[et]=Bluetooth
 Name[fi]=Bluetooth
 Name[fr]=Bluetooth
 Name[gl]=Bluetooth
 Name[hu]=Bluetooth
 Name[it]=Bluetooth
+Name[ja]=Bluetooth
 Name[kk]=Bluetooth
+Name[ko]=블루투스
 Name[lt]=Bluetooth
 Name[mr]=ब्लूटूथ
 Name[nb]=Blåtann
+Name[nds]=Bluetooth
 Name[nl]=Bluetooth
 Name[pa]=ਬਲਿਊਟੁੱਥ
 Name[pl]=Bluetooth
@@ -46,25 +52,30 @@ Name[x-test]=xxBluetoothxx
 Name[zh_TW]=藍牙
 
 Comment=Handles Bluetooth events
+Comment[bs]=Obrađuje Bluetooth događaje
 Comment[ca]=Gestiona els esdeveniments del Bluetooth
 Comment[ca@valencia]=Gestiona els esdeveniments del Bluetooth
 Comment[cs]=Ovládá události Bluetooth
 Comment[da]=Håndterer Bluetooth-hændelser
 Comment[de]=Verarbeitung von Bluetooth-Ereignissen
 Comment[el]=Χειρίζεται γεγονότα Bluetooth
+Comment[en_GB]=Handles Bluetooth events
 Comment[es]=Maneja eventos de Bluetooth
+Comment[et]=Bluetoothi sündmuste käitlemine
 Comment[fi]=Käsittelee Bluetooth-tapahtumia
 Comment[fr]=Gère les évènements Bluetooth
 Comment[gl]=Xestiona acontecementos de Bluetooth
 Comment[hu]=Kezeli a Bluetooth eseményeket
 Comment[it]=Gestisce eventi Bluetooth
 Comment[kk]=Bluetooth оқиғаларын өңдеу
+Comment[ko]=블루투스 이벤트 처리
 Comment[lt]=Valdo Bluetooth įvykius
 Comment[mr]=ब्लूटूथ घटना हाताळतो
 Comment[nb]=Håndterer Blåtann-hendelser
+Comment[nds]=Verarbeidt Bluetooth-Begeefnissen
 Comment[nl]=Behandelt bluetooth-gebeurtenissen
 Comment[pa]=ਬਲਿਊਟੁੱਥ ਘਟਨਾਵਾਂ ਕੰਟਰੋਲ ਕਰਨ ਲਈ
-Comment[pl]=Obsługuje zdarzenia Bluetooth
+Comment[pl]=Obsługa zdarzeń Bluetooth
 Comment[pt]=Lida com os eventos de Bluetooth
 Comment[pt_BR]=Lida com os eventos de Bluetooth
 Comment[ro]=Manipulează evenimente Bluetooth
index 4b60437..d19375d 100644 (file)
@@ -39,7 +39,7 @@ BluezAgent::BluezAgent(QObject *parent)
         return;
     }
 
-    BlueDevil::Manager::self()->registerAgent(AGENT_PATH,BlueDevil::Manager::DisplayYesNo);
+    BlueDevil::Manager::self()->registerAgent(AGENT_PATH, BlueDevil::Manager::DisplayYesNo);
     BlueDevil::Manager::self()->requestDefaultAgent(AGENT_PATH);
 
     m_process = new QProcess(this);
@@ -99,6 +99,8 @@ quint32 BluezAgent::RequestPasskey(const QDBusObjectPath &device, const QDBusMes
     m_msg.setDelayedReply(true);
 
     QStringList list(deviceName(device.path()));
+    list << QLatin1String("numeric");
+
     connect(m_process, SIGNAL(finished(int)), this, SLOT(processClosedPasskey(int)));
     m_process->start(KStandardDirs::findExe("bluedevil-requestpin"), list);
 
index 67db6aa..67d7e84 100644 (file)
 #include "filereceiver.h"
 #include "../BlueDevilDaemon.h"
 #include "obexagent.h"
-#include "obex_agent_manager.h"
 
 #include <QDBusConnection>
 #include <QDBusPendingCall>
 #include <QDBusPendingCallWatcher>
+#include <QDBusServiceWatcher>
 
 #include <KDebug>
 
-FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent) : QObject(parent)
+FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent)
+    : QObject(parent)
+    , m_agentManager(0)
 {
     kDebug(dblue());
     qDBusRegisterMetaType<QVariantMap>();
 
     new ObexAgent(componentData, this);
-    org::bluez::obex::AgentManager1 *agent = new org::bluez::obex::AgentManager1("org.bluez.obex", "/org/bluez/obex", QDBusConnection::sessionBus(), this);
+    m_agentManager = new org::bluez::obex::AgentManager1("org.bluez.obex", "/org/bluez/obex", QDBusConnection::sessionBus(), this);
+    registerAgent();
 
-    QDBusPendingReply <void > r = agent->RegisterAgent(QDBusObjectPath("/BlueDevil_receiveAgent"));
-    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(r, this);
-    connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(agentRegistered(QDBusPendingCallWatcher*)));
+    // obexd should be set to auto-start by D-Bus (D-Bus activation), so this should restart it in case of crash
+    QDBusServiceWatcher *serviceWatcher = new QDBusServiceWatcher("org.bluez.obex", QDBusConnection::sessionBus(),
+            QDBusServiceWatcher::WatchForUnregistration, this);
+    connect(serviceWatcher, SIGNAL(serviceUnregistered(QString)), this, SLOT(registerAgent()));
 }
 
 FileReceiver::~FileReceiver()
@@ -45,6 +49,13 @@ FileReceiver::~FileReceiver()
 
 }
 
+void FileReceiver::registerAgent()
+{
+    QDBusPendingReply <void > r = m_agentManager->RegisterAgent(QDBusObjectPath("/BlueDevil_receiveAgent"));
+    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(r, this);
+    connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(agentRegistered(QDBusPendingCallWatcher*)));
+}
+
 void FileReceiver::agentRegistered(QDBusPendingCallWatcher* call)
 {
     QDBusPendingReply <void > r = *call;
@@ -54,4 +65,4 @@ void FileReceiver::agentRegistered(QDBusPendingCallWatcher* call)
     }
 
     call->deleteLater();
-}
\ No newline at end of file
+}
index 9ac6b6f..c821d7a 100644 (file)
@@ -22,6 +22,8 @@
 #include <QObject>
 #include <KComponentData>
 
+#include "obex_agent_manager.h"
+
 class QDBusPendingCallWatcher;
 class FileReceiver : public QObject
 {
@@ -31,7 +33,11 @@ class FileReceiver : public QObject
         virtual ~FileReceiver();
 
     private Q_SLOTS:
+        void registerAgent();
         void agentRegistered(QDBusPendingCallWatcher* call);
+
+    private:
+        org::bluez::obex::AgentManager1 *m_agentManager;
 };
 
-#endif //FILE_RECEIVER_H
\ No newline at end of file
+#endif //FILE_RECEIVER_H
index 8cc0022..daf6c57 100644 (file)
@@ -143,6 +143,7 @@ void ReceiveFileJob::slotAccept()
     KIO::getJobTracker()->registerJob(this);
     KGlobal::setActiveComponent(data);
 
+    m_originalFileName = m_transfer->name();
     m_tempPath = createTempPath(m_transfer->name());
     kDebug(dblue()) << m_tempPath;
     QDBusMessage msg = m_msg.createReply(m_tempPath);
@@ -189,7 +190,7 @@ void ReceiveFileJob::statusChanged(const QVariant& value)
 
     FileReceiverSettings::self()->readConfig();
     KUrl savePath = FileReceiverSettings::self()->saveUrl();
-    savePath.setFileName(m_transfer->name());
+    savePath.addPath(m_originalFileName);
 
     if (status == QLatin1String("active")) {
         emit description(this, i18n("Receiving file over Bluetooth"),
@@ -252,7 +253,7 @@ void ReceiveFileJob::moveFinished(KJob* job)
 
 QString ReceiveFileJob::createTempPath(const QString &fileName) const
 {
-    QString xdgCacheHome = QLatin1String(qgetenv("XDG_CACHE_HOME"));
+    QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME"));
     if (xdgCacheHome.isEmpty()) {
             xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
     }
@@ -267,4 +268,4 @@ QString ReceiveFileJob::createTempPath(const QString &fileName) const
     }
 
     return path;
-}
\ No newline at end of file
+}
index 655be8d..675d45c 100644 (file)
@@ -58,6 +58,7 @@ class ReceiveFileJob : public KJob
         qulonglong m_speedBytes;
         QString m_path;
         QString m_tempPath;
+        QString m_originalFileName;
         QString m_deviceName;
         QDBusMessage m_msg;
         KComponentData m_componentData;
index bdcafac..27fce33 100644 (file)
@@ -1,4 +1,4 @@
 kde4_add_plugin(bluetoothfiletiemaction sendfileitemaction.cpp)
-target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} bluedevil)
+target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} ${LibBlueDevil_LIBRARIES})
 install(TARGETS bluetoothfiletiemaction DESTINATION ${PLUGIN_INSTALL_DIR})
 install(FILES bluedevilsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR})
\ No newline at end of file
index ac4eb70..72cf807 100644 (file)
@@ -9,6 +9,7 @@ Name[cs]=Poslat soubor přes Bluetooth
 Name[da]=Send fil via Bluetooth
 Name[de]=Datei über Bluetooth versenden
 Name[el]=Αποστολή αρχείου μέσω Bluetooth
+Name[en_GB]=Send file via Bluetooth
 Name[es]=Enviar archivo por Bluetooth
 Name[et]=Faili saatmine Bluetoothi kaudu
 Name[fi]=Lähetä tiedosto Bluetoothin kautta
@@ -16,8 +17,10 @@ Name[fr]=Envoi de fichiers via Bluetooth
 Name[gl]=Enviar o ficheiro por Bluetooth
 Name[hu]=Fájl küldése Bluetoothon
 Name[it]=Invia file via Bluetooth
+Name[ja]=Bluetooth を通してファイルを送信
 Name[kk]=Bluetooth арқылы файлды жіберу
 Name[km]=ផ្ញើ​ឯកសារ​តាម​ប៊្លូធូស
+Name[ko]=블루투스로 파일 보내기
 Name[lt]=Siųsti per Bluetooth
 Name[mr]=ब्लूटूथ द्वारे फाईल पाठवा
 Name[nb]=Send fil over Blåtann
@@ -51,6 +54,7 @@ X-KDE-Submenu[cs]=Bluetooth
 X-KDE-Submenu[da]=Bluetooth
 X-KDE-Submenu[de]=Bluetooth
 X-KDE-Submenu[el]=Bluetooth
+X-KDE-Submenu[en_GB]=Bluetooth
 X-KDE-Submenu[es]=Bluetooth
 X-KDE-Submenu[et]=Bluetooth
 X-KDE-Submenu[fi]=Bluetooth
@@ -58,8 +62,10 @@ X-KDE-Submenu[fr]=Bluetooth
 X-KDE-Submenu[gl]=Bluetooth
 X-KDE-Submenu[hu]=Bluetooth
 X-KDE-Submenu[it]=Bluetooth
+X-KDE-Submenu[ja]=Bluetooth
 X-KDE-Submenu[kk]=Bluetooth
 X-KDE-Submenu[km]=ប៊្លូធូស
+X-KDE-Submenu[ko]=블루투스
 X-KDE-Submenu[lt]=Bluetooth
 X-KDE-Submenu[mr]=ब्लूटूथ
 X-KDE-Submenu[nb]=Blåtann
index 9c6f8ff..6888a52 100644 (file)
@@ -4,12 +4,9 @@ set(kcm_bluedeviltransfer_PART_SRCS
     bluedeviltransfer.cpp
     systemcheck.cpp
     kded.cpp
-    columnresizer.cpp
-    sharedfilesdialog/sharedfilesdialog.cpp
-    sharedfilesdialog/linkproxymodel.cpp
 )
 
-kde4_add_ui_files(kcm_bluedeviltransfer_PART_SRCS_UI transfer.ui sharedfilesdialog/sharedfiles.ui)
+kde4_add_ui_files(kcm_bluedeviltransfer_PART_SRCS_UI transfer.ui)
 
 kde4_add_kcfg_files(kcm_bluedeviltransfer_PART_SRCS
                     ../settings/filereceiversettings.kcfgc
@@ -31,9 +28,9 @@ qt4_automoc(${kcm_bluedevildevices}
             ${kcm_bluedeviladapters}
             ${kcm_bluedeviltransfer})
 
-target_link_libraries(kcm_bluedevildevices ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
-target_link_libraries(kcm_bluedeviladapters ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
-target_link_libraries(kcm_bluedeviltransfer ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} bluedevil)
+target_link_libraries(kcm_bluedevildevices ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
+target_link_libraries(kcm_bluedeviladapters ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
+target_link_libraries(kcm_bluedeviltransfer ${KDE4_KIO_LIBS} ${QT_QTGUI_LIBRARY} ${LibBlueDevil_LIBRARIES})
 
 install(TARGETS kcm_bluedevildevices
                 kcm_bluedeviladapters
index ec2fff9..600b1ee 100644 (file)
@@ -61,8 +61,8 @@ AdapterSettings::AdapterSettings(Adapter *adapter, KCModule *parent)
     buttonGroup->addButton(m_alwaysVisible);
     buttonGroup->addButton(m_temporaryVisible);
 
-    m_name->setText(adapter->name());
-    m_nameOrig = adapter->name();
+    m_name->setText(adapter->alias());
+    m_nameOrig = adapter->alias();
     m_hiddenOrig = false;
     m_alwaysVisibleOrig = false;
     m_temporaryVisibleOrig = false;
@@ -118,9 +118,9 @@ AdapterSettings::AdapterSettings(Adapter *adapter, KCModule *parent)
     connect(m_powered, SIGNAL(stateChanged(int)), this, SLOT(slotSettingsChanged()));
 
     if (BlueDevil::Manager::self()->usableAdapter() == adapter) {
-        setTitle(i18n("Default adapter: %1 (%2)", adapter->name(), adapter->address()));
+        setTitle(i18n("Default adapter: %1 (%2)", adapter->alias(), adapter->address()));
     } else {
-        setTitle(i18n("Adapter: %1 (%2)", adapter->name(), adapter->address()));
+        setTitle(i18n("Adapter: %1 (%2)", adapter->alias(), adapter->address()));
     }
 }
 
@@ -135,13 +135,13 @@ bool AdapterSettings::isModified() const
            m_temporaryVisible->isChecked() != m_temporaryVisibleOrig ||
            m_discoverTime->value() != m_discoverTimeOrig || m_powered->isChecked() != m_poweredOrig;
 }
-
+#include <QDebug>
 void AdapterSettings::applyChanges()
 {
-     /* TODO: Find new way to set adapter name in bluez5
-        if (m_name->text() != m_nameOrig) {
-         m_adapter->setName(m_name->text());
-     } */
+    if (m_name->text() != m_nameOrig) {
+        qDebug() << "Setting alias";
+         m_adapter->setAlias(m_name->text());
+     }
 
     if (m_hidden->isChecked()) {
         m_adapter->setDiscoverable(false);
@@ -188,7 +188,7 @@ void AdapterSettings::readChanges()
 {
     blockSignals(true);
 
-    m_nameOrig = m_adapter->name();
+    m_nameOrig = m_adapter->alias();
     m_hiddenOrig = !m_adapter->isDiscoverable();
     m_alwaysVisibleOrig = m_adapter->isDiscoverable() && !m_adapter->discoverableTimeout();
     m_temporaryVisibleOrig = m_adapter->isDiscoverable() && m_adapter->discoverableTimeout();
@@ -204,9 +204,9 @@ void AdapterSettings::readChanges()
 
     m_discoverTimeLabel->setText(i18np("1 minute", "%1 minutes", m_discoverTime->value()));
     if (BlueDevil::Manager::self()->usableAdapter() == m_adapter) {
-        setTitle(i18n("Default adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+        setTitle(i18n("Default adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
     } else {
-        setTitle(i18n("Adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+        setTitle(i18n("Adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
     }
 
     blockSignals(false);
index 700a481..edb3628 100644 (file)
@@ -28,12 +28,14 @@ Name[fr]=Adaptateurs
 Name[gl]=Adaptadores
 Name[hu]=Adapterek
 Name[it]=Adattatori
+Name[ja]=アダプタ
 Name[kk]=Адаптерлері
 Name[km]=អាដាប់ទ័រ
+Name[ko]=어댑터
 Name[lt]=Adapteriai
 Name[mr]=एडाप्टर्स
 Name[nb]=Adaptere
-Name[nds]=Koorten
+Name[nds]=Adaptern
 Name[nl]=Adapters
 Name[pa]=ਐਡਪਟਰ
 Name[pl]=Adaptery
@@ -57,25 +59,30 @@ Name[zh_CN]=适配器
 Name[zh_TW]=轉接器
 
 Comment=Configure Bluetooth adapters
+Comment[bs]=Konfigurisanje Blutut adaptera
 Comment[ca]=Configura els adaptadors Bluetooth
 Comment[ca@valencia]=Configura els adaptadors Bluetooth
 Comment[cs]=Nastavte adaptéry Bluetooth
 Comment[da]=Indstil Bluetooth-adaptere
 Comment[de]=Bluetooth-Adapter einrichten
 Comment[el]=Διαμόρφωση προσαρμογέων Bluetooth
+Comment[en_GB]=Configure Bluetooth adapters
 Comment[es]=Configurar adaptadores Bluetooth
+Comment[et]=Bluetoothi adapterite seadistamine
 Comment[fi]=Bluetooth-sovittimien asetukset
 Comment[fr]=Configure les adaptateurs Bluetooth
 Comment[gl]=Configurar os adaptadores de Bluetooth
 Comment[hu]=Bluetooth adapterek beállítása
 Comment[it]=Configura gli adattatori Bluetooth
 Comment[kk]=Bluetooth адаптерлерін баптау
+Comment[ko]=블루투스 어댑터 설정
 Comment[lt]=Konfigūruoti prieinamus Bluetooth adapterius
 Comment[mr]=ब्लूटूथ एडाप्टर्स संयोजीत करा
 Comment[nb]=Sett opp Blåtann-adaptere
+Comment[nds]=Bluetooth-Adaptern instellen
 Comment[nl]=Bluetooth-adapters instellen
 Comment[pa]=ਬਲਿਊਟੁੱਥ ਐਡਪਟਰ ਸੰਰਚਨਾ
-Comment[pl]=Konfiguruj adaptery Bluetooth
+Comment[pl]=Ustawienia adapterów Bluetooth
 Comment[pt]=Configurar os adaptadores de Bluetooth
 Comment[pt_BR]=Configura os adaptadores Bluetooth
 Comment[ro]=Configurează adaptoare Bluetooth
@@ -101,6 +108,7 @@ X-KDE-Keywords[cs]=Síť,Konektivita,Bluetooth
 X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
 X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
 X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
 X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
 X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
@@ -110,6 +118,7 @@ X-KDE-Keywords[hu]=Hálózat,Kapcsolódás,Bluetooth
 X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
 X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[km]=បណ្ដាញ ការ​តភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
 X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
 X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
 X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
@@ -118,7 +127,7 @@ X-KDE-Keywords[nl]=Netwerkverbinding,connectiviteit,bluetooth
 X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
 X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
 X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
 X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
 X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
 X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
index 2eecf4c..e2e2282 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <QtCore/QAbstractItemModel>
 
+#include <QtGui/QFontMetrics>
 #include <QtGui/QLabel>
 #include <QtGui/QPainter>
 #include <QtGui/QCheckBox>
@@ -215,6 +216,7 @@ public:
     QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
 
 private:
+    const int smallIconSize;
     QPixmap m_blockedPixmap;
     QPixmap m_trustedPixmap;
     QPixmap m_untrustedPixmap;
@@ -223,18 +225,19 @@ private:
 };
 
 BluetoothDevicesDelegate::BluetoothDevicesDelegate(QObject *parent)
-    : QStyledItemDelegate(parent)
+    : QStyledItemDelegate(parent),
+      smallIconSize(IconSize(KIconLoader::Toolbar))
 {
     KIcon blockedIcon("dialog-cancel");
-    m_blockedPixmap = blockedIcon.pixmap(22, 22);
+    m_blockedPixmap = blockedIcon.pixmap(smallIconSize, smallIconSize);
     KIcon trustedIcon("security-high");
-    m_trustedPixmap = trustedIcon.pixmap(22, 22);
+    m_trustedPixmap = trustedIcon.pixmap(smallIconSize, smallIconSize);
     KIcon untrustedIcon("security-low");
-    m_untrustedPixmap = untrustedIcon.pixmap(22, 22);
+    m_untrustedPixmap = untrustedIcon.pixmap(smallIconSize, smallIconSize);
     KIcon connectedIcon("user-online");
-    m_connectedPixmap = connectedIcon.pixmap(22, 22);
+    m_connectedPixmap = connectedIcon.pixmap(smallIconSize, smallIconSize);
     KIcon disconnectedIcon("user-offline");
-    m_disconnectedPixmap = disconnectedIcon.pixmap(22, 22);
+    m_disconnectedPixmap = disconnectedIcon.pixmap(smallIconSize, smallIconSize);
 }
 
 BluetoothDevicesDelegate::~BluetoothDevicesDelegate()
@@ -251,17 +254,18 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt
         painter->setPen(option.palette.highlightedText().color());
     }
 
+    QRect r = option.rect;
+
 // Draw icon
     const QModelIndex iconIndex = index.model()->index(index.row(), 0);
     const QPixmap icon = iconIndex.data(BluetoothDevicesModel::IconModelRole).value<QPixmap>();
-    painter->drawPixmap(option.rect.left() + 5, option.rect.top() + 5, icon);
+    painter->drawPixmap(r.left() + 5, r.top() + (r.height() - icon.height()) / 2, icon);
 
 // Draw alias and device type
     const QModelIndex idx = index.model()->index(index.row(), 0);
-    QRect r = option.rect;
-    r.setTop(r.top() + 10);
-    r.setBottom(r.bottom() - 10);
-    r.setLeft(r.left() + KIconLoader::SizeLarge + 10);
+    r.setTop(r.top() + smallIconSize / 2);
+    r.setBottom(r.bottom() - smallIconSize / 2);
+    r.setLeft(r.left() + IconSize(KIconLoader::Dialog) * 1.8);
     QFont f = kapp->font();
     f.setBold(true);
     painter->save();
@@ -280,9 +284,9 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt
     Device *const device = static_cast<Device*>(index.data(BluetoothDevicesModel::DeviceModelRole).value<void*>());
 
     r = option.rect;
-    r.setTop(r.top() + r.height() / 2 - 11);
-    r.setLeft(r.right() - 5 - 22);
-    r.setSize(QSize(22, 22));
+    r.setTop(r.top() + r.height() / 2 - smallIconSize / 2);
+    r.setLeft(r.right() - 5 - smallIconSize);
+    r.setSize(QSize(smallIconSize, smallIconSize));
 
     if (!device->isBlocked()) {
         if (device->isConnected()) {
@@ -291,8 +295,8 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt
             painter->drawPixmap(r, m_disconnectedPixmap);
         }
 
-        r.setLeft(r.right() - 5 - 22 - 22);
-        r.setSize(QSize(22, 22));
+        r.setLeft(r.right() - 5 - smallIconSize * 2);
+        r.setSize(QSize(smallIconSize, smallIconSize));
 
         if (device->isTrusted()) {
             painter->drawPixmap(r, m_trustedPixmap);
@@ -309,8 +313,9 @@ void BluetoothDevicesDelegate::paint(QPainter *painter, const QStyleOptionViewIt
 
 QSize BluetoothDevicesDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
 {
-    const QSize res = QStyledItemDelegate::sizeHint(option, index);
-    return QSize(res.width(), KIconLoader::SizeLarge + 10);
+    const int width = QStyledItemDelegate::sizeHint(option, index).width();
+    const int height = qMax( QFontMetrics(kapp->font()).height() * 2 + QFontMetrics(kapp->font()).xHeight(), (int)(IconSize(KIconLoader::Dialog) * 1.5)) + 10;
+    return QSize(width, height);
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -543,7 +548,11 @@ void KCMBlueDevilDevices::usableAdapterChanged(Adapter *adapter)
     if (adapter) {
         connect(adapter, SIGNAL(discoverableChanged(bool)),
                 this, SLOT(adapterDiscoverableChanged()));
-        connect(adapter, SIGNAL(devicesChanged(QList<Device*>)),
+        connect(adapter, SIGNAL(deviceChanged(Device*)),
+                this, SLOT(adapterDevicesChanged()));
+        connect(adapter, SIGNAL(deviceRemoved(Device*)),
+                this, SLOT(adapterDevicesChanged()));
+        connect(adapter, SIGNAL(deviceFound(Device*)),
                 this, SLOT(adapterDevicesChanged()));
     }
     fillRemoteDevicesModelInformation();
@@ -607,10 +616,11 @@ void KCMBlueDevilDevices::fillRemoteDevicesModelInformation()
         m_devices->setViewport(viewport);
     }
     m_devicesModel->insertRows(0, deviceList.count());
+    const QSize iconSize = QSize(IconSize(KIconLoader::Dialog) * 1.5, IconSize(KIconLoader::Dialog) * 1.5);
     int i = 0;
     Q_FOREACH (Device *const device, deviceList) {
         QModelIndex index = m_devicesModel->index(i, 0);
-        m_devicesModel->setData(index, KIcon(device->icon()).pixmap(48, 48), BluetoothDevicesModel::IconModelRole);
+        m_devicesModel->setData(index, KIcon(device->icon()).pixmap(iconSize), BluetoothDevicesModel::IconModelRole);
         QString deviceType;
         const quint32 type = BlueDevil::classToType(device->deviceClass());
         switch (type) {
index 2ea1ede..bb9fe57 100644 (file)
@@ -30,8 +30,10 @@ Name[ga]=Gléasanna
 Name[gl]=Dispositivos
 Name[hu]=Eszközök
 Name[it]=Dispositivi
+Name[ja]=デバイス
 Name[kk]=Құрылғылар
 Name[km]=ឧបករណ៍​
+Name[ko]=장치
 Name[lt]=Įrenginiai
 Name[mai]=डिवाइस
 Name[mr]=साधने
@@ -61,22 +63,28 @@ Name[zh_CN]=设备
 Name[zh_TW]=裝置
 
 Comment=Manage Bluetooth devices
+Comment[bs]=Upravljanje Blutut uređaje
 Comment[ca]=Gestiona els dispositius Bluetooth
 Comment[ca@valencia]=Gestiona els dispositius Bluetooth
 Comment[cs]=Spravovat zařízení Bluetooth
 Comment[da]=Håndtér Bluetooth-enheder
 Comment[de]=Bluetooth-Geräte verwalten
 Comment[el]=Διαχείριση συσκευών Bluetooth
+Comment[en_GB]=Manage Bluetooth devices
 Comment[es]=Gestión de dispositivos Bluetooth
+Comment[et]=Bluetoothi seadmete haldamine
 Comment[fi]=Bluetooth-laitteiden asetukset
 Comment[fr]=Gère les périphériques Bluetooth
 Comment[gl]=Xestionar os dispositivos Bluetooth
 Comment[hu]=Bluetooth eszközök kezelése
 Comment[it]=Gestisci i dispositivi Bluetooth
+Comment[ja]=Bluetooth デバイスを管理
 Comment[kk]=Bluetooth құрылығыларын басқару
+Comment[ko]=블루투스 장치 관리
 Comment[lt]=Konfigūruoti Bluetooth failų gavimą
 Comment[mr]=ब्लूटूथ साधने व्यवस्थापीत करा
 Comment[nb]=Håndter Blåtann-enheter
+Comment[nds]=Bluetooth-Reedschappen plegen
 Comment[nl]=Bluetooth-apparaten beheren
 Comment[pa]=ਬਲਿਊਟੁੱਥ ਜੰਤਰ ਪਰਬੰਧ
 Comment[pl]=Zarządzaj urządzeniami Bluetooth
@@ -106,6 +114,7 @@ X-KDE-Keywords[cs]=Síť,Konektivita,Bluetooth
 X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
 X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
 X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
 X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
 X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
@@ -115,6 +124,7 @@ X-KDE-Keywords[hu]=Hálózat,Kapcsolódás,Bluetooth
 X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
 X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[km]=បណ្ដាញ ការ​តភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
 X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
 X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
 X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
@@ -123,7 +133,7 @@ X-KDE-Keywords[nl]=Netwerkverbinding,connectiviteit,bluetooth
 X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
 X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
 X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
 X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
 X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
 X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
index 1a4f4a6..7fef601 100644 (file)
 
 #include "bluedeviltransfer.h"
 #include "systemcheck.h"
-#include "columnresizer.h"
 #include "ui_transfer.h"
 #include "filereceiversettings.h"
 #include "bluedevil_service.h"
-#include "sharedfilesdialog/sharedfilesdialog.h"
 
 #include <QtCore/QTimer>
 
@@ -75,15 +73,8 @@ KCMBlueDevilTransfer::KCMBlueDevilTransfer(QWidget *parent, const QVariantList&)
     m_uiTransfer->kcfg_autoAccept->addItem(i18nc("'Auto accept' option value", "Trusted devices"), QVariant(1));
     m_uiTransfer->kcfg_autoAccept->addItem(i18nc("'Auto accept' option value", "All devices"), QVariant(2));
 
-    m_uiTransfer->kcfg_requirePin->addItem(i18nc("'Require PIN' option value", "Never"), QVariant(false));
-    m_uiTransfer->kcfg_requirePin->addItem(i18nc("'Require PIN' option value", "Always"), QVariant(true));
-
-    m_uiTransfer->kcfg_allowWrite->addItem(i18nc("'Permissions' option value", "Read Only"), QVariant(false));
-    m_uiTransfer->kcfg_allowWrite->addItem(i18nc("'Permissions' option value", "Modify and Read"), QVariant(true));
-
     addConfig(FileReceiverSettings::self(), transfer);
 
-    connect(m_uiTransfer->sharedFiles, SIGNAL(clicked(bool)), this, SLOT(showSharedFilesDialog()));
     connect(BlueDevil::Manager::self(), SIGNAL(usableAdapterChanged(Adapter*)),
             this, SLOT(usableAdapterChanged(Adapter*)));
 
@@ -95,10 +86,6 @@ KCMBlueDevilTransfer::KCMBlueDevilTransfer(QWidget *parent, const QVariantList&)
 
 
     updateInformationState();
-
-    ColumnResizer *resizer = new ColumnResizer(this);
-    resizer->addWidgetsFromFormLayout(m_uiTransfer->formLayout, QFormLayout::LabelRole);
-    resizer->addWidgetsFromFormLayout(m_uiTransfer->formLayout_2, QFormLayout::LabelRole);
 }
 
 KCMBlueDevilTransfer::~KCMBlueDevilTransfer()
@@ -143,12 +130,6 @@ void KCMBlueDevilTransfer::updateInformationState()
     m_systemCheck->updateInformationState();
 }
 
-void KCMBlueDevilTransfer::showSharedFilesDialog()
-{
-    SharedFilesDialog *d = new SharedFilesDialog();
-    d->exec();
-}
-
 void KCMBlueDevilTransfer::changed(bool changed)
 {
     m_restartNeeded = changed;
index d835c96..6559ad6 100644 (file)
@@ -20,6 +20,7 @@ Name[cs]=Přenosy souborů
 Name[da]=Filoverførsler
 Name[de]=Dateiübertragungen
 Name[el]=Μεταφορές αρχείων
+Name[en_GB]=File Transfers
 Name[es]=Transferencias de archivo
 Name[et]=Failiedastused
 Name[fi]=Tiedostonsiirto
@@ -29,13 +30,14 @@ Name[hu]=Fájlátvitelek
 Name[it]=Trasferimenti di file
 Name[kk]=Файл тасымалдаулары
 Name[km]=ផ្ទេរ​ឯកសារ​​
+Name[ko]=파일 전송
 Name[lt]=Failų perdavimai
 Name[mr]=फाईल देवाणघेवाण
 Name[nb]=Filoverføringer
 Name[nds]=Dateiöverdregen
 Name[nl]=Bestandsoverdrachten
 Name[pa]=ਫਾਇਲ ਟਰਾਂਸਫਰ
-Name[pl]=Przesyłania plików
+Name[pl]=Przesyłanie plików
 Name[pt]=Transferência de Ficheiros
 Name[pt_BR]=Transferência de arquivos
 Name[ro]=Transferuri de fișiere
@@ -55,27 +57,32 @@ Name[zh_CN]=文件传送
 Name[zh_TW]=檔案傳輸
 
 Comment=Configure Bluetooth file sharing and transfers
+Comment[bs]=Konfiguriranje Blutut dijeljenje datoteka i prijenos
 Comment[ca]=Configura la compartició i transferència de fitxers per Bluetooth
 Comment[ca@valencia]=Configura la compartició i transferència de fitxers per Bluetooth
 Comment[cs]=Nastavte sdílení souborů přes Bluetooth
 Comment[da]=Indstil fildeling og -overførsler via Bluetooth
 Comment[de]=Dateifreigaben und Dateiübertragung für Bluetooth einrichten
 Comment[el]=Διαμόρφωση διαμοιρασμού και μεταφοράς αρχείων με Bluetooth
+Comment[en_GB]=Configure Bluetooth file sharing and transfers
 Comment[es]=Configurar compartición y transferencias de archivos por Bluetooth
+Comment[et]=Bluetoothi failide jagamise ja edastamine seadistamine
 Comment[fi]=Bluetooth-tiedostonjaon ja -siirron asetukset
 Comment[fr]=Configure le partage et les transferts de fichiers par Bluetooth
 Comment[gl]=Configurar a compartición e a transferencia de ficheiros por Bluetooth
 Comment[hu]=Bluetooth fájlmegosztás és átvitelek beállítása
 Comment[it]=Configura la condivisione e il trasferimento di file via Bluetooth
 Comment[kk]=Bluetooth файл ортақтастыру және тасымалдауды баптау
+Comment[ko]=블루투스 파일 공유 및 전송 설정
 Comment[lt]=Konfigūruoti Bluetooth failų gavimą
 Comment[mr]=ब्लूटूथ फाईल शेअर करणे व बदली संयोजीत करा
 Comment[nb]=Sett opp deling og overføring av filer over Blåtann
+Comment[nds]=Bluetooth - Överdregen un Delen vun Dateien instellen
 Comment[nl]=Bestandsdeling en -overdracht via bluetooth instellen
 Comment[pa]=ਬਲਿਊਟੁੱਥ ਫਾਇਲ ਸਾਂਝ ਤੇ ਟਰਾਂਸਫਰ ਸੰਰਚਨਾ
-Comment[pl]=Konfiguruj udostępnianie i przesyłanie plików przez Bluetooth
+Comment[pl]=Ustawienia udostępniania i przesyłanie plików przez Bluetooth
 Comment[pt]=Configura a partilha e as transferências de ficheiros por Bluetooth
-Comment[pt_BR]=Configura o compartilhamento e as transferências de arquivos por Bluetooth
+Comment[pt_BR]=Configura o compartilhamento e a transferência de arquivos por Bluetooth
 Comment[ro]=Configurează partajarea și transferul de fișiere Bluetooth
 Comment[ru]=Настройка доступа и передачи файлов через Bluetooth
 Comment[sk]=Nastaviť zdieľanie súborov a prenosy Bluetooth
@@ -100,6 +107,7 @@ X-KDE-Keywords[cs]=Síť,Konektivita,Bluetooth
 X-KDE-Keywords[da]=Netværk,forbindelse,Bluetooth
 X-KDE-Keywords[de]=Netzwerk,Verbindungen,Bluetooth
 X-KDE-Keywords[el]=Δίκτυο,Συνδεσιμότητα,Bluetooth
+X-KDE-Keywords[en_GB]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[es]=Red,Conectividad,Bluetooth
 X-KDE-Keywords[et]=Võrk,Ühenduvus,Bluetooth
 X-KDE-Keywords[fi]=Verkko,Yhteydet,Bluetooth
@@ -109,6 +117,7 @@ X-KDE-Keywords[hu]=Hálózat,Kapcsolódás,Bluetooth
 X-KDE-Keywords[it]=Rete,Connettività,Bluetooth
 X-KDE-Keywords[kk]=Network,Connectivity,Bluetooth
 X-KDE-Keywords[km]=បណ្ដាញ ការ​តភ្ជាប់ ប៊្លូធូស
+X-KDE-Keywords[ko]=Network,Connectivity,Bluetooth,네트워크,연결,블루투스
 X-KDE-Keywords[lt]=Tinklas,Junglumas,Bluetooth
 X-KDE-Keywords[mr]=संजाळ,जुळवणी,ब्लूटूथ
 X-KDE-Keywords[nb]=Nettverk,sammenkobling,blåtann
@@ -117,7 +126,7 @@ X-KDE-Keywords[nl]=Netwerkverbinding,connectiviteit,bluetooth
 X-KDE-Keywords[pa]=ਨੈੱਟਵਰਕ,ਕੁਨੈਕਟਵਿਟੀ,ਬਲਿਊਟੁੱਥ
 X-KDE-Keywords[pl]=Sieć,Łączność,Bluetooth
 X-KDE-Keywords[pt]=Rede,Conectividade,Bluetooth
-X-KDE-Keywords[pt_BR]=rede,conectividade,bluetooth
+X-KDE-Keywords[pt_BR]=Rede,Conectividade,Bluetooth
 X-KDE-Keywords[ro]=Rețea,Conectivitate,Bluetooth
 X-KDE-Keywords[ru]=Сеть,Соединение,Bluetooth
 X-KDE-Keywords[sk]=Sieť,Konektivita,Bluetooth
index 87f205a..1723996 100644 (file)
@@ -47,7 +47,6 @@ private Q_SLOTS:
     void usableAdapterChanged(Adapter *adapter);
     void adapterDiscoverableChanged();
     void updateInformationState();
-    void showSharedFilesDialog();
     void changed(bool);
 
 private:
diff --git a/bluedevil/src/kcmodule/columnresizer.cpp b/bluedevil/src/kcmodule/columnresizer.cpp
deleted file mode 100644 (file)
index 1a74f72..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright 2011 Aurélien Gâteau <agateau@kde.org>
- * License: LGPL v2.1 or later (see COPYING)
- */
-#include <columnresizer.h>
-
-#include <QDebug>
-#include <QEvent>
-#include <QFormLayout>
-#include <QGridLayout>
-#include <QTimer>
-#include <QWidget>
-
-class FormLayoutWidgetItem : public QWidgetItem
-{
-public:
-    FormLayoutWidgetItem(QWidget* widget, QFormLayout* formLayout, QFormLayout::ItemRole itemRole)
-    : QWidgetItem(widget)
-    , m_width(-1)
-    , m_formLayout(formLayout)
-    , m_itemRole(itemRole)
-    {}
-
-    QSize sizeHint() const
-    {
-        QSize size = QWidgetItem::sizeHint();
-        if (m_width != -1) {
-            size.setWidth(m_width);
-        }
-        return size;
-    }
-
-    QSize minimumSize() const
-    {
-        QSize size = QWidgetItem::minimumSize();
-        if (m_width != -1) {
-            size.setWidth(m_width);
-        }
-        return size;
-    }
-
-    QSize maximumSize() const
-    {
-        QSize size = QWidgetItem::maximumSize();
-        if (m_width != -1) {
-            size.setWidth(m_width);
-        }
-        return size;
-    }
-
-    void setWidth(int width)
-    {
-        if (width != m_width) {
-            m_width = width;
-            invalidate();
-        }
-    }
-
-    void setGeometry(const QRect& _rect)
-    {
-        QRect rect = _rect;
-        int width = widget()->sizeHint().width();
-        if (m_itemRole == QFormLayout::LabelRole && m_formLayout->labelAlignment() & Qt::AlignRight) {
-            rect.setLeft(rect.right() - width);
-        }
-        QWidgetItem::setGeometry(rect);
-    }
-
-    QFormLayout* formLayout() const
-    {
-        return m_formLayout;
-    }
-
-private:
-    int m_width;
-    QFormLayout* m_formLayout;
-    QFormLayout::ItemRole m_itemRole;
-};
-
-typedef QPair<QGridLayout*, int> GridColumnInfo;
-
-class ColumnResizerPrivate
-{
-public:
-    ColumnResizerPrivate(ColumnResizer* q_ptr)
-    : q(q_ptr)
-    , m_updateTimer(new QTimer(q))
-    {
-        m_updateTimer->setSingleShot(true);
-        m_updateTimer->setInterval(0);
-        QObject::connect(m_updateTimer, SIGNAL(timeout()), q, SLOT(updateWidth()));
-    }
-
-    void scheduleWidthUpdate()
-    {
-        m_updateTimer->start();
-    }
-
-    ColumnResizer* q;
-    QTimer* m_updateTimer;
-    QList<QWidget*> m_widgets;
-    QList<FormLayoutWidgetItem*> m_wrWidgetItemList;
-    QList<GridColumnInfo> m_gridColumnInfoList;
-};
-
-ColumnResizer::ColumnResizer(QObject* parent)
-: QObject(parent)
-, d(new ColumnResizerPrivate(this))
-{}
-
-ColumnResizer::~ColumnResizer()
-{
-    delete d;
-}
-
-void ColumnResizer::addWidget(QWidget* widget)
-{
-    d->m_widgets.append(widget);
-    widget->installEventFilter(this);
-    d->scheduleWidthUpdate();
-}
-
-void ColumnResizer::updateWidth()
-{
-    int width = 0;
-    Q_FOREACH(QWidget* widget, d->m_widgets) {
-        width = qMax(widget->sizeHint().width(), width);
-    }
-    Q_FOREACH(FormLayoutWidgetItem* item, d->m_wrWidgetItemList) {
-        item->setWidth(width);
-        item->formLayout()->update();
-    }
-    Q_FOREACH(GridColumnInfo info, d->m_gridColumnInfoList) {
-        info.first->setColumnMinimumWidth(info.second, width);
-    }
-}
-
-bool ColumnResizer::eventFilter(QObject*, QEvent* event)
-{
-    if (event->type() == QEvent::Resize) {
-        d->scheduleWidthUpdate();
-    }
-    return false;
-}
-
-void ColumnResizer::addWidgetsFromLayout(QLayout* layout, int column)
-{
-    Q_ASSERT(column >= 0);
-    QGridLayout* gridLayout = qobject_cast<QGridLayout*>(layout);
-    QFormLayout* formLayout = qobject_cast<QFormLayout*>(layout);
-    if (gridLayout) {
-        addWidgetsFromGridLayout(gridLayout, column);
-    } else if (formLayout) {
-        if (column > QFormLayout::SpanningRole) {
-            qCritical() << "column should not be more than" << QFormLayout::SpanningRole << "for QFormLayout";
-            return;
-        }
-        QFormLayout::ItemRole role = static_cast<QFormLayout::ItemRole>(column);
-        addWidgetsFromFormLayout(formLayout, role);
-    } else {
-        qCritical() << "Don't know how to handle layout" << layout;
-    }
-}
-
-void ColumnResizer::addWidgetsFromGridLayout(QGridLayout* layout, int column)
-{
-    for (int row = 0; row < layout->rowCount(); ++row) {
-        QLayoutItem* item = layout->itemAtPosition(row, column);
-        if (!item) {
-            continue;
-        }
-        QWidget* widget = item->widget();
-        if (!widget) {
-            continue;
-        }
-        addWidget(widget);
-    }
-    d->m_gridColumnInfoList << GridColumnInfo(layout, column);
-}
-
-void ColumnResizer::addWidgetsFromFormLayout(QFormLayout* layout, QFormLayout::ItemRole role)
-{
-    for (int row = 0; row < layout->rowCount(); ++row) {
-        QLayoutItem* item = layout->itemAt(row, role);
-        if (!item) {
-            continue;
-        }
-        QWidget* widget = item->widget();
-        if (!widget) {
-            continue;
-        }
-        layout->removeItem(item);
-        delete item;
-        FormLayoutWidgetItem* newItem = new FormLayoutWidgetItem(widget, layout, role);
-        layout->setItem(row, role, newItem);
-        addWidget(widget);
-        d->m_wrWidgetItemList << newItem;
-    }
-}
-
-#include <columnresizer.moc>
-// vi: ts=4 sw=4 et
diff --git a/bluedevil/src/kcmodule/columnresizer.h b/bluedevil/src/kcmodule/columnresizer.h
deleted file mode 100644 (file)
index 929b0fa..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2011 Aurélien Gâteau <agateau@kde.org>
- * License: LGPL v2.1 or later (see COPYING)
- */
-#ifndef COLUMNRESIZER_H
-#define COLUMNRESIZER_H
-
-#include <QtGui/QFormLayout>
-
-#include <QtCore/QObject>
-#include <QtCore/QList>
-
-class QEvent;
-class QGridLayout;
-class QLayout;
-class QWidget;
-
-class ColumnResizerPrivate;
-class ColumnResizer : public QObject
-{
-    Q_OBJECT
-public:
-    ColumnResizer(QObject* parent = 0);
-    ~ColumnResizer();
-
-    void addWidget(QWidget* widget);
-    void addWidgetsFromLayout(QLayout*, int column);
-    void addWidgetsFromGridLayout(QGridLayout*, int column);
-    void addWidgetsFromFormLayout(QFormLayout*, QFormLayout::ItemRole role);
-
-private Q_SLOTS:
-    void updateWidth();
-
-protected:
-    bool eventFilter(QObject*, QEvent* event);
-
-private:
-    ColumnResizerPrivate* const d;
-};
-
-#endif /* COLUMNRESIZER_H */
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp b/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp
deleted file mode 100644 (file)
index 86db9d1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- *   Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com>               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
-
-#include "linkproxymodel.h"
-#include <QDebug>
-#include <QModelIndex>
-#include <QFileSystemModel>
-
-bool LinkProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
-{
-    QFileSystemModel *model = qobject_cast< QFileSystemModel *>(sourceModel());
-    QModelIndex in = model->index(source_row, source_parent.column(), source_parent);
-    const QString path = in.data(QFileSystemModel::FilePathRole).toString();
-
-    if (path == model->rootPath()) {
-        return true;
-    }
-
-    QFileInfo file(path);
-    return file.isSymLink();
-}
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h b/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h
deleted file mode 100644 (file)
index a178e6b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- *   Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com>               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
-
-#ifndef LINKPROXYMODEL_H
-#define LINKPROXYMODEL_H
-
-#include <QSortFilterProxyModel>
-
-class LinkProxyModel : public QSortFilterProxyModel
-{
-    virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
-};
-
-#endif // LINKPROXYMODEL_H
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui
deleted file mode 100644 (file)
index 0f62fe8..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>sharedFiles</class>
- <widget class="QWidget" name="sharedFiles">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QListView" name="listView"/>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <widget class="KPushButton" name="addBtn">
-       <property name="text">
-        <string/>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="KPushButton" name="removeBtn"/>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>KPushButton</class>
-   <extends>QPushButton</extends>
-   <header>kpushbutton.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp
deleted file mode 100644 (file)
index e97de27..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- *   Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com>               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
-
-#include "sharedfilesdialog.h"
-#include "ui_sharedfiles.h"
-#include "linkproxymodel.h"
-#include "filereceiversettings.h"
-
-#include <QDebug>
-#include <QFileSystemModel>
-#include <QDesktopServices>
-
-#include <KFileDialog>
-#include <kstandarddirs.h>
-
-SharedFilesDialog::SharedFilesDialog(QWidget* parent, Qt::WFlags flags): KDialog(parent, flags)
-{
-    QWidget *sharedFiles = new QWidget(this);
-    m_ui = new Ui::sharedFiles();
-    m_ui->setupUi(sharedFiles);
-    setMainWidget(sharedFiles);
-    m_ui->listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
-
-    QFileSystemModel *model = new QFileSystemModel();
-    QModelIndex in = model->setRootPath(FileReceiverSettings::self()->rootFolder().path());
-
-    LinkProxyModel *proxy = new LinkProxyModel();
-    proxy->setSourceModel(model);
-
-    m_ui->listView->setModel(proxy);
-    m_ui->listView->setRootIndex(proxy->mapFromSource(in));
-
-    m_ui->addBtn->setIcon(KIcon("list-add"));
-    m_ui->removeBtn->setIcon(KIcon("list-remove"));
-
-    connect(this, SIGNAL(finished(int)), this, SLOT(slotFinished(int)));
-    connect(m_ui->addBtn, SIGNAL(clicked(bool)), this, SLOT(addFiles()));
-    connect(m_ui->removeBtn, SIGNAL(clicked(bool)), this, SLOT(removeFiles()));
-}
-
-void SharedFilesDialog::slotFinished(int result)
-{
-    if (result == 1) {
-        return;
-    }
-
-    KUrl url;
-    QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
-    if (!m_added.isEmpty()) {
-        Q_FOREACH(const QString &filePath, m_added) {
-            url.setPath(filePath);
-            QFile::remove(baseDir + url.fileName());
-        }
-    }
-    if (!m_removed.isEmpty()) {
-        Q_FOREACH(const QString &filePath, m_removed) {
-            url.setPath(filePath);
-            QFile::link(filePath, baseDir + url.fileName());
-        }
-    }
-}
-
-void SharedFilesDialog::addFiles()
-{
-    KFileDialog *dialog = new KFileDialog(QDesktopServices::storageLocation(QDesktopServices::HomeLocation), "*", this);
-    dialog->setMode(KFile::Directory | KFile::Files | KFile::LocalOnly);
-    dialog->exec();
-
-    QFile fileExist;
-    KUrl url;
-    QString linkPath;
-    QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
-
-    QStringList files = dialog->selectedFiles();
-    Q_FOREACH(const QString &filePath, files) {
-        url.setPath(filePath);
-
-        linkPath = baseDir + url.fileName();
-        fileExist.setFileName(linkPath);
-        if (fileExist.exists()) {
-            continue;
-        }
-
-        QFile::link(filePath, linkPath);
-        if (m_removed.contains(filePath)) {
-            m_removed.removeOne(filePath);
-            continue;
-        }
-        if (!m_added.contains(filePath)) {
-            m_added.append(filePath);
-        }
-    }
-}
-
-void SharedFilesDialog::removeFiles()
-{
-    QItemSelectionModel *select = m_ui->listView->selectionModel();
-    QModelIndexList list = select->selectedIndexes();
-
-    QFile file;
-    QString linkPath;
-    Q_FOREACH(const QModelIndex &index, list) {
-        linkPath = index.data(QFileSystemModel::FilePathRole).toString();
-        file.setFileName(linkPath);
-        if (m_added.contains(file.symLinkTarget())) {
-            m_added.removeOne(file.symLinkTarget());
-            continue;
-        }
-        if (!m_removed.contains(file.symLinkTarget())) {
-            m_removed.append(file.symLinkTarget());
-        }
-
-        file.remove();
-    }
-}
\ No newline at end of file
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h
deleted file mode 100644 (file)
index f1c25b9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2010-2011 Alejandro Fiestas Olivares <afiestas@kde.org> *
- *   Copyright (C) 2010-2011 UFO Coders <info@ufocoders.com>               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
- ***************************************************************************/
-
-#ifndef SHAREDFILESDIALOG_H
-#define SHAREDFILESDIALOG_H
-
-#include <kdialog.h>
-
-class Ui_sharedFiles;
-class SharedFilesDialog : public KDialog
-{
-    Q_OBJECT
-public:
-    SharedFilesDialog(QWidget* parent = 0, Qt::WFlags flags = 0);
-
-private Q_SLOTS:
-    void slotFinished(int result);
-    void addFiles();
-    void removeFiles();
-
-private:
-    Ui_sharedFiles *m_ui;
-    QStringList m_removed;
-    QStringList m_added;
-};
-
-#endif // SHAREDFILESDIALOG_H
index 6c6cf74..3eb560c 100644 (file)
     </widget>
    </item>
    <item>
-    <widget class="QLabel" name="label_8">
-     <property name="text">
-      <string>&lt;b&gt;Sharing&lt;/b&gt;</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QWidget" name="gridWidget2" native="true">
-     <layout class="QFormLayout" name="formLayout_2">
-      <property name="fieldGrowthPolicy">
-       <enum>QFormLayout::ExpandingFieldsGrow</enum>
-      </property>
-      <item row="0" column="0">
-       <widget class="QLabel" name="label_4">
-        <property name="text">
-         <string>Share Files:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy">
-         <cstring>kcfg_shareEnabled</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QCheckBox" name="kcfg_shareEnabled">
-        <property name="text">
-         <string/>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="label_5">
-        <property name="text">
-         <string>Require PIN:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QComboBox" name="kcfg_requirePin"/>
-      </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="label_6">
-        <property name="text">
-         <string>Permissions:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="1">
-       <widget class="QComboBox" name="kcfg_allowWrite"/>
-      </item>
-      <item row="5" column="1">
-       <layout class="QHBoxLayout" name="horizontalLayout">
-        <item>
-         <spacer name="horizontalSpacer">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeType">
-           <enum>QSizePolicy::Fixed</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>300</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item>
-         <widget class="KPushButton" name="sharedFiles">
-          <property name="text">
-           <string>Shared Files</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <item row="4" column="1">
-       <widget class="KUrlRequester" name="kcfg_rootFolder">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>400</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="mode">
-         <set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
-        </property>
-       </widget>
-      </item>
-      <item row="4" column="0">
-       <widget class="QLabel" name="label_9">
-        <property name="text">
-         <string>Shared Folder:</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
    <extends>QFrame</extends>
    <header>kurlrequester.h</header>
   </customwidget>
-  <customwidget>
-   <class>KPushButton</class>
-   <extends>QPushButton</extends>
-   <header>kpushbutton.h</header>
-  </customwidget>
  </customwidgets>
  <resources/>
  <connections/>
index 85820bc..ef1f1e2 100644 (file)
@@ -11,7 +11,7 @@ target_link_libraries(kio_bluetooth
   ${KDE4_KDECORE_LIBS}
   ${KDE4_KIO_LIBRARY}
   ${KDE4_KDEUI_LIBS}
-  bluedevil
+  ${LibBlueDevil_LIBRARIES}
 )
 
 ########### install files ###############
index 4ac17a6..ee44688 100644 (file)
@@ -76,14 +76,14 @@ KioBluetooth::KioBluetooth(const QByteArray &pool, const QByteArray &app)
     s.uuid = "00001106-0000-1000-8000-00805F9B34FB";
     m_supportedServices.insert("00001106-0000-1000-8000-00805F9B34FB", s);
 
+    kDebug() << "Kio Bluetooth instanced!";
+    m_kded = new org::kde::BlueDevil("org.kde.kded", "/modules/bluedevil", QDBusConnection::sessionBus(), 0);
+
     if (!Manager::self()->usableAdapter()) {
         kDebug() << "No available interface";
         infoMessage(i18n("No Bluetooth adapters have been found."));
         return;
     }
-
-    kDebug() << "Kio Bluetooth instanced!";
-    m_kded = new org::kde::BlueDevil("org.kde.kded", "/modules/bluedevil", QDBusConnection::sessionBus(), 0);
 }
 
 QList<KioBluetooth::Service> KioBluetooth::getSupportedServices(const QStringList &uuids)
index e8111d3..a14b18d 100644 (file)
@@ -15,7 +15,7 @@ qt4_add_dbus_interface(kio_obexftp_SRCS ${FILE_TRANSFER_FILE} obexd_file_transfe
 
 set(obexftpfiletransfer_xml ${CMAKE_CURRENT_SOURCE_DIR}/obexftp/filetransfer.xml)
 
-set(SENDER_PLUGIN_PATH ../../sendfile/)
+set(SENDER_PLUGIN_PATH ${CMAKE_SOURCE_DIR}/src/sendfile/)
 qt4_add_dbus_interface(kio_obexftp_SRCS ${SENDER_PLUGIN_PATH}org.bluez.obex.Transfer1.xml obexd_transfer)
 
 kde4_add_plugin(kio_obexftp ${kio_obexftp_SRCS})
index 6280f52..00320a7 100644 (file)
@@ -3,7 +3,7 @@ set(kded_obexftp_SRCS
     createsessionjob.cpp
 )
 
-set(SENDER_PLUGIN_PATH ../../../sendfile/)
+set(SENDER_PLUGIN_PATH ${CMAKE_SOURCE_DIR}/src/sendfile/)
 qt4_add_dbus_interface(kded_obexftp_SRCS ${SENDER_PLUGIN_PATH}org.bluez.obex.Client1.xml obexd_client)
 
 set(OBJECT_MANAGER_FILE org.freedesktop.DBus.ObjectManager.xml)
@@ -18,7 +18,7 @@ target_link_libraries(kded_obexftpdaemon
     ${KDE4_KDECORE_LIBS}
     ${KDE4_KDEUI_LIBS}
     ${KDE4_KFILE_LIBS}
-    bluedevil
+    ${LibBlueDevil_LIBRARIES}
 )
 
 install(TARGETS kded_obexftpdaemon DESTINATION ${PLUGIN_INSTALL_DIR})
index 4939c0c..572ce17 100644 (file)
@@ -9,22 +9,27 @@ X-KDE-Kded-load-on-demand=true
 X-KDE-Kded-phase=1
 
 Name=Bluetooth File Transfer
+Name[bs]=Transfer Bluetooth Daoteke
 Name[ca]=Transferència de fitxer per Bluetooth
 Name[ca@valencia]=Transferència de fitxer per Bluetooth
 Name[cs]=Přenos souborů Bluetooth
 Name[da]=Bluetooth filoverførsel
 Name[de]=Bluetooth-Dateiübertragung
 Name[el]=Μεταφορά αρχείων με Bluetooth
+Name[en_GB]=Bluetooth File Transfer
 Name[es]=Transferencia de archivo por Bluetooth
+Name[et]=Bluetoothi failiedastus
 Name[fi]=Bluetooth-tiedostonsiirto
 Name[fr]=Transfert de fichiers Bluetooth
 Name[gl]=Transferencias de ficheiros mediante Bluetooth
 Name[hu]=Bluetooth fájlátvitel
 Name[it]=Trasferimento file via Bluetooth
 Name[kk]=Bluetooth арқылы файлды тасымалдау
+Name[ko]=블루투스 파일 전송
 Name[lt]=Failų perdavimai
 Name[mr]=ब्लूटूथ फाईल बदली
 Name[nb]=Blåtann filoverføring
+Name[nds]=Bluetooth-Dateiöverdregen
 Name[nl]=Bestandsoverdracht via bluetooth
 Name[pa]=ਬਲਿਊਟੁੱਥ ਫਾਇਲ ਟਰਾਂਸਫਰ
 Name[pl]=Przesyłanie plików Bluetooth
@@ -45,26 +50,32 @@ Name[x-test]=xxBluetooth File Transferxx
 Name[zh_TW]=藍牙檔案傳輸
 
 Comment=Supports Bluetooth file transfer using ObexFTP
+Comment[bs]=Podržava Blutut prijenos datoteka koristeći ObexFTP
 Comment[ca]=Accepta transferència de fitxer per Bluetooth usant ObexFTP
 Comment[ca@valencia]=Accepta transferència de fitxer per Bluetooth usant ObexFTP
 Comment[cs]=Podporuje přenos souborů Bluetooth použitím ObexFTP
 Comment[da]=Understøtter Bluetooth filoverførsel med ObexFTP
 Comment[de]=Unterstützt Bluetooth-Datenübertragung mittels ObexFTP
 Comment[el]=Υποστηρίζει μεταφορά αρχείων με Bluetooth με χρήση ObexFTP
+Comment[en_GB]=Supports Bluetooth file transfer using ObexFTP
 Comment[es]=Permite transferencias de archivos por Bluetooth usando ObexFTP
+Comment[et]=Bluetoothi failiedastuse toetamine ObexFTP vahendusel
 Comment[fi]=Tukee Bluetooth-tiedostonsiirtoa ObexFTP:tä käyttäen
 Comment[fr]=Prend en charge le transfert de fichiers Bluetooth à l'aide de « ObexFTP »
 Comment[gl]=Permite a transferencia de ficheiros por Bluetooth empregando ObexFTP
 Comment[hu]=Támogatja a Bluetooth fájlátvitelt az ObexFTP használatával
 Comment[it]=Supporta i trasferimenti di file Bluetooth usando ObexFTP
 Comment[kk]=ObexFTP-мен Bluetooth арқылы файлды тасымалдау
+Comment[ko]=ObexFTP를 통한 블루투스 파일 전송 지원
 Comment[lt]=Palaiko Bluetooth failų perdavimą naudojant ObexFTP
 Comment[mr]=ओबेक्स-एफटीपी वापरून ब्लूटूथ फाईल बदली समर्थीत करतो
 Comment[nb]=Støtter Blåtann filoverføring vhja ObexFTP
+Comment[nds]=Ünnerstütt Bluetooth-Dateiöverdregen över ObexFTP
 Comment[nl]=Ondersteunt bestandsoverdracht via bluetooth met ObexFTP
 Comment[pl]=Wspiera przesyłanie plików przez Bluetooth przy użyciu ObexFTP
 Comment[pt]=Suporta a transferência de ficheiros por Bluetooth com o ObexFTP
 Comment[pt_BR]=Suporte à transferência de arquivos por Bluetooth usando o ObexFTP
+Comment[ro]=Susține transfer de fișiere Bluetooth folosind ObexFTP
 Comment[ru]=Поддерживает передачу файлов по Bluetooth на базе ObexFTP
 Comment[sk]=Podporuje Bluetooth prenosy súborov pomocou ObexFTP
 Comment[sl]=Podpira prenose datotek preko Bluetooth z uporabo ObexFTP
index 1f901c1..47cd1b7 100644 (file)
@@ -104,6 +104,12 @@ void KioFtp::listDir(const KUrl &url)
     QDBusPendingReply <QVariantMapList > reply = m_transfer->ListFolder();
     reply.waitForFinished();
 
+    if (reply.isError()) {
+        kDebug() << reply.error().message();
+        error(KIO::ERR_SLAVE_DEFINED, i18n("Bluetooth is not enabled"));
+        finished();
+        return;
+    }
     QVariantMapList folderList = reply.value();
     Q_FOREACH(const QVariantMap folder, folderList) {
         KIO::UDSEntry entry = entryFromInfo(folder);
index 349b712..7cd40c5 100644 (file)
@@ -7,7 +7,7 @@ qt4_add_dbus_interface(monolithic_SRCS org.bluez.Audio.xml audio_interface)
 
 kde4_add_executable(bluedevil-monolithic ${monolithic_SRCS})
 
-target_link_libraries(bluedevil-monolithic ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+target_link_libraries(bluedevil-monolithic ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
 
 install(TARGETS bluedevil-monolithic ${INSTALL_TARGETS_DEFAULT_ARGS})
 install(FILES bluedevil-monolithic.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
index 9ffd94a..c077d4e 100644 (file)
@@ -19,8 +19,10 @@ Name[ga]=BlueDevil
 Name[gl]=BlueDevil
 Name[hu]=BlueDevil
 Name[it]=BlueDevil
+Name[ja]=BlueDevil
 Name[kk]=BlueDevil
 Name[km]=BlueDevil
+Name[ko]=BlueDevil
 Name[lt]=BlueDevil
 Name[mr]=ब्लु-डेव्हिल
 Name[nb]=BlueDevil
@@ -64,8 +66,10 @@ GenericName[ga]=BlueDevil
 GenericName[gl]=BlueDevil
 GenericName[hu]=BlueDevil
 GenericName[it]=BlueDevil
+GenericName[ja]=BlueDevil
 GenericName[kk]=BlueDevil
 GenericName[km]=BlueDevil
+GenericName[ko]=BlueDevil
 GenericName[lt]=BlueDevil
 GenericName[mr]=ब्लु-डेव्हिल
 GenericName[nb]=BlueDevil
@@ -109,8 +113,10 @@ Comment[fr]=Prise en charge de Bluetooth pour KDE
 Comment[gl]=Funcionalidades de Bluetooth para KDE.
 Comment[hu]=KDE bluetooth támogatás
 Comment[it]=Supporto Bluetooth per KDE
+Comment[ja]=KDE Bluetooth サポート
 Comment[kk]=KDE Bluetooth қолдауы
 Comment[km]=គាំទ្រ​ប៊្លូធូស​របស់​ KDE
+Comment[ko]=KDE 블루투스 지원
 Comment[lt]=KDE Bluetooth palaikymas
 Comment[mr]=केडीई ब्लूटूथ समर्थन
 Comment[nb]=KDE Blåtann-støtte
index c7b2d7e..86bb9d4 100644 (file)
@@ -44,7 +44,7 @@ Monolithic::Monolithic(QObject* parent)
 
     offlineMode();
 
-    if (Manager::self()->usableAdapter()) {
+    if (!Manager::self()->adapters().isEmpty()) {
         onlineMode();
     }
 
@@ -54,6 +54,9 @@ Monolithic::Monolithic(QObject* parent)
 
     setStandardActionsEnabled(false);
     setAssociatedWidget(contextMenu());
+
+    setStatus(KStatusNotifierItem::Active);
+    poweredChanged();
 }
 
 void Monolithic::adapterChanged()
@@ -63,6 +66,8 @@ void Monolithic::adapterChanged()
     if (Manager::self()->usableAdapter()) {
         onlineMode();
     }
+
+    poweredChanged();
 }
 
 quint32 sortHelper(quint32 type)
@@ -169,9 +174,11 @@ void Monolithic::regenerateDeviceEntries()
 //Shortcut configuration actions, mainly checkables for discovering and powering
     menu->addSeparator();
 
+    Adapter *usableAdapter = Manager::self()->usableAdapter();
+
     KAction *discoverable = new KAction(i18n("Discoverable"), menu);
     discoverable->setCheckable(true);
-    discoverable->setChecked(Manager::self()->usableAdapter()->isDiscoverable());
+    discoverable->setChecked(usableAdapter && usableAdapter->isDiscoverable());
     connect(discoverable, SIGNAL(toggled(bool)), this, SLOT(activeDiscoverable(bool)));
     menu->addAction(discoverable);
 
@@ -204,9 +211,16 @@ void Monolithic::regenerateConnectedDevices()
     }
 }
 
+void Monolithic::setupDevice(Device *device)
+{
+    connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
+    connect(device, SIGNAL(connectedChanged(bool)), this, SLOT(regenerateDeviceEntries()));
+    connect(device, SIGNAL(UUIDsChanged(QStringList)), this, SLOT(UUIDsChanged(QStringList)));
+}
+
 void Monolithic::onlineMode()
 {
-    setStatus(KStatusNotifierItem::Active);
+    setStatus(Active);
 
     QList<Adapter*> adapters = Manager::self()->adapters();
     Q_FOREACH(Adapter *adapter, adapters) {
@@ -218,12 +232,8 @@ void Monolithic::onlineMode()
 
     QList<Device*> devices = Manager::self()->devices();
     Q_FOREACH(Device* device, devices) {
-        connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
+        setupDevice(device);
     }
-
-    regenerateDeviceEntries();
-    regenerateConnectedDevices();
-    poweredChanged();
 }
 
 void Monolithic::actionTriggered()
@@ -336,15 +346,14 @@ void Monolithic::poweredChanged()
 
 void Monolithic::deviceCreated(Device *device)
 {
-    connect(device, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(regenerateConnectedDevices()));
-    connect(device, SIGNAL(UUIDsChanged(QStringList)), this, SLOT(UUIDsChanged(QStringList)));
+    setupDevice(device);
     regenerateDeviceEntries();
     regenerateConnectedDevices();
 }
 
 void Monolithic::offlineMode()
 {
-    setStatus(KStatusNotifierItem::Passive);
+    setStatus(Passive);
     setTooltipTitleStatus(false);
 
     KMenu *const menu = contextMenu();
@@ -364,6 +373,16 @@ void Monolithic::offlineMode()
     separator->setSeparator(true);
     menu->addAction(separator);
 //     menu->addAction(KStandardAction::quit(QCoreApplication::instance(), SLOT(quit()), menu));
+
+    QList<Adapter*> adapters = Manager::self()->adapters();
+    Q_FOREACH(Adapter *adapter, adapters) {
+        adapter->disconnect(this);
+    }
+
+    QList<Device*> devices = Manager::self()->devices();
+    Q_FOREACH(Device* device, devices) {
+        device->QObject::disconnect(this);
+    }
 }
 
 bool Monolithic::poweredAdapters()
@@ -438,9 +457,18 @@ QAction* Monolithic::actionForDevice(Device* device, Device *lastDevice)
         subMenu->addAction(action);
     }
 
-    KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
-    connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
-    subMenu->addAction(connectAction);
+    if (device->isConnected()) {
+        KAction *reconnectAction = new KAction(i18nc("Re-connect to a bluetooth device", "Re-connect"), deviceAction);
+        KAction* disconnectAction = new KAction(i18nc("Disconnect to a bluetooth device", "Disconnect"), deviceAction);
+        connect(reconnectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+        connect(disconnectAction, SIGNAL(triggered()), device, SLOT(disconnect()));
+        subMenu->addAction(reconnectAction);
+        subMenu->addAction(disconnectAction);
+    } else {
+        KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
+        connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+        subMenu->addAction(connectAction);
+    }
 
 //Enable when we can know if we should show Connect or not
 //     if (deviceServices.isEmpty()) {
index 2d6790a..da69e1d 100644 (file)
@@ -75,6 +75,7 @@ private Q_SLOTS:
 private:
     void onlineMode();
     void offlineMode();
+    void setupDevice(Device *device);
 
     /**
      * Returns true or false wether there are powered adapters
index 6c0cc28..fa52d17 100644 (file)
@@ -28,7 +28,7 @@ qt4_add_dbus_interface(sendfilehelper_SRCS org.bluez.obex.Transfer1.xml obexd_tr
 kde4_add_executable(bluedevil-sendfile ${sendfilehelper_SRCS})
 
 target_link_libraries(bluedevil-sendfile
-                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} bluedevil)
+                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} ${LibBlueDevil_LIBRARIES})
 
 install(TARGETS bluedevil-sendfile DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS})
 install(FILES bluedevil-sendfile.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
index 62abe44..87dd697 100644 (file)
@@ -20,6 +20,7 @@ Name[hu]=BlueDevil fájlküldés
 Name[it]=Invio file di BlueDevil
 Name[kk]=BlueDevil файл жіберуі
 Name[km]=ផ្ញើ​ឯកសារ​ BlueDevil ​
+Name[ko]=BlueDevil 파일 보내기
 Name[lt]=BlueDevil siųsti failą
 Name[mr]=ब्लु-डेव्हिल फाईल पाठवा
 Name[nb]=BlueDevil send fil
@@ -64,6 +65,7 @@ GenericName[hu]=BlueDevil fájlküldés
 GenericName[it]=Invio file di BlueDevil
 GenericName[kk]=BlueDevil файлды жіберуі
 GenericName[km]=ផ្ញើ​ឯកសារ​ BlueDevil ​
+GenericName[ko]=BlueDevil 파일 보내기
 GenericName[lt]=BlueDevil siųsti failą
 GenericName[mr]=ब्लु-डेव्हिल फाईल पाठवा
 GenericName[nb]=BlueDevil send fil
@@ -110,6 +112,7 @@ Comment[hu]=BlueDevil fájlküldés
 Comment[it]=Invio file di BlueDevil
 Comment[kk]=BlueDevil файлды жіберуі
 Comment[km]=ផ្ញើ​ឯកសារ BlueDevil 
+Comment[ko]=BlueDevil 파일 보내기
 Comment[lt]=BlueDevil siųsti failą
 Comment[mr]=ब्लु-डेव्हिल फाईल पाठवा
 Comment[nb]=BlueDevil send fil
index fb80054..56f8c44 100644 (file)
@@ -40,8 +40,8 @@ DiscoverWidget::DiscoverWidget(QWidget* parent) : QWidget(parent)
 
     connect(deviceList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this,
             SLOT(itemSelected(QListWidgetItem*)));
-    connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(QVariantMap)), this,
-            SLOT(deviceFound(QVariantMap)));
+    connect(Manager::self()->usableAdapter(), SIGNAL(deviceFound(Device*)), this,
+            SLOT(deviceFound(Device*)));
 
     startScan();
 }
index 457506a..151248c 100644 (file)
@@ -6,14 +6,6 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
     <!-- Includes -->
     <include>QDesktopServices</include>
     <kcfgfile name="bluedevilreceiverrc"/>
-    <include>kglobalsettings.h</include>
-    <include>QFile</include>
-    <include>QDir</include>
-    <include>kdebug.h</include>
-    <include>KUrl</include>
-    <include>KGlobal</include>
-    <include>KConfig</include>
-    <include>kstandarddirs.h</include>
 
     <group name="General">
 <!--    File Receiving      -->
@@ -29,46 +21,5 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
             <label>Whether allow to modify shared files</label>
             <default>0</default>
         </entry>
-<!--    File Sharing      -->
-        <entry name="shareEnabled" type="bool" key="shareEnabled">
-            <label>Enable or disable file sharing</label>
-            <default>true</default>
-        </entry>
-        <entry name="requirePin" type="bool" key="requirePin">
-            <label>Whether require the PIN</label>
-            <default>true</default>
-        </entry>
-        <entry name="allowWrite" type="bool" key="allowWrite">
-            <label>Allow external devices to modify the shared files</label>
-            <default>false</default>
-        </entry>
-        <entry key="rootFolder" type="Url" key="rootFolder">
-            <code>
-                QString downloadPath;
-                const QString xdgUserDirs = KGlobal::dirs()->localxdgconfdir() + QLatin1String( "user-dirs.dirs" );
-                if( QFile::exists( xdgUserDirs ) ) {
-                    KConfig xdgUserConf( xdgUserDirs, KConfig::SimpleConfig );
-                    KConfigGroup g( &amp;xdgUserConf, "" );
-                    downloadPath  = g.readPathEntry( "XDG_PUBLICSHARE_DIR", downloadPath ).remove(  '"' );
-                    if ( downloadPath.isEmpty() ) {
-                        downloadPath = KStandardDirs().saveLocation("data", "bluedevil/shared_files/");
-                    }
-                }
-
-                downloadPath = QDir::cleanPath( downloadPath );
-                QDir dir(downloadPath);
-                if (!dir.exists()) {
-                    KUrl url(downloadPath);
-                    QString dirname = dir.dirName();
-                    dir.setPath(url.upUrl().path());
-                    if (!dir.mkdir(dirname)) {
-                        downloadPath = KStandardDirs().saveLocation("data", "bluedevil/shared_files/");
-                    }
-                }
-
-                KUrl rootFolderUrl(downloadPath);
-            </code>
-            <default code="true">rootFolderUrl</default>
-        </entry>
     </group>
 </kcfg>
index 869db82..847e672 100644 (file)
@@ -24,7 +24,7 @@ kde4_add_ui_files(wizard_SRCS
 kde4_add_executable(bluedevil-wizard ${wizard_SRCS})
 
 target_link_libraries(bluedevil-wizard
-                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} bluedevil)
+                      ${KDE4_KIO_LIBRARY} ${KDE4_KDEUI_LIBS} ${LibBlueDevil_LIBRARIES})
 
 install(TARGETS bluedevil-wizard ${INSTALL_TARGETS_DEFAULT_ARGS})
 install(FILES bluedevil-wizard.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
index 2704b21..ce62b96 100644 (file)
@@ -18,15 +18,17 @@ Name[fr]=Assistant pour BlueDevil
 Name[gl]=Asistente de BlueDevil
 Name[hu]=BlueDevil varázsló
 Name[it]=Procedura guidata di BlueDevil
+Name[ja]=BlueDevil ウィザード
 Name[kk]=BlueDevil шебері
 Name[km]=អ្នក​ជំនួយការ BlueDevil
+Name[ko]=BlueDevil 마법사
 Name[lt]=BlueDevil vedlys
 Name[mr]=ब्लु-डेव्हिल विझार्ड
 Name[nb]=BlueDevil veiviser
 Name[nds]=BlueDevil-Hölper
 Name[nl]=BlueDevil assistent
 Name[pa]=BlueDevil ਸਹਾਇਕ
-Name[pl]=Asystent BlueDevil
+Name[pl]=Pomocnik BlueDevil
 Name[pt]=Assistente BlueDevil
 Name[pt_BR]=Assistente BlueDevil
 Name[ro]=Asistent BlueDevil
@@ -62,15 +64,17 @@ GenericName[fr]=Assistant pour BlueDevil
 GenericName[gl]=Asistente de BlueDevil
 GenericName[hu]=BlueDevil varázsló
 GenericName[it]=Procedura guidata di BlueDevil
+GenericName[ja]=BlueDevil ウィザード
 GenericName[kk]=BlueDevil шебері
 GenericName[km]=អ្នកជំនួយការ​ BlueDevil
+GenericName[ko]=BlueDevil 마법사
 GenericName[lt]=BlueDevil vedlys
 GenericName[mr]=ब्लु-डेव्हिल विझार्ड
 GenericName[nb]=BlueDevil veiviser
 GenericName[nds]=BlueDevil-Hölper
 GenericName[nl]=BlueDevil assistent
 GenericName[pa]=BlueDevil ਸਹਾਇਕ
-GenericName[pl]=Asystent BlueDevil
+GenericName[pl]=Pomocnik BlueDevil
 GenericName[pt]=Assistente BlueDevil
 GenericName[pt_BR]=Assistente BlueDevil
 GenericName[ro]=Asistent BlueDevil
@@ -107,15 +111,17 @@ Comment[fr]=Assistant pour BlueDevil
 Comment[gl]=Asistente de BlueDevil.
 Comment[hu]=BlueDevil varázsló
 Comment[it]=Procedura guidata di BlueDevil
+Comment[ja]=BlueDevil ウィザード
 Comment[kk]=BlueDevil шебері
 Comment[km]=អ្នក​ជំនួយការ​ BlueDevil
+Comment[ko]=BlueDevil 마법사
 Comment[lt]=BlueDevil vedlys
 Comment[mr]=ब्लु-डेव्हिल विझार्ड
 Comment[nb]=BlueDevil veiviser
 Comment[nds]=BlueDevil-Hölper
 Comment[nl]=BlueDevil assistent
 Comment[pa]=BlueDevil ਸਹਾਇਕ
-Comment[pl]=Asystent BlueDevil
+Comment[pl]=Pomocnik BlueDevil
 Comment[pt]=Assistente BlueDevil
 Comment[pt_BR]=Assistente BlueDevil
 Comment[ro]=Asistent BlueDevil
index 55c21d5..de241b0 100644 (file)
@@ -82,6 +82,7 @@ void BlueWizard::done(int result)
     kDebug() << "Wizard done: " << result;
 
     QWizard::done(result);
+    qApp->exit(result);
 }
 
 Device* BlueWizard::device() const
@@ -97,6 +98,11 @@ BlueWizard::~BlueWizard()
 void BlueWizard::setDeviceAddress(const QByteArray& address)
 {
     kDebug() << "Device Address: " << address;
+    if (!Manager::self()->usableAdapter()) {
+        kDebug() << "No usable adapter available";
+        return;
+    }
+
     m_deviceAddress = address;
     m_device = Manager::self()->usableAdapter()->deviceForAddress(m_deviceAddress);
 }
index c7ea86f..7003b7b 100644 (file)
@@ -46,6 +46,7 @@ int main(int argc, char *argv[])
     }
 
     KApplication app;
+    app.disableSessionManagement();
     app.setQuitOnLastWindowClosed(false);
     new BlueWizard(url);
 
index c43f080..aec410d 100644 (file)
            <height>40</height>
           </size>
          </property>
-         <property name="inputMask">
-          <string>999999999; </string>
-         </property>
          <property name="readOnly">
           <bool>false</bool>
          </property>
index 3c0f48d..50bcf57 100644 (file)
@@ -26,6 +26,7 @@
 #include <QListView>
 #include <QLabel>
 #include <QTimer>
+#include <QRegExpValidator>
 
 #include <KDebug>
 #include <kpixmapsequenceoverlaypainter.h>
@@ -61,6 +62,10 @@ void DiscoverPage::initializePage()
     list << QWizard::CancelButton;
     m_wizard->setButtonLayout(list);
 
+    QRegExp rx("[0-9]{0,9}");
+    QRegExpValidator *validator = new QRegExpValidator(rx);
+    pinText->setValidator(validator);
+
     connect(Manager::self()->usableAdapter(), SIGNAL(unpairedDeviceFound(Device*)), this,
         SLOT(deviceFound(Device*)));
     connect(manualPin, SIGNAL(toggled(bool)), pinText, SLOT(setEnabled(bool)));
@@ -73,7 +78,7 @@ void DiscoverPage::initializePage()
 
 bool DiscoverPage::isComplete() const
 {
-    if (m_wizard->deviceAddress().isEmpty()) {
+    if (m_wizard->deviceAddress().isEmpty() || !m_wizard->device()) {
         return false;
     }
     if (manualPin->isChecked() && pinText->text().isEmpty()) {
@@ -190,12 +195,16 @@ int DiscoverPage::nextId() const
         return BlueWizard::Discover;
     }
 
-    if (m_wizard->deviceAddress().isEmpty()) {
+    if (m_wizard->deviceAddress().isEmpty() || !m_wizard->device()) {
         return BlueWizard::Discover;
     }
 
     kDebug() << "Stopping scanning";
 
+    if (!Manager::self()->usableAdapter()) {
+        return BlueWizard::Fail;
+    }
+
     Manager::self()->usableAdapter()->stopDiscovery();
     Device *device = m_wizard->device();
     if (device->isPaired()) {
index 0125118..f7c065e 100644 (file)
@@ -60,7 +60,7 @@ void FailPage::initializePage()
     if (deviceName.isEmpty()) {
         failLbl->setText(i18nc("This string is shown when the wizard fail","The setup of the device has failed"));
     } else {
-        failLbl->setText(failLbl->text().arg(deviceName));
+        failLbl->setText(i18n("The setup of %1 has failed", deviceName));
     }
 
 }
index 92d3289..0470e8f 100644 (file)
@@ -32,7 +32,7 @@
      <item>
       <widget class="QLabel" name="failLbl">
        <property name="text">
-        <string>The setup of %1 has failed</string>
+        <string/>
        </property>
       </widget>
      </item>
index 8239aa9..5e99392 100644 (file)
@@ -52,9 +52,9 @@
     <device type="keyboard" oui="00:13:6C:" name="TomTom Remote" pin="0000"/>
 
     <!-- Sony PlayStation 3 Remote Control -->
-    <device oui="00:19:C1:" name="BD Remote Control" pin="NULL"/>
-    <device oui="00:1E:3D:" name="BD Remote Control" pin="NULL"/>
-    <device oui="00:06:F5:" name="BD Remote Control" pin="NULL"/>
+    <device oui="00:19:C1:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
+    <device oui="00:1E:3D:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
+    <device oui="00:06:F5:" name="PLAYSTATION(R)3 Controller" pin="NULL"/>
 
     <!-- Apple Wireless and Mighty Mouse
          Note: Apple doesn't follow the specs, and requires their mice
index 4194dfc..56b2ad7 100644 (file)
@@ -62,14 +62,16 @@ quint32 WizardAgent::RequestPasskey(const QDBusObjectPath& device, const QDBusMe
     Q_UNUSED(device);
     Q_UNUSED(msg);
     kDebug() << "AGENT-RequestPasskey " << device.path();
-    return 0;
+    emit pinRequested(m_pin);
+    return m_pin.toUInt();
 }
 
-void WizardAgent::DisplayPasskey(const QDBusObjectPath& device, quint32 passkey)
+void WizardAgent::DisplayPasskey(const QDBusObjectPath& device, quint32 passkey, quint8 entered)
 {
     Q_UNUSED(device);
-    Q_UNUSED(passkey);
+    Q_UNUSED(entered);
     kDebug() << "AGENT-DisplayPasskey " << device.path() << ", " << QString::number(passkey);
+    emit pinRequested(QString("%1").arg(passkey, 6, 10, QLatin1Char('0')));
 }
 
 void WizardAgent::DisplayPinCode(const QDBusObjectPath& device, const QString& pincode)
index 05d577f..5a9ea2c 100644 (file)
@@ -52,7 +52,7 @@ public slots:
     QString RequestPinCode(const QDBusObjectPath &device, const QDBusMessage &msg);
     quint32 RequestPasskey(const QDBusObjectPath &device, const QDBusMessage &msg);
     void DisplayPinCode(const QDBusObjectPath &device, const QString & pincode);
-    void DisplayPasskey(const QDBusObjectPath &device, quint32 passkey);
+    void DisplayPasskey(const QDBusObjectPath &device, quint32 passkey, quint8 entered);
     void RequestConfirmation(const QDBusObjectPath &device, quint32 passkey, const QDBusMessage &msg);
     void Cancel();