Adding support for contact deletion
This commit is contained in:
parent
e9da2f8904
commit
af22de5f89
@ -70,10 +70,12 @@ typedef enum _ModemCallType
|
||||
typedef enum _ModemContactStatus
|
||||
{
|
||||
MODEM_CONTACT_STATUS_OFFLINE = 0,
|
||||
MODEM_CONTACT_STATUS_ONLINE,
|
||||
MODEM_CONTACT_STATUS_AWAY,
|
||||
MODEM_CONTACT_STATUS_IDLE
|
||||
MODEM_CONTACT_STATUS_IDLE,
|
||||
MODEM_CONTACT_STATUS_ONLINE
|
||||
} ModemContactStatus;
|
||||
# define MODEM_CONTACT_STATUS_LAST MODEM_CONTACT_STATUS_ONLINE
|
||||
# define MODEM_CONTACT_STATUS_COUNT (MODEM_CONTACT_STATUS_LAST + 1)
|
||||
|
||||
typedef enum _ModemMessageEncoding
|
||||
{
|
||||
@ -331,6 +333,15 @@ typedef union _ModemRequest
|
||||
unsigned int id;
|
||||
} contact, contact_delete;
|
||||
|
||||
/* MODEM_REQUEST_CONTACT_NEW */
|
||||
struct
|
||||
{
|
||||
ModemRequestType type;
|
||||
unsigned int id;
|
||||
char const * name;
|
||||
char const * number;
|
||||
} contact_new;
|
||||
|
||||
/* MODEM_REQUEST_MESSAGE, MODEM_REQUEST_MESSAGE_DELETE */
|
||||
struct
|
||||
{
|
||||
|
152
po/fr.po
152
po/fr.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Phone 0.0.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-21 02:10+0200\n"
|
||||
"POT-Creation-Date: 2011-08-21 02:42+0200\n"
|
||||
"PO-Revision-Date: 2010-04-24 02:07+0200\n"
|
||||
"Last-Translator: Pierre Pronchery <khorben@defora.org>\n"
|
||||
"Language-Team: DeforaOS development (French) <devel-fr@lists.defora.org>\n"
|
||||
@ -27,305 +27,305 @@ msgstr ""
|
||||
" -m\tNom du greffon modem à charger\n"
|
||||
" -r\tDélai entre deux tentatives d'accès au modem (ms)\n"
|
||||
|
||||
#: ../src/phone.c:333
|
||||
#: ../src/phone.c:336
|
||||
msgid "All"
|
||||
msgstr "Tous"
|
||||
|
||||
#: ../src/phone.c:334
|
||||
#: ../src/phone.c:337
|
||||
msgid "Inbox"
|
||||
msgstr "Reçus"
|
||||
|
||||
#: ../src/phone.c:335
|
||||
#: ../src/phone.c:338
|
||||
msgid "Sent"
|
||||
msgstr "Envoyés"
|
||||
|
||||
#: ../src/phone.c:336
|
||||
#: ../src/phone.c:339
|
||||
msgid "Drafts"
|
||||
msgstr "Brouillons"
|
||||
|
||||
#: ../src/phone.c:337
|
||||
#: ../src/phone.c:340
|
||||
msgid "Trash"
|
||||
msgstr "Corbeille"
|
||||
|
||||
#: ../src/phone.c:490 ../src/phone.c:2476
|
||||
#: ../src/phone.c:508 ../src/phone.c:2506
|
||||
msgid "System preferences"
|
||||
msgstr "Préférences système"
|
||||
|
||||
#: ../src/phone.c:501 ../src/phone.c:1905
|
||||
#: ../src/phone.c:519 ../src/phone.c:1935
|
||||
msgid "Plug-ins"
|
||||
msgstr "Greffons"
|
||||
|
||||
#: ../src/phone.c:666
|
||||
#: ../src/phone.c:684
|
||||
#, c-format
|
||||
msgid "Checking %s..."
|
||||
msgstr "Vérification %s..."
|
||||
|
||||
#: ../src/phone.c:729
|
||||
#: ../src/phone.c:747
|
||||
msgid "Delete this contact?"
|
||||
msgstr "Supprimer ce contact?"
|
||||
|
||||
#: ../src/phone.c:1031 ../src/phone.c:1197
|
||||
#: ../src/phone.c:1053 ../src/phone.c:1219
|
||||
msgid "Delete this message?"
|
||||
msgstr "Supprimer ce message?"
|
||||
|
||||
#: ../src/phone.c:1037 ../src/phone.c:1202
|
||||
#: ../src/phone.c:1059 ../src/phone.c:1224
|
||||
msgid "Deleting message..."
|
||||
msgstr "Suppression du message..."
|
||||
|
||||
#: ../src/phone.c:1299
|
||||
#: ../src/phone.c:1321
|
||||
msgid "Unknown contact"
|
||||
msgstr "Contact inconnu"
|
||||
|
||||
#: ../src/phone.c:1306
|
||||
#: ../src/phone.c:1328
|
||||
msgid "Unknown number"
|
||||
msgstr "Numéro inconnu"
|
||||
|
||||
#: ../src/phone.c:1318
|
||||
#: ../src/phone.c:1340
|
||||
msgid "In conversation"
|
||||
msgstr "En conversation"
|
||||
|
||||
#: ../src/phone.c:1329
|
||||
#: ../src/phone.c:1351
|
||||
msgid "Incoming call"
|
||||
msgstr "Appel entrant"
|
||||
|
||||
#: ../src/phone.c:1339
|
||||
#: ../src/phone.c:1361
|
||||
msgid "Outgoing call"
|
||||
msgstr "Appel sortant"
|
||||
|
||||
#: ../src/phone.c:1350
|
||||
#: ../src/phone.c:1372
|
||||
msgid "Call finished"
|
||||
msgstr "Appel terminé"
|
||||
|
||||
#: ../src/phone.c:1380
|
||||
#: ../src/phone.c:1402
|
||||
msgid "_Answer"
|
||||
msgstr "_Répondre"
|
||||
|
||||
#: ../src/phone.c:1385
|
||||
#: ../src/phone.c:1407
|
||||
msgid "_Hangup"
|
||||
msgstr "Ra_ccrocher"
|
||||
|
||||
#: ../src/phone.c:1390
|
||||
#: ../src/phone.c:1412
|
||||
msgid "_Reject"
|
||||
msgstr "Re_jeter"
|
||||
|
||||
#: ../src/phone.c:1410
|
||||
#: ../src/phone.c:1432
|
||||
msgid "Loudspeaker"
|
||||
msgstr "Haut-parleur"
|
||||
|
||||
#: ../src/phone.c:1418
|
||||
#: ../src/phone.c:1440
|
||||
msgid "Mute microphone"
|
||||
msgstr "Couper le microphone"
|
||||
|
||||
#: ../src/phone.c:1460
|
||||
#: ../src/phone.c:1482
|
||||
#, c-format
|
||||
msgid "Enter %s"
|
||||
msgstr "Entrer %s"
|
||||
|
||||
#: ../src/phone.c:1503
|
||||
#: ../src/phone.c:1525
|
||||
msgid "Enter"
|
||||
msgstr "Entrer"
|
||||
|
||||
#: ../src/phone.c:1505
|
||||
#: ../src/phone.c:1527
|
||||
msgid "Skip"
|
||||
msgstr "Ignorer"
|
||||
|
||||
#: ../src/phone.c:1533
|
||||
#: ../src/phone.c:1555
|
||||
msgid "Contacts"
|
||||
msgstr "Contacts"
|
||||
|
||||
#: ../src/phone.c:1539 ../src/phone.c:1650 ../src/phone.c:1686
|
||||
#: ../src/phone.c:1801 ../src/phone.c:2157
|
||||
#: ../src/phone.c:1561 ../src/phone.c:1680 ../src/phone.c:1716
|
||||
#: ../src/phone.c:1831 ../src/phone.c:2187
|
||||
msgid "Call"
|
||||
msgstr "Appeler"
|
||||
|
||||
#: ../src/phone.c:1545
|
||||
#: ../src/phone.c:1567
|
||||
msgid "Write"
|
||||
msgstr "Écrire"
|
||||
|
||||
#: ../src/phone.c:1579 ../src/phone.c:1936 ../src/phone.c:2268
|
||||
#: ../src/phone.c:1609 ../src/phone.c:1966 ../src/phone.c:2298
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#: ../src/phone.c:1625
|
||||
#: ../src/phone.c:1655
|
||||
msgid "Dialer"
|
||||
msgstr "Composer"
|
||||
|
||||
#: ../src/phone.c:1652
|
||||
#: ../src/phone.c:1682
|
||||
msgid "Hang up"
|
||||
msgstr "Raccrocher"
|
||||
|
||||
#: ../src/phone.c:1680
|
||||
#: ../src/phone.c:1710
|
||||
msgid "Phone logs"
|
||||
msgstr "Journal d'appels"
|
||||
|
||||
#: ../src/phone.c:1692
|
||||
#: ../src/phone.c:1722
|
||||
msgid "Message"
|
||||
msgstr "Message"
|
||||
|
||||
#: ../src/phone.c:1723
|
||||
#: ../src/phone.c:1753
|
||||
msgid "Direction"
|
||||
msgstr "Direction"
|
||||
|
||||
#: ../src/phone.c:1728 ../src/phone.c:1847
|
||||
#: ../src/phone.c:1758 ../src/phone.c:1877
|
||||
msgid "To/From"
|
||||
msgstr "Vers/De"
|
||||
|
||||
#: ../src/phone.c:1734 ../src/phone.c:1855
|
||||
#: ../src/phone.c:1764 ../src/phone.c:1885
|
||||
msgid "Date"
|
||||
msgstr "Date"
|
||||
|
||||
#: ../src/phone.c:1795
|
||||
#: ../src/phone.c:1825
|
||||
msgid "Messages"
|
||||
msgstr "Messages"
|
||||
|
||||
#: ../src/phone.c:1806
|
||||
#: ../src/phone.c:1836
|
||||
msgid "New message"
|
||||
msgstr "Nouveau message"
|
||||
|
||||
#: ../src/phone.c:1812 ../src/phone.c:2163
|
||||
#: ../src/phone.c:1842 ../src/phone.c:2193
|
||||
msgid "Reply"
|
||||
msgstr "Répondre"
|
||||
|
||||
#: ../src/phone.c:1924
|
||||
#: ../src/phone.c:1954
|
||||
msgid "Enabled"
|
||||
msgstr "Activé"
|
||||
|
||||
#: ../src/phone.c:2151
|
||||
#: ../src/phone.c:2181
|
||||
msgid "Read message"
|
||||
msgstr "Lire le message"
|
||||
|
||||
#: ../src/phone.c:2169
|
||||
#: ../src/phone.c:2199
|
||||
msgid "Forward"
|
||||
msgstr "Transmettre"
|
||||
|
||||
#: ../src/phone.c:2243
|
||||
#: ../src/phone.c:2273
|
||||
msgid "Phone settings"
|
||||
msgstr "Paramètres du téléphone"
|
||||
|
||||
#: ../src/phone.c:2320
|
||||
#: ../src/phone.c:2350
|
||||
msgid "missed calls"
|
||||
msgstr "appels manqués"
|
||||
|
||||
#: ../src/phone.c:2320
|
||||
#: ../src/phone.c:2350
|
||||
msgid "missed call"
|
||||
msgstr "appel manqué"
|
||||
|
||||
#: ../src/phone.c:2329
|
||||
#: ../src/phone.c:2359
|
||||
msgid "new messages"
|
||||
msgstr "nouveaux messages"
|
||||
|
||||
#: ../src/phone.c:2330
|
||||
#: ../src/phone.c:2360
|
||||
msgid "new message"
|
||||
msgstr "nouveau message"
|
||||
|
||||
#: ../src/phone.c:2348 ../src/phone.c:3253 ../src/phone.c:3257
|
||||
#: ../src/phone.c:2378 ../src/phone.c:3283 ../src/phone.c:3287
|
||||
msgid "Information"
|
||||
msgstr "Information"
|
||||
|
||||
#: ../src/phone.c:2358
|
||||
#: ../src/phone.c:2388
|
||||
msgid "Status"
|
||||
msgstr "État"
|
||||
|
||||
#: ../src/phone.c:2382
|
||||
#: ../src/phone.c:2412
|
||||
msgid "_View"
|
||||
msgstr "_Vue"
|
||||
|
||||
#: ../src/phone.c:2401
|
||||
#: ../src/phone.c:2431
|
||||
msgid "_Read"
|
||||
msgstr "_Lire"
|
||||
|
||||
#: ../src/phone.c:2502
|
||||
#: ../src/phone.c:2532
|
||||
msgid "Open file..."
|
||||
msgstr "Ouvrir fichier..."
|
||||
|
||||
#: ../src/phone.c:2688
|
||||
#: ../src/phone.c:2718
|
||||
msgid "Write message"
|
||||
msgstr "Écrire un message"
|
||||
|
||||
#: ../src/phone.c:2694
|
||||
#: ../src/phone.c:2724
|
||||
msgid "Send"
|
||||
msgstr "Envoyer"
|
||||
|
||||
#: ../src/phone.c:2700
|
||||
#: ../src/phone.c:2730
|
||||
msgid "Attach"
|
||||
msgstr "Joindre"
|
||||
|
||||
#: ../src/phone.c:2816
|
||||
#: ../src/phone.c:2846
|
||||
msgid "Attach file..."
|
||||
msgstr "Joindre un fichier..."
|
||||
|
||||
#: ../src/phone.c:2887
|
||||
#: ../src/phone.c:2917
|
||||
#, c-format
|
||||
msgid "%d message%s, %d/%d characters"
|
||||
msgstr "%d message%s, %d/%d caractères"
|
||||
|
||||
#: ../src/phone.c:2888
|
||||
#: ../src/phone.c:2918
|
||||
msgid "s"
|
||||
msgstr "s"
|
||||
|
||||
#: ../src/phone.c:2952
|
||||
#: ../src/phone.c:2982
|
||||
msgid "Sending message..."
|
||||
msgstr "Envoi du message..."
|
||||
|
||||
#: ../src/phone.c:2981
|
||||
#: ../src/phone.c:3011
|
||||
msgid "Outgoing"
|
||||
msgstr "Sortant"
|
||||
|
||||
#: ../src/phone.c:3167
|
||||
#: ../src/phone.c:3197
|
||||
msgid "Operation in progress..."
|
||||
msgstr "Opération en cours..."
|
||||
|
||||
#: ../src/phone.c:3205 ../src/phone.c:3209
|
||||
#: ../src/phone.c:3235 ../src/phone.c:3239
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
|
||||
#: ../src/phone.c:3229 ../src/phone.c:3233
|
||||
#: ../src/phone.c:3259 ../src/phone.c:3263
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: ../src/phone.c:3459
|
||||
#: ../src/phone.c:3489
|
||||
msgid "Name: "
|
||||
msgstr "Nom: "
|
||||
|
||||
#: ../src/phone.c:3468
|
||||
#: ../src/phone.c:3498
|
||||
msgid "Number: "
|
||||
msgstr "Numéro: "
|
||||
|
||||
#: ../src/phone.c:3484
|
||||
#: ../src/phone.c:3514
|
||||
msgid "New contact"
|
||||
msgstr "Nouveau contact"
|
||||
|
||||
#: ../src/phone.c:3486
|
||||
#: ../src/phone.c:3516
|
||||
msgid "Edit contact: "
|
||||
msgstr "Modifier contact: "
|
||||
|
||||
#: ../src/phone.c:3513
|
||||
#: ../src/phone.c:3543
|
||||
msgid "The name cannot be empty"
|
||||
msgstr "Le nom ne peut être vide"
|
||||
|
||||
#: ../src/phone.c:3518
|
||||
#: ../src/phone.c:3548
|
||||
msgid "The number cannot be empty"
|
||||
msgstr "Le numéro ne peut être vide"
|
||||
|
||||
#: ../src/phone.c:3653
|
||||
#: ../src/phone.c:3684
|
||||
msgid "Message sent"
|
||||
msgstr "Message envoyé"
|
||||
|
||||
#: ../src/phone.c:3689
|
||||
#: ../src/phone.c:3720
|
||||
#, c-format
|
||||
msgid "Wrong %s"
|
||||
msgstr "Mauvais %s"
|
||||
|
||||
#: ../src/phone.c:3696
|
||||
#: ../src/phone.c:3727
|
||||
#, c-format
|
||||
msgid "%s is valid"
|
||||
msgstr "%s valide"
|
||||
|
||||
#: ../src/phone.c:3759
|
||||
#: ../src/phone.c:3790
|
||||
msgid "Raw data (not shown)"
|
||||
msgstr "Données brutes (non affichées)"
|
||||
|
||||
#: ../src/phone.c:3792
|
||||
#: ../src/phone.c:3823
|
||||
msgid "Message deleted"
|
||||
msgstr "Message effacé"
|
||||
|
||||
|
@ -204,6 +204,11 @@ int modem_request_type(Modem * modem, ModemRequestType type, ...)
|
||||
case MODEM_REQUEST_CONTACT:
|
||||
request.contact.id = va_arg(ap, unsigned int);
|
||||
break;
|
||||
case MODEM_REQUEST_CONTACT_NEW:
|
||||
request.contact_new.id = va_arg(ap, unsigned int);
|
||||
request.contact_new.name = va_arg(ap, char const *);
|
||||
request.contact_new.number = va_arg(ap, char const *);
|
||||
break;
|
||||
case MODEM_REQUEST_CONTACT_DELETE:
|
||||
request.contact_delete.id = va_arg(ap, unsigned int);
|
||||
break;
|
||||
|
@ -38,6 +38,7 @@ typedef struct _Debug
|
||||
GtkWidget * message;
|
||||
|
||||
/* events */
|
||||
ModemEvent event_contact;
|
||||
ModemEvent event_message;
|
||||
} Debug;
|
||||
|
||||
@ -91,6 +92,7 @@ static int _debug_init(ModemPlugin * modem)
|
||||
return -1;
|
||||
modem->priv = debug;
|
||||
debug->source = 0;
|
||||
memset(&debug->event_contact, 0, sizeof(debug->event_contact));
|
||||
memset(&debug->event_message, 0, sizeof(debug->event_message));
|
||||
/* window */
|
||||
debug->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
@ -219,6 +221,8 @@ static gboolean _stop_on_idle(gpointer data)
|
||||
/* debug_request */
|
||||
static int _debug_request(ModemPlugin * modem, ModemRequest * request)
|
||||
{
|
||||
ModemPluginHelper * helper = modem->helper;
|
||||
Debug * debug = modem->priv;
|
||||
ModemEvent event;
|
||||
|
||||
if(request == NULL)
|
||||
@ -226,10 +230,21 @@ static int _debug_request(ModemPlugin * modem, ModemRequest * request)
|
||||
memset(&event, 0, sizeof(event));
|
||||
switch(request->type)
|
||||
{
|
||||
case MODEM_REQUEST_CONTACT_NEW:
|
||||
debug->event_contact.type = MODEM_EVENT_TYPE_CONTACT;
|
||||
debug->event_contact.contact.id++;
|
||||
debug->event_contact.contact.status
|
||||
= rand() % MODEM_CONTACT_STATUS_COUNT;
|
||||
debug->event_contact.contact.name
|
||||
= request->contact_new.name;
|
||||
debug->event_contact.contact.number
|
||||
= request->contact_new.number;
|
||||
helper->event(helper->modem, &debug->event_contact);
|
||||
break;
|
||||
case MODEM_REQUEST_MESSAGE_DELETE:
|
||||
event.type = MODEM_EVENT_TYPE_MESSAGE_DELETED;
|
||||
event.message_deleted.id = request->message_delete.id;
|
||||
modem->helper->event(modem->helper->modem, &event);
|
||||
helper->event(helper->modem, &event);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
35
src/phone.c
35
src/phone.c
@ -68,6 +68,8 @@ typedef enum _PhoneCallType
|
||||
typedef enum _PhoneContactColumn
|
||||
{
|
||||
PHONE_CONTACT_COLUMN_ID = 0,
|
||||
PHONE_CONTACT_COLUMN_STATUS,
|
||||
PHONE_CONTACT_COLUMN_STATUS_DISPLAY,
|
||||
PHONE_CONTACT_COLUMN_NAME,
|
||||
PHONE_CONTACT_COLUMN_NUMBER
|
||||
} PhoneContactColumn;
|
||||
@ -182,6 +184,7 @@ struct _Phone
|
||||
GtkWidget * co_window;
|
||||
GtkListStore * co_store;
|
||||
GtkWidget * co_view;
|
||||
GdkPixbuf * co_status[MODEM_CONTACT_STATUS_COUNT];
|
||||
/* dialog */
|
||||
int co_index;
|
||||
GtkWidget * co_dialog;
|
||||
@ -350,6 +353,7 @@ Phone * phone_new(char const * plugin, int retry)
|
||||
{
|
||||
Phone * phone;
|
||||
char const * p;
|
||||
GtkIconTheme * icontheme;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "DEBUG: %s(%d)\n", __func__, retry);
|
||||
@ -395,7 +399,21 @@ Phone * phone_new(char const * plugin, int retry)
|
||||
phone->en_progress = NULL;
|
||||
phone->co_window = NULL;
|
||||
phone->co_store = gtk_list_store_new(PHONE_CONTACT_COLUMN_COUNT,
|
||||
G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);
|
||||
G_TYPE_UINT, G_TYPE_UINT, GDK_TYPE_PIXBUF,
|
||||
G_TYPE_STRING, G_TYPE_STRING);
|
||||
icontheme = gtk_icon_theme_get_default();
|
||||
phone->co_status[MODEM_CONTACT_STATUS_AWAY]
|
||||
= gtk_icon_theme_load_icon(icontheme, "user-away", 24,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
|
||||
phone->co_status[MODEM_CONTACT_STATUS_IDLE]
|
||||
= gtk_icon_theme_load_icon(icontheme, "user-idle", 24,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
|
||||
phone->co_status[MODEM_CONTACT_STATUS_OFFLINE]
|
||||
= gtk_icon_theme_load_icon(icontheme, "user-offline", 24,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
|
||||
phone->co_status[MODEM_CONTACT_STATUS_ONLINE]
|
||||
= gtk_icon_theme_load_icon(icontheme, "user-online", 24,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
|
||||
phone->co_dialog = NULL;
|
||||
phone->di_window = NULL;
|
||||
phone->lo_window = NULL;
|
||||
@ -766,7 +784,8 @@ void phone_contacts_new(Phone * phone)
|
||||
|
||||
|
||||
/* phone_contacts_set */
|
||||
void phone_contacts_set(Phone * phone, unsigned int index, char const * name,
|
||||
void phone_contacts_set(Phone * phone, unsigned int index,
|
||||
ModemContactStatus status, char const * name,
|
||||
char const * number)
|
||||
{
|
||||
GtkTreeModel * model = GTK_TREE_MODEL(phone->co_store);
|
||||
@ -790,6 +809,9 @@ void phone_contacts_set(Phone * phone, unsigned int index, char const * name,
|
||||
gtk_list_store_append(phone->co_store, &iter);
|
||||
gtk_list_store_set(phone->co_store, &iter,
|
||||
PHONE_CONTACT_COLUMN_ID, index,
|
||||
PHONE_CONTACT_COLUMN_STATUS, status,
|
||||
PHONE_CONTACT_COLUMN_STATUS_DISPLAY,
|
||||
phone->co_status[status],
|
||||
PHONE_CONTACT_COLUMN_NAME, name,
|
||||
PHONE_CONTACT_COLUMN_NUMBER, number, -1);
|
||||
}
|
||||
@ -1575,6 +1597,14 @@ void phone_show_contacts(Phone * phone, gboolean show)
|
||||
FALSE);
|
||||
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(phone->co_view),
|
||||
TRUE);
|
||||
renderer = gtk_cell_renderer_pixbuf_new();
|
||||
column = gtk_tree_view_column_new_with_attributes(NULL,
|
||||
renderer, "pixbuf",
|
||||
PHONE_CONTACT_COLUMN_STATUS_DISPLAY, NULL);
|
||||
gtk_tree_view_column_set_sort_column_id(column,
|
||||
PHONE_CONTACT_COLUMN_STATUS);
|
||||
gtk_tree_view_append_column(GTK_TREE_VIEW(phone->co_view),
|
||||
column);
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
column = gtk_tree_view_column_new_with_attributes(_("Name"),
|
||||
renderer, "text", PHONE_CONTACT_COLUMN_NAME,
|
||||
@ -3637,6 +3667,7 @@ static void _phone_modem_event(void * priv, ModemEvent * event)
|
||||
break;
|
||||
case MODEM_EVENT_TYPE_CONTACT:
|
||||
phone_contacts_set(phone, event->contact.id,
|
||||
event->contact.status,
|
||||
event->contact.name,
|
||||
event->contact.number);
|
||||
break;
|
||||
|
@ -49,7 +49,8 @@ void phone_contacts_call_selected(Phone * phone);
|
||||
void phone_contacts_delete_selected(Phone * phone);
|
||||
void phone_contacts_edit_selected(Phone * phone);
|
||||
void phone_contacts_new(Phone * phone);
|
||||
void phone_contacts_set(Phone * phone, unsigned int index, char const * name,
|
||||
void phone_contacts_set(Phone * phone, unsigned int index,
|
||||
ModemContactStatus status, char const * name,
|
||||
char const * number);
|
||||
void phone_contacts_write_selected(Phone * phone);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user