Commit cbf59bc7 authored by Ghislain MARY's avatar Ghislain MARY

Fix bug 0002609: Encryption lock icon too small.

parent f6c18589
......@@ -2,6 +2,11 @@
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkImage" id="zrtp_button_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">linphone-security-pending</property>
</object>
<object class="GtkFrame" id="in_call_frame">
<property name="can_focus">False</property>
<property name="extension_events">cursor</property>
......@@ -44,51 +49,66 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="encryption_box">
<object class="GtkHBox" id="zrtp_box">
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="encryption_status_icon">
<object class="GtkButton" id="zrtp_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">linphone-security-pending</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">zrtp_button_icon</property>
<property name="relief">none</property>
<signal name="clicked" handler="linphone_gtk_auth_token_verified_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="encryption_status_box">
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="encryption_label">
<object class="GtkImage" id="encryption_status_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="pixel_size">16</property>
<property name="icon_name">linphone-security-ok</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="encryption_verify_button">
<property name="label" translatable="yes">Set verified</property>
<object class="GtkLabel" id="encryption_status_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="linphone_gtk_auth_token_verified_clicked" swapped="no"/>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Encryption status</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
<property name="position">3</property>
</packing>
</child>
<child>
......@@ -185,7 +205,7 @@
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">5</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
......@@ -224,7 +244,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child>
......@@ -262,7 +282,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">5</property>
<property name="position">6</property>
</packing>
</child>
<child>
......@@ -352,7 +372,7 @@
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">7</property>
<property name="position">6</property>
<property name="position">7</property>
</packing>
</child>
</object>
......
......@@ -715,47 +715,53 @@ void linphone_gtk_auth_token_verified_clicked(GtkButton *button){
}
void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call){
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *encryption_box=linphone_gtk_get_widget(callview,"encryption_box");
GtkWidget *label=linphone_gtk_get_widget(callview,"encryption_label");
GtkWidget *status_icon=linphone_gtk_get_widget(callview,"encryption_status_icon");
GtkWidget *verify_button=linphone_gtk_get_widget(callview,"encryption_verify_button");
LinphoneMediaEncryption me=linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
bool_t verified=linphone_call_get_authentication_token_verified(call);
switch(me){
GtkWidget *callview = (GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *encryption_status_box = linphone_gtk_get_widget(callview, "encryption_status_box");
GtkWidget *encryption_status_label = linphone_gtk_get_widget(callview, "encryption_status_label");
GtkWidget *encryption_status_icon = linphone_gtk_get_widget(callview, "encryption_status_icon");
GtkWidget *zrtp_box = linphone_gtk_get_widget(callview, "zrtp_box");
GtkWidget *zrtp_button = linphone_gtk_get_widget(callview, "zrtp_button");
GtkWidget *zrtp_status_icon = gtk_button_get_image(GTK_BUTTON(zrtp_button));
LinphoneMediaEncryption me = linphone_call_params_get_media_encryption(linphone_call_get_current_params(call));
switch (me) {
case LinphoneMediaEncryptionSRTP:
gtk_widget_show_all(encryption_box);
gtk_label_set_markup(GTK_LABEL(label),_("Secured by SRTP"));
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
gtk_widget_hide(verify_button);
break;
gtk_widget_hide_all(zrtp_box);
gtk_widget_show_all(encryption_status_box);
gtk_label_set_markup(GTK_LABEL(encryption_status_label), _("Secured by SRTP"));
gtk_image_set_from_icon_name(GTK_IMAGE(encryption_status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
break;
case LinphoneMediaEncryptionDTLS:
gtk_widget_show_all(encryption_box);
gtk_label_set_markup(GTK_LABEL(label),_("Secured by DTLS"));
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
gtk_widget_hide(verify_button);
break;
gtk_widget_hide_all(zrtp_box);
gtk_widget_show_all(encryption_status_box);
gtk_label_set_markup(GTK_LABEL(encryption_status_label), _("Secured by DTLS"));
gtk_image_set_from_icon_name(GTK_IMAGE(encryption_status_icon), "linphone-security-ok", GTK_ICON_SIZE_MENU);
break;
case LinphoneMediaEncryptionZRTP:
{
gchar *text=g_strdup_printf(_("Secured by ZRTP - [auth token: %s]"),linphone_call_get_authentication_token(call));
gtk_label_set_markup(GTK_LABEL(label),text);
bool_t verified = linphone_call_get_authentication_token_verified(call);
gchar *text = g_strdup_printf(_("Secured by ZRTP - [auth token: %s]"), linphone_call_get_authentication_token(call));
gtk_button_set_label(GTK_BUTTON(zrtp_button), text);
g_free(text);
gtk_image_set_from_icon_name(GTK_IMAGE(status_icon),
verified ? "linphone-security-ok" : "linphone-security-pending", GTK_ICON_SIZE_MENU);
gtk_button_set_label(GTK_BUTTON(verify_button),
verified ? _("Set unverified") : _("Set verified"));
gtk_widget_show_all(encryption_box);
gtk_image_set_from_icon_name(GTK_IMAGE(zrtp_status_icon), verified ? "linphone-security-ok" : "linphone-security-pending", GTK_ICON_SIZE_MENU);
gtk_widget_set_tooltip_text(zrtp_button, verified ? _("Set unverified") : _("Set verified"));
gtk_widget_hide_all(encryption_status_box);
gtk_widget_show_all(zrtp_box);
}
break;
default:
gtk_widget_hide_all(encryption_box);
gtk_widget_hide_all(encryption_status_box);
gtk_widget_hide_all(zrtp_box);
break;
}
}
void linphone_gtk_in_call_view_hide_encryption(LinphoneCall *call) {
GtkWidget *callview = (GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *encryption_box = linphone_gtk_get_widget(callview, "encryption_box");
gtk_widget_hide_all(encryption_box);
GtkWidget *encryption_status_box = linphone_gtk_get_widget(callview, "encryption_status_box");
GtkWidget *zrtp_box = linphone_gtk_get_widget(callview, "zrtp_box");
gtk_widget_hide_all(encryption_status_box);
gtk_widget_hide_all(zrtp_box);
}
char *linphone_gtk_address(const LinphoneAddress *addr){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment