diff options
author | Emanoil Kotsev <[email protected]> | 2023-05-21 08:53:39 +0000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-05-24 16:48:11 +0900 |
commit | 24b3dc5e93cccb51daacb5cc4a8c0dfc63a2ce97 (patch) | |
tree | ead90c61d665b616450cd45308da58c3b93c45a2 /src | |
parent | e11af1d354fc62268e6c17f1024b43851df4c440 (diff) | |
download | tdebluez-24b3dc5e93cccb51daacb5cc4a8c0dfc63a2ce97.tar.gz tdebluez-24b3dc5e93cccb51daacb5cc4a8c0dfc63a2ce97.zip |
This fixes unknown devices to be configured and adds computer as valid device type.
Signed-off-by: Emanoil Kotsev <[email protected]>
(cherry picked from commit 15170254359f2f59f8fcfec3cdf3925246e612b1)
Diffstat (limited to 'src')
-rw-r--r-- | src/tdebluez/devicewizard.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/tdebluez/devicewizard.cpp b/src/tdebluez/devicewizard.cpp index 049c19a..e190804 100644 --- a/src/tdebluez/devicewizard.cpp +++ b/src/tdebluez/devicewizard.cpp @@ -657,6 +657,7 @@ void DeviceWizard::slotInsertDevice(const TQString& path) //device was not setup it belongs to the new device list TQString mimeType = DeviceMimeConverter::classToMimeType(devclass); + TQListViewItem *ndevlist = new TQListViewItem(devicedlg_ext->newdevList, name, addr); TQString type; if (mimeType == "bluetooth/peripheral-device-class") { @@ -684,15 +685,14 @@ void DeviceWizard::slotInsertDevice(const TQString& path) } else if (mimeType == "bluetooth/computer-device-class") { - return; + type = i18n("computer"); } else { type = i18n("unknown"); + ndevlist->setSelectable(false); } - TQListViewItem *ndevlist = new TQListViewItem(devicedlg_ext->newdevList, name, addr); - TQString iconName = DeviceMimeConverter::classToIconName(devclass); KPixmap pix2 = TDEGlobal::iconLoader()->loadIcon(iconName, TDEIcon::Small, 32); ndevlist->setPixmap(2, pix2); @@ -776,6 +776,17 @@ void DeviceWizard::slotSetupNewDevice() return; } + if (!confSel->isSelectable()) + { + TQMessageBox::information(this, + i18n("Setup device"), + i18n("This device is not configurable!"), + TQMessageBox::Ok | TQMessageBox::Default, + TQMessageBox::NoButton, + TQMessageBox::NoButton); + return; + } + TQString selAddr = confSel->text(1); DeviceImpl *newdev; |