francesco.dev...@mailoo.org writes:

>>Just one nit: what's supposed to appear next to the globe?  I'm guessing
>>some kind of location, but I don't know what to do to make anything
>>appear there?
>
> Yes it is the GSM cell location. To activate it go to Appearance, open the 
> options menu and select the main window settings, there check the location 
> box.
> However, for me this feature doesn't work, nor in mokofaen nor in finxi. 
> Could someone check if it works?

If I've understood the code correctly, there appears to be a missing
link between QModemNetworkRegistration, which is the first place that
gets registration and cell location info, and CellModemManager, which is
the class that sets the Telephony/Status/CellLocation value that the UI
expects.

The patch below tries to connect those two up.  It builds, but I don't
have time this evening to quickly test it.  If anyone else feels
brave...

       Neil


>From 828d7c687e2bc90b11d35b42c5a6d9b9785e5f5c Mon Sep 17 00:00:00 2001
From: Neil Jerram <n...@ossau.homelinux.net>
Date: Wed, 29 Aug 2012 22:08:35 +0100
Subject: [PATCH] Connect the jigsaw pieces for displaying cell location

---
 .../telephony/callpolicymanager/cell/cellmodemmanager.cpp  |   12 ++++++++++++
 .../telephony/callpolicymanager/cell/cellmodemmanager.h    |    1 +
 2 files changed, 13 insertions(+)

diff --git a/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.cpp b/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.cpp
index 6607581..a03b0c9 100644
--- a/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.cpp
+++ b/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.cpp
@@ -205,6 +205,8 @@ CellModemManager::CellModemManager(QObject *parent)
                      this, SLOT(registrationStateChanged()));
     QObject::connect(d->m_netReg, SIGNAL(currentOperatorChanged()),
                      this, SLOT(currentOperatorChanged()));
+    QObject::connect(d->m_netReg, SIGNAL(locationChanged()),
+                     this, SLOT(locationChanged()));
 
     // Rename signal for QAbstractCallPolicyManager.
     QObject::connect(this, SIGNAL(registrationStateChanged(QTelephony::RegistrationState)),
@@ -340,6 +342,16 @@ void CellModemManager::registrationStateChanged()
     doAutoRegister();
 }
 
+void CellModemManager::locationChanged()
+{
+  QString cell_location;
+  QTextStream(&cell_location)
+    << m_netReg.locationAreaCode()
+    << "/"
+    << m_netReg.cellId();
+  setCellLocation(cell_location);
+}
+
 void CellModemManager::rfLevelChanged()
 {
     QPhoneRfFunctionality::Level level = d->m_rfFunc->level();
diff --git a/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.h b/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.h
index 77a6fd0..1d239d1 100644
--- a/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.h
+++ b/src/server/phone/telephony/callpolicymanager/cell/cellmodemmanager.h
@@ -108,6 +108,7 @@ private slots:
                    const QPinOptions&);
     void currentOperatorChanged();
     void registrationStateChanged();
+    void locationChanged();
     void autoRegisterTimeout();
     void planeModeChanged(bool);
     void queryCallForwarding();
-- 
1.7.10.4

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to