Commit 3b47d36c authored by Ghislain MARY's avatar Ghislain MARY

Improve contact list and call history icons.

parent 0ad4c0d4
......@@ -154,10 +154,11 @@ static void linphone_gtk_call_selected(GtkTreeView *treeview){
}
static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
GtkWidget *menu=gtk_menu_new();
GtkWidget *menu=NULL;
GtkWidget *menu_item;
gchar *call_label=NULL;
gchar *text_label=NULL;
gchar *add_contact_label=NULL;
gchar *name=NULL;
GtkWidget *image;
GtkTreeSelection *select;
......@@ -176,34 +177,44 @@ static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
name=linphone_address_as_string(la);
call_label=g_strdup_printf(_("Call %s"),name);
text_label=g_strdup_printf(_("Send text to %s"),name);
add_contact_label=g_strdup_printf(_("Add %s to your contact list"),name);
ms_free(name);
menu=gtk_menu_new();
}
}
if (call_label){
if (menu && call_label){
menu_item=gtk_image_menu_item_new_with_label(call_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-call",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,call_log);
}
if (text_label){
if (menu && text_label){
menu_item=gtk_image_menu_item_new_with_label(text_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-chat",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_chat_selected,call_log);
}
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_add_contact,call_log);
gtk_widget_show(menu);
gtk_menu_attach_to_widget(GTK_MENU(menu),call_log, NULL);
if (menu && add_contact_label){
menu_item=gtk_image_menu_item_new_with_label(add_contact_label);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_log_add_contact,call_log);
}
if (menu) {
gtk_widget_show(menu);
gtk_menu_attach_to_widget(GTK_MENU(menu),call_log, NULL);
}
if (add_contact_label) g_free(add_contact_label);
if (call_label) g_free(call_label);
if (text_label) g_free(text_label);
return menu;
......@@ -211,9 +222,12 @@ static GtkWidget *linphone_gtk_create_call_log_menu(GtkWidget *call_log){
gboolean linphone_gtk_call_log_popup_contact(GtkWidget *list, GdkEventButton *event){
GtkWidget *m=linphone_gtk_create_call_log_menu(list);
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
return TRUE;
if (m) {
gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL,
event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
return TRUE;
}
return FALSE;
}
gboolean linphone_gtk_call_log_button_pressed(GtkWidget *widget, GdkEventButton *event){
......
......@@ -844,6 +844,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
gchar *edit_label=NULL;
gchar *delete_label=NULL;
gchar *delete_hist_label=NULL;
gchar *add_contact_label=NULL;
gchar *name=NULL;
GtkTreeSelection *select;
GtkTreeIter iter;
......@@ -852,6 +853,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
LinphoneCore *lc=linphone_gtk_get_core();
LinphoneProxyConfig *cfg=NULL;
SipSetupContext * ssc=NULL;
bool_t show_menu_separator=FALSE;
linphone_core_get_default_proxy(lc,&cfg);
if (cfg){
......@@ -860,6 +862,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
add_contact_label=g_strdup_printf(_("Add a new contact"));
if (gtk_tree_selection_get_selected (select, &model, &iter)){
gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
call_label=g_strdup_printf(_("Call %s"),name);
......@@ -868,10 +871,11 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
delete_hist_label=g_strdup_printf(_("Delete chat history of '%s'"),name);
g_free(name);
show_menu_separator=TRUE;
}
if (call_label){
menu_item=gtk_image_menu_item_new_with_label(call_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-call",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
......@@ -880,7 +884,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (text_label){
menu_item=gtk_image_menu_item_new_with_label(text_label);
image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-start-chat",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
......@@ -889,7 +893,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (edit_label){
menu_item=gtk_image_menu_item_new_with_label(edit_label);
image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-edit",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
......@@ -898,7 +902,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
}
if (delete_label){
menu_item=gtk_image_menu_item_new_with_label(delete_label);
image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-delete",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
......@@ -920,22 +924,31 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
menu_item=gtk_image_menu_item_new_with_label(tmp);
g_free(tmp);
image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
gtk_widget_show(menu);
}
menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
if (show_menu_separator) {
GtkWidget *menu_item_separator=gtk_separator_menu_item_new();
gtk_widget_show(menu_item_separator);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_separator);
}
menu_item=gtk_image_menu_item_new_with_label(add_contact_label);
image=gtk_image_new_from_icon_name("linphone-contact-add",GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
gtk_widget_show(image);
gtk_widget_show(menu_item);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
gtk_widget_show(menu);
gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
g_free(add_contact_label);
if (call_label) g_free(call_label);
if (text_label) g_free(text_label);
if (edit_label) g_free(edit_label);
......
......@@ -17,7 +17,9 @@
<object class="GtkImage" id="add_image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-add</property>
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="icon_name">linphone-contact-add</property>
</object>
<object class="GtkImage" id="connect_image">
<property name="visible">True</property>
......@@ -78,7 +80,9 @@
<object class="GtkImage" id="edit_image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-edit</property>
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="icon_name">linphone-edit</property>
</object>
<object class="GtkImage" id="execute_image">
<property name="visible">True</property>
......@@ -122,7 +126,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Delete</property>
<property name="stock">gtk-remove</property>
<property name="xpad">2</property>
<property name="ypad">2</property>
<property name="icon_name">linphone-delete</property>
</object>
<object class="GtkImage" id="start_call_image">
<property name="visible">True</property>
......@@ -825,12 +831,13 @@
<object class="GtkImage" id="history_tab_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-refresh</property>
<property name="icon_name">linphone-history</property>
<property name="icon-size">1</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">4</property>
<property name="position">0</property>
</packing>
</child>
......
......@@ -54,6 +54,10 @@ install(FILES
svg/linphone-hold-on.svg
svg/linphone-start-call2.svg
svg/linphone-start-chat.svg
svg/linphone-history.svg
svg/linphone-edit.svg
svg/linphone-delete.svg
svg/linphone-contact-add.svg
DESTINATION ${ICONS_INSTALL_DIR}/scalable/actions
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
......@@ -88,6 +92,10 @@ install(FILES
linphone-stop-call.png
linphone-hold-on.png
linphone-hold-off.png
linphone-history.png
linphone-edit.png
linphone-delete.png
linphone-contact-add.png
DESTINATION ${ICONS_INSTALL_DIR}/48x48/actions
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
......
......@@ -57,7 +57,11 @@ dist_actions48icons_DATA= \
linphone-start-chat.png \
linphone-stop-call.png \
linphone-hold-on.png \
linphone-hold-off.png
linphone-hold-off.png \
linphone-history.png \
linphone-edit.png \
linphone-delete.png \
linphone-contact-add.png
actionssvgiconsdir=$(iconsdir)/scalable/actions
dist_actionssvgicons_DATA= \
......@@ -66,4 +70,8 @@ dist_actionssvgicons_DATA= \
svg/linphone-hold-off.svg \
svg/linphone-hold-on.svg \
svg/linphone-start-call2.svg \
svg/linphone-start-chat.svg
svg/linphone-start-chat.svg \
svg/linphone-history.svg \
svg/linphone-edit.svg \
svg/linphone-delete.svg \
svg/linphone-contact-add.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="100px" height="86px" viewBox="0 0 100 86" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>contact_add</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-1436.000000, -8040.000000)">
<g id="contact_add" sketch:type="MSLayerGroup" transform="translate(1426.000000, 8023.000000)">
<g id="add_contact" transform="translate(12.000000, 19.000000)" stroke="#444444" stroke-width="5" sketch:type="MSShapeGroup" stroke-linecap="round" stroke-linejoin="round">
<path d="M64.4082749,62.4977661 C71.4592749,69.5867661 82.8872749,69.5827661 89.9382749,62.4977661 C96.9902749,55.4087661 96.9902749,43.9247661 89.9382749,36.8367661 C82.8872749,29.7527661 71.4592749,29.7487661 64.4082749,36.8367661 C57.3582749,43.9217661 57.3582749,55.4127661 64.4082749,62.4977661 L64.4082749,62.4977661 Z M77.1442749,57.5577661 L77.1442749,41.7397661 L77.1442749,57.5577661 Z M85.0032749,49.6527661 L69.2772749,49.6497661 L85.0032749,49.6527661 Z M81.1602749,67.5947661 C81.3382749,72.2657661 80.2402749,75.4137661 80.2402749,75.4137661 C59.7252749,81.9487661 41.2112749,80.9447661 41.2112749,80.9447661 L40.7402749,80.9447661 C40.7402749,80.9447661 22.2272749,81.9487661 1.71127485,75.4137661 C1.71127485,75.4137661 -6.45672515,51.9927661 25.3992749,38.0597661 L26.2762749,37.4667661 C25.7292749,36.9887661 25.9242749,37.0817661 25.4302749,36.5507661 C21.9122749,32.7737661 19.7562749,27.6987661 19.7562749,22.1177661 C19.7562749,10.4547661 29.1662749,0.99976614 40.7742749,0.99976614 L41.1782749,0.99976614 C52.7852749,0.99976614 62.1952749,10.4547661 62.1952749,22.1177661 C62.1952749,27.6987661 60.0412749,32.7737661 56.5222749,36.5507661 C56.0282749,37.0817661 56.2212749,36.9887661 55.6762749,37.4667661 L56.5532749,38.0597661 C57.187901,38.3379988 61.6047564,40.9939068 61.6047564,40.9939068" id="Add-contact-ICON"></path>
</g>
<rect id="Rectangle-232-Copy-31" opacity="0" fill-opacity="0.7" fill="#FFFFFF" sketch:type="MSShapeGroup" x="0" y="0" width="120" height="120"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="63px" height="82px" viewBox="0 0 63 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>delete</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-1451.000000, -7131.000000)">
<g id="delete" sketch:type="MSLayerGroup" transform="translate(1426.000000, 7115.000000)">
<g transform="translate(27.000000, 19.000000)" stroke="#444444" id="Delete-icon" stroke-width="5" sketch:type="MSShapeGroup" stroke-linecap="round" stroke-linejoin="round">
<path d="M29.5231579,75.5263158 L34.8768421,75.5263158 C46.4010526,75.5263158 48.46,64.9796053 48.46,64.9796053 L58.3389474,10.9707368 L0.5,10.9707368 L10.38,64.9796053 C10.38,64.9796053 12.4410526,75.5263158 23.9652632,75.5263158 L29.5231579,75.5263158 L29.5231579,75.5263158 Z M22.7305263,24.4726842 L22.7305263,75.5263158 L22.7305263,24.4726842 Z M36.1094737,24.4726842 L36.1094737,75.5263158 L36.1094737,24.4726842 Z M17.5852632,9.09494702e-13 L41.2568421,9.09494702e-13 L17.5852632,9.09494702e-13 Z"></path>
</g>
<rect id="Rectangle-232-Copy-27" opacity="0" fill-opacity="0.7" fill="#FFFFFF" sketch:type="MSShapeGroup" x="0" y="0" width="120" height="120"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="85px" height="85px" viewBox="0 0 85 85" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title>edit</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="OUTILS" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="linphone_v2.0_icones_buttons" sketch:type="MSArtboardGroup" transform="translate(-1443.000000, -7813.000000)">
<g id="edit" sketch:type="MSLayerGroup" transform="translate(1426.000000, 7796.000000)">
<path d="M31.6469767,91.3387209 L45.9368605,90.1823256 L98.6467442,33.3786047 L91.5443023,26.7861628 L91.330814,26.5865116 L84.2303488,20 L31.5204651,76.8017442 L31.4315116,91.1351163 L31.6469767,91.3387209 L31.6469767,91.3387209 Z M73.4472093,31.6173256 L87.9367442,45.0611628 L73.4472093,31.6173256 Z M20,99.0697674 L45.8597674,99.0697674 L20,99.0697674 Z" id="edit_detail" stroke="#444444" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" sketch:type="MSShapeGroup"></path>
<rect id="Rectangle-232-Copy-30" opacity="0" fill-opacity="0.7" fill="#FFFFFF" sketch:type="MSShapeGroup" x="0" y="0" width="120" height="120"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="86px"
height="86px"
viewBox="0 0 86 86"
version="1.1"
id="svg3446"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-history.svg">
<metadata
id="metadata3462">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1141"
id="namedview3460"
showgrid="false"
inkscape:zoom="11.290698"
inkscape:cx="28.873326"
inkscape:cy="42.955716"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3446" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title3448">footer_history</title>
<desc
id="desc3450">Created with Sketch.</desc>
<defs
id="defs3452" />
<g
id="OUTILS"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
sketch:type="MSPage"
style="stroke:#444444;stroke-opacity:1">
<g
id="linphone_v2.0_icones_buttons"
sketch:type="MSArtboardGroup"
transform="translate(-1888.000000, -16901.000000)"
style="stroke:#444444;stroke-opacity:1">
<g
id="footer_history"
sketch:type="MSLayerGroup"
transform="translate(1886.000000, 16899.000000)"
style="stroke:#444444;stroke-opacity:1">
<path
d="M85,45 C85,67.09 67.094,85 45,85 C22.91,85 5,67.09 5,45 C5,22.909 22.91,5 45,5 C67.094,5 85,22.909 85,45 L85,45 Z M44.99,14.493 L44.99,45.311 L67.939,45.311"
stroke="#FFFFFF"
stroke-width="5"
stroke-linecap="round"
stroke-linejoin="round"
sketch:type="MSShapeGroup"
id="path3457"
style="stroke:#444444;stroke-opacity:1" />
<rect
id="Rectangle-250-Copy-8"
fill-opacity="0"
fill="#FFFFFF"
sketch:type="MSShapeGroup"
x="0"
y="0"
width="90"
height="90"
style="stroke:#444444;stroke-opacity:1" />
</g>
</g>
</g>
</svg>
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