From 796abf8f98b5b0b80280ac2d2e67e89ad6e5c360 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 16 May 2010 23:39:07 +0000 Subject: [PATCH] Implemented calling the sender of a message being read (untested) --- src/callbacks.c | 2 +- src/phone.c | 14 ++++++++++++++ src/phone.h | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/callbacks.c b/src/callbacks.c index ba71665..70398e8 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -310,7 +310,7 @@ void on_phone_read_call(gpointer data) { Phone * phone = data; - /* FIXME implement */ + phone_read_call(phone); } diff --git a/src/phone.c b/src/phone.c index 66b9854..d2e663c 100644 --- a/src/phone.c +++ b/src/phone.c @@ -802,6 +802,20 @@ void phone_messages_write(Phone * phone, char const * number, char const * text) } +/* read */ +/* phone_read_call */ +void phone_read_call(Phone * phone) +{ + char const * number; + + if(phone->re_window == NULL) + return; + if((number = gtk_label_get_text(GTK_LABEL(phone->re_number))) == NULL) + return; + gsm_call(phone->gsm, GSM_CALL_TYPE_VOICE, number); +} + + /* show */ /* phone_show_call */ void phone_show_call(Phone * phone, gboolean show, ...) diff --git a/src/phone.h b/src/phone.h index 7475923..aac59b7 100644 --- a/src/phone.h +++ b/src/phone.h @@ -74,6 +74,9 @@ void phone_messages_set(Phone * phone, unsigned int index, char const * number, void phone_messages_write(Phone * phone, char const * number, char const * text); +/* read */ +void phone_read_call(Phone * phone); + /* write */ void phone_write_count_buffer(Phone * phone); void phone_write_send(Phone * phone);