mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
2006-03-10 Robert Love <rml@novell.com>
* gnome/applet/applet.glade: Add toggles to show/obfuscate the passphrase or key. * gnome/applet/wso-wep-ascii.c, gnome/applet/wso-wep-hex.c, gnome/applet/wso-wep-passphrase.c, gnome/applet/wso-wpa-eap.c, gnome/applet/wso-wpa-psk.c: Show and obfuscate passphrases and keys in response to "toggled" signal on new toggle. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1586 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
b368cf5118
commit
a771796641
|
@ -1,3 +1,12 @@
|
|||
2006-03-10 Robert Love <rml@novell.com>
|
||||
|
||||
* gnome/applet/applet.glade: Add toggles to show/obfuscate the
|
||||
passphrase or key.
|
||||
* gnome/applet/wso-wep-ascii.c, gnome/applet/wso-wep-hex.c,
|
||||
gnome/applet/wso-wep-passphrase.c, gnome/applet/wso-wpa-eap.c,
|
||||
gnome/applet/wso-wpa-psk.c: Show and obfuscate passphrases and keys
|
||||
in response to "toggled" signal on new toggle.
|
||||
|
||||
2006-03-10 Robert Love <rml@novell.com>
|
||||
|
||||
* src/nm-ap-security-wpa-eap.c: Pass fake empty strings for
|
||||
|
|
|
@ -1749,7 +1749,7 @@ WEP 40/128-bit ASCII
|
|||
<widget class="GtkTable" id="table6">
|
||||
<property name="border_width">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
|
@ -1825,8 +1825,8 @@ WEP 40/128-bit ASCII
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
|
@ -1843,10 +1843,60 @@ Shared Key</property>
|
|||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label31">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="show_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Show key</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -2130,7 +2180,7 @@ Shared Key</property>
|
|||
<widget class="GtkTable" id="wpa_psk_table">
|
||||
<property name="border_width">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">4</property>
|
||||
|
@ -2206,8 +2256,8 @@ Shared Key</property>
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
|
@ -2223,10 +2273,60 @@ Shared Key</property>
|
|||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label32">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="show_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Show password</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -2318,7 +2418,7 @@ Shared Key</property>
|
|||
<widget class="GtkTable" id="wpa_eap_table">
|
||||
<property name="border_width">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">8</property>
|
||||
<property name="n_rows">9</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">4</property>
|
||||
|
@ -2707,6 +2807,56 @@ Shared Key</property>
|
|||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label33">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="bottom_attach">9</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="show_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Show passwords</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">8</property>
|
||||
<property name="bottom_attach">9</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
|
@ -2796,7 +2946,7 @@ Shared Key</property>
|
|||
<widget class="GtkTable" id="table7">
|
||||
<property name="border_width">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
|
@ -2872,8 +3022,8 @@ Shared Key</property>
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
|
@ -2887,13 +3037,63 @@ Shared Key</property>
|
|||
<property name="add_tearoffs">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="show_checkbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Show passphrase</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label30">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
|
@ -37,6 +37,7 @@ struct OptData
|
|||
{
|
||||
const char * entry_name;
|
||||
const char * auth_combo_name;
|
||||
const char * show_checkbutton_name;
|
||||
};
|
||||
|
||||
static void data_free_func (WirelessSecurityOption *opt)
|
||||
|
@ -53,9 +54,16 @@ static void data_free_func (WirelessSecurityOption *opt)
|
|||
}
|
||||
|
||||
|
||||
static void show_key_cb (GtkToggleButton *button, GtkEntry *entry)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, gtk_toggle_button_get_active (button));
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFunc validate_cb, gpointer user_data)
|
||||
{
|
||||
GtkWidget * entry;
|
||||
GtkWidget * checkbutton;
|
||||
GtkWidget * combo;
|
||||
GtkWidget * widget;
|
||||
|
||||
|
@ -69,6 +77,9 @@ static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFun
|
|||
entry = glade_xml_get_widget (opt->uixml, opt->data->entry_name);
|
||||
g_signal_connect (G_OBJECT (entry), "changed", validate_cb, user_data);
|
||||
|
||||
checkbutton = glade_xml_get_widget (opt->uixml, opt->data->show_checkbutton_name);
|
||||
g_signal_connect (G_OBJECT (checkbutton), "toggled", GTK_SIGNAL_FUNC (show_key_cb), GTK_ENTRY (entry));
|
||||
|
||||
combo = glade_xml_get_widget (opt->uixml, opt->data->auth_combo_name);
|
||||
wso_wep_auth_combo_setup (opt, GTK_COMBO_BOX (combo));
|
||||
|
||||
|
@ -143,6 +154,7 @@ WirelessSecurityOption * wso_wep_ascii_new (const char *glade_file)
|
|||
opt->data = data = g_malloc0 (sizeof (OptData));
|
||||
data->entry_name = "wep_key_entry";
|
||||
data->auth_combo_name = "auth_method_combo";
|
||||
data->show_checkbutton_name = "show_checkbutton";
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ struct OptData
|
|||
{
|
||||
const char * entry_name;
|
||||
const char * auth_combo_name;
|
||||
const char * show_checkbutton_name;
|
||||
};
|
||||
|
||||
static void data_free_func (WirelessSecurityOption *opt)
|
||||
|
@ -53,9 +54,16 @@ static void data_free_func (WirelessSecurityOption *opt)
|
|||
}
|
||||
|
||||
|
||||
static void show_key_cb (GtkToggleButton *button, GtkEntry *entry)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, gtk_toggle_button_get_active (button));
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFunc validate_cb, gpointer user_data)
|
||||
{
|
||||
GtkWidget * entry;
|
||||
GtkWidget * checkbutton;
|
||||
GtkWidget * combo;
|
||||
GtkWidget * widget;
|
||||
|
||||
|
@ -67,6 +75,9 @@ static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFun
|
|||
entry = glade_xml_get_widget (opt->uixml, opt->data->entry_name);
|
||||
g_signal_connect (G_OBJECT (entry), "changed", validate_cb, user_data);
|
||||
|
||||
checkbutton = glade_xml_get_widget (opt->uixml, opt->data->show_checkbutton_name);
|
||||
g_signal_connect (G_OBJECT (checkbutton), "toggled", GTK_SIGNAL_FUNC (show_key_cb), GTK_ENTRY (entry));
|
||||
|
||||
combo = glade_xml_get_widget (opt->uixml, opt->data->auth_combo_name);
|
||||
wso_wep_auth_combo_setup (opt, GTK_COMBO_BOX (combo));
|
||||
|
||||
|
@ -140,6 +151,7 @@ WirelessSecurityOption * wso_wep_hex_new (const char *glade_file)
|
|||
opt->data = data = g_malloc0 (sizeof (OptData));
|
||||
data->entry_name = "wep_key_entry";
|
||||
data->auth_combo_name = "auth_method_combo";
|
||||
data->show_checkbutton_name = "show_checkbutton";
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ struct OptData
|
|||
{
|
||||
const char * entry_name;
|
||||
const char * auth_combo_name;
|
||||
const char * show_checkbutton_name;
|
||||
};
|
||||
|
||||
static void data_free_func (WirelessSecurityOption *opt)
|
||||
|
@ -53,9 +54,15 @@ static void data_free_func (WirelessSecurityOption *opt)
|
|||
}
|
||||
|
||||
|
||||
static void show_passphrase_cb (GtkToggleButton *button, GtkEntry *entry)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, gtk_toggle_button_get_active (button));
|
||||
}
|
||||
|
||||
static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFunc validate_cb, gpointer user_data)
|
||||
{
|
||||
GtkWidget * entry;
|
||||
GtkWidget * checkbutton;
|
||||
GtkWidget * combo;
|
||||
GtkWidget * widget;
|
||||
|
||||
|
@ -67,6 +74,9 @@ static GtkWidget * widget_create_func (WirelessSecurityOption *opt, GtkSignalFun
|
|||
entry = glade_xml_get_widget (opt->uixml, opt->data->entry_name);
|
||||
g_signal_connect (G_OBJECT (entry), "changed", validate_cb, user_data);
|
||||
|
||||
checkbutton = glade_xml_get_widget (opt->uixml, opt->data->show_checkbutton_name);
|
||||
g_signal_connect (G_OBJECT (checkbutton), "toggled", GTK_SIGNAL_FUNC (show_passphrase_cb), GTK_ENTRY (entry));
|
||||
|
||||
combo = glade_xml_get_widget (opt->uixml, opt->data->auth_combo_name);
|
||||
wso_wep_auth_combo_setup (opt, GTK_COMBO_BOX (combo));
|
||||
|
||||
|
@ -83,6 +93,7 @@ static gboolean validate_input_func (WirelessSecurityOption *opt, const char *ss
|
|||
|
||||
entry = glade_xml_get_widget (opt->uixml, opt->data->entry_name);
|
||||
input = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
|
||||
return wso_validate_helper (opt, ssid, input, out_cipher);
|
||||
}
|
||||
|
||||
|
@ -139,6 +150,7 @@ WirelessSecurityOption * wso_wep_passphrase_new (const char *glade_file)
|
|||
opt->data = data = g_malloc0 (sizeof (OptData));
|
||||
data->entry_name = "wep_passphrase_entry";
|
||||
data->auth_combo_name = "auth_method_combo";
|
||||
data->show_checkbutton_name = "show_checkbutton";
|
||||
|
||||
return opt;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,21 @@ data_free_func (WirelessSecurityOption *opt)
|
|||
}
|
||||
|
||||
|
||||
static void show_passwords_cb (GtkToggleButton *button, WirelessSecurityOption *opt)
|
||||
{
|
||||
GtkWidget * entry;
|
||||
gboolean visible;
|
||||
|
||||
visible = gtk_toggle_button_get_active (button);
|
||||
|
||||
entry = glade_xml_get_widget (opt->uixml, "wpa_eap_passwd_entry");
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), visible);
|
||||
|
||||
entry = glade_xml_get_widget (opt->uixml, "wpa_eap_private_key_passwd_entry");
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), visible);
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
widget_create_func (WirelessSecurityOption *opt,
|
||||
GtkSignalFunc validate_cb,
|
||||
|
@ -69,6 +84,7 @@ widget_create_func (WirelessSecurityOption *opt,
|
|||
{
|
||||
GtkWidget * entry;
|
||||
GtkWidget * widget;
|
||||
GtkWidget * checkbutton;
|
||||
|
||||
g_return_val_if_fail (opt != NULL, NULL);
|
||||
g_return_val_if_fail (opt->data != NULL, NULL);
|
||||
|
@ -97,6 +113,9 @@ widget_create_func (WirelessSecurityOption *opt,
|
|||
entry = glade_xml_get_widget (opt->uixml, "wpa_eap_private_key_passwd_entry");
|
||||
g_signal_connect (G_OBJECT (entry), "changed", validate_cb, user_data);
|
||||
|
||||
checkbutton = glade_xml_get_widget (opt->uixml, "show_checkbutton");
|
||||
g_signal_connect (G_OBJECT (checkbutton), "toggled", GTK_SIGNAL_FUNC (show_passwords_cb), opt);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ struct OptData
|
|||
gboolean wpa2;
|
||||
const char * entry_name;
|
||||
const char * key_type_combo_name;
|
||||
const char * show_checkbutton_name;
|
||||
IEEE_802_11_Cipher * hex_cipher;
|
||||
IEEE_802_11_Cipher * passphrase_cipher;
|
||||
};
|
||||
|
@ -58,12 +59,19 @@ data_free_func (WirelessSecurityOption *opt)
|
|||
}
|
||||
|
||||
|
||||
static void show_passphrase_cb (GtkToggleButton *button, GtkEntry *entry)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, gtk_toggle_button_get_active (button));
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
widget_create_func (WirelessSecurityOption *opt,
|
||||
GtkSignalFunc validate_cb,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget * entry;
|
||||
GtkWidget * checkbutton;
|
||||
GtkWidget * widget;
|
||||
|
||||
g_return_val_if_fail (opt != NULL, NULL);
|
||||
|
@ -73,6 +81,10 @@ widget_create_func (WirelessSecurityOption *opt,
|
|||
widget = wso_widget_helper (opt);
|
||||
entry = glade_xml_get_widget (opt->uixml, opt->data->entry_name);
|
||||
g_signal_connect (G_OBJECT (entry), "changed", validate_cb, user_data);
|
||||
|
||||
checkbutton = glade_xml_get_widget (opt->uixml, opt->data->show_checkbutton_name);
|
||||
g_signal_connect (G_OBJECT (checkbutton), "toggled", GTK_SIGNAL_FUNC (show_passphrase_cb), GTK_ENTRY (entry));
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
@ -183,6 +195,7 @@ wso_wpa_psk_new (const char *glade_file,
|
|||
data->wpa2 = wpa2;
|
||||
data->entry_name = "wpa_psk_entry";
|
||||
data->key_type_combo_name = "wpa_psk_type_combo";
|
||||
data->show_checkbutton_name = "show_checkbutton";
|
||||
|
||||
/* Set up our ciphers */
|
||||
data->passphrase_cipher = cipher_wpa_psk_passphrase_new ();
|
||||
|
|
Loading…
Reference in a new issue