Use icons designed by Kerosine for speaker and microphone icons

This commit is contained in:
François Grisez 2015-08-03 17:21:29 +02:00
parent 15fcd2487d
commit 2a3e4c46ab
30 changed files with 384 additions and 36 deletions

View file

@ -646,16 +646,26 @@ static void volume_control_value_changed(GtkScaleButton *button, gdouble value,
}
}
static void volume_control_button_update_value(GtkWidget *widget) {
LinphoneCall *call = (LinphoneCall *)g_object_get_data(G_OBJECT(widget), "call");
VolumeControlType type = (VolumeControlType)g_object_get_data(G_OBJECT(widget), "type");
if(type == VOLUME_CTRL_PLAYBACK) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(widget), linphone_call_get_speaker_volume_gain(call));
} else if(type == VOLUME_CTRL_RECORD) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(widget), linphone_call_get_microphone_volume_gain(call));
}
}
static gboolean volume_control_button_enter_event_handler(GtkWidget *widget) {
volume_control_button_update_value(widget);
return FALSE;
}
static void volume_control_init(GtkWidget *vol_ctrl, VolumeControlType type, LinphoneCall *call) {
g_object_set_data(G_OBJECT(vol_ctrl), "call", call);
g_object_set_data(G_OBJECT(vol_ctrl), "type", (gpointer)type);
if(type == VOLUME_CTRL_PLAYBACK) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(vol_ctrl), linphone_call_get_speaker_volume_gain(call));
} else if(type == VOLUME_CTRL_RECORD) {
gtk_scale_button_set_value(GTK_SCALE_BUTTON(vol_ctrl), linphone_call_get_microphone_volume_gain(call));
}
g_signal_connect(G_OBJECT(vol_ctrl), "enter-notify-event", G_CALLBACK(volume_control_button_enter_event_handler), NULL);
g_signal_connect(G_OBJECT(vol_ctrl), "value-changed", G_CALLBACK(volume_control_value_changed), NULL);
}
@ -864,22 +874,11 @@ void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call,LinphoneCa
}
void linphone_gtk_draw_mute_button(GtkButton *button, gboolean active){
const char *icon_name = active ? "linphone-micro-muted" : "linphone-micro-enabled";
GtkWidget *image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(button, image);
gtk_widget_show(image);
g_object_set_data(G_OBJECT(button),"active",GINT_TO_POINTER(active));
if (active){
GtkWidget *image=create_pixmap("mic_muted.png");
/*gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));*/
if (image!=NULL) {
gtk_button_set_image(GTK_BUTTON(button),image);
gtk_widget_show(image);
}
}else{
GtkWidget *image=create_pixmap("mic_active.png");
/*gtk_button_set_label(GTK_BUTTON(button),_("Mute"));*/
if (image!=NULL) {
gtk_button_set_image(GTK_BUTTON(button),image);
gtk_widget_show(image);
}
}
}
void linphone_gtk_mute_clicked(GtkButton *button){

View file

@ -2124,6 +2124,17 @@ int main(int argc, char *argv[]){
/*for pulseaudio:*/
g_setenv("PULSE_PROP_media.role", "phone", TRUE);
#endif
/* Add the data directory of Linphone to XDG_DATA_DIRS to enable GTK+ to find
the Linphone specific icons */
tmp = g_getenv("XDG_DATA_DIRS");
if(tmp && strlen(tmp) > 0) {
char *xdg_data_dirs = g_strdup_printf("%s:%s", tmp, PACKAGE_DATA_DIR "/linphone");
g_setenv("XDG_DATA_DIRS", xdg_data_dirs, TRUE);
g_free(xdg_data_dirs);
} else {
g_setenv("XDG_DATA_DIRS", PACKAGE_DATA_DIR "/linphone", FALSE);
}
lang=linphone_gtk_get_lang(config_file);
if (lang == NULL || lang[0]=='\0'){

View file

@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<!-- interface-local-resource-path /home/francois/projects/linphone/linphone/pixmaps/hicolor -->
<object class="GtkImage" id="add_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
@ -304,10 +305,7 @@
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted
audio-volume-high
audio-volume-low
audio-volume-medium</property>
<property name="icons">linphone-micro-enabled</property>
</object>
<packing>
<property name="expand">False</property>
@ -350,10 +348,7 @@ audio-volume-medium</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted
audio-volume-high
audio-volume-low
audio-volume-medium</property>
<property name="icons">linphone-speaker-enabled</property>
</object>
<packing>
<property name="expand">False</property>

View file

@ -27,6 +27,11 @@ install(FILES ${PIXMAPS}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install(DIRECTORY hicolor DESTINATION ${PACKAGE_DATA_DIR}/linphone/icons
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install(FILES linphone.png
DESTINATION ${PACKAGE_DATA_DIR}/icons/hicolor/48x48/apps
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ

View file

@ -1,6 +1,5 @@
pixmapdir=$(datadir)/pixmaps/linphone
pixmap_DATA= \
dist_pixmap_DATA= \
hold_on.png hold_off.png \
mic_muted.png mic_active.png \
linphone.png linphone-banner.png \
@ -21,9 +20,9 @@ pixmap_DATA= \
notok.png
iconsdir=$(datadir)/icons/hicolor/48x48/apps
appicondir=$(datadir)/icons/hicolor/48x48/apps
dist_appicon_DATA= linphone.png
icons_DATA= linphone.png
iconsdir=$(datadir)/linphone/icons
dist_icons_DATA=hicolor
EXTRA_DIST=$(pixmap_DATA) $(icons_DATA)

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

View file

@ -0,0 +1,4 @@
[Dolphin]
PreviewsShown=true
Timestamp=2015,8,3,15,21,55
Version=3

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 B

4
pixmaps/svg/.directory Normal file
View file

@ -0,0 +1,4 @@
[Dolphin]
PreviewsShown=true
Timestamp=2015,8,3,13,7,36
Version=3

View file

@ -0,0 +1,78 @@
<?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="128"
height="128"
viewBox="0 0 128 128"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-micro-enabled.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/hicolor/16x16/linphone-micro-muted.png"
inkscape:export-xdpi="11.25"
inkscape:export-ydpi="11.25">
<metadata
id="metadata17">
<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>micro_default</dc:title>
</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="1133"
id="namedview15"
showgrid="false"
inkscape:zoom="2.1454545"
inkscape:cx="-69.09746"
inkscape:cy="55"
inkscape:window-x="-6"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">micro_default</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="g3348">
<path
sodipodi:nodetypes="cssssscccsccccccccsc"
d="m 44.924259,68.391695 c 0,10.054618 8.187424,18.210235 18.282433,18.210235 10.09808,0 18.285504,-8.155617 18.285504,-18.210235 l 0,-45.74882 c 0,-10.060734 -8.187424,-18.2163505 -18.285504,-18.2163505 -10.095009,0 -18.282433,8.1556165 -18.282433,18.2163505 l 0,45.74882 z m 52.901346,-22.208536 0,19.875302 c 0,19.049648 -15.500088,34.486299 -34.618913,34.486299 m 0,0 0,21.47768 z m -10.771796,23.87819 21.548197,0 z M 28.58931,46.183159 l 0,19.875302 c 0,19.049648 15.500092,34.486299 34.618917,34.486299"
id="micro_off"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:5.78692436;stroke-linecap:round;stroke-linejoin:round" />
<rect
id="Rectangle-250-Copy-6"
sketch:type="MSShapeGroup"
x="-25.377115"
y="-24.508099"
width="178.23727"
height="178.23727"
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,90 @@
<?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="128"
height="128"
viewBox="0 0 128 128"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-micro-muted.svg"
inkscape:export-filename="/home/francois/projects/linphone/linphone/pixmaps/hicolor/16x16/linphone-micro-muted.png"
inkscape:export-xdpi="11.25"
inkscape:export-ydpi="11.25">
<metadata
id="metadata17">
<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>micro_default</dc:title>
</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="1133"
id="namedview15"
showgrid="false"
inkscape:zoom="2.1454545"
inkscape:cx="-69.09746"
inkscape:cy="55"
inkscape:window-x="-6"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">micro_default</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="OUTILS"
sketch:type="MSPage"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
transform="matrix(1.1573849,0,0,1.1573849,13.973971,0.95399506)">
<g
id="linphone_v2.0_icones_buttons"
sketch:type="MSArtboardGroup"
transform="translate(-1684,-19406)">
<g
id="micro_default"
sketch:type="MSLayerGroup"
transform="translate(1650,19384)">
<path
d="m 60.741568,80.266982 c 0,8.687359 7.074072,15.733949 15.79633,15.733949 8.72491,0 15.798982,-7.04659 15.798982,-15.733949 l 0,-39.527749 C 92.33688,32.04659 85.262808,25 76.537898,25 67.81564,25 60.741568,32.04659 60.741568,40.739233 l 0,39.527749 0,0 z m 45.707652,-19.188548 0,17.172595 c 0,16.459216 -13.392336,29.796741 -29.911322,29.796741 m 0,0 0,18.55708 0,-18.55708 z m -9.307013,20.63116 18.618004,0 -18.618004,0 z m -20.602987,-67.600496 0,17.172595 c 0,16.459216 13.39234,29.796741 29.911326,29.796741 M 37,116.69154 117,36.987393 37,116.69154 Z"
id="micro_off"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round" />
<rect
id="Rectangle-250-Copy-6"
sketch:type="MSShapeGroup"
x="0"
y="0"
width="154"
height="154"
style="fill:#ffffff;fill-opacity:0" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,87 @@
<?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="128"
height="128"
viewBox="0 0 128 128"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-speaker-enabled.svg">
<metadata
id="metadata17">
<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>speaker_default</dc:title>
</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="1133"
id="namedview15"
showgrid="false"
inkscape:zoom="3.1052632"
inkscape:cx="40.5"
inkscape:cy="25.118644"
inkscape:window-x="-6"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">speaker_default</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<g
id="OUTILS"
sketch:type="MSPage"
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
transform="matrix(1.5813339,0,0,1.5813339,0.25511819,2.6974466)">
<g
id="linphone_v2.0_icones_buttons"
sketch:type="MSArtboardGroup"
transform="translate(-1687,-19654)">
<g
id="speaker_default"
sketch:type="MSLayerGroup"
transform="translate(1650,19615)">
<path
d="m 40.603728,91.675608 22.168645,0 L 87.743025,112 l 0,-70 -24.970652,20.323222 -22.772373,0 0,29.352386 0.603728,0 0,0 z m 59.422202,-7.801955 c 4.01893,-3.972926 4.01893,-10.413137 0,-14.383722 m 9.53653,20.165288 c 7.24946,-7.164369 7.25065,-18.783656 0,-25.948024"
id="speaker_on"
sketch:type="MSShapeGroup"
inkscape:connector-curvature="0"
style="stroke:#444444;stroke-width:5;stroke-linecap:round;stroke-linejoin:round" />
<rect
id="Rectangle-250-Copy-7"
sketch:type="MSShapeGroup"
x="0"
y="0"
width="154"
height="154"
style="fill:#ffffff;fill-opacity:0" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,76 @@
<?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="128"
height="128"
viewBox="0 0 128 128"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="linphone-speaker-muted.svg">
<metadata
id="metadata17">
<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>speaker_default</dc:title>
</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="1133"
id="namedview15"
showgrid="false"
inkscape:zoom="3.1052632"
inkscape:cx="-21.974575"
inkscape:cy="50.881356"
inkscape:window-x="-6"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id="title4">speaker_default</title>
<desc
id="desc6">Created with Sketch.</desc>
<defs
id="defs8" />
<path
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:7.907;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
inkscape:connector-curvature="0"
sketch:type="MSShapeGroup"
id="speaker_on"
d="m 5.9537866,85.995196 35.0560294,0 39.486939,32.139654 0,-110.6933772 -39.486939,32.1378002 -36.010725,0 0,46.415923 0.9546956,0 0,0 z M 99.920129,73.6577 c 6.355271,-6.282523 6.355271,-16.466647 0,-22.745467 m 15.080441,31.888053 c 11.46381,-11.329259 11.4657,-29.703232 0,-41.03249" />
<rect
style="fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1"
height="243.52542"
width="243.52542"
y="-58.974552"
x="-58.254265"
sketch:type="MSShapeGroup"
id="Rectangle-250-Copy-7" />
<path
style="fill:none;fill-rule:evenodd;stroke:#444444;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 6.7627118,115.76271 122.05085,5.6271203"
id="path3348"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB