i18n and some minor corrections

Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
pull/10/head
Emanoil Kotsev 2 years ago
parent 66c9d2a592
commit c95a429826
No known key found for this signature in database
GPG Key ID: F1EEB8CD9FB16A50

@ -88,8 +88,8 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined"
add_subdirectory( src/tdebluez-common )
add_subdirectory( src/libtdebluez )
add_subdirectory( src/libtdeobex )
add_subdirectory( src/tdeioclient )
add_subdirectory( src/tdeioslave )
add_subdirectory( src/tdebluezioclient )
add_subdirectory( src/tdebluezioslave )
add_subdirectory( src/tdebluez )
add_subdirectory( src/tdebluezauth )

@ -57,6 +57,13 @@ This is the main library providing the core functionality.
New for BlueZ 5 D-Bus API.
## tdebluezioclient
This is an openobex command line client using tdeio_obex from libtdeobex.
Here is an example
```
tdebluezioclient ls obexopp:/[50:xx:xx:xx:xx:xx]:/Music
```
## tdebluezauth
This is helper application that can be run stand alone, but it is usually started from tdebluez.
@ -66,7 +73,7 @@ It provides agent for authentication utilizing several DBus interfaces.
This can be seen as third party application that can be started as stand alone application or by tdebluez.
It provides Obex FTP, OPP, Message Access, PSE.
* FTP is working per default in ~/Download directory.
* ObexFTP is working per default in ~/Download directory.
If you want to change this, open .trinity/share/config/tdebluezrc and add/modify entry
downloadDir=Downloads
You can use absolute or relative path. Both absolute and relative can be used, but relative paths are assumed to be relative to user $HOME folder. Default $HOME/Downloads.

@ -32,6 +32,7 @@
#include <tqdbusproxy.h>
#include <tqmessagebox.h>
#include <tdelocale.h>
#include "adapterImpl.h"
@ -90,7 +91,7 @@ void AdapterImpl::powerOn(bool state)
if (hcidx < 0)
{
// error handling
tqDebug("Index for the device %s not found", device.local8Bit().data());
tqDebug(i18n("Index for the device %1 not found").arg(device));
return;
}
@ -99,7 +100,7 @@ void AdapterImpl::powerOn(bool state)
TQFile file("/dev/rfkill");
if (!file.open(IO_ReadWrite))
{
tqDebug("Failed to open %s", file.name().utf8().data());
tqDebug(i18n("Failed to open %1").arg(file.name()));
return;
}
@ -110,10 +111,10 @@ void AdapterImpl::powerOn(bool state)
else
event.soft = 1;
tqDebug("Bluetooth device %s switches: idx(%i), soft(%d).", device.local8Bit().data(), event.idx, event.soft);
tqDebug(i18n("Bluetooth device %1 switches: idx(%2), soft(%3).").arg(device).arg(event.idx).arg(event.soft));
if (write(file.handle(), &event, sizeof(event)) < 0)
tqDebug("Failed to write to %s", file.name().utf8().data());
tqDebug(i18n("Failed to write to %1").arg(file.name()));
file.close();
}
@ -124,18 +125,18 @@ TQString AdapterImpl::getPath()
void AdapterImpl::slotSetAlias(const TQString& alias)
{
TQT_DBusError error;
setAlias(alias, error);
if (error.isValid())
tqDebug("AdapterImpl::slotSetAlias(%s) failed: %s", alias.utf8().data(), error.message().utf8().data());
TQT_DBusError dbuserror;
setAlias(alias, dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("AdapterImpl::slotSetAlias(%1) failed: %2").arg(alias).arg(dbuserror.message()));
}
void AdapterImpl::slotSetTimeout(int timeout)
{
TQT_DBusError error;
setDiscoverableTimeout(timeout, error);
if (error.isValid())
tqDebug("AdapterImpl::slotSetTimeout(%i) failed: %s", timeout, error.message().utf8().data());
TQT_DBusError dbuserror;
setDiscoverableTimeout(timeout, dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("AdapterImpl::slotSetTimeout(%1) failed: %2").arg(timeout).arg(dbuserror.message()));
}
} // namespace TDEBluetooth

@ -191,12 +191,12 @@ bool ObjectManagerImpl::registerAgent()
{
if (!agentRegisteredStatus)
{
TQT_DBusError error;
TQT_DBusError dbuserror;
agentManager->RegisterAgent(
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), DEVICE_PIN_CAPABILITY, error);
if (error.isValid())
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), DEVICE_PIN_CAPABILITY, dbuserror);
if (dbuserror.isValid())
{
tqDebug("Could not register agent: %s", error.message().local8Bit().data());
tqDebug(i18n("Could not register agent: %1").arg(dbuserror.message()));
return false;
}
agentRegisteredStatus = true;
@ -209,12 +209,12 @@ bool ObjectManagerImpl::unregisterAgent()
kdDebug() << k_funcinfo << endl;
if (agentRegisteredStatus)
{
TQT_DBusError error;
TQT_DBusError dbuserror;
getAgentManager()->UnregisterAgent(
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), error);
if (error.isValid())
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), dbuserror);
if (dbuserror.isValid())
{
tqDebug("Could not unregister agent");
tqDebug(i18n("Could not unregister agent"));
return false;
}
agentRegisteredStatus = false;
@ -225,12 +225,12 @@ bool ObjectManagerImpl::unregisterAgent()
bool ObjectManagerImpl::requestDefaultAgent()
{
TQT_DBusError error;
TQT_DBusError dbuserror;
agentManager->RequestDefaultAgent(
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), error);
if (error.isValid())
TQT_DBusObjectPath(TQCString(DBUS_AUTH_SERVICE_PATH)), dbuserror);
if (dbuserror.isValid())
{
tqDebug("Could not request default agent: %s", error.message().local8Bit().data());
tqDebug(i18n("Could not request default agent: %1").arg(dbuserror.message()));
return false;
}
agentIsDefaultAgent = true;
@ -258,17 +258,17 @@ bool ObjectManagerImpl::initDBUS()
dBusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus, DBUS_CONN_NAME);
if (!dBusConn.isConnected())
{
tqDebug("Failed to open connection to system message bus: %s", dBusConn.lastError().message().local8Bit().data());
tqDebug(i18n("Failed to open connection to system message bus: %1").arg(dBusConn.lastError().message()));
TQTimer::singleShot(4000, this, TQT_SLOT(reconnect()));
return false;
}
setConnection(dBusConn);
TQT_DBusDataMap<TQT_DBusObjectPath> objects;
TQT_DBusError error;
if (!GetManagedObjects(objects, error))
TQT_DBusError dbuserror;
if (!GetManagedObjects(objects, dbuserror))
{
tqDebug("GetManagedObjects(objects,error) FAILED:\n%s\n", error.message().latin1());
tqDebug(i18n("GetManagedObjects(objects,error) failed: %1").arg(dbuserror.message()));
return false;
}
@ -278,7 +278,7 @@ bool ObjectManagerImpl::initDBUS()
bool ok = false;
slotInterfacesAdded(it.key(), it.data().toStringKeyMap(&ok));
if (!ok)
tqWarning("Failed to convert dbus data to string map: %s", it.key().latin1());
tqWarning(i18n("Failed to convert dbus data to string map: %1").arg(it.key()));
}
connect(this, SIGNAL(InterfacesAdded(const TQT_DBusObjectPath&, const TQT_DBusDataMap< TQString >&)),
@ -313,7 +313,7 @@ void ObjectManagerImpl::adapterPropertiesChanged(TQString path, const TQMap<
else
continue;
if (!ok)
tqDebug("ObjectManagerImpl::adapterPropertiesChanged conversion failed");
tqDebug(i18n("ObjectManagerImpl::adapterPropertiesChanged conversion failed"));
}
}
@ -367,7 +367,7 @@ void ObjectManagerImpl::devicePropertiesChanged(TQString path, const TQMap<TQStr
else
continue;
if (!ok)
tqDebug("ObjectManagerImpl::devicePropertiesChanged conversion failed");
tqDebug(i18n("ObjectManagerImpl::devicePropertiesChanged conversion failed"));
}
}
@ -385,7 +385,7 @@ void ObjectManagerImpl::mediaControlPropertiesChanged(TQString path, const TQMap
else
continue;
if (!ok)
tqDebug("ObjectManagerImpl::mediaControlPropertiesChanged conversion failed");
tqDebug(i18n("ObjectManagerImpl::mediaControlPropertiesChanged conversion failed"));
}
}
@ -468,7 +468,7 @@ void ObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object, co
}
else
{
tqWarning("Interface not implemented: %s", interface.local8Bit().data());
tqWarning(i18n("Interface not implemented: %1").arg(interface));
}
}
}
@ -539,7 +539,7 @@ void ObjectManagerImpl::slotInterfacesRemoved(const TQT_DBusObjectPath& object,
}
else
{
tqWarning("Interface not implemented: %s", (*it).local8Bit().data());
tqWarning(i18n("Interface not implemented: %1").arg((*it)));
}
}
}

