Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
56d49fd7
Commit
56d49fd7
authored
Oct 29, 2015
by
Ghislain MARY
Browse files
Add an icon in the status bar to show if autoanswer is enabled.
parent
9956491d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
157 additions
and
9 deletions
+157
-9
gtk/linphone.h
gtk/linphone.h
+2
-0
gtk/main.c
gtk/main.c
+10
-3
gtk/main.ui
gtk/main.ui
+27
-3
gtk/propertybox.c
gtk/propertybox.c
+6
-1
pixmaps/CMakeLists.txt
pixmaps/CMakeLists.txt
+2
-0
pixmaps/Makefile.am
pixmaps/Makefile.am
+4
-2
pixmaps/linphone-warning.png
pixmaps/linphone-warning.png
+0
-0
pixmaps/svg/linphone-warning.svg
pixmaps/svg/linphone-warning.svg
+106
-0
No files found.
gtk/linphone.h
View file @
56d49fd7
...
...
@@ -347,3 +347,5 @@ LINPHONE_PUBLIC void linphone_gtk_notebook_current_page_changed(GtkNotebook *not
LINPHONE_PUBLIC
void
linphone_gtk_reload_sound_devices
(
void
);
LINPHONE_PUBLIC
void
linphone_gtk_reload_video_devices
(
void
);
LINPHONE_PUBLIC
bool_t
linphone_gtk_is_friend
(
LinphoneCore
*
lc
,
const
char
*
contact
);
LINPHONE_PUBLIC
gboolean
linphone_gtk_auto_answer_enabled
(
void
);
LINPHONE_PUBLIC
void
linphone_gtk_update_status_bar_icons
(
void
);
gtk/main.c
View file @
56d49fd7
...
...
@@ -1365,7 +1365,7 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
linphone_gtk_create_in_call_view
(
call
);
linphone_gtk_in_call_view_set_incoming
(
call
);
linphone_gtk_status_icon_set_blinking
(
TRUE
);
if
(
linphone_gtk_
get_ui_config_int
(
"
auto_answer
"
,
0
))
{
if
(
linphone_gtk_auto_answer
_enabled
(
))
{
int
delay
=
linphone_gtk_get_ui_config_int
(
"auto_answer_delay"
,
2000
);
linphone_call_ref
(
call
);
g_timeout_add
(
delay
,
(
GSourceFunc
)
linphone_gtk_auto_answer
,
call
);
...
...
@@ -1862,13 +1862,20 @@ gboolean linphone_gtk_keypad_destroyed_handler(void) {
return
FALSE
;
}
static
void
linphone_gtk_init_main_window
(){
void
linphone_gtk_update_status_bar_icons
(
void
)
{
GtkWidget
*
mw
=
linphone_gtk_get_main_window
();
GtkWidget
*
icon
=
linphone_gtk_get_widget
(
mw
,
"autoanswer_icon"
);
gtk_widget_set_visible
(
icon
,
linphone_gtk_auto_answer_enabled
());
}
static
void
linphone_gtk_init_main_window
(
void
){
GtkWidget
*
main_window
;
linphone_gtk_configure_main_window
();
linphone_gtk_manage_login
();
linphone_gtk_load_identities
();
linphone_gtk_set_my_presence
(
linphone_core_get_presence_info
(
linphone_gtk_get_core
()));
linphone_gtk_show_friends
();
linphone_gtk_update_status_bar_icons
();
load_uri_history
();
linphone_core_reset_missed_calls_count
(
linphone_gtk_get_core
());
main_window
=
linphone_gtk_get_main_window
();
...
...
@@ -2259,7 +2266,7 @@ GtkWidget *linphone_gtk_make_tab_header(const gchar *label, const gchar *icon_na
gtk_button_set_image
(
GTK_BUTTON
(
button
),
button_image
);
gtk_button_set_relief
(
GTK_BUTTON
(
button
),
GTK_RELIEF_NONE
);
#ifdef HAVE_GTK_OSX
gtk_misc_set_alignment
(
GTK_MISC
(
button_image
),
0
.
5
f
,
0
.
25
f
);
gtk_misc_set_alignment
(
GTK_MISC
(
button_image
),
0
.
5
f
,
0
.
f
);
#endif
g_signal_connect_swapped
(
G_OBJECT
(
button
),
"clicked"
,
cb
,
user_data
);
gtk_box_pack_end
(
GTK_BOX
(
tab_header
),
button
,
FALSE
,
FALSE
,
4
);
...
...
gtk/main.ui
View file @
56d49fd7
...
...
@@ -986,15 +986,39 @@
</packing>
</child>
<child>
<object
class=
"Gtk
Statusbar
"
id=
"status_bar"
>
<object
class=
"Gtk
HBox
"
id=
"status_bar
_box
"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"events"
>
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
</property>
<child>
<object
class=
"GtkStatusbar"
id=
"status_bar"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"events"
>
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
</property>
<property
name=
"has_resize_grip"
>
False
</property>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkImage"
id=
"autoanswer_icon"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"tooltip_text"
translatable=
"yes"
>
Autoanswer is enabled
</property>
<property
name=
"pixel_size"
>
16
</property>
<property
name=
"icon_name"
>
linphone-warning
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
...
...
gtk/propertybox.c
View file @
56d49fd7
...
...
@@ -267,6 +267,7 @@ void linphone_gtk_fill_video_sizes(GtkWidget *combo){
void
linphone_gtk_parameters_closed
(
GtkWidget
*
button
){
GtkWidget
*
pb
=
gtk_widget_get_toplevel
(
button
);
gtk_widget_destroy
(
pb
);
linphone_gtk_update_status_bar_icons
();
}
void
linphone_gtk_update_my_contact
(
GtkWidget
*
w
){
...
...
@@ -1701,7 +1702,7 @@ void linphone_gtk_show_parameters(void){
linphone_core_get_upload_bandwidth
(
lc
));
/* CALL PARAMS CONFIG */
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
linphone_gtk_get_widget
(
pb
,
"auto_answer_checkbox"
)),
linphone_gtk_
get_ui_config_int
(
"
auto_answer
"
,
0
));
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
linphone_gtk_get_widget
(
pb
,
"auto_answer_checkbox"
)),
linphone_gtk_auto_answer
_enabled
(
));
gtk_spin_button_set_value
(
GTK_SPIN_BUTTON
(
linphone_gtk_get_widget
(
pb
,
"auto_answer_delay_spinbutton"
)),
linphone_gtk_get_ui_config_int
(
"auto_answer_delay"
,
2000
));
/* UI CONFIG */
...
...
@@ -1897,6 +1898,10 @@ void linphone_gtk_enable_auto_answer(GtkToggleButton *checkbox, gpointer user_da
linphone_gtk_set_ui_config_int
(
"auto_answer"
,
auto_answer_enabled
?
1
:
0
);
}
gboolean
linphone_gtk_auto_answer_enabled
(
void
)
{
return
(
gboolean
)
linphone_gtk_get_ui_config_int
(
"auto_answer"
,
0
);
}
void
linphone_gtk_auto_answer_delay_changed
(
GtkSpinButton
*
spinbutton
,
gpointer
user_data
)
{
int
delay
=
gtk_spin_button_get_value
(
spinbutton
);
linphone_gtk_set_ui_config_int
(
"auto_answer_delay"
,
delay
);
...
...
pixmaps/CMakeLists.txt
View file @
56d49fd7
...
...
@@ -52,6 +52,7 @@ install(FILES
svg/linphone-security-pending.svg
svg/linphone-media-play.svg
svg/linphone-media-pause.svg
svg/linphone-warning.svg
DESTINATION
${
ICONS_INSTALL_DIR
}
/scalable/status
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
...
...
@@ -100,6 +101,7 @@ install(FILES
linphone-security-pending.png
linphone-media-play.png
linphone-media-pause.png
linphone-warning.png
DESTINATION
${
ICONS_INSTALL_DIR
}
/48x48/status
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
...
...
pixmaps/Makefile.am
View file @
56d49fd7
...
...
@@ -36,7 +36,8 @@ dist_status48icons_DATA= \
linphone-security-ok.png
\
linphone-security-pending.png
\
linphone-media-play.png
\
linphone-media-pause.png
linphone-media-pause.png
\
linphone-warning.png
statussvgiconsdir
=
$(iconsdir)
/scalable/status
dist_statussvgicons_DATA
=
\
...
...
@@ -63,7 +64,8 @@ dist_statussvgicons_DATA= \
svg/linphone-security-ok.svg
\
svg/linphone-security-pending.svg
\
svg/linphone-media-play.svg
\
svg/linphone-media-pause.svg
svg/linphone-media-pause.svg
\
svg/linphone-warning.svg
actions48iconsdir
=
$(iconsdir)
/48x48/actions
dist_actions48icons_DATA
=
\
...
...
pixmaps/linphone-warning.png
0 → 100644
View file @
56d49fd7
1004 Bytes
pixmaps/svg/linphone-warning.svg
0 → 100644
View file @
56d49fd7
<?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=
"34"
height=
"34"
viewBox=
"0 0 34 34"
version=
"1.1"
id=
"svg4229"
inkscape:version=
"0.91 r13725"
sodipodi:docname=
"linphone-warning.svg"
inkscape:export-filename=
"/home/ghislain/code/linphone-desktop/submodules/linphone/pixmaps/linphone-warning.png"
inkscape:export-xdpi=
"127.06"
inkscape:export-ydpi=
"127.06"
>
<metadata
id=
"metadata4247"
>
<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>
chat_message_not_delivered
</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=
"1141"
id=
"namedview4245"
showgrid=
"false"
inkscape:zoom=
"23.675886"
inkscape:cx=
"17"
inkscape:cy=
"16.669388"
inkscape:window-x=
"0"
inkscape:window-y=
"0"
inkscape:window-maximized=
"1"
inkscape:current-layer=
"svg4229"
/>
<!-- Generator: Sketch 3.3.3 (12081) - http://www.bohemiancoding.com/sketch -->
<title
id=
"title4231"
>
chat_message_not_delivered
</title>
<desc
id=
"desc4233"
>
Created with Sketch.
</desc>
<defs
id=
"defs4235"
/>
<g
id=
"OUTILS"
sketch:type=
"MSPage"
style=
"fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
transform=
"translate(0.04223707,2.5776293)"
>
<g
id=
"linphone_v2.0_icones_buttons"
sketch:type=
"MSArtboardGroup"
transform=
"translate(-4749,-15298)"
>
<g
id=
"chat_message_not_delivered"
sketch:type=
"MSLayerGroup"
transform=
"translate(4747,15295)"
>
<path
d=
"M 19.140723,3.4160156 2.1543948,32 35.845605,32 19.140723,3.4160156 Z"
id=
"Path-1067"
sketch:type=
"MSShapeGroup"
inkscape:connector-curvature=
"0"
style=
"fill:#ff0000"
/>
<g
id=
"chat_message_not_delivered-copy-2"
sketch:type=
"MSShapeGroup"
style=
"fill:#ffffff;fill-opacity:0"
>
<rect
id=
"Rectangle-232-Copy-22"
x=
"0"
y=
"0"
width=
"38"
height=
"38"
/>
</g>
<path
d=
"m 19.017716,19.516561 0,-7.030643"
id=
"chat_message_delivered-copy-4"
sketch:type=
"MSShapeGroup"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round"
/>
<circle
id=
"Oval-51"
sketch:type=
"MSShapeGroup"
cx=
"19"
cy=
"27"
r=
"3"
style=
"fill:#ffffff"
/>
</g>
</g>
</g>
</svg>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment