-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 11 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/manager.pro | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/popuphelper.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.cpp | 3 |
5 files changed, 14 insertions, 9 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 433bd3a..1fd0ea2 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -284,36 +284,37 @@ void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) { /** * Action that are toggled on hold (mostly QPopups i guess) */ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) { if (!item ) return; QPopupMenu *menu = new QPopupMenu(); int ret=0; if ( ((BTListItem*)item)->type() == "device") { QPopupMenu *groups = new QPopupMenu(); - menu->insertItem( tr("rescan sevices:"), 0); - menu->insertItem( tr("to group"), groups , 1); - // menu->insertItem( tr("bound device"), 2); - menu->insertItem( tr("delete"), 3); + menu->insertItem( ((BTDeviceItem*)item)->name(),0 ); + menu->insertSeparator(1); + menu->insertItem( tr("rescan sevices"), 2); + menu->insertItem( tr("to group"), groups , 3); + menu->insertItem( tr("delete"), 4); ret = menu->exec( point , 0); switch(ret) { case -1: break; case 0: addServicesToDevice( (BTDeviceItem*)item ); break; case 1: break; // NO need to, since hcid does that on the fly // case 2: // make connection @@ -331,32 +332,34 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin /* * We got service sensitive PopupMenus in our factory * We will create one through the factory and will insert * our Separator + ShowInfo into the menu or create a new * one if the factory returns 0 * PopupMenu deletion is kind of weird. * If escaped( -1 ) or any of our items were chosen we'll * delete the PopupMenu otherwise it's the responsibility of * the PopupMenu to delete itself * */ else if ( ((BTListItem*)item)->type() == "service") { BTServiceItem* service = (BTServiceItem*)item; QMap<int, QString> list = service->services().classIdList(); QMap<int, QString>::Iterator it = list.begin(); QPopupMenu *popup =0l; + popup->insertItem( (service->services()).serviceName() ); + popup->insertSeparator(); if ( it != list.end() ) { qWarning("Searching id %d %s", it.key(), it.data().latin1() ); popup = m_popHelper.find( it.key() /*1*/, service->services(), (BTDeviceItem*)service->parent() ); }else { qWarning("Empty"); } if ( popup == 0l ) { qWarning("factory returned 0l"); popup = new QPopupMenu(); } int test1 = popup->insertItem( tr("Test1:"), 0); diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro index 121c069..4684c67 100644 --- a/noncore/net/opietooth/manager/manager.pro +++ b/noncore/net/opietooth/manager/manager.pro @@ -1,35 +1,35 @@ TEMPLATE = app CONFIG = qt warn_on debug #CONFIG = qt warn_on release HEADERS = btconnectionitem.h btdeviceitem.h \ btserviceitem.h stdpopups.h \ popuphelper.h bluebase.h \ scandialog.h btlistitem.h \ hciconfwrapper.h bticonloader.h \ pppdialog.h obexdialog.h \ - devicehandler.h rfcpopup.h + devicehandler.h rfcpopup.h obexpopup.h \ SOURCES = btconnectionitem.cpp btdeviceitem.cpp \ btserviceitem.cpp stdpopups.cpp \ popuphelper.cpp main.cpp \ bluebase.cpp scandialog.cpp \ btlistitem.cpp hciconfwrapper.cpp \ bticonloader.cpp pppdialog.cpp \ obexdialog.cpp devicehandler.cpp \ - rfcpopup.cpp + rfcpopup.cpp obexpopup.cpp INCLUDEPATH += $(OPIEDIR)/include INCLUDEPATH += $(OPIEDIR)/noncore/net/opietooth/lib DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopietooth -lopie INTERFACES = bluetoothbase.ui devicedialog.ui DESTDIR = $(OPIEDIR)/bin TARGET = bluetooth-manager TRANSLATIONS = ../../../../i18n/de/bluetooth-manager.ts \ ../../../../i18n/en/bluetooth-manager.ts \ ../../../../i18n/es/bluetooth-manager.ts \ ../../../../i18n/fr/bluetooth-manager.ts \ ../../../../i18n/hu/bluetooth-manager.ts \ ../../../../i18n/ja/bluetooth-manager.ts \ ../../../../i18n/ko/bluetooth-manager.ts \ ../../../../i18n/no/bluetooth-manager.ts \ diff --git a/noncore/net/opietooth/manager/obexdialog.h b/noncore/net/opietooth/manager/obexdialog.h index 28d2be2..b3d5e6d 100644 --- a/noncore/net/opietooth/manager/obexdialog.h +++ b/noncore/net/opietooth/manager/obexdialog.h @@ -5,33 +5,33 @@ #include <qdialog.h> #include <opie/oprocess.h> class QVBoxLayout; class QPushButton; class QMultiLineEdit; class QLineEdit; namespace OpieTooth { class ObexDialog : public QDialog { Q_OBJECT public: - ObexDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0, const QString& device = 0); + ObexDialog( QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0, const QString& device = 0); ~ObexDialog(); private slots: void browse(); void sendData(); protected: QVBoxLayout* layout; QLineEdit* cmdLine; QLineEdit* chNameLine; QPushButton* sendButton; private: // Device that is used QString m_device; }; diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp index 4a4daf2..1571fab 100644 --- a/noncore/net/opietooth/manager/popuphelper.cpp +++ b/noncore/net/opietooth/manager/popuphelper.cpp @@ -18,18 +18,19 @@ void PopupHelper::insert( int id, popupFactory fact ) { } QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) { //qWarning("find"); FactoryMap::Iterator it = m_map.find(id ); if ( it != m_map.end() ) { //qWarning("found"); popupFactory fact = it.data(); return (*fact)(ser, item); } return 0l; } void PopupHelper::init() { insert( 4355, newRfcComPopup ); insert( 4353, newRfcComPopup ); - insert( 3, newObexPushPopup ); + insert( 4357, newObexPushPopup ); + insert( 4358, newObexPushPopup ); } diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp index 750365e..3a52334 100644 --- a/noncore/net/opietooth/manager/stdpopups.cpp +++ b/noncore/net/opietooth/manager/stdpopups.cpp @@ -1,15 +1,16 @@ #include "rfcpopup.h" +#include "obexpopup.h" #include "stdpopups.h" extern "C" { QPopupMenu* newRfcComPopup( const OpieTooth::Services& servive, OpieTooth::BTDeviceItem* item ) { return new OpieTooth::RfcCommPopup(/* servive, item*/ ); // fix spellin RfComm vs. RfcComm and paramaters //return 0l; } QPopupMenu* newObexPushPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* ) { - return 0l; + return new OpieTooth::ObexPopup(); } } |