@ -136,10 +136,10 @@ bool ObexObjectManagerImpl::initDBUS()
setConnection(dBusConn);
TQT_DBusDataMap<TQT_DBusObjectPath> objects;
TQT_DBusError error;
if (!GetManagedObjects(objects, error))
TQT_DBusError dbuserror;
if (!GetManagedObjects(objects, dbuserror))
{
tqDebug("GetManagedObjects(objects,error) FAILED\n");
tqDebug(i18n("GetManagedObjects(objects, dbuserror) failed: %1").arg(dbuserror.message()));
return false;
}
@ -150,7 +150,7 @@ bool ObexObjectManagerImpl::initDBUS()
TQT_DBusDataMap<TQString> tqMap1 = it.data().toStringKeyMap(&ok);
if (!ok)
{
tqWarning("Failed to convert dbus data to string map: %s", it.key().latin1());
tqWarning(i18n("Failed to convert dbus data to string map: %1").arg(it.key()));
return false;
}
slotInterfacesAdded(it.key(), tqMap1);
@ -198,7 +198,7 @@ void ObexObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object
}
else
{
tqDebug("org.bluez.obex.AgentManager1 initialization failed\n");
tqDebug(i18n("org.bluez.obex.AgentManager1 initialization failed"));
}
}
else if (interface == "org.bluez.obex.Client1")
@ -210,7 +210,7 @@ void ObexObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object
}
else
{
tqDebug("org.bluez.obex.Client1 initialization failed\n");
tqDebug(i18n("org.bluez.obex.Client1 initialization failed"));
}
}
else if (interface == "org.bluez.obex.Session1")
@ -222,7 +222,7 @@ void ObexObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object
}
else
{
tqDebug("org.bluez.obex.Session1 initialization failed\n");
tqDebug(i18n("org.bluez.obex.Session1 initialization failed"));
}
}
else if (interface == "org.bluez.obex.FileTransfer1")
@ -234,7 +234,7 @@ void ObexObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object
}
else
{
tqDebug("org.bluez.obex.FileTransfer1 initialization failed\n");
tqDebug(i18n("org.bluez.obex.FileTransfer1 initialization failed"));
}
}
else if (interface == "org.freedesktop.DBus.Introspectable")
@ -243,7 +243,7 @@ void ObexObjectManagerImpl::slotInterfacesAdded(const TQT_DBusObjectPath& object
}
else
{
tqWarning("Interface not implemented: %s", interface.local8Bit().data());
tqWarning(i18n("Interface not implemented: %1").arg(interface));
}
}
}
@ -273,7 +273,7 @@ void ObexObjectManagerImpl::slotInterfacesRemoved(const TQT_DBusObjectPath& obje
}
else
{
tqWarning("Interface not implemented: %s", (*it).local8Bit().data());
tqWarning(i18n("Interface not implemented: %1").arg((*it)));
}
}
}

