Adding a phone activity log window
This commit is contained in:
parent
24bcb783d6
commit
7c79b84ce4
2
Makefile
2
Makefile
@ -48,6 +48,7 @@ dist:
|
|||||||
$(PACKAGE)-$(VERSION)/src/phone.c \
|
$(PACKAGE)-$(VERSION)/src/phone.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/contacts.c \
|
$(PACKAGE)-$(VERSION)/src/contacts.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/dialer.c \
|
$(PACKAGE)-$(VERSION)/src/dialer.c \
|
||||||
|
$(PACKAGE)-$(VERSION)/src/logs.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/messages.c \
|
$(PACKAGE)-$(VERSION)/src/messages.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/settings.c \
|
$(PACKAGE)-$(VERSION)/src/settings.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/Makefile \
|
$(PACKAGE)-$(VERSION)/src/Makefile \
|
||||||
@ -58,6 +59,7 @@ dist:
|
|||||||
$(PACKAGE)-$(VERSION)/src/phone.h \
|
$(PACKAGE)-$(VERSION)/src/phone.h \
|
||||||
$(PACKAGE)-$(VERSION)/src/common.c \
|
$(PACKAGE)-$(VERSION)/src/common.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/project.conf \
|
$(PACKAGE)-$(VERSION)/src/project.conf \
|
||||||
|
$(PACKAGE)-$(VERSION)/src/plugins/blacklist.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/plugins/engineering.c \
|
$(PACKAGE)-$(VERSION)/src/plugins/engineering.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/plugins/openmoko.c \
|
$(PACKAGE)-$(VERSION)/src/plugins/openmoko.c \
|
||||||
$(PACKAGE)-$(VERSION)/src/plugins/panel.c \
|
$(PACKAGE)-$(VERSION)/src/plugins/panel.c \
|
||||||
|
174
po/fr.po
174
po/fr.po
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Phone 0.0.0\n"
|
"Project-Id-Version: Phone 0.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2010-08-01 20:27+0200\n"
|
"POT-Creation-Date: 2010-08-07 02:24+0200\n"
|
||||||
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
||||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
@ -112,8 +112,8 @@ msgstr "Délai d'attente du réseau dépassé"
|
|||||||
msgid "Network not allowed - emergency calls only"
|
msgid "Network not allowed - emergency calls only"
|
||||||
msgstr "Réseau non autorisé - appels d'urgence uniquement"
|
msgstr "Réseau non autorisé - appels d'urgence uniquement"
|
||||||
|
|
||||||
#: ../src/gsm.c:172 ../src/gsm.c:1235 ../src/gsm.c:1445 ../src/gsm.c:1505
|
#: ../src/gsm.c:172 ../src/gsm.c:1234 ../src/gsm.c:1444 ../src/gsm.c:1504
|
||||||
#: ../src/gsm.c:2047
|
#: ../src/gsm.c:2046
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr "Erreur inconnue"
|
msgstr "Erreur inconnue"
|
||||||
|
|
||||||
@ -189,266 +189,274 @@ msgstr ""
|
|||||||
msgid "Conflict with command details"
|
msgid "Conflict with command details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../src/gsm.c:391
|
#: ../src/gsm.c:390
|
||||||
msgid ": Unknown baudrate, assuming 115200"
|
msgid ": Unknown baudrate, assuming 115200"
|
||||||
msgstr ": Débit inconnu, tente 115200"
|
msgstr ": Débit inconnu, tente 115200"
|
||||||
|
|
||||||
#: ../src/gsm.c:1075
|
#: ../src/gsm.c:1074
|
||||||
msgid "Event not handled"
|
msgid "Event not handled"
|
||||||
msgstr "Événement non géré"
|
msgstr "Événement non géré"
|
||||||
|
|
||||||
#: ../src/main.c:45
|
#: ../src/main.c:45
|
||||||
msgid ""
|
msgid ""
|
||||||
"Usage: phone -b baudrate -d device -r retry -F\n"
|
"Usage: phone [-b baudrate][-d device][-r retry][-F]\n"
|
||||||
" -b\tSpeed to set before communicating with the device\n"
|
" -b\tSpeed to set before communicating with the device\n"
|
||||||
" -d\tPath to the modem device\n"
|
" -d\tPath to the modem device\n"
|
||||||
" -r\tDelay between two tries to open and settle with the modem (ms)\n"
|
" -r\tDelay between two tries to open and settle with the modem (ms)\n"
|
||||||
" -F\tEnable hardware flow control (RTS/CTS)\n"
|
" -F\tEnable hardware flow control (RTS/CTS)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../src/phone.c:334
|
#: ../src/phone.c:354
|
||||||
msgid "Initializing..."
|
msgid "Initializing..."
|
||||||
msgstr "Initialisation..."
|
msgstr "Initialisation..."
|
||||||
|
|
||||||
#: ../src/phone.c:512
|
#: ../src/phone.c:533
|
||||||
msgid "Checking SIM PIN code..."
|
msgid "Checking SIM PIN code..."
|
||||||
msgstr "Vérification du code SIM PIN..."
|
msgstr "Vérification du code SIM PIN..."
|
||||||
|
|
||||||
#: ../src/phone.c:564
|
#: ../src/phone.c:585
|
||||||
msgid "Delete this contact?"
|
msgid "Delete this contact?"
|
||||||
msgstr "Supprimer ce contact?"
|
msgstr "Supprimer ce contact?"
|
||||||
|
|
||||||
#: ../src/phone.c:903 ../src/phone.c:975
|
#: ../src/phone.c:934 ../src/phone.c:1005
|
||||||
msgid "Delete this message?"
|
msgid "Delete this message?"
|
||||||
msgstr "Supprimer ce message?"
|
msgstr "Supprimer ce message?"
|
||||||
|
|
||||||
#: ../src/phone.c:909 ../src/phone.c:980
|
#: ../src/phone.c:940 ../src/phone.c:1010
|
||||||
msgid "Deleting message..."
|
msgid "Deleting message..."
|
||||||
msgstr "Suppression du message..."
|
msgstr "Suppression du message..."
|
||||||
|
|
||||||
#: ../src/phone.c:1054
|
#: ../src/phone.c:1084
|
||||||
msgid "Answer"
|
msgid "Answer"
|
||||||
msgstr "Répondre"
|
msgstr "Répondre"
|
||||||
|
|
||||||
#: ../src/phone.c:1061
|
#: ../src/phone.c:1091
|
||||||
msgid "Hangup"
|
msgid "Hangup"
|
||||||
msgstr "Raccrocher"
|
msgstr "Raccrocher"
|
||||||
|
|
||||||
#: ../src/phone.c:1068
|
#: ../src/phone.c:1098
|
||||||
msgid "Reject"
|
msgid "Reject"
|
||||||
msgstr "Rejeter"
|
msgstr "Rejeter"
|
||||||
|
|
||||||
#: ../src/phone.c:1091
|
#: ../src/phone.c:1121
|
||||||
msgid "Loudspeaker"
|
msgid "Loudspeaker"
|
||||||
msgstr "Haut-parleur"
|
msgstr "Haut-parleur"
|
||||||
|
|
||||||
#: ../src/phone.c:1101
|
#: ../src/phone.c:1131
|
||||||
msgid "Mute microphone"
|
msgid "Mute microphone"
|
||||||
msgstr "Couper le microphone"
|
msgstr "Couper le microphone"
|
||||||
|
|
||||||
#: ../src/phone.c:1117
|
#: ../src/phone.c:1147
|
||||||
msgid "Unknown contact"
|
msgid "Unknown contact"
|
||||||
msgstr "Contact inconnu"
|
msgstr "Contact inconnu"
|
||||||
|
|
||||||
#: ../src/phone.c:1124
|
#: ../src/phone.c:1154
|
||||||
msgid "Unknown number"
|
msgid "Unknown number"
|
||||||
msgstr "Numéro inconnu"
|
msgstr "Numéro inconnu"
|
||||||
|
|
||||||
#: ../src/phone.c:1132
|
#: ../src/phone.c:1162
|
||||||
msgid "In conversation"
|
msgid "In conversation"
|
||||||
msgstr "En conversation"
|
msgstr "En conversation"
|
||||||
|
|
||||||
#: ../src/phone.c:1140
|
#: ../src/phone.c:1170
|
||||||
msgid "Incoming call"
|
msgid "Incoming call"
|
||||||
msgstr "Appel entrant"
|
msgstr "Appel entrant"
|
||||||
|
|
||||||
#: ../src/phone.c:1147
|
#: ../src/phone.c:1177
|
||||||
msgid "Outgoing call"
|
msgid "Outgoing call"
|
||||||
msgstr "Appel sortant"
|
msgstr "Appel sortant"
|
||||||
|
|
||||||
#: ../src/phone.c:1155
|
#: ../src/phone.c:1185
|
||||||
msgid "Call finished"
|
msgid "Call finished"
|
||||||
msgstr "Appel terminé"
|
msgstr "Appel terminé"
|
||||||
|
|
||||||
#: ../src/phone.c:1209
|
#: ../src/phone.c:1239
|
||||||
msgid "Enter"
|
msgid "Enter"
|
||||||
msgstr "Entrer"
|
msgstr "Entrer"
|
||||||
|
|
||||||
#: ../src/phone.c:1211
|
#: ../src/phone.c:1241
|
||||||
msgid "Skip"
|
msgid "Skip"
|
||||||
msgstr "Ignorer"
|
msgstr "Ignorer"
|
||||||
|
|
||||||
#: ../src/phone.c:1222
|
#: ../src/phone.c:1252
|
||||||
msgid "Enter SIM PIN code"
|
msgid "Enter SIM PIN code"
|
||||||
msgstr "Entrer le code SIM PIN"
|
msgstr "Entrer le code SIM PIN"
|
||||||
|
|
||||||
#: ../src/phone.c:1251
|
#: ../src/phone.c:1281
|
||||||
msgid "Contacts"
|
msgid "Contacts"
|
||||||
msgstr "Contacts"
|
msgstr "Contacts"
|
||||||
|
|
||||||
#: ../src/phone.c:1258 ../src/phone.c:1573 ../src/phone.c:1616
|
#: ../src/phone.c:1288 ../src/phone.c:1603 ../src/phone.c:1645
|
||||||
#: ../src/phone.c:1740
|
#: ../src/phone.c:1722 ../src/phone.c:1846
|
||||||
msgid "Call"
|
msgid "Call"
|
||||||
msgstr "Appeler"
|
msgstr "Appeler"
|
||||||
|
|
||||||
#: ../src/phone.c:1264
|
#: ../src/phone.c:1294
|
||||||
msgid "Write"
|
msgid "Write"
|
||||||
msgstr "Écrire"
|
msgstr "Écrire"
|
||||||
|
|
||||||
#: ../src/phone.c:1296 ../src/phone.c:1844
|
#: ../src/phone.c:1326 ../src/phone.c:1950
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "Nom"
|
msgstr "Nom"
|
||||||
|
|
||||||
#: ../src/phone.c:1545
|
#: ../src/phone.c:1575
|
||||||
msgid "Dialer"
|
msgid "Dialer"
|
||||||
msgstr "Composer"
|
msgstr "Composer"
|
||||||
|
|
||||||
#: ../src/phone.c:1575
|
#: ../src/phone.c:1605
|
||||||
msgid "Hang up"
|
msgid "Hang up"
|
||||||
msgstr "Raccrocher"
|
msgstr "Raccrocher"
|
||||||
|
|
||||||
#: ../src/phone.c:1609
|
#: ../src/phone.c:1638
|
||||||
msgid "Messages"
|
msgid "Phone log"
|
||||||
msgstr "Messages"
|
msgstr ""
|
||||||
|
|
||||||
#: ../src/phone.c:1622
|
#: ../src/phone.c:1651
|
||||||
msgid "New message"
|
msgid "Message"
|
||||||
msgstr "Nouveau message"
|
msgstr "Message"
|
||||||
|
|
||||||
#: ../src/phone.c:1628 ../src/phone.c:1746
|
#: ../src/phone.c:1672 ../src/phone.c:1775
|
||||||
msgid "Reply"
|
msgid "To/From"
|
||||||
msgstr "Répondre"
|
msgstr "Vers/De"
|
||||||
|
|
||||||
#: ../src/phone.c:1646
|
#: ../src/phone.c:1678 ../src/phone.c:1781
|
||||||
msgid "Inbox"
|
|
||||||
msgstr "Reçus"
|
|
||||||
|
|
||||||
#: ../src/phone.c:1650
|
|
||||||
msgid "Sent"
|
|
||||||
msgstr "Envoyés"
|
|
||||||
|
|
||||||
#: ../src/phone.c:1669
|
|
||||||
msgid "From"
|
|
||||||
msgstr "De"
|
|
||||||
|
|
||||||
#: ../src/phone.c:1675
|
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "Date"
|
msgstr "Date"
|
||||||
|
|
||||||
#: ../src/phone.c:1734
|
#: ../src/phone.c:1715
|
||||||
|
msgid "Messages"
|
||||||
|
msgstr "Messages"
|
||||||
|
|
||||||
|
#: ../src/phone.c:1728
|
||||||
|
msgid "New message"
|
||||||
|
msgstr "Nouveau message"
|
||||||
|
|
||||||
|
#: ../src/phone.c:1734 ../src/phone.c:1852
|
||||||
|
msgid "Reply"
|
||||||
|
msgstr "Répondre"
|
||||||
|
|
||||||
|
#: ../src/phone.c:1752
|
||||||
|
msgid "Inbox"
|
||||||
|
msgstr "Reçus"
|
||||||
|
|
||||||
|
#: ../src/phone.c:1756
|
||||||
|
msgid "Sent"
|
||||||
|
msgstr "Envoyés"
|
||||||
|
|
||||||
|
#: ../src/phone.c:1840
|
||||||
msgid "Read message"
|
msgid "Read message"
|
||||||
msgstr "Lire le message"
|
msgstr "Lire le message"
|
||||||
|
|
||||||
#: ../src/phone.c:1821
|
#: ../src/phone.c:1927
|
||||||
msgid "Phone settings"
|
msgid "Phone settings"
|
||||||
msgstr "Paramètres du téléphone"
|
msgstr "Paramètres du téléphone"
|
||||||
|
|
||||||
#: ../src/phone.c:1884
|
#: ../src/phone.c:1990
|
||||||
msgid "Write message"
|
msgid "Write message"
|
||||||
msgstr "Écrire un message"
|
msgstr "Écrire un message"
|
||||||
|
|
||||||
#: ../src/phone.c:1890
|
#: ../src/phone.c:1996
|
||||||
msgid "Send"
|
msgid "Send"
|
||||||
msgstr "Envoyer"
|
msgstr "Envoyer"
|
||||||
|
|
||||||
#: ../src/phone.c:1896
|
#: ../src/phone.c:2002
|
||||||
msgid "Attach"
|
msgid "Attach"
|
||||||
msgstr "Attacher"
|
msgstr "Attacher"
|
||||||
|
|
||||||
#: ../src/phone.c:2010
|
#: ../src/phone.c:2116
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d message%s, %d/%d characters"
|
msgid "%d message%s, %d/%d characters"
|
||||||
msgstr "%d message%s, %d/%d caractères"
|
msgstr "%d message%s, %d/%d caractères"
|
||||||
|
|
||||||
#: ../src/phone.c:2011
|
#: ../src/phone.c:2117
|
||||||
msgid "s"
|
msgid "s"
|
||||||
msgstr "s"
|
msgstr "s"
|
||||||
|
|
||||||
#: ../src/phone.c:2040
|
#: ../src/phone.c:2146
|
||||||
msgid "Sending message..."
|
msgid "Sending message..."
|
||||||
msgstr "Envoi du message..."
|
msgstr "Envoi du message..."
|
||||||
|
|
||||||
#: ../src/phone.c:2155
|
#: ../src/phone.c:2273
|
||||||
msgid "Operation in progress..."
|
msgid "Operation in progress..."
|
||||||
msgstr "Opération en cours..."
|
msgstr "Opération en cours..."
|
||||||
|
|
||||||
#: ../src/phone.c:2183 ../src/phone.c:2188
|
#: ../src/phone.c:2301 ../src/phone.c:2306
|
||||||
msgid "Question"
|
msgid "Question"
|
||||||
msgstr "Question"
|
msgstr "Question"
|
||||||
|
|
||||||
#: ../src/phone.c:2208 ../src/phone.c:2213
|
#: ../src/phone.c:2326 ../src/phone.c:2331
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Erreur"
|
msgstr "Erreur"
|
||||||
|
|
||||||
#: ../src/phone.c:2260 ../src/phone.c:2265
|
#: ../src/phone.c:2378 ../src/phone.c:2383
|
||||||
msgid "Information"
|
msgid "Information"
|
||||||
msgstr "Information"
|
msgstr "Information"
|
||||||
|
|
||||||
#: ../src/phone.c:2344
|
#: ../src/phone.c:2462
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Inconnu"
|
msgstr "Inconnu"
|
||||||
|
|
||||||
#: ../src/phone.c:2347
|
#: ../src/phone.c:2465
|
||||||
msgid "Registering..."
|
msgid "Registering..."
|
||||||
msgstr "Enregistrement..."
|
msgstr "Enregistrement..."
|
||||||
|
|
||||||
#: ../src/phone.c:2350
|
#: ../src/phone.c:2468
|
||||||
msgid "Denied"
|
msgid "Denied"
|
||||||
msgstr "Refusé"
|
msgstr "Refusé"
|
||||||
|
|
||||||
#: ../src/phone.c:2355
|
#: ../src/phone.c:2473
|
||||||
msgid "SIM check..."
|
msgid "SIM check..."
|
||||||
msgstr "Vérification SIM..."
|
msgstr "Vérification SIM..."
|
||||||
|
|
||||||
#: ../src/phone.c:2361
|
#: ../src/phone.c:2479
|
||||||
msgid "SIM ready..."
|
msgid "SIM ready..."
|
||||||
msgstr "SIM prête..."
|
msgstr "SIM prête..."
|
||||||
|
|
||||||
#: ../src/phone.c:2407
|
#: ../src/phone.c:2525
|
||||||
msgid "Name: "
|
msgid "Name: "
|
||||||
msgstr "Nom: "
|
msgstr "Nom: "
|
||||||
|
|
||||||
#: ../src/phone.c:2414
|
#: ../src/phone.c:2532
|
||||||
msgid "Number: "
|
msgid "Number: "
|
||||||
msgstr "Numéro: "
|
msgstr "Numéro: "
|
||||||
|
|
||||||
#: ../src/phone.c:2428
|
#: ../src/phone.c:2546
|
||||||
msgid "New contact"
|
msgid "New contact"
|
||||||
msgstr "Nouveau contact"
|
msgstr "Nouveau contact"
|
||||||
|
|
||||||
#: ../src/phone.c:2430
|
#: ../src/phone.c:2548
|
||||||
msgid "Edit contact: "
|
msgid "Edit contact: "
|
||||||
msgstr "Modifier contact: "
|
msgstr "Modifier contact: "
|
||||||
|
|
||||||
#: ../src/phone.c:2557
|
#: ../src/phone.c:2677
|
||||||
msgid "New message received"
|
msgid "New message received"
|
||||||
msgstr "Nouveau message reçu"
|
msgstr "Nouveau message reçu"
|
||||||
|
|
||||||
#: ../src/phone.c:2573
|
#: ../src/phone.c:2693
|
||||||
msgid "Message sent"
|
msgid "Message sent"
|
||||||
msgstr "Message envoyé"
|
msgstr "Message envoyé"
|
||||||
|
|
||||||
#: ../src/phone.c:2597
|
#: ../src/phone.c:2722 ../src/phone.c:2726
|
||||||
msgid "SIM PIN is valid"
|
msgid "SIM PIN is valid"
|
||||||
msgstr "Code SIM PIN valide"
|
msgstr "Code SIM PIN valide"
|
||||||
|
|
||||||
#: ../src/phone.c:2633
|
#: ../src/phone.c:2763
|
||||||
msgid "Could not request new message indications"
|
msgid "Could not request new message indications"
|
||||||
msgstr "Impossible d'obtenir des notifications de nouveaux messages"
|
msgstr "Impossible d'obtenir des notifications de nouveaux messages"
|
||||||
|
|
||||||
#: ../src/phone.c:2644
|
#: ../src/phone.c:2774
|
||||||
msgid "Could not send message"
|
msgid "Could not send message"
|
||||||
msgstr "Le message n'a pas pu être envoyé"
|
msgstr "Le message n'a pas pu être envoyé"
|
||||||
|
|
||||||
#: ../src/phone.c:2652
|
#: ../src/phone.c:2782
|
||||||
msgid "Wrong SIM PIN code"
|
msgid "Wrong SIM PIN code"
|
||||||
msgstr "Code SIM PIN erroné"
|
msgstr "Code SIM PIN erroné"
|
||||||
|
|
||||||
#: ../src/phone.c:2687
|
#: ../src/phone.c:2817
|
||||||
msgid "Raw data (not shown)"
|
msgid "Raw data (not shown)"
|
||||||
msgstr "Données brutes (non affichées)"
|
msgstr "Données brutes (non affichées)"
|
||||||
|
|
||||||
#: ../src/phone.c:2702
|
#: ../src/phone.c:2832
|
||||||
msgid "Message deleted"
|
msgid "Message deleted"
|
||||||
msgstr "Message supprimé"
|
msgstr "Message supprimé"
|
||||||
|
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
phone
|
phone
|
||||||
phone-contacts
|
phone-contacts
|
||||||
phone-dialer
|
phone-dialer
|
||||||
|
phone-logs
|
||||||
phone-messages
|
phone-messages
|
||||||
phone-settings
|
phone-settings
|
||||||
|
23
src/Makefile
23
src/Makefile
@ -1,13 +1,13 @@
|
|||||||
SUBDIRS = plugins
|
SUBDIRS = plugins
|
||||||
TARGETS = phone phone-contacts phone-dialer phone-messages phone-settings
|
TARGETS = phone phone-contacts phone-dialer phone-logs phone-messages phone-settings
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
CC = cc
|
CC = cc
|
||||||
CPPFLAGSF= -I ../include
|
CPPFLAGSF= -I ../include
|
||||||
CPPFLAGS= -I $(PREFIX)/include
|
CPPFLAGS= -I $(PREFIX)/include
|
||||||
CFLAGSF = -W
|
CFLAGSF = -W `pkg-config --cflags gtk+-2.0`
|
||||||
CFLAGS = -Wall -g -O2 -pedantic `pkg-config --cflags gtk+-2.0`
|
CFLAGS = -Wall -g -O2 -pedantic
|
||||||
LDFLAGSF= `pkg-config --libs gtk+-2.0` -lSystem
|
LDFLAGSF= `pkg-config --libs gtk+-2.0` -lSystem
|
||||||
LDFLAGS = -L $(PREFIX)/lib -Wl,-rpath,$(PREFIX)/lib
|
LDFLAGS = -L $(PREFIX)/lib -Wl,-rpath,$(PREFIX)/lib
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
@ -42,6 +42,13 @@ phone-dialer_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
|||||||
phone-dialer: $(phone-dialer_OBJS)
|
phone-dialer: $(phone-dialer_OBJS)
|
||||||
$(CC) -o phone-dialer $(phone-dialer_OBJS) $(phone-dialer_LDFLAGS)
|
$(CC) -o phone-dialer $(phone-dialer_OBJS) $(phone-dialer_LDFLAGS)
|
||||||
|
|
||||||
|
phone-logs_OBJS = logs.o
|
||||||
|
phone-logs_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
|
phone-logs_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
||||||
|
|
||||||
|
phone-logs: $(phone-logs_OBJS)
|
||||||
|
$(CC) -o phone-logs $(phone-logs_OBJS) $(phone-logs_LDFLAGS)
|
||||||
|
|
||||||
phone-messages_OBJS = messages.o
|
phone-messages_OBJS = messages.o
|
||||||
phone-messages_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
phone-messages_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
|
||||||
phone-messages_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
phone-messages_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
|
||||||
@ -80,6 +87,9 @@ contacts.o: contacts.c common.c
|
|||||||
dialer.o: dialer.c common.c
|
dialer.o: dialer.c common.c
|
||||||
$(CC) $(phone-dialer_CFLAGS) -c dialer.c
|
$(CC) $(phone-dialer_CFLAGS) -c dialer.c
|
||||||
|
|
||||||
|
logs.o: logs.c common.c
|
||||||
|
$(CC) $(phone-logs_CFLAGS) -c logs.c
|
||||||
|
|
||||||
messages.o: messages.c common.c
|
messages.o: messages.c common.c
|
||||||
$(CC) $(phone-messages_CFLAGS) -c messages.c
|
$(CC) $(phone-messages_CFLAGS) -c messages.c
|
||||||
|
|
||||||
@ -88,11 +98,11 @@ settings.o: settings.c common.c
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
|
||||||
$(RM) -- $(phone_OBJS) $(phone-contacts_OBJS) $(phone-dialer_OBJS) $(phone-messages_OBJS) $(phone-settings_OBJS)
|
$(RM) -- $(phone_OBJS) $(phone-contacts_OBJS) $(phone-dialer_OBJS) $(phone-logs_OBJS) $(phone-messages_OBJS) $(phone-settings_OBJS)
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) distclean) || exit; done
|
||||||
$(RM) -- $(phone_OBJS) $(phone-contacts_OBJS) $(phone-dialer_OBJS) $(phone-messages_OBJS) $(phone-settings_OBJS)
|
$(RM) -- $(phone_OBJS) $(phone-contacts_OBJS) $(phone-dialer_OBJS) $(phone-logs_OBJS) $(phone-messages_OBJS) $(phone-settings_OBJS)
|
||||||
$(RM) -- $(TARGETS)
|
$(RM) -- $(TARGETS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
@ -104,6 +114,8 @@ install: all
|
|||||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||||
$(INSTALL) -m 0755 -- phone-dialer $(DESTDIR)$(BINDIR)/phone-dialer
|
$(INSTALL) -m 0755 -- phone-dialer $(DESTDIR)$(BINDIR)/phone-dialer
|
||||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||||
|
$(INSTALL) -m 0755 -- phone-logs $(DESTDIR)$(BINDIR)/phone-logs
|
||||||
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||||
$(INSTALL) -m 0755 -- phone-messages $(DESTDIR)$(BINDIR)/phone-messages
|
$(INSTALL) -m 0755 -- phone-messages $(DESTDIR)$(BINDIR)/phone-messages
|
||||||
$(MKDIR) $(DESTDIR)$(BINDIR)
|
$(MKDIR) $(DESTDIR)$(BINDIR)
|
||||||
$(INSTALL) -m 0755 -- phone-settings $(DESTDIR)$(BINDIR)/phone-settings
|
$(INSTALL) -m 0755 -- phone-settings $(DESTDIR)$(BINDIR)/phone-settings
|
||||||
@ -113,6 +125,7 @@ uninstall:
|
|||||||
$(RM) -- $(DESTDIR)$(BINDIR)/phone
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone
|
||||||
$(RM) -- $(DESTDIR)$(BINDIR)/phone-contacts
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone-contacts
|
||||||
$(RM) -- $(DESTDIR)$(BINDIR)/phone-dialer
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone-dialer
|
||||||
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone-logs
|
||||||
$(RM) -- $(DESTDIR)$(BINDIR)/phone-messages
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone-messages
|
||||||
$(RM) -- $(DESTDIR)$(BINDIR)/phone-settings
|
$(RM) -- $(DESTDIR)$(BINDIR)/phone-settings
|
||||||
|
|
||||||
|
@ -69,6 +69,9 @@ static GdkFilterReturn _filter_message_show(Phone * phone,
|
|||||||
case PHONE_MESSAGE_SHOW_DIALER:
|
case PHONE_MESSAGE_SHOW_DIALER:
|
||||||
phone_show_dialer(phone, show);
|
phone_show_dialer(phone, show);
|
||||||
break;
|
break;
|
||||||
|
case PHONE_MESSAGE_SHOW_LOGS:
|
||||||
|
phone_show_logs(phone, show);
|
||||||
|
break;
|
||||||
case PHONE_MESSAGE_SHOW_MESSAGES:
|
case PHONE_MESSAGE_SHOW_MESSAGES:
|
||||||
phone_show_messages(phone, show);
|
phone_show_messages(phone, show);
|
||||||
break;
|
break;
|
||||||
@ -266,6 +269,34 @@ void on_phone_dialer_hangup(gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* logs */
|
||||||
|
/* on_phone_logs_activated */
|
||||||
|
void on_phone_logs_activated(gpointer data)
|
||||||
|
{
|
||||||
|
Phone * phone = data;
|
||||||
|
|
||||||
|
/* FIXME implement */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* on_phone_logs_call */
|
||||||
|
void on_phone_logs_call(gpointer data)
|
||||||
|
{
|
||||||
|
Phone * phone = data;
|
||||||
|
|
||||||
|
/* FIXME implement */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* on_phone_logs_write */
|
||||||
|
void on_phone_logs_write(gpointer data)
|
||||||
|
{
|
||||||
|
Phone * phone = data;
|
||||||
|
|
||||||
|
/* FIXME implement */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* messages */
|
/* messages */
|
||||||
/* on_phone_messages_activated */
|
/* on_phone_messages_activated */
|
||||||
void on_phone_messages_activated(gpointer data)
|
void on_phone_messages_activated(gpointer data)
|
||||||
|
@ -53,6 +53,11 @@ void on_phone_dialer_call(gpointer data);
|
|||||||
void on_phone_dialer_clicked(GtkWidget * widget, gpointer data);
|
void on_phone_dialer_clicked(GtkWidget * widget, gpointer data);
|
||||||
void on_phone_dialer_hangup(gpointer data);
|
void on_phone_dialer_hangup(gpointer data);
|
||||||
|
|
||||||
|
/* logs */
|
||||||
|
void on_phone_logs_activated(gpointer data);
|
||||||
|
void on_phone_logs_call(gpointer data);
|
||||||
|
void on_phone_logs_write(gpointer data);
|
||||||
|
|
||||||
/* messages */
|
/* messages */
|
||||||
void on_phone_messages_activated(gpointer data);
|
void on_phone_messages_activated(gpointer data);
|
||||||
void on_phone_messages_call(gpointer data);
|
void on_phone_messages_call(gpointer data);
|
||||||
|
22
src/logs.c
Normal file
22
src/logs.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
/* Copyright (c) 2010 Pierre Pronchery <khorben@defora.org> */
|
||||||
|
/* This file is part of DeforaOS Desktop Phone */
|
||||||
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, version 3 of the License.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define PROGNAME "logs"
|
||||||
|
#define PHONE_MESSAGE PHONE_MESSAGE_SHOW
|
||||||
|
#define PHONE_MESSAGE_WHAT PHONE_MESSAGE_SHOW_LOGS
|
||||||
|
|
||||||
|
#include "common.c"
|
135
src/phone.c
135
src/phone.c
@ -51,6 +51,16 @@ typedef enum _PhoneContactColumn
|
|||||||
#define PHONE_CONTACT_COLUMN_LAST PHONE_CONTACT_COLUMN_NUMBER
|
#define PHONE_CONTACT_COLUMN_LAST PHONE_CONTACT_COLUMN_NUMBER
|
||||||
#define PHONE_CONTACT_COLUMN_COUNT (PHONE_CONTACT_COLUMN_LAST + 1)
|
#define PHONE_CONTACT_COLUMN_COUNT (PHONE_CONTACT_COLUMN_LAST + 1)
|
||||||
|
|
||||||
|
typedef enum _PhoneLogsColumn
|
||||||
|
{
|
||||||
|
PHONE_LOGS_COLUMN_TYPE = 0,
|
||||||
|
PHONE_LOGS_COLUMN_NUMBER_DISPLAY,
|
||||||
|
PHONE_LOGS_COLUMN_DATE,
|
||||||
|
PHONE_LOGS_COLUMN_DATE_DISPLAY
|
||||||
|
} PhoneLogsColumn;
|
||||||
|
#define PHONE_LOGS_COLUMN_LAST PHONE_LOGS_COLUMN_DATE_DISPLAY
|
||||||
|
#define PHONE_LOGS_COLUMN_COUNT (PHONE_LOGS_COLUMN_LAST + 1)
|
||||||
|
|
||||||
typedef enum _PhoneMessageColumn
|
typedef enum _PhoneMessageColumn
|
||||||
{
|
{
|
||||||
PHONE_MESSAGE_COLUMN_ID = 0,
|
PHONE_MESSAGE_COLUMN_ID = 0,
|
||||||
@ -162,6 +172,11 @@ struct _Phone
|
|||||||
GtkWidget * di_window;
|
GtkWidget * di_window;
|
||||||
GtkWidget * di_entry;
|
GtkWidget * di_entry;
|
||||||
|
|
||||||
|
/* logs */
|
||||||
|
GtkWidget * lo_window;
|
||||||
|
GtkListStore * lo_store;
|
||||||
|
GtkWidget * lo_view;
|
||||||
|
|
||||||
/* messages */
|
/* messages */
|
||||||
GtkWidget * me_window;
|
GtkWidget * me_window;
|
||||||
GtkListStore * me_store;
|
GtkListStore * me_store;
|
||||||
@ -195,6 +210,8 @@ struct _Phone
|
|||||||
|
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
|
static int _phone_call_number(Phone * phone, char const * number);
|
||||||
|
|
||||||
static char const * _phone_config_get(Phone * phone, char const * section,
|
static char const * _phone_config_get(Phone * phone, char const * section,
|
||||||
char const * variable);
|
char const * variable);
|
||||||
|
|
||||||
@ -312,6 +329,9 @@ Phone * phone_new(char const * device, unsigned int baudrate, int retry,
|
|||||||
phone->de_window = NULL;
|
phone->de_window = NULL;
|
||||||
#endif
|
#endif
|
||||||
phone->di_window = NULL;
|
phone->di_window = NULL;
|
||||||
|
phone->lo_window = NULL;
|
||||||
|
phone->lo_store = gtk_list_store_new(PHONE_LOGS_COLUMN_COUNT,
|
||||||
|
G_TYPE_UINT, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING);
|
||||||
phone->me_window = NULL;
|
phone->me_window = NULL;
|
||||||
phone->me_store = gtk_list_store_new(PHONE_MESSAGE_COLUMN_COUNT,
|
phone->me_store = gtk_list_store_new(PHONE_MESSAGE_COLUMN_COUNT,
|
||||||
G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT,
|
G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT,
|
||||||
@ -685,8 +705,7 @@ void phone_dialer_call(Phone * phone, char const * number)
|
|||||||
number = gtk_entry_get_text(GTK_ENTRY(phone->di_entry));
|
number = gtk_entry_get_text(GTK_ENTRY(phone->di_entry));
|
||||||
if(number[0] == '\0')
|
if(number[0] == '\0')
|
||||||
number = NULL; /* call the last number dialled */
|
number = NULL; /* call the last number dialled */
|
||||||
gsm_call(phone->gsm, GSM_CALL_TYPE_VOICE, number);
|
_phone_call_number(phone, number);
|
||||||
phone_show_call(phone, TRUE, PHONE_CALL_OUTGOING, " ", number);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -725,6 +744,14 @@ int phone_event(Phone * phone, PhoneEvent event, ...)
|
|||||||
va_start(ap, event);
|
va_start(ap, event);
|
||||||
switch(event)
|
switch(event)
|
||||||
{
|
{
|
||||||
|
case PHONE_EVENT_BATTERY_LEVEL:
|
||||||
|
level = va_arg(ap, gdouble);
|
||||||
|
ret |= plugin->event(plugin, event, level);
|
||||||
|
break;
|
||||||
|
case PHONE_EVENT_CALLING:
|
||||||
|
number = va_arg(ap, char const *);
|
||||||
|
ret |= plugin->event(plugin, event, number);
|
||||||
|
break;
|
||||||
case PHONE_EVENT_SET_OPERATOR:
|
case PHONE_EVENT_SET_OPERATOR:
|
||||||
operator = va_arg(ap, char const *);
|
operator = va_arg(ap, char const *);
|
||||||
ret |= plugin->event(plugin, event, operator);
|
ret |= plugin->event(plugin, event, operator);
|
||||||
@ -747,6 +774,7 @@ int phone_event(Phone * phone, PhoneEvent event, ...)
|
|||||||
case PHONE_EVENT_CALL_INCOMING:
|
case PHONE_EVENT_CALL_INCOMING:
|
||||||
case PHONE_EVENT_CALL_OUTGOING:
|
case PHONE_EVENT_CALL_OUTGOING:
|
||||||
case PHONE_EVENT_CALL_TERMINATED:
|
case PHONE_EVENT_CALL_TERMINATED:
|
||||||
|
case PHONE_EVENT_FUNCTIONAL:
|
||||||
case PHONE_EVENT_KEY_TONE:
|
case PHONE_EVENT_KEY_TONE:
|
||||||
case PHONE_EVENT_NOTIFICATION_OFF:
|
case PHONE_EVENT_NOTIFICATION_OFF:
|
||||||
case PHONE_EVENT_NOTIFICATION_ON:
|
case PHONE_EVENT_NOTIFICATION_ON:
|
||||||
@ -884,8 +912,7 @@ void phone_messages_call_selected(Phone * phone)
|
|||||||
PHONE_MESSAGE_COLUMN_NUMBER, &number, -1);
|
PHONE_MESSAGE_COLUMN_NUMBER, &number, -1);
|
||||||
if(number == NULL)
|
if(number == NULL)
|
||||||
return;
|
return;
|
||||||
gsm_call(phone->gsm, GSM_CALL_TYPE_VOICE, number);
|
_phone_call_number(phone, number);
|
||||||
phone_show_call(phone, TRUE, PHONE_CALL_OUTGOING, " ", number);
|
|
||||||
g_free(number);
|
g_free(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -968,8 +995,7 @@ void phone_read_call(Phone * phone)
|
|||||||
return;
|
return;
|
||||||
if((number = gtk_label_get_text(GTK_LABEL(phone->re_number))) == NULL)
|
if((number = gtk_label_get_text(GTK_LABEL(phone->re_number))) == NULL)
|
||||||
return;
|
return;
|
||||||
gsm_call(phone->gsm, GSM_CALL_TYPE_VOICE, number);
|
_phone_call_number(phone, number);
|
||||||
phone_show_call(phone, TRUE, PHONE_CALL_OUTGOING, " ", number);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1590,6 +1616,82 @@ void phone_show_dialer(Phone * phone, gboolean show)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* phone_show_logs */
|
||||||
|
void phone_show_logs(Phone * phone, gboolean show)
|
||||||
|
{
|
||||||
|
GtkWidget * vbox;
|
||||||
|
GtkWidget * widget;
|
||||||
|
GtkToolItem * toolitem;
|
||||||
|
GtkCellRenderer * renderer;
|
||||||
|
GtkTreeViewColumn * column;
|
||||||
|
|
||||||
|
if(phone->lo_window == NULL)
|
||||||
|
{
|
||||||
|
phone->lo_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_window_set_default_size(GTK_WINDOW(phone->lo_window), 200,
|
||||||
|
300);
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
|
gtk_window_set_icon_name(GTK_WINDOW(phone->me_window),
|
||||||
|
"phone-logs"); /* FIXME find sth appropriate */
|
||||||
|
#endif
|
||||||
|
gtk_window_set_title(GTK_WINDOW(phone->lo_window),
|
||||||
|
_("Phone log"));
|
||||||
|
g_signal_connect_swapped(G_OBJECT(phone->lo_window),
|
||||||
|
"delete-event", G_CALLBACK(on_phone_closex),
|
||||||
|
phone->lo_window);
|
||||||
|
vbox = gtk_vbox_new(FALSE, 0);
|
||||||
|
/* toolbar */
|
||||||
|
widget = gtk_toolbar_new();
|
||||||
|
toolitem = gtk_tool_button_new(NULL, _("Call"));
|
||||||
|
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem),
|
||||||
|
"call-start");
|
||||||
|
g_signal_connect_swapped(G_OBJECT(toolitem), "clicked",
|
||||||
|
G_CALLBACK(on_phone_logs_call), phone);
|
||||||
|
gtk_toolbar_insert(GTK_TOOLBAR(widget), toolitem, -1);
|
||||||
|
toolitem = gtk_tool_button_new(NULL, _("Message"));
|
||||||
|
gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(toolitem),
|
||||||
|
"stock_mail-compose");
|
||||||
|
g_signal_connect_swapped(G_OBJECT(toolitem), "clicked",
|
||||||
|
G_CALLBACK(on_phone_logs_write), phone);
|
||||||
|
gtk_toolbar_insert(GTK_TOOLBAR(widget), toolitem, -1);
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), widget, FALSE, TRUE, 0);
|
||||||
|
/* view */
|
||||||
|
widget = gtk_scrolled_window_new(NULL, NULL);
|
||||||
|
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(widget),
|
||||||
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
|
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(widget),
|
||||||
|
GTK_SHADOW_ETCHED_IN);
|
||||||
|
phone->lo_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(
|
||||||
|
phone->lo_store));
|
||||||
|
g_signal_connect_swapped(G_OBJECT(phone->lo_view),
|
||||||
|
"row-activated", G_CALLBACK(
|
||||||
|
on_phone_logs_activated), phone);
|
||||||
|
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(phone->lo_view),
|
||||||
|
FALSE); /* XXX consider reverting this */
|
||||||
|
renderer = gtk_cell_renderer_text_new();
|
||||||
|
column = gtk_tree_view_column_new_with_attributes(_("To/From"),
|
||||||
|
renderer, "text",
|
||||||
|
PHONE_LOGS_COLUMN_NUMBER_DISPLAY, NULL);
|
||||||
|
gtk_tree_view_append_column(GTK_TREE_VIEW(phone->lo_view),
|
||||||
|
column);
|
||||||
|
renderer = gtk_cell_renderer_text_new();
|
||||||
|
column = gtk_tree_view_column_new_with_attributes(_("Date"),
|
||||||
|
renderer, "text",
|
||||||
|
PHONE_LOGS_COLUMN_DATE_DISPLAY, NULL);
|
||||||
|
gtk_tree_view_append_column(GTK_TREE_VIEW(phone->lo_view),
|
||||||
|
column);
|
||||||
|
gtk_container_add(GTK_CONTAINER(widget), phone->lo_view);
|
||||||
|
gtk_box_pack_start(GTK_BOX(vbox), widget, TRUE, TRUE, 0);
|
||||||
|
gtk_container_add(GTK_CONTAINER(phone->lo_window), vbox);
|
||||||
|
gtk_widget_show_all(vbox);
|
||||||
|
}
|
||||||
|
if(show)
|
||||||
|
gtk_window_present(GTK_WINDOW(phone->lo_window));
|
||||||
|
else
|
||||||
|
gtk_widget_hide(phone->lo_window);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* phone_show_messages */
|
/* phone_show_messages */
|
||||||
void phone_show_messages(Phone * phone, gboolean show)
|
void phone_show_messages(Phone * phone, gboolean show)
|
||||||
{
|
{
|
||||||
@ -1670,7 +1772,7 @@ void phone_show_messages(Phone * phone, gboolean show)
|
|||||||
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(phone->me_view),
|
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(phone->me_view),
|
||||||
FALSE); /* XXX consider reverting this */
|
FALSE); /* XXX consider reverting this */
|
||||||
renderer = gtk_cell_renderer_text_new();
|
renderer = gtk_cell_renderer_text_new();
|
||||||
column = gtk_tree_view_column_new_with_attributes(_("From"),
|
column = gtk_tree_view_column_new_with_attributes(_("To/From"),
|
||||||
renderer, "text",
|
renderer, "text",
|
||||||
PHONE_MESSAGE_COLUMN_NUMBER_DISPLAY, NULL);
|
PHONE_MESSAGE_COLUMN_NUMBER_DISPLAY, NULL);
|
||||||
gtk_tree_view_append_column(GTK_TREE_VIEW(phone->me_view),
|
gtk_tree_view_append_column(GTK_TREE_VIEW(phone->me_view),
|
||||||
@ -2050,6 +2152,18 @@ void phone_write_send(Phone * phone)
|
|||||||
|
|
||||||
|
|
||||||
/* private */
|
/* private */
|
||||||
|
/* phone_call_number */
|
||||||
|
static int _phone_call_number(Phone * phone, char const * number)
|
||||||
|
{
|
||||||
|
if(number != NULL && phone_event(phone, PHONE_EVENT_CALLING, number)
|
||||||
|
!= 0)
|
||||||
|
return -1;
|
||||||
|
gsm_call(phone->gsm, GSM_CALL_TYPE_VOICE, number);
|
||||||
|
phone_show_call(phone, TRUE, PHONE_CALL_OUTGOING, "", number);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* phone_config_get */
|
/* phone_config_get */
|
||||||
static char const * _phone_config_get(Phone * phone, char const * section,
|
static char const * _phone_config_get(Phone * phone, char const * section,
|
||||||
char const * variable)
|
char const * variable)
|
||||||
@ -2509,7 +2623,8 @@ static int _phone_gsm_event(GSMEvent * event, gpointer data)
|
|||||||
case GSM_EVENT_TYPE_ERROR:
|
case GSM_EVENT_TYPE_ERROR:
|
||||||
return _gsm_event_error(phone, event);
|
return _gsm_event_error(phone, event);
|
||||||
case GSM_EVENT_TYPE_BATTERY_CHARGE:
|
case GSM_EVENT_TYPE_BATTERY_CHARGE:
|
||||||
/* FIXME implement */
|
phone_event(phone, PHONE_EVENT_BATTERY_LEVEL,
|
||||||
|
event->battery_charge.level + 0.0);
|
||||||
return 0;
|
return 0;
|
||||||
case GSM_EVENT_TYPE_CALL_PRESENTATION:
|
case GSM_EVENT_TYPE_CALL_PRESENTATION:
|
||||||
/* FIXME convert number, contact will be automatic */
|
/* FIXME convert number, contact will be automatic */
|
||||||
@ -2550,6 +2665,7 @@ static int _phone_gsm_event(GSMEvent * event, gpointer data)
|
|||||||
_phone_track(phone, PHONE_TRACK_CONTACT_LIST, TRUE);
|
_phone_track(phone, PHONE_TRACK_CONTACT_LIST, TRUE);
|
||||||
_phone_track(phone, PHONE_TRACK_MESSAGE_LIST, TRUE);
|
_phone_track(phone, PHONE_TRACK_MESSAGE_LIST, TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
phone_event(phone, PHONE_EVENT_FUNCTIONAL);
|
||||||
return 0;
|
return 0;
|
||||||
case GSM_EVENT_TYPE_INCOMING_CALL:
|
case GSM_EVENT_TYPE_INCOMING_CALL:
|
||||||
phone_show_call(phone, TRUE, PHONE_CALL_INCOMING, "",
|
phone_show_call(phone, TRUE, PHONE_CALL_INCOMING, "",
|
||||||
@ -2731,7 +2847,8 @@ static int _gsm_event_phone_activity(Phone * phone, GSMPhoneActivity activity)
|
|||||||
case GSM_PHONE_ACTIVITY_UNKNOWN:
|
case GSM_PHONE_ACTIVITY_UNKNOWN:
|
||||||
break; /* what should we do? */
|
break; /* what should we do? */
|
||||||
case GSM_PHONE_ACTIVITY_RINGING:
|
case GSM_PHONE_ACTIVITY_RINGING:
|
||||||
phone_show_call(phone, TRUE, PHONE_CALL_OUTGOING, NULL,
|
/* FIXME is this really incoming? */
|
||||||
|
phone_show_call(phone, TRUE, PHONE_CALL_INCOMING, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ typedef enum _PhoneMessageShow
|
|||||||
{
|
{
|
||||||
PHONE_MESSAGE_SHOW_CONTACTS = 0,
|
PHONE_MESSAGE_SHOW_CONTACTS = 0,
|
||||||
PHONE_MESSAGE_SHOW_DIALER,
|
PHONE_MESSAGE_SHOW_DIALER,
|
||||||
|
PHONE_MESSAGE_SHOW_LOGS,
|
||||||
PHONE_MESSAGE_SHOW_MESSAGES,
|
PHONE_MESSAGE_SHOW_MESSAGES,
|
||||||
PHONE_MESSAGE_SHOW_SETTINGS
|
PHONE_MESSAGE_SHOW_SETTINGS
|
||||||
} PhoneMessageShow;
|
} PhoneMessageShow;
|
||||||
@ -85,6 +86,7 @@ void phone_show_call(Phone * phone, gboolean show, ...); /* PhoneCall */
|
|||||||
void phone_show_code(Phone * phone, gboolean show, ...); /* PhoneCode */
|
void phone_show_code(Phone * phone, gboolean show, ...); /* PhoneCode */
|
||||||
void phone_show_contacts(Phone * phone, gboolean show);
|
void phone_show_contacts(Phone * phone, gboolean show);
|
||||||
void phone_show_dialer(Phone * phone, gboolean show);
|
void phone_show_dialer(Phone * phone, gboolean show);
|
||||||
|
void phone_show_logs(Phone * phone, gboolean show);
|
||||||
void phone_show_messages(Phone * phone, gboolean show);
|
void phone_show_messages(Phone * phone, gboolean show);
|
||||||
void phone_show_read(Phone * phone, gboolean show, ...);
|
void phone_show_read(Phone * phone, gboolean show, ...);
|
||||||
void phone_show_settings(Phone * phone, gboolean show);
|
void phone_show_settings(Phone * phone, gboolean show);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
targets=phone,phone-contacts,phone-dialer,phone-messages,phone-settings
|
targets=phone,phone-contacts,phone-dialer,phone-logs,phone-messages,phone-settings
|
||||||
cppflags_force=-I ../include
|
cppflags_force=-I ../include
|
||||||
cppflags=-I $(PREFIX)/include
|
cppflags=-I $(PREFIX)/include
|
||||||
cflags_force=-W
|
cflags_force=-W `pkg-config --cflags gtk+-2.0`
|
||||||
cflags=-Wall -g -O2 -pedantic `pkg-config --cflags gtk+-2.0`
|
cflags=-Wall -g -O2 -pedantic
|
||||||
ldflags_force=`pkg-config --libs gtk+-2.0` -lSystem
|
ldflags_force=`pkg-config --libs gtk+-2.0` -lSystem
|
||||||
ldflags=-L $(PREFIX)/lib -Wl,-rpath,$(PREFIX)/lib
|
ldflags=-L $(PREFIX)/lib -Wl,-rpath,$(PREFIX)/lib
|
||||||
subdirs=plugins
|
subdirs=plugins
|
||||||
@ -24,6 +24,14 @@ install=$(BINDIR)
|
|||||||
[dialer.c]
|
[dialer.c]
|
||||||
depends=common.c
|
depends=common.c
|
||||||
|
|
||||||
|
[phone-logs]
|
||||||
|
type=binary
|
||||||
|
sources=logs.c
|
||||||
|
install=$(BINDIR)
|
||||||
|
|
||||||
|
[logs.c]
|
||||||
|
depends=common.c
|
||||||
|
|
||||||
[phone-messages]
|
[phone-messages]
|
||||||
type=binary
|
type=binary
|
||||||
sources=messages.c
|
sources=messages.c
|
||||||
|
Loading…
Reference in New Issue
Block a user