Commit bfc45748 authored by Emmanuel Milou's avatar Emmanuel Milou

add home/business/mobile differenciation for a contact

parent c6b9609a
...@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps ...@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.png icon_DATA = sflphone.png
buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history.svg history2.svg sflphone.png stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg
buttonsdir = $(datadir)/sflphone buttonsdir = $(datadir)/sflphone
EXTRA_DIST = $(buttons_DATA) $(icon_DATA) EXTRA_DIST = $(buttons_DATA) $(icon_DATA)
This diff is collapsed.
This diff is collapsed.
...@@ -106,6 +106,7 @@ typedef struct { ...@@ -106,6 +106,7 @@ typedef struct {
call_state_t state; call_state_t state;
/** The history state if necessary */ /** The history state if necessary */
history_state_t history_state; history_state_t history_state;
contact_type_t contact_type;
time_t _start; time_t _start;
time_t _stop; time_t _stop;
......
...@@ -259,11 +259,11 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED, ...@@ -259,11 +259,11 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED,
if (entry) if (entry)
{ {
/* Create entry for business phone information */ /* Create entry for business phone information */
create_new_entry_in_contactlist (entry->name, entry->phone_business); create_new_entry_in_contactlist (entry->name, entry->phone_business, CONTACT_PHONE_BUSINESS);
/* Create entry for home phone information */ /* Create entry for home phone information */
create_new_entry_in_contactlist (entry->name, entry->phone_home); create_new_entry_in_contactlist (entry->name, entry->phone_home, CONTACT_PHONE_HOME);
/* Create entry for mobile phone information */ /* Create entry for mobile phone information */
create_new_entry_in_contactlist (entry->name, entry->phone_mobile); create_new_entry_in_contactlist (entry->name, entry->phone_mobile, CONTACT_PHONE_MOBILE);
} }
free_hit(entry); free_hit(entry);
} }
...@@ -279,7 +279,7 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED, ...@@ -279,7 +279,7 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED,
toolbar_update_buttons(); toolbar_update_buttons();
} }
void create_new_entry_in_contactlist (gchar *contact_name, gchar *contact_phone){ void create_new_entry_in_contactlist (gchar *contact_name, gchar *contact_phone, contact_type_t type){
gchar *from; gchar *from;
call_t *new_call; call_t *new_call;
...@@ -288,6 +288,7 @@ void create_new_entry_in_contactlist (gchar *contact_name, gchar *contact_phone) ...@@ -288,6 +288,7 @@ void create_new_entry_in_contactlist (gchar *contact_name, gchar *contact_phone)
if (strcmp (contact_phone, EMPTY_ENTRY) != 0){ if (strcmp (contact_phone, EMPTY_ENTRY) != 0){
from = g_strconcat("\"" , contact_name, "\"<", contact_phone, ">", NULL); from = g_strconcat("\"" , contact_name, "\"<", contact_phone, ">", NULL);
create_new_call (from, from, CALL_STATE_DIALING, "", &new_call); create_new_call (from, from, CALL_STATE_DIALING, "", &new_call);
new_call->contact_type = type;
call_list_add (contacts, new_call); call_list_add (contacts, new_call);
update_call_tree_add(contacts, new_call); update_call_tree_add(contacts, new_call);
} }
...@@ -940,23 +941,21 @@ update_call_tree_add (calltab_t* tab, call_t * c) ...@@ -940,23 +941,21 @@ update_call_tree_add (calltab_t* tab, call_t * c)
} }
else if (tab == contacts) { else if (tab == contacts) {
/*switch (c->contact_type) switch (c->contact_type)
{ {
case CONTACT_PHONE_HOME: case CONTACT_PHONE_HOME:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/home.svg", NULL);
break; break;
case CONTACT_PHONE_BUSINESS: case CONTACT_PHONE_BUSINESS:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL);
break; break;
case CONTACT_PHONE_MOBILE: case CONTACT_PHONE_MOBILE:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL);
break; break;
default: default:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL); pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL);
break; break;
}*/ }
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL);
description = g_strconcat( description , NULL); description = g_strconcat( description , NULL);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment