Commit cd313efa authored by Emmanuel Milou's avatar Emmanuel Milou

Add icons, set the contacts entry state as CALL_STATE_DIALING

parent 170bc71f
......@@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps
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
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
buttonsdir = $(datadir)/sflphone
EXTRA_DIST = $(buttons_DATA) $(icon_DATA)
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2108"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docbase="/home/dobey/Projects/gnome-icon-theme/scalable/stock/generic"
sodipodi:docname="stock_person.svg"
inkscape:export-filename="/home/jimmac/src/cvs/gnome/gnome-icon-theme/48x48/stock/generic/stock_person.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0">
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective39" />
<linearGradient
id="linearGradient4562">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4564" />
<stop
style="stop-color:#d6d6d2;stop-opacity:1;"
offset="1"
id="stop4566" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4356">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4358" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4360" />
</linearGradient>
<linearGradient
id="linearGradient3824">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3826" />
<stop
style="stop-color:#c9c9c9;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop3828" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop3818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3820" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3816"
id="radialGradient3822"
cx="31.112698"
cy="19.008621"
fx="31.112698"
fy="19.008621"
r="8.6620579"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient4362"
x1="20.661695"
y1="35.817974"
x2="22.626925"
y2="36.217758"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4574725,8.6573699e-2,-8.4475822e-2,0.4688334,-3.7001476,-5.7438166)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient4366"
gradientUnits="userSpaceOnUse"
x1="22.686766"
y1="36.3904"
x2="21.408455"
y2="35.739632"
gradientTransform="matrix(-0.4548256,0.1001553,9.7728308e-2,0.4661207,19.475571,-6.1586599)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4356"
id="linearGradient1366"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.4548256,0.1001553,9.7728308e-2,0.4661207,13.107279,-9.3553728)"
x1="22.686766"
y1="36.3904"
x2="21.408455"
y2="35.739632" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3824"
id="linearGradient1372"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4652065,0,0,0.4767595,-12.117924,-7.3917619)"
x1="30.935921"
y1="29.553486"
x2="30.935921"
y2="35.803486" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4562"
id="radialGradient4568"
cx="24.753788"
cy="26.814409"
fx="24.753788"
fy="26.814409"
r="17.986025"
gradientTransform="matrix(0.4708262,0,-1.1611519e-8,0.4867499,-3.5907712,-3.5342702)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4562"
id="radialGradient3816"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
cx="29.922075"
cy="17.727694"
fx="29.922075"
fy="17.727694"
r="17.986025" />
<filter
inkscape:collect="always"
x="-0.076111108"
width="1.1522222"
y="-0.28344828"
height="1.5668966"
id="filter5655">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.4531044"
id="feGaussianBlur5657" />
</filter>
</defs>
<sodipodi:namedview
inkscape:showpageshadow="false"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.16862745"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="14.000535"
inkscape:cy="28.945566"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
fill="#9db029"
stroke="#727e0a"
inkscape:window-width="872"
inkscape:window-height="815"
inkscape:window-x="207"
inkscape:window-y="92"
borderlayer="true" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Person</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>user</rdf:li>
<rdf:li>person</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires
rdf:resource="http://web.resource.org/cc/SourceCode" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="cipek"
inkscape:groupmode="layer"
style="display:inline">
<path
style="opacity:1;fill:url(#linearGradient1372);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 4.1651393,8.8345802 L 6.138843,8.8345802 L 4.9875164,7.7389402 L 4.7408031,8.0760604 L 4.4940899,7.8232205 L 4.1651393,8.8345802 z"
id="path4173" />
<path
sodipodi:nodetypes="cccc"
id="path4370"
d="M 6.430587,11.556284 C 7.003373,11.279297 7.269997,10.601658 7.269997,10.601658 C 6.823808,8.674127 5.420266,7.3392773 5.420266,7.3392773 C 5.420266,7.3392773 6.566811,10.363174 6.430587,11.556284 z"
style="opacity:0.22784807;fill:url(#linearGradient1366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="dalsi cipek"
style="display:inline">
<rect
style="opacity:0.34857142;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.30000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible;filter:url(#filter5655);enable-background:accumulate"
id="rect4608"
width="38.183765"
height="10.253048"
x="5.3033009"
y="35.448853"
rx="5.126524"
ry="5.126524"
transform="matrix(0.3250676,0,0,0.3331404,6.89512e-2,0.7930955)" />
<path
style="opacity:1;fill:url(#radialGradient4568);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.35188666px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 5.747901,15.484233 L 10.682162,15.484233 C 12.080203,15.484233 13.464322,14.958876 13.971669,13.461513 C 14.453455,12.03959 14.053907,9.331795 10.928875,7.1405156 L 5.0899998,7.1405156 C 1.9649683,9.1632345 1.5744381,11.929484 2.2939191,13.545793 C 3.0268962,15.19242 4.2676231,15.484233 5.747901,15.484233 z"
id="path4308"
sodipodi:nodetypes="cczcczc" />
<path
sodipodi:nodetypes="cccc"
id="path4364"
d="M 12.79888,14.752996 C 13.371666,14.476009 13.638289,13.79837 13.638289,13.79837 C 13.1921,11.870839 11.788558,10.53599 11.788558,10.53599 C 11.788558,10.53599 12.935103,13.559886 12.79888,14.752996 z"
style="opacity:0.29120878;fill:url(#linearGradient4366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
inkscape:r_cx="true"
inkscape:r_cy="true" />
<path
style="opacity:0.54945056;fill:url(#linearGradient4362);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 3.5664124,14.960262 C 2.9860173,14.700442 2.7262518,14.07431 2.7262518,14.07431 C 3.1176214,12.134311 4.4567857,10.714959 4.4567857,10.714959 C 4.4567857,10.714959 3.3964304,13.77171 3.5664124,14.960262 z"
id="path4354"
sodipodi:nodetypes="cccc"
inkscape:r_cx="true"
inkscape:r_cy="true" />
<path
sodipodi:nodetypes="cczcczc"
id="path4314"
d="M 5.634667,15.115814 L 10.684449,15.104916 C 11.954768,15.104916 13.212438,14.627555 13.673434,13.266988 C 14.111206,11.974967 13.627851,9.514549 10.788314,7.5234596 L 5.2422484,7.4035828 C 2.4027116,9.2415112 1.8531144,11.755044 2.5174989,13.343568 C 3.1818841,14.932092 4.1513831,15.104916 5.634667,15.115814 z"
style="opacity:0.64285715;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.35188669px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
sodipodi:ry="8.6620579"
sodipodi:rx="8.6620579"
sodipodi:cy="19.008621"
sodipodi:cx="31.112698"
id="path4318"
style="opacity:1;fill:url(#radialGradient3822);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc"
transform="matrix(0.4652065,0,0,0.4767595,-6.3991871,-2.6974863)" />
<path
sodipodi:type="arc"
style="opacity:1;fill:url(#radialGradient3816);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.74718857px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="path4320"
sodipodi:cx="31.112698"
sodipodi:cy="19.008621"
sodipodi:rx="8.6620579"
sodipodi:ry="8.6620579"
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
transform="matrix(0.4652065,0,0,0.4767595,-6.3410376,-4.366146)" />
<path
d="M 39.774755,19.008621 A 8.6620579,8.6620579 0 1 1 22.45064,19.008621 A 8.6620579,8.6620579 0 1 1 39.774755,19.008621 z"
sodipodi:ry="8.6620579"
sodipodi:rx="8.6620579"
sodipodi:cy="19.008621"
sodipodi:cx="31.112698"
id="path4322"
style="opacity:0.19620254;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.82296228px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
sodipodi:type="arc"
transform="matrix(0.4223732,0,0,0.4328624,-5.0083678,-3.5317177)" />
</g>
</svg>
This diff is collapsed.
......@@ -75,6 +75,17 @@ typedef enum
CONTACT
} call_type_t;
/**
* @enum contact_type
* This enum have all types of contacts: HOME phone, cell phone, etc...
*/
typedef enum
{
HOME,
CELLPHONE,
WORK
} contact_type_t;
/** @struct call_t
* @brief Call information.
* This struct holds information about a call.
......@@ -93,8 +104,10 @@ typedef struct {
gchar * to;
/** The current state of the call */
call_state_t state;
/** The history state */
/** The history state if necessary */
history_state_t history_state;
/** The contact type if necessary */
contact_type_t contact_type;
time_t _start;
time_t _stop;
......
......@@ -247,7 +247,7 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED,
reset_call_tree(contacts);
call_list_reset(contacts);
// do a synchronized search
// do a synchronous search
results = search_sync (gtk_entry_get_text(GTK_ENTRY(filter_entry)), 50);
for (i = results; i != NULL; i = i->next)
......@@ -260,8 +260,9 @@ show_contacts_tab(GtkToggleToolButton *toggle_tool_button UNUSED,
call = g_new0 (call_t, 1);
call->from = g_strconcat("\"" , entry->name, "\"<", entry->phone, ">", NULL);
call->state = CALL_STATE_RECORD;
call->history_state = OUTGOING;
call->state = CALL_STATE_DIALING;
//call->history_state = MISSED;
call->contact_type = HOME;
call_list_add (contacts, call);
update_call_tree_add(contacts,call);
......@@ -401,7 +402,7 @@ toolbar_update_buttons ()
gtk_widget_set_sensitive( GTK_WIDGET(recButton), TRUE);
break;
default:
g_warning("Should not happen!");
g_warning("Toolbar update - Should not happen!");
break;
}
}
......@@ -474,7 +475,7 @@ void row_activated(GtkTreeView *tree_view UNUSED,
sflphone_place_call (selectedCall);
break;
default:
g_warning("Should not happen!");
g_warning("Row activated - Should not happen!");
break;
}
}
......@@ -584,7 +585,7 @@ create_toolbar ()
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(historyButton), -1);
active_calltree = current_calls;
image = gtk_image_new_from_file( ICONS_DIR "/contacts.svg");
image = gtk_image_new_from_file( ICONS_DIR "/addressbook.svg");
contactButton = gtk_tool_button_new(image, _("Contacts"));
#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text(GTK_WIDGET(contactButton), _("Contacts"));
......@@ -604,9 +605,6 @@ create_toolbar ()
G_CALLBACK (call_mailbox), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(mailboxButton), -1);
//image = gtk_image_new_from_file( ICONS_DIR "/record.svg");
//recButton = gtk_tool_button_new (image, _("Record a call"));
recButton = gtk_tool_button_new_from_stock (GTK_STOCK_MEDIA_RECORD);
#if GTK_CHECK_VERSION(2,12,0)
gtk_widget_set_tooltip_text(GTK_WIDGET(recButton), _("Record a call"));
......@@ -823,7 +821,7 @@ update_call_tree (calltab_t* tab, call_t * c)
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/rec_call.svg", NULL);
break;
default:
g_warning("Should not happen!");
g_warning("Update calltree - Should not happen!");
}
}
else
......@@ -908,10 +906,11 @@ update_call_tree_add (calltab_t* tab, call_t * c)
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL);
break;
default:
g_warning("Should not happen!");
g_warning("Update calltree add - Should not happen!");
}
}
else{
else if (tab == history) {
switch(c->history_state)
{
case INCOMING:
......@@ -927,12 +926,33 @@ update_call_tree_add (calltab_t* tab, call_t * c)
g_warning("History - Should not happen!");
}
date = timestamp_get_call_date();
if(tab == contacts)
description = g_strconcat( description , NULL);
else
description = g_strconcat( date , description , NULL);
}
else if (tab == contacts) {
switch (c->contact_type)
{
case HOME:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL);
break;
case WORK:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL);
break;
case CELLPHONE:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL);
break;
default:
pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL);
break;
}
description = g_strconcat( description , NULL);
}
else {
g_warning ("This widget doesn't exist - This is a bug in the application\n.");
}
//Resize it
if(pixbuf)
{
......@@ -950,7 +970,6 @@ update_call_tree_add (calltab_t* tab, call_t * c)
if (pixbuf != NULL)
g_object_unref(G_OBJECT(pixbuf));
sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tab->view));
gtk_tree_selection_select_iter(GTK_TREE_SELECTION(sel), &iter);
toolbar_update_buttons();
......
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