@ -38,7 +38,7 @@ AdapterConfig::AdapterConfig(ObjectManagerImpl *mgr, AdapterImpl *a)
TQT_DBusError dbuserr;
name = adapter->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Get alias for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get alias for the adapter failed: %1").arg(dbuserr.message()));
adapterDialog->deviceModes->insertItem(i18n("Hidden"));
adapterDialog->deviceModes->insertItem(i18n("Always visible"));
@ -127,14 +127,14 @@ void AdapterConfig::addAdapterDialogInfo()
slotSetClass(DeviceMimeConverter::classToMimeType(adapter->getClass(dbuserr)));
if (dbuserr.isValid())
tqDebug("Get class for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get class for the adapter failed: %1").arg(dbuserr.message()));
TQString address = adapter->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Get address for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get address for the adapter failed: %1").arg(dbuserr.message()));
TQStringList uuids = adapter->getUUIDs(dbuserr);
if (dbuserr.isValid())
tqDebug("Get uuids for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get uuids for the adapter failed: %1").arg(dbuserr.message()));
TQVBoxLayout *infoLayout = new TQVBoxLayout(adapterDialog->groupBoxInfo->layout());
// GridLayout *infoGrid = new TQGridLayout(adapterDialog->groupBoxInfo->layout());
@ -188,7 +188,7 @@ void AdapterConfig::slotDiscoverableChanged(const TQString &path, bool changed)
TQT_DBusError dbuserr;
TQ_UINT32 timeout = adapter->getDiscoverableTimeout(dbuserr);
if (dbuserr.isValid())
tqDebug("Get discoverable timeout for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get discoverable timeout for the adapter failed: %1").arg(dbuserr.message()));
disconnect(adapterDialog->deviceModes, SIGNAL(activated(int)),
this, TQT_SLOT(slotSetMode(int)));
disconnect(adapterDialog->sliderTimeout, SIGNAL(valueChanged(int)),
@ -278,7 +278,7 @@ void AdapterConfig::slotChangeName(const TQString &n)
// adapterDialog->adapterName->setText(name);
adapter->setAlias(name, dbuserr);
if (dbuserr.isValid())
tqDebug("Set alias for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Set alias for the adapter failed: %1").arg(dbuserr.message()));
connect(manager, SIGNAL(adapterNameChanged(const TQString&,const TQString&)),
this, TQT_SLOT(slotAdapterNameChanged(const TQString&, const TQString&)));
@ -303,7 +303,7 @@ void AdapterConfig::slotChangeTimeout(int timeout)
adapterDialog->timeout->setText(adapterDialog->timeout->text().append(i18n("min")));
adapter->setDiscoverableTimeout(timeout, dbuserr);
if (dbuserr.isValid())
tqDebug("Set discoverable timeout for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Set discoverable timeout for the adapter failed: %1").arg(dbuserr.message()));
connect(manager, SIGNAL(adapterDiscoverableChanged(const TQString&, bool)),
this, TQT_SLOT(slotDiscoverableChanged(const TQString&, bool)));
@ -317,7 +317,7 @@ void AdapterConfig::slotSetMode(int modenr)
TQT_DBusError dbuserr;
int timeout = adapter->getDiscoverableTimeout(dbuserr);
if (dbuserr.isValid())
tqDebug("Get discoverable timeout for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get discoverable timeout for the adapter failed: %1").arg(dbuserr.message()));
// Disconnect signal of valueChanged!
// D-Bus signal get emmited immeditaly ..
@ -358,7 +358,7 @@ void AdapterConfig::slotSetMode(int modenr)
adapter->setDiscoverable(((modenr > 0) ? true : false), dbuserr);
adapter->setDiscoverableTimeout(timeout, dbuserr);
if (dbuserr.isValid())
tqDebug("Get discoverable for the adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get discoverable for the adapter failed: %1").arg(dbuserr.message()));
connect(adapterDialog->deviceModes, SIGNAL(activated(int)),
this, TQT_SLOT(slotSetMode(int)));

@ -71,7 +71,7 @@ void AdapterConfigDialog::addAdapter(const TQString &path)
TQT_DBusError dbuserr;
bool powered = app->adapters[path]->getPowered(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getPowered failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getPowered failed: %1").arg(dbuserr.message()));
aconfig->dialog()->setEnabled(powered);
//
@ -130,7 +130,7 @@ void AdapterConfigDialog::slotCurrentChanged(TQWidget *widget)
TQT_DBusError dbuserr;
TQString name = app->adapters[path]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
// kdDebug() << "Adapter changed: " << it.data()->dialog()->macLabel->text() << endl;
emit signalAdapterSelected(path,name);
break;

@ -83,7 +83,7 @@ TDEBluetoothApp::TDEBluetoothApp() :
manager = new ObjectManagerImpl(BLUEZ_DN, "/", this, "ObjectManager");
if (!manager->isConnectedToDBUS())
{
tqDebug("ObjectManager is not connected to DBus");
tqDebug(i18n("ObjectManager is not connected to DBus"));
return;
}
@ -118,7 +118,7 @@ TDEBluetoothApp::TDEBluetoothApp() :
}
else
{
tqWarning( "obexd executable was not found\nSet path in configuration file \"%s\"\nVariable: obexSrvExe=<path to obexd>", CONFIGURATION_FILE);
tqWarning(i18n("obexd executable was not found\nSet path in configuration file \"%1\"\nVariable: obexSrvExe=<path to obexd>").arg(CONFIGURATION_FILE));
m_config->writeEntry("obexSrv", false);
}
}
@ -146,7 +146,7 @@ TDEBluetoothApp::TDEBluetoothApp() :
TQFile f("/proc/" + d[i] + "/status");
if ( ! f.open( IO_ReadOnly ) )
{
tqDebug( "Failed to open file for reading: %s", f.name().local8Bit().data() );
tqDebug(i18n("Failed to open file for reading: %1").arg(f.name()));
continue;
}
@ -174,20 +174,20 @@ TDEBluetoothApp::TDEBluetoothApp() :
switch ( errno )
{
case EINVAL:
tqDebug( "4\t%s", pid.local8Bit().data() );
tqDebug(i18n("4\t%1").arg(pid) );
break;
case ESRCH:
tqDebug( "3\t%s", pid.local8Bit().data() );
tqDebug(i18n("3\t%1").arg(pid) );
break;
case EPERM:
tqDebug( "2\t%s", pid.local8Bit().data() );
tqDebug(i18n("2\t%1").arg(pid) );
break;
default: /* unknown error */
tqDebug( "1\t%s", pid.local8Bit().data() );
tqDebug(i18n("1\t%1").arg(pid) );
break;
}
} else {
tqWarning( "Cleanup pid\t%s", pid.local8Bit().data() );
tqWarning(i18n("Cleanup pid\t%1").arg(pid) );
}
}
}
@ -241,7 +241,7 @@ TDEBluetoothApp::~TDEBluetoothApp()
if (a->getDiscovering(error))
a->StopDiscovery(error);
if (error.isValid())
tqDebug("Stop discoverable for the adapter failed: %s", error.message().local8Bit().data());
tqDebug(i18n("Stop discoverable for the adapter failed: %1").arg(error.message()));
delete a;
}
}

@ -177,7 +177,7 @@ void DeviceSetupWizard::next()
// TQWizard::next();
// }
// if (error.isValid())
// tqDebug("Failed in connecting device: %s", error.message().local8Bit().data());
// tqDebug(i18n("Failed in connecting device: %1").arg(error.message()));
// }
else if (currentPage() == donepage)
{
@ -215,7 +215,7 @@ void DeviceSetupWizard::setDevice(DeviceImpl *_device)
TQT_DBusError error;
address = device->getAddress(error);
if (error.isValid())
tqDebug("Failed to get address for the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get address for the new device: %1").arg(error.message()));
if (device->getPaired(error))
{
@ -237,7 +237,7 @@ void DeviceSetupWizard::setDevice(DeviceImpl *_device)
tQListViewDst->clear();
}
if (error.isValid())
tqDebug("Failed to get paired status for the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get paired status for the new device: %1").arg(error.message()));
if (device->getConnected(error))
{
@ -248,12 +248,12 @@ void DeviceSetupWizard::setDevice(DeviceImpl *_device)
TQWizard::showPage(donepage);
}
if (error.isValid())
tqDebug("Failed to get connecting status of the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get connecting status of the new device: %1").arg(error.message()));
if (device->getTrusted(error))
trustedCheckBox->setChecked(true);
if (error.isValid())
tqDebug("Failed to get trusted status of the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get trusted status of the new device: %1").arg(error.message()));
connect(device, SIGNAL(PairAsyncReply(int /*asyncCallId*/)),
this, TQT_SLOT(slotPairAsyncReply(int /*asyncCallId*/)));
@ -277,7 +277,7 @@ void DeviceSetupWizard::updateServiceList()
uuids.clear();
uuids = device->getUUIDs(error);
if (error.isValid())
tqDebug("Failed to get uuids: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get uuids: %1").arg(error.message()));
tQListViewSrc->clear();
for (TQStringList::iterator it = uuids.begin(); it != uuids.end(); ++it)
@ -305,7 +305,7 @@ void DeviceSetupWizard::startPairing()
if (!device->PairAsync(asyncCallId, error))
{
if (error.isValid())
tqDebug("Failed to get paired status for the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to get paired status for the new device: %1").arg(error.message()));
}
manager->getConnection()->scheduleDispatch();
}
@ -327,7 +327,7 @@ void DeviceSetupWizard::slotPairingTimeOut()
setNextEnabled(pairpage, true);
}
else
tqDebug("Failed pairing the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed pairing the new device: %1").arg(error.message()));
}
else
{
@ -356,7 +356,7 @@ void DeviceSetupWizard::slotConnectTimeOut()
setNextEnabled(connectpage, true);
}
else
tqDebug("Failed connecting the new device: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed connecting the new device: %1").arg(error.message()));
}
else
{
@ -399,8 +399,7 @@ void DeviceSetupWizard::accept()
device->setTrusted(true, error);
}
if (error.isValid())
tqDebug("Could not set trusted for %s\nError: %s",
address.latin1(), error.message().local8Bit().data());
tqDebug(i18n("Could not set trusted for %1\nError: %2").arg(address).arg(error.message()));
}
hide();
@ -472,7 +471,7 @@ void DeviceSetupWizard::slotConnectNextProfile()
if (!device->ConnectProfileAsync(asyncCallId, connect, error))
{
if (error.isValid())
tqDebug("Failed to call DBus ConnectProfileAsync: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to call DBus ConnectProfileAsync: %1").arg(error.message()));
}
manager->getConnection()->scheduleDispatch();
}
@ -480,7 +479,7 @@ void DeviceSetupWizard::slotConnectNextProfile()
void DeviceSetupWizard::slotAsyncErrorResponseDetected(int asyncCallId, const TQT_DBusError error)
{
tqDebug("AsyncErrorResponseDetected: %i %s %s", error.type(), error.name().local8Bit().data(), error.message().local8Bit().data());
tqDebug(i18n("AsyncErrorResponseDetected: %1 %2 %3").arg(error.type()).arg(error.name()).arg(error.message()));
if(pairingTimer->isActive())
pairingTimer->stop();
@ -505,15 +504,15 @@ void DeviceSetupWizard::slotAsyncErrorResponseDetected(int asyncCallId, const TQ
// TQMessageBox::critical( 0, "Device Setup Wizard",
// TQString("AsyncErrorResponseDetected: %1\n%2\n%3")
// .arg(error.type())
// .arg(error.name().local8Bit().data())
// .arg(error.message().local8Bit().data()),
// .arg(error.name())
// .arg(error.message()),
// TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"ConnectionError", tr("AsyncErrorResponseDetected: %1\n%2\n%3")
"ConnectionError", i18n("AsyncErrorResponseDetected: %1\n%2\n%3")
.arg(error.type())
.arg(error.name().local8Bit().data())
.arg(error.message().local8Bit().data()));
.arg(error.name())
.arg(error.message()));
}
void DeviceSetupWizard::slotConnectAsyncReply(int asyncCallId)
@ -561,7 +560,7 @@ void DeviceSetupWizard::slotCancelPairing()
if (!device->CancelPairingAsync(asyncCallId, error))
{
if (error.isValid())
tqDebug("Failed to call DBus CancelPairingAsync: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to call DBus CancelPairingAsync: %1").arg(error.message()));
}
if(pairingTimer->isActive())
@ -575,10 +574,10 @@ void DeviceSetupWizard::slotCancelConnecting()
if (device->getConnected(error))
{
if (!device->DisconnectAsync(asyncCallId, error))
tqDebug("Failed to call DisconnectAsync: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed to call DisconnectAsync: %1").arg(error.message()));
}
if (error.isValid())
tqDebug("Failed in slotCancelConnecting: %s", error.message().local8Bit().data());
tqDebug(i18n("Failed in slotCancelConnecting: %1").arg(error.message()));
if(connectTimer->isActive())
connectTimer->stop();

