[pkg-fso-commits] [SCM] freesmartphone.org demo GUI branch, upstream-dist, updated. upstream/0-git20090202-1-g5332a6a
Joachim Breitner
mail at joachim-breitner.de
Tue Jul 21 10:56:34 UTC 2009
The following commit has been merged in the upstream-dist branch:
commit 5332a6a2d9b9d89d3435dca1af0e3e31abf81c51
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Tue Jul 21 12:48:13 2009 +0200
Imported Upstream version 0-git20090610
diff --git a/data/locale/pl/LC_MESSAGES/zhone.mo b/data/locale/pl/LC_MESSAGES/zhone.mo
new file mode 100644
index 0000000..c952d95
Binary files /dev/null and b/data/locale/pl/LC_MESSAGES/zhone.mo differ
diff --git a/data/locale/zhone.pot b/data/locale/pl/LC_MESSAGES/zhone.po
similarity index 52%
copy from data/locale/zhone.pot
copy to data/locale/pl/LC_MESSAGES/zhone.po
index 0b45437..0e397aa 100644
--- a/data/locale/zhone.pot
+++ b/data/locale/pl/LC_MESSAGES/zhone.po
@@ -1,344 +1,363 @@
-# SOME DESCRIPTIVE TITLE.
-# This file is put in the public domain.
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: zhone\n"
+"Project-Id-Version: Zhone\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-28 09:26+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"PO-Revision-Date: 2009-04-13 15:10+0100\n"
+"Last-Translator: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>\n"
+"Language-Team: Polish\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: zhone:211
#, python-format
msgid "Registered: %s"
-msgstr ""
+msgstr "Zarejestrowano: %s"
#: zhone:218
msgid "Failed to register to network"
-msgstr ""
+msgstr "Nie można połączyć się z siecią"
#: zhone:226
msgid "active"
-msgstr ""
+msgstr "aktywny"
#: zhone:227
msgid "incoming"
-msgstr ""
+msgstr "przychodzący"
#: zhone:228
msgid "held"
-msgstr ""
+msgstr "zawieszony"
#: zhone:229
msgid "outgoing"
-msgstr ""
+msgstr "wychodzący"
#: zhone:230
msgid "released"
-msgstr ""
+msgstr "zakończony"
#: zhone:247
msgid "unknown number"
-msgstr ""
+msgstr "nieznany numer"
-#: zhone:276 zhone:610 zhone:916 zhone:1927
+#: zhone:276
+#: zhone:610
+#: zhone:916
+#: zhone:1927
msgid "cancel"
-msgstr ""
+msgstr "anuluj"
#: zhone:278
msgid "hold"
-msgstr ""
+msgstr "zawieś"
-#: zhone:279 zhone:286
+#: zhone:279
+#: zhone:286
msgid "hangup"
-msgstr ""
+msgstr "rozłąć"
#: zhone:282
msgid "answer"
-msgstr ""
+msgstr "odbierz"
#: zhone:283
msgid "reject"
-msgstr ""
+msgstr "odrzuć"
#: zhone:285
msgid "resume"
-msgstr ""
+msgstr "wznów"
#: zhone:340
msgid "open"
-msgstr ""
+msgstr "otwórz"
-#: zhone:429 zhone:609
+#: zhone:429
+#: zhone:609
msgid "send"
-msgstr ""
-
-#: zhone:438 zhone:441 zhone:609 zhone:784 zhone:787 zhone:915
+msgstr "wyślij"
+
+#: zhone:438
+#: zhone:441
+#: zhone:609
+#: zhone:784
+#: zhone:787
+#: zhone:915
msgid "delete"
-msgstr ""
+msgstr "usuń"
#: zhone:440
msgid "delete?"
-msgstr ""
+msgstr "usunąć?"
-#: zhone:441 zhone:787
+#: zhone:441
+#: zhone:787
msgid "abort"
-msgstr ""
+msgstr "anuluj"
-#: zhone:445 zhone:609
+#: zhone:445
+#: zhone:609
msgid "forward"
-msgstr ""
+msgstr "prześlij dalej"
-#: zhone:454 zhone:609
+#: zhone:454
+#: zhone:609
msgid "reply"
-msgstr ""
+msgstr "odpowiedz"
-#: zhone:477 zhone:591
+#: zhone:477
+#: zhone:591
msgid "From"
-msgstr ""
+msgstr "Od:"
-#: zhone:480 zhone:594
+#: zhone:480
+#: zhone:594
msgid "To"
-msgstr ""
+msgstr "Do:"
-#: zhone:481 zhone:595
+#: zhone:481
+#: zhone:595
msgid "Unknown"
-msgstr ""
+msgstr "Nieznany"
-#: zhone:485 zhone:599
+#: zhone:485
+#: zhone:599
#, python-format
msgid "%s: %s<br>Date: %s<p>%s"
-msgstr ""
+msgstr "%s: %s<br>Data: %s<p>%s"
#: zhone:621
msgid "use"
-msgstr ""
+msgstr "użyj"
-#: zhone:635 zhone:668
+#: zhone:635
+#: zhone:668
#, python-format
msgid "Current : %s"
-msgstr ""
+msgstr "Aktualny : %s"
#: zhone:684
msgid "dial"
-msgstr ""
+msgstr "dzwoń"
-#: zhone:760 zhone:915
+#: zhone:760
+#: zhone:915
msgid "edit name"
-msgstr ""
+msgstr "edytuj nazwę"
-#: zhone:768 zhone:915
+#: zhone:768
+#: zhone:915
msgid "edit number"
-msgstr ""
+msgstr "edytuj numer"
-#: zhone:776 zhone:915
+#: zhone:776
+#: zhone:915
msgid "new"
-msgstr ""
+msgstr "nowy"
#: zhone:780
msgid "name?"
-msgstr ""
+msgstr "nazwa?"
#: zhone:786
#, python-format
msgid "delete '%s'?"
-msgstr ""
+msgstr "usunąć '%s'?"
#: zhone:1368
#, python-format
msgid "GPS Time:<tab>%s"
-msgstr ""
+msgstr "Czas GPS:<tab>%s"
#: zhone:1370
msgid "GPS Time:<tab>N/A"
-msgstr ""
+msgstr "Czas GPS:<tab>nieznany"
#: zhone:1372
#, python-format
msgid "Fix:<tab>%s"
-msgstr ""
+msgstr "Fix:<tab>%s"
#: zhone:1372
msgid "none"
-msgstr ""
+msgstr "brak"
#: zhone:1374
msgid "Fix:<tab>N/A"
-msgstr ""
+msgstr "Fix:<tab>nieznany"
#: zhone:1376
#, python-format
msgid "Lat:<tab>%s<br>Lon:<tab>%s<br>Alt:<tab>%s"
-msgstr ""
+msgstr "Szerokość:<tab>%s<br>Długość:<tab>%s<br>Wysokość:<tab>%s"
#: zhone:1378
msgid "Lat:<tab>N/A<br>Lon:<tab>N/A<br>Alt:<tab>N/A"
-msgstr ""
+msgstr "Szerokość:<tab>nieznana<br>Długość:<tab>nieznana<br>Wysokość:<tab>nieznana"
#: zhone:1380
#, python-format
msgid "Course:<tab>%s<br>Speed:<tab>%s<br>Climb:<tab>%s"
-msgstr ""
+msgstr "Kierunek:<tab>%s<br>Szybkość:<tab>%s<br>Podejście:<tab>%s"
#: zhone:1382
msgid "Course:<tab>N/A<br>Speed:<tab>N/A<br>Climb:<tab>N/A"
-msgstr ""
+msgstr "Kierunek:<tab>nieznany<br>Szybkość:<tab>nieznana<br>Podejście:<tab>nieznane"
#: zhone:1384
#, python-format
msgid "P/H/V-DOP:<tab>%s/%s/%s"
-msgstr ""
+msgstr "P/H/V-DOP:<tab>%s/%s/%s"
#: zhone:1386
msgid "P/H/V-DOP:<tab>N/A"
-msgstr ""
+msgstr "P/H/V-DOP:<tab>nieznane"
#: zhone:1922
msgid "Take screenshot"
-msgstr ""
+msgstr "Zrzut ekranu"
#: zhone:1923
msgid "and upload to http://scap.linuxtogo.org"
-msgstr ""
+msgstr "i wysłanie na http://scap.linuxtogo.org"
#: zhone:1924
msgid "Exit"
-msgstr ""
+msgstr "Wyjście"
#: zhone:1925
msgid "Stop and exit Zhone"
-msgstr ""
+msgstr "Wyjście z Zhone"
#: zhone:2018
msgid "Waiting for DBus"
-msgstr ""
+msgstr "Oczekiwanie na DBus"
#: zhone:2035
msgid "Usage"
-msgstr ""
+msgstr "Użycie"
#: zhone:2050
#, python-format
msgid "Requesting resource %s"
-msgstr ""
+msgstr "Zamawianie zasobu %s"
#: zhone:2058
#, python-format
msgid "Releasing resource %s"
-msgstr ""
+msgstr "Zwalnianie zasobu %s"
#: zhone:2067
#, python-format
msgid "Requested resource %s"
-msgstr ""
+msgstr "Zamówiono zasób %s"
#: zhone:2077
#, python-format
msgid "Requested resource %s with error"
-msgstr ""
+msgstr "Zamówiono zasób %s, ale wystąpiły błędy"
#: zhone:2084
#, python-format
msgid "Released resource %s"
-msgstr ""
+msgstr "Zwolniono zasób %s"
#: zhone:2090
#, python-format
msgid "Released resource %s with error"
-msgstr ""
+msgstr "Zwolniono zasób %s, ale wystąpiły błędy"
#: zhone:2097
msgid "Requesting resource list"
-msgstr ""
+msgstr "Ządanie listy zasobów"
#: zhone:2103
#, python-format
msgid "Resource added %s"
-msgstr ""
+msgstr "Zasób %s dodany"
#: zhone:2106
#, python-format
msgid "Resource removed %s"
-msgstr ""
+msgstr "Zasób %s usunięty"
#: zhone:2129
msgid "Turning on Antenna"
-msgstr ""
+msgstr "Włączanie anteny GSM"
#: zhone:2138
msgid "Registering to network"
-msgstr ""
+msgstr "Rejestrowanie do sieci"
#: zhone:2146
msgid "Reading authentication status"
-msgstr ""
+msgstr "Odczytywanie stanu autoryzacji"
#: zhone:2154
msgid "Telephony Ready"
-msgstr ""
+msgstr "Telefonia gotowa"
#: zhone:2158
msgid "Waiting for PIN"
-msgstr ""
+msgstr "Oczekiwanie na PIN"
#: zhone:2162
msgid "Enter PIN"
-msgstr ""
+msgstr "Wpisz PIN"
#: zhone:2167
msgid "Waiting for PUK"
-msgstr ""
+msgstr "Oczekiwanie na PUK"
#: zhone:2171
msgid "Enter PUK"
-msgstr ""
+msgstr "Wpisz PUK"
#: zhone:2179
msgid "Failed to read authentication status"
-msgstr ""
+msgstr "Nie udało się odczytać statusu autoryzacji"
#: zhone:2183
msgid "Sending PIN"
-msgstr ""
+msgstr "Wysyłanie PINu"
-#: zhone:2194 zhone:2220
+#: zhone:2194
+#: zhone:2220
msgid "Error while sending PIN"
-msgstr ""
+msgstr "Błąd podczas wysyłania PINu"
#: zhone:2203
msgid "Enter new PIN"
-msgstr ""
+msgstr "Wpisz nowy PIN"
#: zhone:2209
msgid "Sending PUK and new PIN"
-msgstr ""
+msgstr "Wysyłanie kodu PUK i nowego PINu"
#: zhone:2250
#, python-format
msgid "Requesting packet %s"
-msgstr ""
+msgstr "Zamawianie pakietu %s"
#: zhone:2259
msgid "Requesting debug packets."
-msgstr ""
+msgstr "Zamawianie pakietów debugujących."
#: zhone:2265
#, python-format
msgid "Requested debug packet %s"
-msgstr ""
+msgstr "Zamówiono pakiet debugujący %s"
#: zhone:2271
#, python-format
msgid "Requested debug packet %s with error"
-msgstr ""
+msgstr "Zamówiono pakiet debugujący %s, ale wystąpiły błędy"
#: zhone:2367
msgid "connecting w/ dbus..."
-msgstr ""
+msgstr "łączenie z dbusem..."
+
+
diff --git a/setup.py b/setup.py
index 361bdc4..ec73bbc 100644
--- a/setup.py
+++ b/setup.py
@@ -38,6 +38,7 @@ setup(
data_files = [
( "zhone", ["data/themes/zhone.edj"] ),
( "zhone/locale/ru/LC_MESSAGES", ["data/locale/ru/LC_MESSAGES/zhone.mo"] ),
+ ( "zhone/locale/pl/LC_MESSAGES", ["data/locale/pl/LC_MESSAGES/zhone.mo"] ),
( "pixmaps", ["data/launcher/zhone.png"] ),
( "applications", ["data/launcher/zhone.desktop"] ),
]
diff --git a/src/zhone b/src/zhone
index 750b7f7..992e1fb 100755
--- a/src/zhone
+++ b/src/zhone
@@ -335,27 +335,12 @@ class pyphone_sms(edje_group):
self.page = 0
self.selected = None
self.newindex = None
- self.senderTimer = ecore.timer_add( 60, self.processUnsentMessages )
self.part_text_set( "label_action_open", _("open") )
- def processUnsentMessages( self ):
- if not dbus_object.gsm_device_obj:
- return True
-
- logger.info( "checking for unsent messages" )
- dbus_object.gsm_sim_iface.RetrieveMessagebook( "unsent", reply_handler=self.cbReceiveUnsentReply, error_handler=self.cbReceiveUnsentError )
-
- return True # call me again
-
- def cbReceiveUnsentReply( self, messages ):
- for message in messages:
- index, status, number, content, features = message
- logger.info( "trying to send message w/ index %d..." % index )
- dbus_object.gsm_sim_iface.SendStoredMessage( index, reply_handler=self.cbSendReply, error_handler=self.cbSendError )
-
- def cbReceiveUnsentError( self, e ):
- logger.info( "did not receive any unsent messages: %s" % e )
+ def sendMessage( self, index ):
+ logger.info( "trying to send message w/ index %d..." % index )
+ dbus_object.gsm_sim_iface.SendStoredMessage( index, reply_handler=self.cbSendReply, error_handler=self.cbSendError )
def cbSendReply( self, reference, timestamp ):
logger.info( "sent message successfully w/ reference number %d (timestamp: %s)" % ( reference, timestamp ) )
@@ -365,7 +350,7 @@ class pyphone_sms(edje_group):
def cbStoreReply( self, result ):
logger.info( "stored message lives at SIM position %d" % result )
- self.processUnsentMessages()
+ self.sendMessage( result )
if not self.busy:
dbus_object.gsm_sim_iface.RetrieveMessagebook(
"all",
@@ -1020,12 +1005,18 @@ class pyphone_wireless( edje_group ):
self.timer = None
+ self.code = None
self.gsm_serving = None
self.gsm_neighbour = None
+ self.location = None
self.update()
def update( self ):
text = []
+ if self.code:
+ text.append( "MCC/MNC:<tab>%s/%s" % ( self.code[:3], self.code[3:] ) )
+ else:
+ text.append( "MCC/MNC:<tab>N/A" )
if self.gsm_serving:
text.append( "ARFCN:<tab>%s" % self.gsm_serving['arfcn'] )
text.append( "LAC/CID:<tab>%s/%s" % ( self.gsm_serving['lac'], self.gsm_serving['cid'] ) )
@@ -1040,6 +1031,15 @@ class pyphone_wireless( edje_group ):
text.append( "Cell Type:<tab>%s" % self.gsm_serving['ctype'] )
else:
text.append( "Serving Cell:<tab>N/A" )
+ celldb = []
+ if self.location:
+ celldb.append( "Lat:<tab>%s" % self.location[1] )
+ celldb.append( "Lon:<tab>%s" % self.location[2] )
+ celldb.append( "Alt:<tab>%s" % self.location[3] )
+ celldb.append( "Size:<tab>%s" % self.location[4] )
+ celldb.append( "Count:<tab>%s" % self.location[5] )
+ else:
+ celldb.append( "Cell DB:<tab>N/A" )
cells = []
if self.gsm_serving:
cells.append(self.gsm_serving)
@@ -1056,8 +1056,6 @@ class pyphone_wireless( edje_group ):
self.part_swallow( "swallow", self.neighbourgraph )
self.neighbourgraph.show()
elif self.page == "right":
- #self.part_swallow( "swallow", self.positiongraph )
- #self.positiongraph.show()
pass
if self.page == "left":
self.part_text_set( "status", u"<br>".join( text ) )
@@ -1065,7 +1063,7 @@ class pyphone_wireless( edje_group ):
self.part_text_set( "status", u"" )
self.neighbourgraph.update(cells)
elif self.page == "right":
- self.part_text_set( "status", u"" )
+ self.part_text_set( "status", u"<br>".join( celldb ) )
def cbServingCellReply( self, serving ):
logger.debug( "gsm serving cell status updated: %s" % serving )
@@ -1106,8 +1104,34 @@ class pyphone_wireless( edje_group ):
reply_handler=self.cbNeighbourCellReply,
error_handler=self.cbNeighbourCellError,
)
+ cells = []
+ if self.gsm_serving:
+ cells.append(self.gsm_serving)
+ if self.gsm_neighbour:
+ cells.extend(self.gsm_neighbour)
+ if self.code and cells:
+ ids = []
+ for cell in cells:
+ ids.append((int(cell['lac'], 16), int(cell['cid'], 16)))
+ print (self.code[:3], self.code[3:], ids)
+ location = dbus_object.gsm_data_iface.GetCellLocation(self.code[:3], self.code[3:], ids)
+ print location
+ if location is None:
+ self.location = None
+ if location[0] is False:
+ self.location = None
+ else:
+ self.location = location
+ else:
+ self.location = None
return True
+ def onNetworkStatus( self, status ):
+ if 'code' in status:
+ self.code = str(status['code'])
+ else:
+ self.code = None
+
@edje.decorators.signal_callback( "mouse,clicked,1", "button_select_*" )
def on_edje_signal_button_list_pressed( self, emission, source ):
self.page = source.split( "_" )[-1]
@@ -1207,7 +1231,7 @@ class pyphone_location( edje_group ):
elif self.generic:
for sv, (used, signal) in self.generic.items():
text = [ "", "%i" % sv, "%i" % signal, "", "", "" ]
- rows.append( ( cno, used, 0, text, "" ) )
+ rows.append( ( signal, used, 0, text, "" ) )
if rows:
count = 1 + len( rows )
self.maxsignal = float( max( [x[0] for x in rows] + [self.maxsignal] ) )
@@ -2359,6 +2383,7 @@ class GUI(object):
dbus_object.onIncomingUssd.append( self.groups["phone"].onIncomingUssd )
dbus_object.onIdleStateChanged.append( self.lock_on_idle )
dbus_object.onNetworkStatus.append( self.groups["phone"].onNetworkStatus )
+ dbus_object.onNetworkStatus.append( self.groups["wireless"].onNetworkStatus )
logger.debug( "GUI init done" )
@@ -2416,15 +2441,7 @@ class GUI(object):
class EvasCanvas(object):
#----------------------------------------------------------------------------#
def __init__(self, fullscreen, engine, size):
- if engine == "x11":
- f = ecore.evas.SoftwareX11
- elif engine == "x11-16":
- if ecore.evas.engine_type_supported_get("software_x11_16"):
- f = ecore.evas.SoftwareX11_16
- else:
- logger.warning( "x11-16 is not supported, fallback to x11" )
- f = ecore.evas.SoftwareX11
-
+ f = ecore.evas.SoftwareX11
self.evas_obj = f(w=size[0], h=size[1])
self.evas_obj.callback_delete_request = self.on_delete_request
self.evas_obj.callback_resize = self.on_resize
@@ -2539,6 +2556,8 @@ class DBusObject( object ):
self.inputnotifier_iface = None
self.prefs_obj = None
self.prefs_iface = None
+ self.gsm_server_obj = None
+ self.gsm_data_iface = None
self.fullinit = False
@@ -2615,7 +2634,7 @@ class DBusObject( object ):
# Phone
self.gsm_device_obj = self.tryGetProxy( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Device' )
-
+ self.gsm_server_obj = self.tryGetProxy( 'org.freesmartphone.ogsmd', '/org/freesmartphone/GSM/Server' )
if ( self.gsm_device_obj is not None ) and ( self.gsm_device_iface is None ):
self.gsm_device_iface = Interface(self.gsm_device_obj, 'org.freesmartphone.GSM.Device')
self.gsm_sim_iface = Interface(self.gsm_device_obj, 'org.freesmartphone.GSM.SIM')
@@ -2628,7 +2647,9 @@ class DBusObject( object ):
self.gsm_call_iface.connect_to_signal( "CallStatus", self.cbCallStatus )
self.gsm_network_iface.connect_to_signal( "Status", self.cbNetworkStatus )
self.gsm_network_iface.connect_to_signal( "IncomingUssd", self.cbIncomingUssd )
- if self.gsm_device_obj is None:
+ if ( self.gsm_server_obj is not None ) and ( self.gsm_data_iface is None ):
+ self.gsm_data_iface = Interface(self.gsm_server_obj, 'org.freesmartphone.GSM.Data')
+ if self.gsm_device_obj is None or self.gsm_server_obj is None:
failcount += 1
else:
logger.debug( "gsm ok: %s" % self.gsm_network_iface )
--
freesmartphone.org demo GUI
More information about the pkg-fso-commits
mailing list