mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix several UI bugs with buddylookup
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@760 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
96b9e2edf0
commit
e8898a1a0c
4 changed files with 16 additions and 3 deletions
|
|
@ -1095,8 +1095,10 @@ static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig
|
|||
if (linphone_core_lookup_known_proxy(lc,url)==cfg){
|
||||
if (lf->url->url->username!=NULL && lf->url->url->username[0]!='0'){
|
||||
BuddyLookupRequest *req;
|
||||
char tmp[255];
|
||||
snprintf(tmp,sizeof(tmp),"sip:%s@%s",lf->url->url->username,lf->url->url->host);
|
||||
req=sip_setup_context_create_buddy_lookup_request(ctx);
|
||||
buddy_lookup_request_set_key(req,lf->url->url->username);
|
||||
buddy_lookup_request_set_key(req,tmp);
|
||||
buddy_lookup_request_set_max_results(req,1);
|
||||
sip_setup_context_buddy_lookup_submit(ctx,req);
|
||||
lc->bl_reqs=ms_list_append(lc->bl_reqs,req);
|
||||
|
|
|
|||
|
|
@ -143,9 +143,13 @@ static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
|
|||
ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext");
|
||||
last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state"));
|
||||
|
||||
if (req==NULL) return FALSE;
|
||||
if (req==NULL) {
|
||||
g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0));
|
||||
return FALSE;
|
||||
}
|
||||
bls=req->status;
|
||||
if (last_state==bls) return TRUE;
|
||||
|
||||
switch(bls){
|
||||
case BuddyLookupNone:
|
||||
gtk_progress_bar_set_fraction(pb,0);
|
||||
|
|
|
|||
|
|
@ -272,7 +272,8 @@ void linphone_gtk_directory_search_activate(GtkWidget *entry){
|
|||
LinphoneProxyConfig *cfg;
|
||||
linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
|
||||
GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
|
||||
linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
|
||||
if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
|
||||
linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
|
||||
}
|
||||
|
||||
void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
|
||||
|
|
|
|||
|
|
@ -706,6 +706,12 @@ static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint respon
|
|||
|
||||
static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){
|
||||
linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
|
||||
return;
|
||||
}
|
||||
|
||||
gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url);
|
||||
dialog = gtk_message_dialog_new (
|
||||
GTK_WINDOW(linphone_gtk_get_main_window()),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue