Skip to content
Snippets Groups Projects
Commit bbe72fa3 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#2518] Fix some runtime warnings

parent 74616804
Branches
Tags
No related merge requests found
...@@ -107,9 +107,8 @@ static void show_password_cb (GtkWidget *widget, gpointer data) ...@@ -107,9 +107,8 @@ static void show_password_cb (GtkWidget *widget, gpointer data)
} }
/* Signal to protocolComboBox 'changed' */ /* Signal to protocolComboBox 'changed' */
void void change_protocol_cb (account_t *currentAccount UNUSED) {
change_protocol_cb (account_t * currentAccount UNUSED)
{
gchar *protocol = gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox)); gchar *protocol = gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox));
if (g_strcasecmp (protocol, "IAX") == 0) { if (g_strcasecmp (protocol, "IAX") == 0) {
...@@ -195,8 +194,8 @@ static void update_credential_cb(GtkWidget *widget, gpointer data UNUSED) ...@@ -195,8 +194,8 @@ static void update_credential_cb(GtkWidget *widget, gpointer data UNUSED)
gtk_list_store_set (GTK_LIST_STORE (credentialStore), &iter, column, (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)), -1); gtk_list_store_set (GTK_LIST_STORE (credentialStore), &iter, column, (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)), -1);
} }
static GtkWidget * create_basic_tab(account_t **a) static GtkWidget* create_basic_tab (account_t **a) {
{
GtkWidget * frame; GtkWidget * frame;
GtkWidget * table; GtkWidget * table;
account_t *currentAccount; account_t *currentAccount;
...@@ -589,6 +588,7 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED) ...@@ -589,6 +588,7 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED)
gchar *local_address; gchar *local_address;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
DEBUG("Showing stun options, hiding Local/Published info"); DEBUG("Showing stun options, hiding Local/Published info");
gtk_widget_show (stunServerLabel); gtk_widget_show (stunServerLabel);
gtk_widget_show (stunServerEntry); gtk_widget_show (stunServerEntry);
...@@ -599,11 +599,14 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED) ...@@ -599,11 +599,14 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED)
gtk_widget_hide (publishedPortLabel); gtk_widget_hide (publishedPortLabel);
gtk_widget_hide (publishedAddressEntry); gtk_widget_hide (publishedAddressEntry);
gtk_widget_hide (publishedPortSpinBox); gtk_widget_hide (publishedPortSpinBox);
} else { } else {
gtk_widget_hide (stunServerLabel); gtk_widget_hide (stunServerLabel);
gtk_widget_hide (stunServerEntry); gtk_widget_hide (stunServerEntry);
gtk_widget_set_sensitive (sameAsLocalRadioButton, TRUE); gtk_widget_set_sensitive (sameAsLocalRadioButton, TRUE);
gtk_widget_set_sensitive (publishedAddrRadioButton, TRUE); gtk_widget_set_sensitive (publishedAddrRadioButton, TRUE);
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton))) { if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton))) {
gtk_widget_show (publishedAddressLabel); gtk_widget_show (publishedAddressLabel);
gtk_widget_show (publishedPortLabel); gtk_widget_show (publishedPortLabel);
...@@ -619,7 +622,6 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED) ...@@ -619,7 +622,6 @@ static use_stun_cb(GtkWidget * widget, gpointer data UNUSED)
// gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), local_address); // gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), local_address);
} }
} }
} }
...@@ -993,11 +995,11 @@ GtkWidget* create_published_address (account_t **a) { ...@@ -993,11 +995,11 @@ GtkWidget* create_published_address (account_t **a) {
gtk_widget_set_sensitive (GTK_WIDGET(useStunCheckBox), gtk_widget_set_sensitive (GTK_WIDGET(useStunCheckBox),
g_strcasecmp(use_tls,"true") == 0 ? FALSE: TRUE); g_strcasecmp(use_tls,"true") == 0 ? FALSE: TRUE);
label = gtk_label_new_with_mnemonic (_("STUN server URL")); stunServerLabel = gtk_label_new_with_mnemonic (_("STUN server URL"));
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); gtk_table_attach_defaults(GTK_TABLE(table), stunServerLabel, 0, 1, 1, 2);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (stunServerLabel), 0, 0.5);
stunServerEntry = gtk_entry_new(); stunServerEntry = gtk_entry_new();
gtk_label_set_mnemonic_widget(GTK_LABEL(label), stunServerEntry); gtk_label_set_mnemonic_widget (GTK_LABEL (stunServerLabel), stunServerEntry);
gtk_entry_set_text(GTK_ENTRY(stunServerEntry), stun_server); gtk_entry_set_text(GTK_ENTRY(stunServerEntry), stun_server);
gtk_table_attach_defaults(GTK_TABLE(table), stunServerEntry, 1, 2, 1, 2); gtk_table_attach_defaults(GTK_TABLE(table), stunServerEntry, 1, 2, 1, 2);
...@@ -1013,20 +1015,20 @@ GtkWidget* create_published_address (account_t **a) { ...@@ -1013,20 +1015,20 @@ GtkWidget* create_published_address (account_t **a) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), TRUE);
} }
label = gtk_label_new_with_mnemonic (_("Published address")); publishedAddressLabel = gtk_label_new_with_mnemonic (_("Published address"));
gtk_table_attach_defaults( GTK_TABLE(table), label, 0, 1, 5, 6); gtk_table_attach_defaults( GTK_TABLE(table), publishedAddressLabel, 0, 1, 5, 6);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (publishedAddressLabel), 0, 0.5);
publishedAddressEntry = gtk_entry_new(); publishedAddressEntry = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), publishedAddressEntry); gtk_label_set_mnemonic_widget (GTK_LABEL (publishedAddressLabel), publishedAddressEntry);
gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), published_address); gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), published_address);
gtk_table_attach_defaults( GTK_TABLE(table), publishedAddressEntry, 1, 2, 5, 6); gtk_table_attach_defaults( GTK_TABLE(table), publishedAddressEntry, 1, 2, 5, 6);
label = gtk_label_new_with_mnemonic(_("Published port")); publishedPortLabel = gtk_label_new_with_mnemonic(_("Published port"));
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 6, 7); gtk_table_attach_defaults(GTK_TABLE(table), publishedPortLabel, 0, 1, 6, 7);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_misc_set_alignment(GTK_MISC (publishedPortLabel), 0, 0.5);
publishedPortSpinBox = gtk_spin_button_new_with_range(1, 65535, 1); publishedPortSpinBox = gtk_spin_button_new_with_range(1, 65535, 1);
gtk_label_set_mnemonic_widget(GTK_LABEL (label), publishedPortSpinBox); gtk_label_set_mnemonic_widget(GTK_LABEL (publishedPortLabel), publishedPortSpinBox);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(published_port, NULL)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(published_port, NULL));
gtk_table_attach_defaults(GTK_TABLE(table), publishedPortSpinBox, 1, 2, 6, 7); gtk_table_attach_defaults(GTK_TABLE(table), publishedPortSpinBox, 1, 2, 6, 7);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment