diff --git a/coreapi/friend.c b/coreapi/friend.c index c5e515e20..f0a519d49 100644 --- a/coreapi/friend.c +++ b/coreapi/friend.c @@ -230,7 +230,7 @@ void linphone_friend_remove_incoming_subscription(LinphoneFriend *lf, SalOp *op) sal_op_release(op); lf->insubs = ms_list_remove(lf->insubs, op); } - + } static void linphone_friend_unsubscribe(LinphoneFriend *lf){ @@ -632,7 +632,7 @@ LinphoneFriend * linphone_friend_new_from_config_file(LinphoneCore *lc, int inde if (tmp==NULL) { return NULL; } - lf=linphone_friend_new_with_address(tmp); + lf=linphone_core_create_friend_with_address(lc, tmp); if (lf==NULL) { return NULL; } @@ -742,4 +742,4 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneFriend, belle_sip_object_t, NULL, // clone _linphone_friend_marshall, FALSE -); \ No newline at end of file +); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a39f28447..6031a8831 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1862,8 +1862,12 @@ void linphone_core_enable_lime(LinphoneCore *lc, LinphoneLimeState val){ } } +bool_t linphone_core_lime_available(const LinphoneCore *lc){ + return lime_is_available(); +} + LinphoneLimeState linphone_core_lime_enabled(const LinphoneCore *lc){ - return lime_is_available() ? lp_config_get_int(lc->config,"sip", "lime", LinphoneLimeDisabled) : LinphoneLimeDisabled; + return linphone_core_lime_available(lc) ? lp_config_get_int(lc->config,"sip", "lime", LinphoneLimeDisabled) : LinphoneLimeDisabled; } LinphoneLimeState linphone_core_lime_for_file_sharing_enabled(const LinphoneCore *lc){ diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 6494848fe..fc8325c5f 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -2574,6 +2574,7 @@ LINPHONE_PUBLIC bool_t linphone_core_get_guess_hostname(LinphoneCore *lc); */ LINPHONE_PUBLIC void linphone_core_enable_lime(LinphoneCore *lc, LinphoneLimeState val); LINPHONE_PUBLIC LinphoneLimeState linphone_core_lime_enabled(const LinphoneCore *lc); +LINPHONE_PUBLIC bool_t linphone_core_lime_available(const LinphoneCore *lc); LINPHONE_PUBLIC bool_t linphone_core_ipv6_enabled(LinphoneCore *lc); LINPHONE_PUBLIC void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val); diff --git a/gtk/linphone.h b/gtk/linphone.h index 5ef4b2ea9..041520706 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -292,6 +292,7 @@ LINPHONE_PUBLIC void linphone_gtk_mtu_set(GtkWidget *w); LINPHONE_PUBLIC void linphone_gtk_mtu_changed(GtkWidget *w); LINPHONE_PUBLIC void linphone_gtk_use_sip_info_dtmf_toggled(GtkWidget *w); LINPHONE_PUBLIC void linphone_gtk_ipv6_toggled(GtkWidget *w); +LINPHONE_PUBLIC void linphone_gtk_lime_changed(GtkComboBoxText *comboext); LINPHONE_PUBLIC void linphone_gtk_disabled_udp_port_toggle(GtkCheckButton *button); LINPHONE_PUBLIC void linphone_gtk_random_udp_port_toggle(GtkCheckButton *button); LINPHONE_PUBLIC void linphone_gtk_udp_port_value_changed(GtkSpinButton *button); diff --git a/gtk/parameters.ui b/gtk/parameters.ui index 93ad5ffe9..7326a5070 100644 --- a/gtk/parameters.ui +++ b/gtk/parameters.ui @@ -1,6 +1,6 @@ - + -1 @@ -2244,24 +2244,10 @@ True False - 0.49000000953674316 + 0.51999998092651367 Use Lime for outgoing chat messages - - - True - True - False - 0.40000000596046448 - True - - - - 1 - 2 - - True @@ -2289,6 +2275,22 @@ 3 + + + True + False + + Disabled + Mandatory + Preferred + + + + + 1 + 2 + + diff --git a/gtk/propertybox.c b/gtk/propertybox.c index a94322980..60b22b1df 100644 --- a/gtk/propertybox.c +++ b/gtk/propertybox.c @@ -1309,8 +1309,8 @@ void linphone_gtk_set_media_encryption_mandatory(GtkWidget *button){ linphone_core_set_media_encryption_mandatory(linphone_gtk_get_core(),gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); } -void linphone_gtk_enable_lime(GtkWidget *button){ - linphone_core_enable_lime(linphone_gtk_get_core(), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); +void linphone_gtk_lime_changed(GtkComboBoxText *combotext) { + linphone_core_enable_lime(linphone_gtk_get_core(), gtk_combo_box_get_active(GTK_COMBO_BOX(combotext))); } static void linphone_gtk_show_media_encryption(GtkWidget *pb){ @@ -1366,7 +1366,7 @@ static void linphone_gtk_show_media_encryption(GtkWidget *pb){ LinphoneMediaEncryption menc=linphone_core_get_media_encryption(lc); gtk_widget_show(linphone_gtk_get_widget(pb,"encryption_label")); gtk_widget_show(linphone_gtk_get_widget(pb,"encryption_table")); - + switch(menc){ case LinphoneMediaEncryptionNone: gtk_combo_box_set_active(GTK_COMBO_BOX(combo),0); @@ -1395,8 +1395,10 @@ static void linphone_gtk_show_media_encryption(GtkWidget *pb){ } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"media_encryption_mandatory_checkbox")), linphone_core_is_media_encryption_mandatory(lc)); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"chat_lime_checkbox")), - linphone_core_lime_enabled(lc)); + + gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"chat_lime_combo")), linphone_core_lime_enabled(lc)); + gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"chat_lime_combo"), linphone_core_lime_available(lc)); + g_object_unref(G_OBJECT(model)); }