diff --git a/bluedevil/README b/bluedevil/README
index b701b77d..b819ed7f 100644
--- a/bluedevil/README
+++ b/bluedevil/README
@@ -1,14 +1,11 @@
BlueDevil runtime dependencies:
- -obex-data-server
+ -bluez5
+ -General Bluetooth management
+
+ -bluez-obexd
-Be able to "Browse File" aka kio_obexftp
+ -Be able to "Send Files" (bluedevil-sendfile)
-Be able to receive files
- -obexd-client
- -Be able to Send files (bluedevil-sendfile)
-
- -If you're using Alsa:
- The best way of having "automagical headset configuration" is having the bluetooth.conf hook
- enabled
-
- NOTE: Be sure to install only obexd-client and not obexd-server, since the last will conflic
- with obex-data-server.
\ No newline at end of file
+ -pulseaudio-module-bluetooth
+ -Be able to connect A2DP profile
diff --git a/bluedevil/src/XmlMessages.sh b/bluedevil/src/XmlMessages.sh
new file mode 100755
index 00000000..05651f53
--- /dev/null
+++ b/bluedevil/src/XmlMessages.sh
@@ -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
+}
diff --git a/bluedevil/src/bluedevil-mime.xml b/bluedevil/src/bluedevil-mime.xml
index 669147d2..567e3fe7 100644
--- a/bluedevil/src/bluedevil-mime.xml
+++ b/bluedevil/src/bluedevil-mime.xml
@@ -17,27 +17,167 @@ Notes:
Known Device
+ Dispositiu conegut
+ Známé zařízení
+ Kendt enhed
+ Bekanntes Gerät
+ Γνωστή συσκευή
+ Known Device
+ Dispositivo conocido
+ Tunnettu laite
+ Dispositivo conosciuto
+ Bekend apparaat
+ Znane urządzenie
+ Dispositivo Conhecido
+ Dispositivo conhecido
+ Známe zariadenie
+ Znana naprava
+ познати уређај
+ познати уређај
+ poznati uređaj
+ poznati uređaj
+ Відомий пристрій
Discovered Device
+ Dispositiu descobert
+ Objevené zařízení
+ Opdaget enhed
+ Erkanntes Gerät
+ Ευρεθείσα συσκευή
+ Discovered Device
+ Dispositivo descubierto
+ Löydetty palvelu
+ Dispositivo scoperto
+ Gevonden apparaat
+ Odkryte urządzenie
+ Dispositivo Descoberto
+ Dispositivo descoberto
+ Objavené zariadenie
+ Odkrita naprava
+ откривени уређај
+ откривени уређај
+ otkriveni uređaj
+ otkriveni uređaj
+ Виявлений пристрій
Service
+ Servei
+ Služba
+ Tjeneste
+ Dienst
+ Υπηρεσία
+ Service
+ Servicio
+ Palvelu
+ Servizio
+ Service
+ Usługa
+ Serviço
+ Serviço
+ Služba
+ Storitev
+ сервис
+ сервис
+ servis
+ servis
+ Служба
Service
+ Servei
+ Služba
+ Tjeneste
+ Dienst
+ Υπηρεσία
+ Service
+ Servicio
+ Palvelu
+ Servizio
+ Service
+ Usługa
+ Serviço
+ Serviço
+ Služba
+ Storitev
+ сервис
+ сервис
+ servis
+ servis
+ Служба
Service
+ Servei
+ Služba
+ Tjeneste
+ Dienst
+ Υπηρεσία
+ Service
+ Servicio
+ Palvelu
+ Servizio
+ Service
+ Usługa
+ Serviço
+ Serviço
+ Služba
+ Storitev
+ сервис
+ сервис
+ servis
+ servis
+ Служба
Service
+ Servei
+ Služba
+ Tjeneste
+ Dienst
+ Υπηρεσία
+ Service
+ Servicio
+ Palvelu
+ Servizio
+ Service
+ Usługa
+ Serviço
+ Serviço
+ Služba
+ Storitev
+ сервис
+ сервис
+ servis
+ servis
+ Служба
Service
+ Servei
+ Služba
+ Tjeneste
+ Dienst
+ Υπηρεσία
+ Service
+ Servicio
+ Palvelu
+ Servizio
+ Service
+ Usługa
+ Serviço
+ Serviço
+ Služba
+ Storitev
+ сервис
+ сервис
+ servis
+ servis
+ Служба
diff --git a/bluedevil/src/bluedevil.notifyrc b/bluedevil/src/bluedevil.notifyrc
index 31ed1570..0fcc5646 100644
--- a/bluedevil/src/bluedevil.notifyrc
+++ b/bluedevil/src/bluedevil.notifyrc
@@ -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
diff --git a/bluedevil/src/daemon/helpers/authorize/CMakeLists.txt b/bluedevil/src/daemon/helpers/authorize/CMakeLists.txt
index 02e7d9e2..d307c9b6 100644
--- a/bluedevil/src/daemon/helpers/authorize/CMakeLists.txt
+++ b/bluedevil/src/daemon/helpers/authorize/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/daemon/helpers/requestpin/dialogWidget.ui b/bluedevil/src/daemon/helpers/requestpin/dialogWidget.ui
index 6f6c5b90..1714e78b 100644
--- a/bluedevil/src/daemon/helpers/requestpin/dialogWidget.ui
+++ b/bluedevil/src/daemon/helpers/requestpin/dialogWidget.ui
@@ -6,79 +6,82 @@
0
0
- 273
- 95
+ 259
+ 113
-
-
-
- 0
- 0
- 271
- 91
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
- PIN:
-
-
-
-
-
- -
-
-
- 99999999;
-
-
- 8
-
-
- false
-
-
- true
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
- true
-
-
-
-
-
+
+
+ 0
+ 0
+
+
+
+ -
+
+
+
+ 64
+ 64
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ PIN:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ 32767
+
+
+ 1234
+
+
+ false
+
+
+ true
+
+
+
+
+
+
+
diff --git a/bluedevil/src/daemon/helpers/requestpin/requestpin.cpp b/bluedevil/src/daemon/helpers/requestpin/requestpin.cpp
index 96648f53..8986458f 100644
--- a/bluedevil/src/daemon/helpers/requestpin/requestpin.cpp
+++ b/bluedevil/src/daemon/helpers/requestpin/requestpin.cpp
@@ -27,6 +27,9 @@
#include
#include
#include
+#include
+#include
+#include
#include
#include
@@ -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);
diff --git a/bluedevil/src/daemon/helpers/requestpin/requestpin.h b/bluedevil/src/daemon/helpers/requestpin/requestpin.h
index 32c02b34..0b19eceb 100644
--- a/bluedevil/src/daemon/helpers/requestpin/requestpin.h
+++ b/bluedevil/src/daemon/helpers/requestpin/requestpin.h
@@ -23,6 +23,9 @@
#define REQUESTPIN_H
#include
+#include
+
+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
diff --git a/bluedevil/src/daemon/kded/BlueDevilDaemon.cpp b/bluedevil/src/daemon/kded/BlueDevilDaemon.cpp
index 32da7008..3e87d1b5 100644
--- a/bluedevil/src/daemon/kded/BlueDevilDaemon.cpp
+++ b/bluedevil/src/daemon/kded/BlueDevilDaemon.cpp
@@ -65,6 +65,7 @@ struct BlueDevilDaemon::Private
QList m_discovered;
QTimer m_timer;
KComponentData m_componentData;
+ QHash m_adapterPoweredHash;
};
BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList&)
@@ -106,12 +107,20 @@ BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList&)
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 it(d->m_adapterPoweredHash);
+ while (it.hasNext()) {
+ it.next();
+ Adapter *adapter = adapterForAddress(it.key());
+ if (adapter) {
+ kDebug(dblue()) << "Restoring" << adapter->address() << it.value();
+ adapter->setPowered(it.value());
+ }
+ }
+ d->m_adapterPoweredHash.clear();
+ }
+}
+
bool BlueDevilDaemon::isOnline()
{
if (d->m_status == Private::Offline) {
@@ -204,7 +247,8 @@ void BlueDevilDaemon::onlineMode()
d->m_bluezAgent = new BluezAgent(new QObject());
connect(d->m_bluezAgent, SIGNAL(agentReleased()), this, SLOT(agentReleased()));
- d->m_adapter = Manager::self()->usableAdapter();
+ connect(d->m_adapter, SIGNAL(deviceFound(Device*)), this, SLOT(deviceFound(Device*)));
+ connect(&d->m_timer, SIGNAL(timeout()), d->m_adapter, SLOT(stopDiscovery()));
FileReceiverSettings::self()->readConfig();
if (!d->m_fileReceiver && FileReceiverSettings::self()->enabled()) {
@@ -270,7 +314,9 @@ void BlueDevilDaemon::offlineMode()
d->m_placesModel->removePlace(index);
}
- killMonolithic();
+ if (BlueDevil::Manager::self()->adapters().isEmpty()) {
+ killMonolithic();
+ }
d->m_status = Private::Offline;
}
@@ -327,4 +373,4 @@ DeviceInfo BlueDevilDaemon::deviceToInfo(Device *const device) const
return info;
}
-extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
\ No newline at end of file
+extern int dblue() { static int s_area = KDebug::registerArea("BlueDaemon", false); return s_area; }
diff --git a/bluedevil/src/daemon/kded/BlueDevilDaemon.h b/bluedevil/src/daemon/kded/BlueDevilDaemon.h
index be52e9fb..0e55997c 100644
--- a/bluedevil/src/daemon/kded/BlueDevilDaemon.h
+++ b/bluedevil/src/daemon/kded/BlueDevilDaemon.h
@@ -87,6 +87,8 @@ private Q_SLOTS:
*/
void agentReleased();
+ void login1PrepareForSleep(bool active);
+
void deviceFound(Device*);
void monolithicQuit(QDBusPendingCallWatcher* watcher);
void monolithicFinished(const QString &);
diff --git a/bluedevil/src/daemon/kded/CMakeLists.txt b/bluedevil/src/daemon/kded/CMakeLists.txt
index 452c495d..c3960c09 100644
--- a/bluedevil/src/daemon/kded/CMakeLists.txt
+++ b/bluedevil/src/daemon/kded/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/daemon/kded/bluedevil.desktop b/bluedevil/src/daemon/kded/bluedevil.desktop
index f871a180..2b84e983 100644
--- a/bluedevil/src/daemon/kded/bluedevil.desktop
+++ b/bluedevil/src/daemon/kded/bluedevil.desktop
@@ -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
diff --git a/bluedevil/src/daemon/kded/bluezagent.cpp b/bluedevil/src/daemon/kded/bluezagent.cpp
index 4b604379..d19375db 100644
--- a/bluedevil/src/daemon/kded/bluezagent.cpp
+++ b/bluedevil/src/daemon/kded/bluezagent.cpp
@@ -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);
diff --git a/bluedevil/src/daemon/kded/filereceiver/filereceiver.cpp b/bluedevil/src/daemon/kded/filereceiver/filereceiver.cpp
index 67db6aac..67d7e842 100644
--- a/bluedevil/src/daemon/kded/filereceiver/filereceiver.cpp
+++ b/bluedevil/src/daemon/kded/filereceiver/filereceiver.cpp
@@ -19,25 +19,29 @@
#include "filereceiver.h"
#include "../BlueDevilDaemon.h"
#include "obexagent.h"
-#include "obex_agent_manager.h"
#include
#include
#include
+#include
#include
-FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent) : QObject(parent)
+FileReceiver::FileReceiver(const KComponentData& componentData, QObject* parent)
+ : QObject(parent)
+ , m_agentManager(0)
{
kDebug(dblue());
qDBusRegisterMetaType();
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 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 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 r = *call;
@@ -54,4 +65,4 @@ void FileReceiver::agentRegistered(QDBusPendingCallWatcher* call)
}
call->deleteLater();
-}
\ No newline at end of file
+}
diff --git a/bluedevil/src/daemon/kded/filereceiver/filereceiver.h b/bluedevil/src/daemon/kded/filereceiver/filereceiver.h
index 9ac6b6f3..c821d7a6 100644
--- a/bluedevil/src/daemon/kded/filereceiver/filereceiver.h
+++ b/bluedevil/src/daemon/kded/filereceiver/filereceiver.h
@@ -22,6 +22,8 @@
#include
#include
+#include "obex_agent_manager.h"
+
class QDBusPendingCallWatcher;
class FileReceiver : public QObject
{
@@ -31,7 +33,11 @@ class FileReceiver : public QObject
virtual ~FileReceiver();
private Q_SLOTS:
+ void registerAgent();
void agentRegistered(QDBusPendingCallWatcher* call);
+
+ private:
+ org::bluez::obex::AgentManager1 *m_agentManager;
};
-#endif //FILE_RECEIVER_H
\ No newline at end of file
+#endif //FILE_RECEIVER_H
diff --git a/bluedevil/src/daemon/kded/filereceiver/receivefilejob.cpp b/bluedevil/src/daemon/kded/filereceiver/receivefilejob.cpp
index 8cc00220..daf6c57c 100644
--- a/bluedevil/src/daemon/kded/filereceiver/receivefilejob.cpp
+++ b/bluedevil/src/daemon/kded/filereceiver/receivefilejob.cpp
@@ -143,6 +143,7 @@ void ReceiveFileJob::slotAccept()
KIO::getJobTracker()->registerJob(this);
KGlobal::setActiveComponent(data);
+ m_originalFileName = m_transfer->name();
m_tempPath = createTempPath(m_transfer->name());
kDebug(dblue()) << m_tempPath;
QDBusMessage msg = m_msg.createReply(m_tempPath);
@@ -189,7 +190,7 @@ void ReceiveFileJob::statusChanged(const QVariant& value)
FileReceiverSettings::self()->readConfig();
KUrl savePath = FileReceiverSettings::self()->saveUrl();
- savePath.setFileName(m_transfer->name());
+ savePath.addPath(m_originalFileName);
if (status == QLatin1String("active")) {
emit description(this, i18n("Receiving file over Bluetooth"),
@@ -252,7 +253,7 @@ void ReceiveFileJob::moveFinished(KJob* job)
QString ReceiveFileJob::createTempPath(const QString &fileName) const
{
- QString xdgCacheHome = QLatin1String(qgetenv("XDG_CACHE_HOME"));
+ QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME"));
if (xdgCacheHome.isEmpty()) {
xdgCacheHome = QDir::homePath() + QLatin1String("/.cache");
}
@@ -267,4 +268,4 @@ QString ReceiveFileJob::createTempPath(const QString &fileName) const
}
return path;
-}
\ No newline at end of file
+}
diff --git a/bluedevil/src/daemon/kded/filereceiver/receivefilejob.h b/bluedevil/src/daemon/kded/filereceiver/receivefilejob.h
index 655be8de..675d45c5 100644
--- a/bluedevil/src/daemon/kded/filereceiver/receivefilejob.h
+++ b/bluedevil/src/daemon/kded/filereceiver/receivefilejob.h
@@ -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;
diff --git a/bluedevil/src/fileitemactionplugin/CMakeLists.txt b/bluedevil/src/fileitemactionplugin/CMakeLists.txt
index bdcafac3..27fce338 100644
--- a/bluedevil/src/fileitemactionplugin/CMakeLists.txt
+++ b/bluedevil/src/fileitemactionplugin/CMakeLists.txt
@@ -1,4 +1,4 @@
kde4_add_plugin(bluetoothfiletiemaction sendfileitemaction.cpp)
-target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} bluedevil)
+target_link_libraries(bluetoothfiletiemaction ${KDE4_KIO_LIBS} ${LibBlueDevil_LIBRARIES})
install(TARGETS bluetoothfiletiemaction DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES bluedevilsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR})
\ No newline at end of file
diff --git a/bluedevil/src/fileitemactionplugin/bluedevilsendfile.desktop b/bluedevil/src/fileitemactionplugin/bluedevilsendfile.desktop
index ac4eb705..72cf8070 100644
--- a/bluedevil/src/fileitemactionplugin/bluedevilsendfile.desktop
+++ b/bluedevil/src/fileitemactionplugin/bluedevilsendfile.desktop
@@ -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
diff --git a/bluedevil/src/kcmodule/CMakeLists.txt b/bluedevil/src/kcmodule/CMakeLists.txt
index 9c6f8ff0..6888a52c 100644
--- a/bluedevil/src/kcmodule/CMakeLists.txt
+++ b/bluedevil/src/kcmodule/CMakeLists.txt
@@ -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
diff --git a/bluedevil/src/kcmodule/bluedeviladapters.cpp b/bluedevil/src/kcmodule/bluedeviladapters.cpp
index ec2fff91..600b1ee7 100644
--- a/bluedevil/src/kcmodule/bluedeviladapters.cpp
+++ b/bluedevil/src/kcmodule/bluedeviladapters.cpp
@@ -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
void AdapterSettings::applyChanges()
{
- /* TODO: Find new way to set adapter name in bluez5
- if (m_name->text() != m_nameOrig) {
- m_adapter->setName(m_name->text());
- } */
+ if (m_name->text() != m_nameOrig) {
+ qDebug() << "Setting alias";
+ m_adapter->setAlias(m_name->text());
+ }
if (m_hidden->isChecked()) {
m_adapter->setDiscoverable(false);
@@ -188,7 +188,7 @@ void AdapterSettings::readChanges()
{
blockSignals(true);
- m_nameOrig = m_adapter->name();
+ m_nameOrig = m_adapter->alias();
m_hiddenOrig = !m_adapter->isDiscoverable();
m_alwaysVisibleOrig = m_adapter->isDiscoverable() && !m_adapter->discoverableTimeout();
m_temporaryVisibleOrig = m_adapter->isDiscoverable() && m_adapter->discoverableTimeout();
@@ -204,9 +204,9 @@ void AdapterSettings::readChanges()
m_discoverTimeLabel->setText(i18np("1 minute", "%1 minutes", m_discoverTime->value()));
if (BlueDevil::Manager::self()->usableAdapter() == m_adapter) {
- setTitle(i18n("Default adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+ setTitle(i18n("Default adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
} else {
- setTitle(i18n("Adapter: %1 (%2)", m_adapter->name(), m_adapter->address()));
+ setTitle(i18n("Adapter: %1 (%2)", m_adapter->alias(), m_adapter->address()));
}
blockSignals(false);
diff --git a/bluedevil/src/kcmodule/bluedeviladapters.desktop b/bluedevil/src/kcmodule/bluedeviladapters.desktop
index 700a4813..edb3628c 100644
--- a/bluedevil/src/kcmodule/bluedeviladapters.desktop
+++ b/bluedevil/src/kcmodule/bluedeviladapters.desktop
@@ -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
diff --git a/bluedevil/src/kcmodule/bluedevildevices.cpp b/bluedevil/src/kcmodule/bluedevildevices.cpp
index 2eecf4c7..e2e22823 100644
--- a/bluedevil/src/kcmodule/bluedevildevices.cpp
+++ b/bluedevil/src/kcmodule/bluedevildevices.cpp
@@ -28,6 +28,7 @@
#include
+#include
#include
#include
#include
@@ -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();
- 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(index.data(BluetoothDevicesModel::DeviceModelRole).value());
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)),
+ 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) {
diff --git a/bluedevil/src/kcmodule/bluedevildevices.desktop b/bluedevil/src/kcmodule/bluedevildevices.desktop
index 2ea1ede6..bb9fe57a 100644
--- a/bluedevil/src/kcmodule/bluedevildevices.desktop
+++ b/bluedevil/src/kcmodule/bluedevildevices.desktop
@@ -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
diff --git a/bluedevil/src/kcmodule/bluedeviltransfer.cpp b/bluedevil/src/kcmodule/bluedeviltransfer.cpp
index 1a4f4a6b..7fef6014 100644
--- a/bluedevil/src/kcmodule/bluedeviltransfer.cpp
+++ b/bluedevil/src/kcmodule/bluedeviltransfer.cpp
@@ -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
@@ -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;
diff --git a/bluedevil/src/kcmodule/bluedeviltransfer.desktop b/bluedevil/src/kcmodule/bluedeviltransfer.desktop
index d835c962..6559ad62 100644
--- a/bluedevil/src/kcmodule/bluedeviltransfer.desktop
+++ b/bluedevil/src/kcmodule/bluedeviltransfer.desktop
@@ -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
diff --git a/bluedevil/src/kcmodule/bluedeviltransfer.h b/bluedevil/src/kcmodule/bluedeviltransfer.h
index 87f205a4..17239966 100644
--- a/bluedevil/src/kcmodule/bluedeviltransfer.h
+++ b/bluedevil/src/kcmodule/bluedeviltransfer.h
@@ -47,7 +47,6 @@ private Q_SLOTS:
void usableAdapterChanged(Adapter *adapter);
void adapterDiscoverableChanged();
void updateInformationState();
- void showSharedFilesDialog();
void changed(bool);
private:
diff --git a/bluedevil/src/kcmodule/columnresizer.cpp b/bluedevil/src/kcmodule/columnresizer.cpp
deleted file mode 100644
index 1a74f72b..00000000
--- a/bluedevil/src/kcmodule/columnresizer.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright 2011 Aurélien Gâteau
- * License: LGPL v2.1 or later (see COPYING)
- */
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-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 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 m_widgets;
- QList m_wrWidgetItemList;
- QList 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(layout);
- QFormLayout* formLayout = qobject_cast(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(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
-// vi: ts=4 sw=4 et
diff --git a/bluedevil/src/kcmodule/columnresizer.h b/bluedevil/src/kcmodule/columnresizer.h
deleted file mode 100644
index 929b0fa4..00000000
--- a/bluedevil/src/kcmodule/columnresizer.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2011 Aurélien Gâteau
- * License: LGPL v2.1 or later (see COPYING)
- */
-#ifndef COLUMNRESIZER_H
-#define COLUMNRESIZER_H
-
-#include
-
-#include
-#include
-
-class QEvent;
-class QGridLayout;
-class QLayout;
-class QWidget;
-
-class ColumnResizerPrivate;
-class ColumnResizer : public QObject
-{
- Q_OBJECT
-public:
- ColumnResizer(QObject* parent = 0);
- ~ColumnResizer();
-
- void addWidget(QWidget* widget);
- void addWidgetsFromLayout(QLayout*, int column);
- void addWidgetsFromGridLayout(QGridLayout*, int column);
- void addWidgetsFromFormLayout(QFormLayout*, QFormLayout::ItemRole role);
-
-private Q_SLOTS:
- void updateWidth();
-
-protected:
- bool eventFilter(QObject*, QEvent* event);
-
-private:
- ColumnResizerPrivate* const d;
-};
-
-#endif /* COLUMNRESIZER_H */
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp b/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp
deleted file mode 100644
index 86db9d16..00000000
--- a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares *
- * Copyright (C) 2010-2011 UFO Coders *
- * *
- * 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
-#include
-#include
-
-bool LinkProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
-{
- QFileSystemModel *model = qobject_cast< QFileSystemModel *>(sourceModel());
- QModelIndex in = model->index(source_row, source_parent.column(), source_parent);
- const QString path = in.data(QFileSystemModel::FilePathRole).toString();
-
- if (path == model->rootPath()) {
- return true;
- }
-
- QFileInfo file(path);
- return file.isSymLink();
-}
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h b/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h
deleted file mode 100644
index a178e6bc..00000000
--- a/bluedevil/src/kcmodule/sharedfilesdialog/linkproxymodel.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares *
- * Copyright (C) 2010-2011 UFO Coders *
- * *
- * 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
-
-class LinkProxyModel : public QSortFilterProxyModel
-{
- virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
-};
-
-#endif // LINKPROXYMODEL_H
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui
deleted file mode 100644
index 0f62fe8d..00000000
--- a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfiles.ui
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
- sharedFiles
-
-
-
- 0
- 0
- 400
- 300
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
-
-
- KPushButton
- QPushButton
-
-
-
-
-
-
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp
deleted file mode 100644
index e97de278..00000000
--- a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares *
- * Copyright (C) 2010-2011 UFO Coders *
- * *
- * 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
-#include
-#include
-
-#include
-#include
-
-SharedFilesDialog::SharedFilesDialog(QWidget* parent, Qt::WFlags flags): KDialog(parent, flags)
-{
- QWidget *sharedFiles = new QWidget(this);
- m_ui = new Ui::sharedFiles();
- m_ui->setupUi(sharedFiles);
- setMainWidget(sharedFiles);
- m_ui->listView->setSelectionMode(QAbstractItemView::ExtendedSelection);
-
- QFileSystemModel *model = new QFileSystemModel();
- QModelIndex in = model->setRootPath(FileReceiverSettings::self()->rootFolder().path());
-
- LinkProxyModel *proxy = new LinkProxyModel();
- proxy->setSourceModel(model);
-
- m_ui->listView->setModel(proxy);
- m_ui->listView->setRootIndex(proxy->mapFromSource(in));
-
- m_ui->addBtn->setIcon(KIcon("list-add"));
- m_ui->removeBtn->setIcon(KIcon("list-remove"));
-
- connect(this, SIGNAL(finished(int)), this, SLOT(slotFinished(int)));
- connect(m_ui->addBtn, SIGNAL(clicked(bool)), this, SLOT(addFiles()));
- connect(m_ui->removeBtn, SIGNAL(clicked(bool)), this, SLOT(removeFiles()));
-}
-
-void SharedFilesDialog::slotFinished(int result)
-{
- if (result == 1) {
- return;
- }
-
- KUrl url;
- QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
- if (!m_added.isEmpty()) {
- Q_FOREACH(const QString &filePath, m_added) {
- url.setPath(filePath);
- QFile::remove(baseDir + url.fileName());
- }
- }
- if (!m_removed.isEmpty()) {
- Q_FOREACH(const QString &filePath, m_removed) {
- url.setPath(filePath);
- QFile::link(filePath, baseDir + url.fileName());
- }
- }
-}
-
-void SharedFilesDialog::addFiles()
-{
- KFileDialog *dialog = new KFileDialog(QDesktopServices::storageLocation(QDesktopServices::HomeLocation), "*", this);
- dialog->setMode(KFile::Directory | KFile::Files | KFile::LocalOnly);
- dialog->exec();
-
- QFile fileExist;
- KUrl url;
- QString linkPath;
- QString baseDir = FileReceiverSettings::self()->rootFolder().path().append("/");
-
- QStringList files = dialog->selectedFiles();
- Q_FOREACH(const QString &filePath, files) {
- url.setPath(filePath);
-
- linkPath = baseDir + url.fileName();
- fileExist.setFileName(linkPath);
- if (fileExist.exists()) {
- continue;
- }
-
- QFile::link(filePath, linkPath);
- if (m_removed.contains(filePath)) {
- m_removed.removeOne(filePath);
- continue;
- }
- if (!m_added.contains(filePath)) {
- m_added.append(filePath);
- }
- }
-}
-
-void SharedFilesDialog::removeFiles()
-{
- QItemSelectionModel *select = m_ui->listView->selectionModel();
- QModelIndexList list = select->selectedIndexes();
-
- QFile file;
- QString linkPath;
- Q_FOREACH(const QModelIndex &index, list) {
- linkPath = index.data(QFileSystemModel::FilePathRole).toString();
- file.setFileName(linkPath);
- if (m_added.contains(file.symLinkTarget())) {
- m_added.removeOne(file.symLinkTarget());
- continue;
- }
- if (!m_removed.contains(file.symLinkTarget())) {
- m_removed.append(file.symLinkTarget());
- }
-
- file.remove();
- }
-}
\ No newline at end of file
diff --git a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h b/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h
deleted file mode 100644
index f1c25b97..00000000
--- a/bluedevil/src/kcmodule/sharedfilesdialog/sharedfilesdialog.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2010-2011 Alejandro Fiestas Olivares *
- * Copyright (C) 2010-2011 UFO Coders *
- * *
- * 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
-
-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
diff --git a/bluedevil/src/kcmodule/transfer.ui b/bluedevil/src/kcmodule/transfer.ui
index 6c6cf746..3eb560c1 100644
--- a/bluedevil/src/kcmodule/transfer.ui
+++ b/bluedevil/src/kcmodule/transfer.ui
@@ -101,121 +101,6 @@
- -
-
-
- <b>Sharing</b>
-
-
-
- -
-
-
-
- QFormLayout::ExpandingFieldsGrow
-
-
-
-
-
- Share Files:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- kcfg_shareEnabled
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Require PIN:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
- -
-
-
- -
-
-
- Permissions:
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
- -
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 300
- 20
-
-
-
-
- -
-
-
- Shared Files
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 400
- 0
-
-
-
- KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly
-
-
-
- -
-
-
- Shared Folder:
-
-
-
-
-
-
-
@@ -237,11 +122,6 @@
QFrame
-
- KPushButton
- QPushButton
-
-
diff --git a/bluedevil/src/kio/bluetooth/CMakeLists.txt b/bluedevil/src/kio/bluetooth/CMakeLists.txt
index 85820bc4..ef1f1e22 100644
--- a/bluedevil/src/kio/bluetooth/CMakeLists.txt
+++ b/bluedevil/src/kio/bluetooth/CMakeLists.txt
@@ -11,7 +11,7 @@ target_link_libraries(kio_bluetooth
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBRARY}
${KDE4_KDEUI_LIBS}
- bluedevil
+ ${LibBlueDevil_LIBRARIES}
)
########### install files ###############
diff --git a/bluedevil/src/kio/bluetooth/kiobluetooth.cpp b/bluedevil/src/kio/bluetooth/kiobluetooth.cpp
index 4ac17a61..ee44688f 100644
--- a/bluedevil/src/kio/bluetooth/kiobluetooth.cpp
+++ b/bluedevil/src/kio/bluetooth/kiobluetooth.cpp
@@ -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::getSupportedServices(const QStringList &uuids)
diff --git a/bluedevil/src/kio/obexftp/CMakeLists.txt b/bluedevil/src/kio/obexftp/CMakeLists.txt
index e8111d36..a14b18db 100644
--- a/bluedevil/src/kio/obexftp/CMakeLists.txt
+++ b/bluedevil/src/kio/obexftp/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/kio/obexftp/daemon/CMakeLists.txt b/bluedevil/src/kio/obexftp/daemon/CMakeLists.txt
index 6280f52d..00320a77 100644
--- a/bluedevil/src/kio/obexftp/daemon/CMakeLists.txt
+++ b/bluedevil/src/kio/obexftp/daemon/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/kio/obexftp/daemon/obexftpdaemon.desktop b/bluedevil/src/kio/obexftp/daemon/obexftpdaemon.desktop
index 4939c0cc..572ce170 100644
--- a/bluedevil/src/kio/obexftp/daemon/obexftpdaemon.desktop
+++ b/bluedevil/src/kio/obexftp/daemon/obexftpdaemon.desktop
@@ -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
diff --git a/bluedevil/src/kio/obexftp/kio_obexftp.cpp b/bluedevil/src/kio/obexftp/kio_obexftp.cpp
index 1f901c1e..47cd1b79 100644
--- a/bluedevil/src/kio/obexftp/kio_obexftp.cpp
+++ b/bluedevil/src/kio/obexftp/kio_obexftp.cpp
@@ -104,6 +104,12 @@ void KioFtp::listDir(const KUrl &url)
QDBusPendingReply 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);
diff --git a/bluedevil/src/monolithic/CMakeLists.txt b/bluedevil/src/monolithic/CMakeLists.txt
index 349b7123..7cd40c54 100644
--- a/bluedevil/src/monolithic/CMakeLists.txt
+++ b/bluedevil/src/monolithic/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/monolithic/bluedevil-monolithic.desktop b/bluedevil/src/monolithic/bluedevil-monolithic.desktop
index 9ffd94ab..c077d4ed 100644
--- a/bluedevil/src/monolithic/bluedevil-monolithic.desktop
+++ b/bluedevil/src/monolithic/bluedevil-monolithic.desktop
@@ -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
diff --git a/bluedevil/src/monolithic/monolithic.cpp b/bluedevil/src/monolithic/monolithic.cpp
index c7b2d7e4..86bb9d4a 100644
--- a/bluedevil/src/monolithic/monolithic.cpp
+++ b/bluedevil/src/monolithic/monolithic.cpp
@@ -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 adapters = Manager::self()->adapters();
Q_FOREACH(Adapter *adapter, adapters) {
@@ -218,12 +232,8 @@ void Monolithic::onlineMode()
QList 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 adapters = Manager::self()->adapters();
+ Q_FOREACH(Adapter *adapter, adapters) {
+ adapter->disconnect(this);
+ }
+
+ QList devices = Manager::self()->devices();
+ Q_FOREACH(Device* device, devices) {
+ device->QObject::disconnect(this);
+ }
}
bool Monolithic::poweredAdapters()
@@ -438,9 +457,18 @@ QAction* Monolithic::actionForDevice(Device* device, Device *lastDevice)
subMenu->addAction(action);
}
- KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
- connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
- subMenu->addAction(connectAction);
+ if (device->isConnected()) {
+ KAction *reconnectAction = new KAction(i18nc("Re-connect to a bluetooth device", "Re-connect"), deviceAction);
+ KAction* disconnectAction = new KAction(i18nc("Disconnect to a bluetooth device", "Disconnect"), deviceAction);
+ connect(reconnectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+ connect(disconnectAction, SIGNAL(triggered()), device, SLOT(disconnect()));
+ subMenu->addAction(reconnectAction);
+ subMenu->addAction(disconnectAction);
+ } else {
+ KAction *connectAction = new KAction(i18nc("Connect to a bluetooth device", "Connect"), deviceAction);
+ connect(connectAction, SIGNAL(triggered()), device, SLOT(connectDevice()));
+ subMenu->addAction(connectAction);
+ }
//Enable when we can know if we should show Connect or not
// if (deviceServices.isEmpty()) {
diff --git a/bluedevil/src/monolithic/monolithic.h b/bluedevil/src/monolithic/monolithic.h
index 2d6790ab..da69e1dd 100644
--- a/bluedevil/src/monolithic/monolithic.h
+++ b/bluedevil/src/monolithic/monolithic.h
@@ -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
diff --git a/bluedevil/src/sendfile/CMakeLists.txt b/bluedevil/src/sendfile/CMakeLists.txt
index 6c0cc28a..fa52d170 100644
--- a/bluedevil/src/sendfile/CMakeLists.txt
+++ b/bluedevil/src/sendfile/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/sendfile/bluedevil-sendfile.desktop b/bluedevil/src/sendfile/bluedevil-sendfile.desktop
index 62abe444..87dd6976 100644
--- a/bluedevil/src/sendfile/bluedevil-sendfile.desktop
+++ b/bluedevil/src/sendfile/bluedevil-sendfile.desktop
@@ -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
diff --git a/bluedevil/src/sendfile/discoverwidget.cpp b/bluedevil/src/sendfile/discoverwidget.cpp
index fb800541..56f8c443 100644
--- a/bluedevil/src/sendfile/discoverwidget.cpp
+++ b/bluedevil/src/sendfile/discoverwidget.cpp
@@ -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();
}
diff --git a/bluedevil/src/settings/filereceiver.kcfg b/bluedevil/src/settings/filereceiver.kcfg
index 457506ad..151248c7 100644
--- a/bluedevil/src/settings/filereceiver.kcfg
+++ b/bluedevil/src/settings/filereceiver.kcfg
@@ -6,14 +6,6 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
QDesktopServices
- kglobalsettings.h
- QFile
- QDir
- kdebug.h
- KUrl
- KGlobal
- KConfig
- kstandarddirs.h
@@ -29,46 +21,5 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
0
-
-
-
- true
-
-
-
- true
-
-
-
- false
-
-
-
- QString downloadPath;
- const QString xdgUserDirs = KGlobal::dirs()->localxdgconfdir() + QLatin1String( "user-dirs.dirs" );
- if( QFile::exists( xdgUserDirs ) ) {
- KConfig xdgUserConf( xdgUserDirs, KConfig::SimpleConfig );
- KConfigGroup g( &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);
-
- rootFolderUrl
-
diff --git a/bluedevil/src/wizard/CMakeLists.txt b/bluedevil/src/wizard/CMakeLists.txt
index 869db820..847e6729 100644
--- a/bluedevil/src/wizard/CMakeLists.txt
+++ b/bluedevil/src/wizard/CMakeLists.txt
@@ -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})
diff --git a/bluedevil/src/wizard/bluedevil-wizard.desktop b/bluedevil/src/wizard/bluedevil-wizard.desktop
index 2704b21b..ce62b96b 100644
--- a/bluedevil/src/wizard/bluedevil-wizard.desktop
+++ b/bluedevil/src/wizard/bluedevil-wizard.desktop
@@ -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
diff --git a/bluedevil/src/wizard/bluewizard.cpp b/bluedevil/src/wizard/bluewizard.cpp
index 55c21d5a..de241b0b 100644
--- a/bluedevil/src/wizard/bluewizard.cpp
+++ b/bluedevil/src/wizard/bluewizard.cpp
@@ -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);
}
diff --git a/bluedevil/src/wizard/main.cpp b/bluedevil/src/wizard/main.cpp
index c7ea86f0..7003b7b4 100644
--- a/bluedevil/src/wizard/main.cpp
+++ b/bluedevil/src/wizard/main.cpp
@@ -46,6 +46,7 @@ int main(int argc, char *argv[])
}
KApplication app;
+ app.disableSessionManagement();
app.setQuitOnLastWindowClosed(false);
new BlueWizard(url);
diff --git a/bluedevil/src/wizard/pages/discover.ui b/bluedevil/src/wizard/pages/discover.ui
index c43f080e..aec410db 100644
--- a/bluedevil/src/wizard/pages/discover.ui
+++ b/bluedevil/src/wizard/pages/discover.ui
@@ -114,9 +114,6 @@
40
-
- 999999999;
-
false
diff --git a/bluedevil/src/wizard/pages/discoverpage.cpp b/bluedevil/src/wizard/pages/discoverpage.cpp
index 3c0f48de..50bcf57b 100644
--- a/bluedevil/src/wizard/pages/discoverpage.cpp
+++ b/bluedevil/src/wizard/pages/discoverpage.cpp
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include
@@ -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()) {
diff --git a/bluedevil/src/wizard/pages/fail.cpp b/bluedevil/src/wizard/pages/fail.cpp
index 01251184..f7c065e5 100644
--- a/bluedevil/src/wizard/pages/fail.cpp
+++ b/bluedevil/src/wizard/pages/fail.cpp
@@ -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));
}
}
diff --git a/bluedevil/src/wizard/pages/fail.ui b/bluedevil/src/wizard/pages/fail.ui
index 92d3289d..0470e8f4 100644
--- a/bluedevil/src/wizard/pages/fail.ui
+++ b/bluedevil/src/wizard/pages/fail.ui
@@ -32,7 +32,7 @@
-
- The setup of %1 has failed
+
diff --git a/bluedevil/src/wizard/pin-code-database.xml b/bluedevil/src/wizard/pin-code-database.xml
index 8239aa98..5e993927 100644
--- a/bluedevil/src/wizard/pin-code-database.xml
+++ b/bluedevil/src/wizard/pin-code-database.xml
@@ -52,9 +52,9 @@
-
-
-
+
+
+