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
c5b6a0ff
Commit
c5b6a0ff
authored
Jan 04, 2013
by
Margaux Clerc
Browse files
update function chat picture
parent
791e20b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
gtk/chat.c
gtk/chat.c
+3
-2
gtk/friendlist.c
gtk/friendlist.c
+8
-3
gtk/linphone.h
gtk/linphone.h
+1
-1
No files found.
gtk/chat.c
View file @
c5b6a0ff
...
...
@@ -31,7 +31,7 @@ void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
int
idx
=
GPOINTER_TO_INT
(
g_object_get_data
(
G_OBJECT
(
w
),
"idx"
));
g_return_if_fail
(
w
!=
NULL
);
gtk_notebook_remove_page
(
GTK_NOTEBOOK
(
nb
),
idx
);
linphone_gtk_update_chat_picture
();
linphone_gtk_update_chat_picture
(
FALSE
);
g_object_set_data
(
G_OBJECT
(
friendlist
),
"chatview"
,
NULL
);
gtk_widget_destroy
(
w
);
}
...
...
@@ -289,6 +289,7 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const
w
=
linphone_gtk_init_chatroom
(
room
,
from
);
g_object_set_data
(
G_OBJECT
(
friendlist
),
"chatview"
,(
gpointer
)
w
);
}
#ifdef HAVE_GTK_OSX
/* Notified when a new message is sent */
...
...
@@ -303,8 +304,8 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const
}
}
#endif
linphone_gtk_push_text
(
w
,
from
,
message
,
FALSE
,
room
);
//linphone_gtk_update_chat_picture(TRUE);
//gtk_window_present(GTK_WINDOW(w));
/*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
}
...
...
gtk/friendlist.c
View file @
c5b6a0ff
...
...
@@ -171,14 +171,18 @@ static void linphone_gtk_call_selected(GtkTreeView *treeview){
"start_call"
));
}
void
linphone_gtk_update_chat_picture
(){
void
linphone_gtk_update_chat_picture
(
gboolean
active
){
GtkTreeIter
iter
;
GtkWidget
*
w
=
linphone_gtk_get_main_window
();
GtkWidget
*
friendlist
=
linphone_gtk_get_widget
(
w
,
"contact_list"
);
GtkTreeModel
*
model
=
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
friendlist
));
if
(
gtk_tree_model_get_iter_first
(
model
,
&
iter
))
{
do
{
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
FRIEND_CHAT
,
create_chat_picture
(),
-
1
);
if
(
!
active
){
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
FRIEND_CHAT
,
create_chat_picture
(),
-
1
);
}
else
{
gtk_list_store_set
(
GTK_LIST_STORE
(
model
),
&
iter
,
FRIEND_CHAT
,
create_active_chat_picture
(),
-
1
);
}
}
while
(
gtk_tree_model_iter_next
(
model
,
&
iter
));
}
}
...
...
@@ -215,7 +219,7 @@ void linphone_gtk_chat_selected(GtkWidget *item){
linphone_gtk_load_chatroom
(
cr
,
uri
,
page
);
}
gtk_notebook_set_current_page
(
notebook
,
gtk_notebook_page_num
(
notebook
,
page
));
linphone_gtk_update_chat_picture
(
linphone_gtk_get_widget
(
w
,
"contact_list"
)
);
linphone_gtk_update_chat_picture
(
FALSE
);
gtk_list_store_set
(
store
,
&
iter
,
FRIEND_CHAT
,
create_active_chat_picture
(),
-
1
);
}
}
...
...
@@ -622,6 +626,7 @@ void linphone_gtk_show_friends(void){
if
(
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
friendlist
))
==
NULL
){
linphone_gtk_friend_list_init
(
friendlist
);
}
store
=
GTK_LIST_STORE
(
gtk_tree_view_get_model
(
GTK_TREE_VIEW
(
friendlist
)));
gtk_list_store_clear
(
store
);
...
...
gtk/linphone.h
View file @
c5b6a0ff
...
...
@@ -106,7 +106,7 @@ LinphoneChatRoom *linphone_gtk_start_chat(GtkTreeView* t);
void
linphone_gtk_load_chatroom
(
LinphoneChatRoom
*
cr
,
const
LinphoneAddress
*
uri
,
GtkWidget
*
chat_view
);
void
linphone_gtk_send_text
(
LinphoneChatRoom
*
cr
);
GtkWidget
*
linphone_gtk_init_chatroom
(
LinphoneChatRoom
*
cr
,
const
LinphoneAddress
*
with
);
void
linphone_gtk_update_chat_picture
();
void
linphone_gtk_update_chat_picture
(
gboolean
active
);
void
linphone_gtk_chat_set_conversation
(
const
LinphoneAddress
*
uri
,
gchar
*
conversation
);
gchar
*
linphone_gtk_chat_get_conversation
(
const
LinphoneAddress
*
uri
);
...
...
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