reimport bluedevil

This commit is contained in:
Ivailo Monev 2014-12-10 22:52:10 +00:00
parent 49d267682f
commit f3b2dddd0c
60 changed files with 642 additions and 943 deletions

View 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.
-pulseaudio-module-bluetooth
-Be able to connect A2DP profile

22
bluedevil/src/XmlMessages.sh Executable file
View file

@ -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
}

View 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>

View 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

View 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})

View file

@ -6,65 +6,34 @@
<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 name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="pixmap">
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<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">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -77,8 +46,42 @@
</property>
</widget>
</item>
</layout>
<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>

View 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);

View 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

View 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);
}
if (BlueDevil::Manager::self()->adapters().isEmpty()) {
killMonolithic();
}
d->m_status = Private::Offline;
}

View 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 &);

View 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})

View 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

View 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);

View file

@ -19,25 +19,29 @@
#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;

View 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

View 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");
}

View 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;

View 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})

View 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

View 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

View 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());
} */
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);

View 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

View 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) {

View 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

View file

@ -20,11 +20,9 @@
#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;

View 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

View file

@ -47,7 +47,6 @@ private Q_SLOTS:
void usableAdapterChanged(Adapter *adapter);
void adapterDiscoverableChanged();
void updateInformationState();
void showSharedFilesDialog();
void changed(bool);
private:

View file

@ -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

View file

@ -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 */

View file

@ -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();
}

View file

@ -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

View file

@ -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>

View file

@ -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();
}
}

View file

@ -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

View file

@ -101,121 +101,6 @@
</layout>
</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">
@ -237,11 +122,6 @@
<extends>QFrame</extends>
<header>kurlrequester.h</header>
</customwidget>
<customwidget>
<class>KPushButton</class>
<extends>QPushButton</extends>
<header>kpushbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View file

@ -11,7 +11,7 @@ target_link_libraries(kio_bluetooth
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBRARY}
${KDE4_KDEUI_LIBS}
bluedevil
${LibBlueDevil_LIBRARIES}
)
########### install files ###############

View 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)

View 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})

View 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})

View 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

View 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);

View 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})

View 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

View 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);
}
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()) {

View 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

View 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})

View 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

View 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();
}

View 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>

View 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})

View 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

View 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);
}

View file

@ -46,6 +46,7 @@ int main(int argc, char *argv[])
}
KApplication app;
app.disableSessionManagement();
app.setQuitOnLastWindowClosed(false);
new BlueWizard(url);

View file

@ -114,9 +114,6 @@
<height>40</height>
</size>
</property>
<property name="inputMask">
<string>999999999; </string>
</property>
<property name="readOnly">
<bool>false</bool>
</property>

View 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()) {

View 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));
}
}

View 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>

View 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

View 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)

View 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();