@ -55,7 +55,7 @@ DeviceWizard::DeviceWizard(TDEBluetoothApp* a) :
break;
}
if (dbuserr.isValid())
tqDebug("Get powered for active adapter failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Get powered for active adapter failed: %1").arg(dbuserr.message()));
}
}
@ -203,12 +203,12 @@ void DeviceWizard::slotDeviceBoxClicked(TQListViewItem *dev)
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (selAddr == addr)
{
bool connected = dit.data()->getConnected(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getConnected failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getConnected failed: %1").arg(dbuserr.message()));
if (connected)
{
connectButton->setText(i18n("&Disconnect"));
@ -243,7 +243,7 @@ void DeviceWizard::slotConnectButton()
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (sel->text(2) == addr)
{
if (connectButton->text() == "C&onnect")
@ -278,7 +278,7 @@ void DeviceWizard::slotConnectButton()
}
if (dbuserr.isValid())
{
tqDebug("DisconnectAsync failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("DisconnectAsync failed: %1").arg(dbuserr.message()));
}
}
break;
@ -302,7 +302,7 @@ void DeviceWizard::slotConnectNextProfile()
{
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (addr == connectingDevice.address)
{
path = dit.key();
@ -328,7 +328,7 @@ void DeviceWizard::slotConnectNextProfile()
else
{
if (dbuserr.isValid())
tqDebug("ConnectProfileAsync failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("ConnectProfileAsync failed: %1").arg(dbuserr.message()));
TQString text = i18n("<p>Attempt to start connection with the device failed</p>"
"<p>You can retry to connect or click <b>Cancel</b> to stop.</p>");
@ -360,7 +360,7 @@ void DeviceWizard::slotDeviceConnectedChanged(const TQString &path, bool connect
TQT_DBusError dbuserr;
TQString addr = app->devices[path]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
TQListViewItem *devItem = deviceBox->findItem(addr, 2, TQt::ExactMatch);
if (!devItem)
@ -415,7 +415,7 @@ void DeviceWizard::slotDeleteDevice()
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (sel->text(2) == addr)
{
if (!adapter->RemoveDevice(TQT_DBusObjectPath(dit.key()), dbuserr))
@ -474,7 +474,7 @@ void DeviceWizard::slotDeviceRemoved(const TQString& path)
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (addrList1.grep(addr).size() == 1)
addrList1.remove(addr);
if (addrList2.grep(addr).size() == 1)
@ -512,7 +512,7 @@ void DeviceWizard::slotConfigDevice()
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (sel->text(2) == addr)
{
// device to be configured
@ -536,14 +536,14 @@ void DeviceWizard::slotSearch(bool state)
{
adapter->StartDiscovery(dbuserr);
if (dbuserr.isValid())
tqDebug("Device StartDiscovery failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device StartDiscovery failed: %1").arg(dbuserr.message()));
addButton->setText(i18n("&Stop Discovery >>"));
}
else
{
adapter->StopDiscovery(dbuserr);
if (dbuserr.isValid())
tqDebug("Device StopDiscovery failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device StopDiscovery failed: %1").arg(dbuserr.message()));
addButton->setText(i18n("&Start Discovery <<"));
}
}
@ -571,12 +571,12 @@ void DeviceWizard::slotAdapterDiscoveringChanged(const TQString& path, bool stat
TQString thepath = dit.data()->getPath();
TQString theaddr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (addr == theaddr)
{
adapter->RemoveDevice(thepath, dbuserr);
if (dbuserr.isValid())
tqDebug("Remove Device failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Remove Device failed: %1").arg(dbuserr.message()));
break;
}
}
@ -600,19 +600,19 @@ void DeviceWizard::slotInsertDevice(const TQString& path)
TQT_DBusError dbuserr;
TQString addr = app->devices[path]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
TQString name = app->devices[path]->getName(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getName failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getName failed: %1").arg(dbuserr.message()));
bool paired = app->devices[path]->getPaired(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getPaired failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getPaired failed: %1").arg(dbuserr.message()));
TQ_UINT32 devclass = app->devices[path]->getClass(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getClass failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getClass failed: %1").arg(dbuserr.message()));
bool connected = app->devices[path]->getConnected(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getConnected failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getConnected failed: %1").arg(dbuserr.message()));
connect(app->devices[path], SIGNAL(AsyncErrorResponseDetected(int /*asyncCallId*/, const TQT_DBusError)),
@ -702,7 +702,7 @@ void DeviceWizard::slotDeviceNameChanged(const TQString& path, const TQString& n
TQT_DBusError dbuserr;
TQString addr = app->devices[path]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
TQListViewItem *tmp = devicedlg_ext->newdevList->findItem(addr, 1, TQt::ExactMatch);
if (tmp) {
@ -745,10 +745,10 @@ void DeviceWizard::slotAsyncErrorResponseDetected(int asyncCallId, const TQT_DBu
setStateDeviceButtons(true);
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"ConnectionError", tr("AsyncErrorResponseDetected: %1\n%2\n%3")
"ConnectionError", i18n("AsyncErrorResponseDetected: %1\n%2\n%3")
.arg(dbuserr.type())
.arg(dbuserr.name().local8Bit().data())
.arg(dbuserr.message().local8Bit().data()));
.arg(dbuserr.name())
.arg(dbuserr.message()));
}
void DeviceWizard::slotSetupNewDevice()
@ -774,7 +774,7 @@ void DeviceWizard::slotSetupNewDevice()
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (selAddr == addr)
{
newdev = dit.data();
@ -819,7 +819,7 @@ void DeviceWizard::slotDevicePairedChanged(const TQString& path, bool)
TQT_DBusError dbuserr;
TQString addr = dit.data()->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAddress failed: %1").arg(dbuserr.message()));
if (addr == selAddr)
{
TQString iconName = DeviceMimeConverter::classToIconName(dit.data()->getClass(dbuserr));

@ -25,6 +25,7 @@
#include <kdebug.h>
#include <tdelocale.h>
#include <tqpushbutton.h>
#include <tqslider.h>
#include <kiconloader.h>
@ -79,10 +80,10 @@ MediaControl::~MediaControl()
void MediaControl::slotPlay()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->Play(error);
if (error.isValid())
tqDebug("Media Play failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->Play(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media Play failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotPlayToggled(bool state)
@ -102,78 +103,78 @@ void MediaControl::slotPlayToggled(bool state)
void MediaControl::slotStop()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
if (mediaCtlProxy->Stop(error))
TQT_DBusError dbuserror;
if (mediaCtlProxy->Stop(dbuserror))
{
if (tQPushButtonPlay->isOn())
tQPushButtonPlay->toggle();
}
if (error.isValid())
tqDebug("Media Stop failed: %s", error.message().local8Bit().data());
if (dbuserror.isValid())
tqDebug(i18n("Media Stop failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotPause()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->Pause(error);
if (error.isValid())
tqDebug("Media Pause failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->Pause(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media Pause failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotNext()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->Next(error);
if (error.isValid())
tqDebug("Media Next failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->Next(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media Next failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotPrevious()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->Previous(error);
if (error.isValid())
tqDebug("Media Previous failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->Previous(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media Previous failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotFastForward()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->FastForward(error);
if (error.isValid())
tqDebug("Media FastForward failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->FastForward(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media FastForward failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotRewind()
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
mediaCtlProxy->Rewind(error);
if (error.isValid())
tqDebug("Media Rewind failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->Rewind(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media Rewind failed: %1").arg(dbuserror.message()));
}
void MediaControl::slotVolumeValueChanged(int val)
{
kdDebug() << k_funcinfo << endl;
TQT_DBusError error;
TQT_DBusError dbuserror;
if (val > volume)
{
TQT_DBusError error;
mediaCtlProxy->VolumeUp(error);
if (error.isValid())
tqDebug("Media VolumeUp getPowered failed: %s", error.message().local8Bit().data());
TQT_DBusError dbuserror;
mediaCtlProxy->VolumeUp(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media VolumeUp getPowered failed: %1").arg(dbuserror.message()));
}
if (val < volume)
{
mediaCtlProxy->VolumeDown(error);
if (error.isValid())
tqDebug("Media VolumeDown getPowered failed: %s", error.message().local8Bit().data());
mediaCtlProxy->VolumeDown(dbuserror);
if (dbuserror.isValid())
tqDebug(i18n("Media VolumeDown getPowered failed: %1").arg(dbuserror.message()));
}
volume = val;
}

@ -64,19 +64,19 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
// This following commented out lines are also part of the old code
// They represent features that were not migrated to Bluez5
// KBlueMon
//// kbluemonAction = new TDEAction(tr("KBlue&Mon"),
//// kbluemonAction = new TDEAction(i18n("KBlue&Mon"),
//// TDEGlobal::iconLoader()->loadIcon("info", TDEIcon::Small, 16),
//// TDEShortcut::null(), this, "kbluemon");
//// connect(kbluemonAction, SIGNAL(activated()), this, SLOT(slotkbluemonitor()));
////
//// // KBlueLock
//// kbluelockAction = new TDEAction(tr("KBlue&Lock"),
//// kbluelockAction = new TDEAction(i18n("KBlue&Lock"),
//// TDEGlobal::iconLoader()->loadIcon("kbluelock", TDEIcon::Small, 16),
//// TDEShortcut::null(), this, "kbluelock");
//// connect(kbluelockAction, SIGNAL(activated()), this, SLOT(slotkbluelock()));
////
//// // KBtobexclient
//// kbtobexclientAction = new TDEAction(tr("&Send File..."),
//// kbtobexclientAction = new TDEAction(i18n("&Send File..."),
//// TDEGlobal::iconLoader()->loadIcon("attach", TDEIcon::Small, 16),
//// TDEShortcut::null(), this, "kbtobexclient");
//// connect(kbtobexclientAction, SIGNAL(activated()), this, SLOT(slotkbtobexclient()));
@ -90,19 +90,19 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
TQT_DBusError dbuserr;
bool powered = app->adapters[it.key()]->getPowered(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getPowered failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getPowered failed: %1").arg(dbuserr.message()));
TQString name = app->adapters[it.key()]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
TQString msg;
if (powered) {
anyPowered = powered;
msg = tr("Power off [%1]").arg(name);
msg = i18n("Power off [%1]").arg(name);
}
else
{
msg = tr("Power on [%1]").arg(name);
msg = i18n("Power on [%1]").arg(name);
}
TDEToggleAction *ad_a = new TDEToggleAction(this, name.utf8());
@ -115,10 +115,10 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
}
// Configuration menu
configActionMenu = new TDEActionMenu(tr("&Configuration"), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), this, "config_menu");
configActionMenu = new TDEActionMenu(i18n("&Configuration"), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), this, "config_menu");
// Help menu
helpActionMenu = new TDEActionMenu(tr("&Help"), TDEGlobal::iconLoader()->loadIcon("help", TDEIcon::Small, 16), this, "help_menu");
helpActionMenu = new TDEActionMenu(i18n("&Help"), TDEGlobal::iconLoader()->loadIcon("help", TDEIcon::Small, 16), this, "help_menu");
// show documentation
showHelpAction = KStdAction::help(this, TQT_SLOT(slotShowHelp()), actionCollection());
@ -127,22 +127,22 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
aboutAction = KStdAction::aboutApp(this, TQT_SLOT(slotAbout()), actionCollection());
// // Inputdevice configuration
// inputConfigAction = new TDEAction(tr("&Input Devices..."),
// inputConfigAction = new TDEAction(i18n("&Input Devices..."),
// TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16),
// TDEShortcut::null(), this, "input_config");
// connect(inputConfigAction, SIGNAL(activated()), this, SLOT(slotInputConfig()));
// Bluetooth Device configuration
// from 06_rev748007.patch
deviceConfigAction = new TDEAction(tr("&Devices..."), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), TDEShortcut::null(), this, "device_config");
deviceConfigAction = new TDEAction(i18n("&Devices..."), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), TDEShortcut::null(), this, "device_config");
connect(deviceConfigAction, SIGNAL(activated()), this, TQT_SLOT(slotDeviceConfig()));
// Bluetooth Adapter configuration
adapterConfigAction = new TDEAction(tr("&Adapters..."), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), TDEShortcut::null(), this, "adapter_config");
adapterConfigAction = new TDEAction(i18n("&Adapters..."), TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16), TDEShortcut::null(), this, "adapter_config");
connect(adapterConfigAction, SIGNAL(activated()), this, TQT_SLOT(slotAdapterConfig()));
// // Paired device configuration
// pairedConfigAction = new TDEAction(tr("&Paired/Trusted Devices..."),
// pairedConfigAction = new TDEAction(i18n("&Paired/Trusted Devices..."),
// TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16),
// TDEShortcut::null(), this, "paired_config");
// connect(pairedConfigAction, SIGNAL(activated()), this, SLOT(slotPairedConfig()));
@ -151,19 +151,19 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
autostartIconAction = new TDEToggleAction(this, "autostart");
connect(autostartIconAction, SIGNAL(toggled(bool)), this, TQT_SLOT(slotIconAutostartToggled(bool)));
autostartIconAction->setChecked(autostart);
autostartIconAction->setText(tr("&Auto Start"));
autostartIconAction->setText(i18n("&Auto Start"));
// Agent switch
agentIconAction = new TDEToggleAction(this, "tdeauthagent");
connect(agentIconAction, SIGNAL(toggled(bool)), this, TQT_SLOT(slotIconAgentToggled(bool)));
agentIconAction->setChecked(agentstate);
agentIconAction->setText(tr("Auth A&gent"));
agentIconAction->setText(i18n("Auth A&gent"));
// Obexsrv switch
obexIconAction = new TDEToggleAction(this, "tdebtobexsrv");
connect(obexIconAction, SIGNAL(toggled(bool)), this, TQT_SLOT(slotIconObexToggled(bool)));
obexIconAction->setChecked(obexserver);
obexIconAction->setText(tr("&Obex Server"));
obexIconAction->setText(i18n("&Obex Server"));
slotIconAgentToggled(agentstate);
slotIconObexToggled(obexserver);
@ -172,7 +172,7 @@ TrayIcon::TrayIcon(TDEBluetoothApp* _app)
// showIconAction = new TDEToggleAction(this, "always_visible");
// connect(showIconAction, SIGNAL(toggled(bool)), this, SLOT(slotShowIconToggled(bool)));
// showIconAction->setChecked(alwaysVisible);
// showIconAction->setText(tr("Always &Visible"));
// showIconAction->setText(i18n("Always &Visible"));
// configActionMenu->insert(showIconAction);
KPixmap logoPixmap = TDEGlobal::iconLoader()->loadIcon(PIXMAP_LOGO, TDEIcon::Small, 22);
@ -316,7 +316,7 @@ void TrayIcon::setupTray(bool enable)
// Service configuration
/* TODO: create BlueZ service UI
serviceConfigAction = new TDEAction(tr("Configure &Services..."),
serviceConfigAction = new TDEAction(i18n("Configure &Services..."),
TDEGlobal::iconLoader()->loadIcon("configure", TDEIcon::Small, 16),
TDEShortcut::null(), this, "service_config");
connect(serviceConfigAction, SIGNAL(activated()), this, SLOT(slotServiceConfig()));
@ -357,10 +357,10 @@ void TrayIcon::updateIcon()
if (showPowerOnActionMap.isEmpty())
{
setPixmap(iconNoAdapter);
updateTooltip(tr("No BT adapter"));
updateTooltip(i18n("No BT adapter"));
if (!this->isHidden())
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"AdapterDetached", tr("<b>No BT adapter available.</b><br/>(BT adapter removed)"));
"AdapterDetached", i18n("<b>No BT adapter available.</b><br/>(BT adapter removed)"));
adapterConfigAction->setEnabled(false);
deviceConfigAction->setEnabled(false);
@ -376,14 +376,14 @@ void TrayIcon::updateIcon()
{
anyPowered = app->adapters[it.key()]->getPowered(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getPowered failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getPowered failed: %1").arg(dbuserr.message()));
// know if any adapter is powered
if (anyPowered)
{
path = app->adapters[it.key()]->getPath();
name = app->adapters[it.key()]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
break;
}
}
@ -396,7 +396,7 @@ void TrayIcon::updateIcon()
{
anyConnected = dit.data()->getConnected(dbuserr);
if (dbuserr.isValid())
tqDebug("Check for connected device failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Check for connected device failed: %1").arg(dbuserr.message()));
if (anyConnected)
break;
}
@ -418,7 +418,7 @@ void TrayIcon::updateIcon()
path = app->adapters.begin().data()->getPath();
name = app->adapters.begin().data()->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
setPixmap(iconOff);
}
@ -459,7 +459,7 @@ void TrayIcon::slotInputConfig()
process << PROCESS_KINPUTWIZARD;
if (!process.start(TDEProcess::DontCare))
{
KMessageBox::information(this, tr("Could not execute kinputwizard."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not execute kinputwizard."), i18n("TDEBluetooth"));
}
}
@ -470,7 +470,7 @@ void TrayIcon::slotkbluemonitor()
if (!process.start(TDEProcess::DontCare))
{
KMessageBox::information(this, tr("Could not execute KBlueMon."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not execute KBlueMon."), i18n("TDEBluetooth"));
}
}
@ -481,7 +481,7 @@ void TrayIcon::slotkbluelock()
if (!process.start(TDEProcess::DontCare))
{
KMessageBox::information(this, tr("Could not execute KBlueLock."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not execute KBlueLock."), i18n("TDEBluetooth"));
}
}
@ -493,14 +493,14 @@ void TrayIcon::slotIconObexToggled(bool state)
{
if (!app->startObexSrv())
{
KMessageBox::information(this, tr("Could not start OBEX server."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not start OBEX server."), i18n("TDEBluetooth"));
}
}
else
{
if (!app->stopObexSrv())
{
KMessageBox::information(this, tr("Could not stop OBEX server."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not stop OBEX server."), i18n("TDEBluetooth"));
}
}
}
@ -513,14 +513,14 @@ void TrayIcon::slotIconAgentToggled(bool state)
{
if (!app->startAuthAgent())
{
KMessageBox::information(this, tr("Could not start TDEBluez Authentication Agent."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not start TDEBluez Authentication Agent."), i18n("TDEBluetooth"));
}
}
else
{
if (!app->stopAuthAgent())
{
KMessageBox::information(this, tr("Could not stop TDEBluez Authentication Agent."), tr("TDEBluetooth"));
KMessageBox::information(this, i18n("Could not stop TDEBluez Authentication Agent."), i18n("TDEBluetooth"));
}
}
}
@ -550,11 +550,11 @@ void TrayIcon::slotPowerOnChanged(const TQString &adapter, bool state)
TQT_DBusError dbuserr;
TQString name = app->adapters[adapter]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
TQString addr = app->adapters[adapter]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAddress failed: %1").arg(dbuserr.message()));
if (name.isEmpty() && addr.isEmpty()) // adapter was removed
return;
@ -563,14 +563,14 @@ void TrayIcon::slotPowerOnChanged(const TQString &adapter, bool state)
if (state)
{
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"AdapterAvailable", tr("BT adapter <b>%1</b> is on<br/>(<b>%2</b>)").arg(name).arg(addr));
msg = tr("Power off [%1]").arg(name);
"AdapterAvailable", i18n("BT adapter <b>%1</b> is on<br/>(<b>%2</b>)").arg(name).arg(addr));
msg = i18n("Power off [%1]").arg(name);
}
else
{
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"AdapterAvailable", tr("BT adapter <b>%1</b> is off<br/>(<b>%2</b>)").arg(name).arg(addr));
msg = tr("Power on [%1]").arg(name);
"AdapterAvailable", i18n("BT adapter <b>%1</b> is off<br/>(<b>%2</b>)").arg(name).arg(addr));
msg = i18n("Power on [%1]").arg(name);
}
showPowerOnActionMap[adapter]->setText(msg);
@ -584,27 +584,27 @@ void TrayIcon::slotDeviceConnectedChanged(const TQString& path, bool state)
TQT_DBusError dbuserr;
TQString name = app->devices[path]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Device getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Device getAlias failed: %1").arg(dbuserr.message()));
TQString address = app->devices[path]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAddress failed: %1").arg(dbuserr.message()));
if (state)
{
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"IncomingConnection", tr("Connected to <b>%1</b> (<b>%2</b>)").arg(name).arg(address));
"IncomingConnection", i18n("Connected to <b>%1</b> (<b>%2</b>)").arg(name).arg(address));
}
else
{
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"IncomingConnection", tr("Disconnected from <b>%1</b> (<b>%2</b>)").arg(name).arg(address));
"IncomingConnection", i18n("Disconnected from <b>%1</b> (<b>%2</b>)").arg(name).arg(address));
}
updateIcon();
}
TQString TrayIcon::localAndEnglish(const TQCString& s)
{
if (TQString(s) != tr(s))
return TQString("%1 (\"%2\")").arg(tr(s)).arg(s);
if (TQString(s) != i18n(s))
return TQString("%1 (\"%2\")").arg(i18n(s)).arg(s);
else
return s;
}
@ -614,8 +614,8 @@ void TrayIcon::mousePressEvent(TQMouseEvent *e)
if (e->button() == TQMouseEvent::LeftButton)
{
// TQMessageBox::information(this,
// tr("Use right click to open the menu"),
// tr("Left click is reserved for ObexFTP browsing.\n"
// i18n("Use right click to open the menu"),
// i18n("Left click is reserved for ObexFTP browsing.\n"
// "ObexFTP is subject of development."));
e->accept();
TDEProcess proc;
@ -635,10 +635,10 @@ void TrayIcon::slotQuitSelected()
if (!autostartIconAction->isChecked())
{
int autoStart = KMessageBox::questionYesNoCancel(0,
tr("Should TDEBluetooth still be restarted when you login?"),
tr("Automatically Start TDEBluetooth?"),
tr("Start"),
tr("Do Not Start"));
i18n("Should TDEBluetooth still be restarted when you login?"),
i18n("Automatically Start TDEBluetooth?"),
i18n("Start"),
i18n("Do Not Start"));
if (autoStart == KMessageBox::Yes)
app->setAutoStart(true);
@ -662,21 +662,21 @@ void TrayIcon::slotAddAdapter(const TQString& path)
bool powered = app->adapters[path]->getPowered(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getPowered failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getPowered failed: %1").arg(dbuserr.message()));
TQString name = app->adapters[path]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAlias failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAlias failed: %1").arg(dbuserr.message()));
TQString addr = app->adapters[path]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getAddress failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getAddress failed: %1").arg(dbuserr.message()));
TQString msg;
if (powered)
msg = tr("Power off [%1]").arg(name);
msg = i18n("Power off [%1]").arg(name);
else
msg = tr("Power on [%1]").arg(name);
msg = i18n("Power on [%1]").arg(name);
TDEToggleAction *ad_a = new TDEToggleAction(this, name.utf8());
ad_a->setText(msg);
@ -686,7 +686,7 @@ void TrayIcon::slotAddAdapter(const TQString& path)
connect(ad_a, SIGNAL(toggled(bool)), this, SLOT(slotPowerOn(bool)));
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"AdapterAttached", tr("BT adapter <b>%1</b> attached<br/>(<b>%2</b>)").arg(name).arg(addr));
"AdapterAttached", i18n("BT adapter <b>%1</b> attached<br/>(<b>%2</b>)").arg(name).arg(addr));
if(!powered) // find out if we have some powered adapter
{
@ -695,7 +695,7 @@ void TrayIcon::slotAddAdapter(const TQString& path)
{
powered = app->adapters[it.key()]->getPowered(dbuserr);
if (dbuserr.isValid())
tqDebug("Adapter getPowered failed: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Adapter getPowered failed: %1").arg(dbuserr.message()));
// know if any adapter is powered
if (powered)
break;
@ -727,7 +727,7 @@ void TrayIcon::slotRemoveAdapter(const TQString& path)
showPowerOnActionMap.remove(path);
KNotifyClient::event(TDEApplication::kApplication()->mainWidget()->winId(),
"AdapterDetached", tr("BT adapter detached"));
"AdapterDetached", i18n("BT adapter detached"));
if (showPowerOnActionMap.isEmpty())
{
@ -754,9 +754,9 @@ void TrayIcon::slotAdapterAliasChanged(const TQString &path, const TQString &ali
bool powered = showPowerOnActionMap[path]->isChecked();
TQString msg;
if (powered)
msg = tr("Power off [%1]").arg(alias);
msg = i18n("Power off [%1]").arg(alias);
else
msg = tr("Power on [%1]").arg(alias);
msg = i18n("Power on [%1]").arg(alias);
showPowerOnActionMap[path]->setText(msg);
}
@ -765,7 +765,7 @@ void TrayIcon::slotDiscoverableTimeoutChanged(const TQString &path, TQ_UINT32 ti
TQT_DBusError dbuserr;
TQString name = app->adapters[path]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Error: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Error: %1").arg(dbuserr.message()));
slotUpdateToolTip(path, name);
}
@ -774,7 +774,7 @@ void TrayIcon::slotDiscoverableChanged(const TQString &path, bool state)
TQT_DBusError dbuserr;
TQString name = app->adapters[path]->getAlias(dbuserr);
if (dbuserr.isValid())
tqDebug("Error: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Error: %1").arg(dbuserr.message()));
slotUpdateToolTip(path, name);
}
@ -783,13 +783,13 @@ void TrayIcon::slotUpdateToolTip(const TQString& adapter, const TQString& name)
TQT_DBusError dbuserr;
TQString addr = app->adapters[adapter]->getAddress(dbuserr);
if (dbuserr.isValid())
tqDebug("Error: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Error: %1").arg(dbuserr.message()));
TQString disc =
(app->adapters[adapter]->getDiscoverable(dbuserr)) ? "discoverable" : "hidden";
if (dbuserr.isValid())
tqDebug("Error: %s", dbuserr.message().local8Bit().data());
tqDebug(i18n("Error: %1").arg(dbuserr.message()));
TQString newText = tr("Adapter: %1\nAddress: %2\nMode: %3\n").arg(name, addr, disc);
TQString newText = i18n("Adapter: %1\nAddress: %2\nMode: %3\n").arg(name, addr, disc);
updateTooltip(newText);
}

@ -47,9 +47,9 @@ TDEBluezAuth::TDEBluezAuth() :
// try to get a specific service name
if (!m_connection.requestName(DBUS_AUTH_SERVICE_NAME))
{
tqWarning("Requesting name %s failed. "
"The object will only be addressable through unique name '%s'",
DBUS_AUTH_SERVICE_NAME, m_connection.uniqueName().local8Bit().data());
tqWarning(i18n("Requesting name %1 failed. "
"The object will only be addressable through unique name '%2'").arg(
DBUS_AUTH_SERVICE_NAME).arg(m_connection.uniqueName()));
exit(-2);
}
@ -123,7 +123,7 @@ bool TDEBluezAuth::configureAgent()
{
if (!manager->requestDefaultAgent())
{
tqWarning("org.bluez.Agent1 registering FAILED");
tqWarning(i18n("org.bluez.Agent1 registering FAILED"));
return false;
}
}

@ -7,6 +7,7 @@
* (at your option) any later version. *
***************************************************************************/
#include "commandhandler.h"
#include <tdecmdlineargs.h>
#include <tdeapplication.h>
#include <tdelocale.h>

@ -79,7 +79,7 @@ ObexProtocol::ObexProtocol(const TQCString &protocol, const TQCString &pool_sock
mManager = new TDEObex::ObexObjectManagerImpl("org.bluez.obex", "/");
if (!mManager->isConnectedToDBUS())
{
TQString err = "ObexObjectManager is not connected to DBus";
TQString err = i18n("ObexObjectManager is not connected to DBus");
tqDebug(err);
// infoMessage(i18n("Error"));
TDEIO::SlaveBase::error(TDEIO::ERR_COULD_NOT_CONNECT, err);
@ -100,7 +100,7 @@ ObexProtocol::ObexProtocol(const TQCString &protocol, const TQCString &pool_sock
mClient = mManager->getClient();
if (!mClient)
{
TDEIO::SlaveBase::error(TDEIO::ERR_COULD_NOT_CONNECT, "ObexClient was not created");
TDEIO::SlaveBase::error(TDEIO::ERR_COULD_NOT_CONNECT, i18n("ObexClient was not created"));
exit();
}
@ -134,7 +134,7 @@ void ObexProtocol::closeObex()
if (!mClient->RemoveSession(mSessionPath, dbuserror))
{
if (dbuserror.isValid())
TDEIO::SlaveBase::error(TDEIO::ERR_COULD_NOT_CONNECT, dbuserror.message());
TDEIO::SlaveBase::error(TDEIO::ERR_COULD_NOT_CONNECT, i18n(dbuserror.message().utf8()));
}
// infoMessage(i18n("Disconnected"));
}
@ -518,7 +518,7 @@ void ObexProtocol::slotPropertiesChanged(const TQString& interface, const TQMap<
else
continue;
if (!ok)
tqDebug("ObjectManagerImpl::slotPropertiesChanged conversion failed");
tqDebug(i18n("ObjectManagerImpl::slotPropertiesChanged conversion failed"));
}
}
@ -542,7 +542,7 @@ void ObexProtocol::slotPropertiesChanged(const TQString& interface, const TQMap<
else
continue;
if (!ok)
tqDebug("ObjectManagerImpl::slotPropertiesChanged conversion failed");
tqDebug(i18n("ObjectManagerImpl::slotPropertiesChanged conversion failed"));
}
}
}
Loading…
Cancel
Save