mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 04:28:10 +00:00
gtk: add lime "preferred" choice
This commit is contained in:
parent
55900bbf66
commit
3df89f60e0
6 changed files with 35 additions and 25 deletions
|
|
@ -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
|
||||
);
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="2.18"/>
|
||||
<requires lib="gtk+" version="2.24"/>
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<object class="GtkAdjustment" id="adjustment_download_bw">
|
||||
<property name="lower">-1</property>
|
||||
|
|
@ -2244,24 +2244,10 @@
|
|||
<object class="GtkLabel" id="chat_lime_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="yalign">0.49000000953674316</property>
|
||||
<property name="yalign">0.51999998092651367</property>
|
||||
<property name="label" translatable="yes">Use Lime for outgoing chat messages</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chat_lime_checkbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.40000000596046448</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="linphone_gtk_enable_lime" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="media_encryption_mandatory_label">
|
||||
<property name="visible">True</property>
|
||||
|
|
@ -2289,6 +2275,22 @@
|
|||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="chat_lime_combo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<items>
|
||||
<item translatable="yes">Disabled</item>
|
||||
<item translatable="yes">Mandatory</item>
|
||||
<item translatable="yes">Preferred</item>
|
||||
</items>
|
||||
<signal name="changed" handler="linphone_gtk_lime_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue