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
acd7db9d
Commit
acd7db9d
authored
Jun 27, 2016
by
Erwan Croze
👋🏻
Browse files
Fix the chat icon display on unread messages
parent
d12c575d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
gtk/friendlist.c
gtk/friendlist.c
+6
-2
No files found.
gtk/friendlist.c
View file @
acd7db9d
...
...
@@ -218,13 +218,15 @@ void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist){
icon_name
=
"linphone-chat-nothing"
;
}
}
if
((
selected_path
&&
gtk_tree_path_compare
(
path
,
selected_path
)
==
0
)
||
(
hovered_row
&&
gtk_tree_path_compare
(
path
,
hovered_row
)
==
0
)){
show_chat_button
=
TRUE
;
show_call_button
=
TRUE
;
}
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
FRIEND_CHAT
,
icon_name
,
FRIEND_CHAT_BUTTON_VISIBLE
,
show_chat_button
,
-
1
);
FRIEND_CHAT_BUTTON_VISIBLE
,
show_chat_button
,
-
1
);
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
FRIEND_CALL_BUTTON_VISIBLE
,
show_call_button
,
-
1
);
gtk_tree_path_free
(
path
);
...
...
@@ -702,11 +704,13 @@ void linphone_gtk_show_friends(void){
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_NAME
,
display
,
FRIEND_ID
,
lf
,
FRIEND_PRESENCE_IMG
,
send_subscribe
?
status_to_icon_name
(
linphone_friend_get_status
(
lf
))
:
NULL
,
FRIEND_CHAT
,
"linphone-chat-nothing"
,
-
1
);
cr
=
linphone_gtk_create_chatroom
(
f_uri
);
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_CHATROOM
,
cr
,
-
1
);
nbmsg
=
linphone_chat_room_get_unread_messages_count
(
cr
);
if
(
nbmsg
!=
0
){
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_CHAT
,
"linphone-chat-new-message"
,
-
1
);
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_CHAT
,
"linphone-chat-new-message"
,
FRIEND_CHAT_BUTTON_VISIBLE
,
TRUE
,
-
1
);
}
escaped
=
g_markup_escape_text
(
uri
,
-
1
);
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_SIP_ADDRESS
,
escaped
,
-
1
);
...
...
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