mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-24 21:20:12 +00:00
Disable password entry if open is toggeld
This commit is contained in:
parent
c390dbac5d
commit
54c7258ece
17
src/ui/ui.c
17
src/ui/ui.c
@ -414,7 +414,8 @@ int initUi(int argc, char *argv[]){
|
||||
g_signal_connect (button_create_hp, "clicked", G_CALLBACK(on_create_hp_clicked), NULL);
|
||||
g_signal_connect (button_stop_hp, "clicked", G_CALLBACK(on_stop_hp_clicked), NULL);
|
||||
g_signal_connect (button_about, "clicked", G_CALLBACK(on_about_open_click), NULL);
|
||||
g_signal_connect (button_refresh, "clicked", G_CALLBACK(on_refresh_clicked), NULL); //new
|
||||
g_signal_connect (button_refresh, "clicked", G_CALLBACK(on_refresh_clicked), NULL);
|
||||
g_signal_connect (cb_open, "toggled", G_CALLBACK(on_cb_open_clicked), NULL); //new
|
||||
|
||||
g_signal_connect (entry_mac, "changed", G_CALLBACK(entry_mac_warn), NULL);
|
||||
g_signal_connect (entry_ssd, "changed", G_CALLBACK(entry_ssid_warn), NULL);
|
||||
@ -938,4 +939,16 @@ static void on_refresh_clicked(GtkWidget *widget, gpointer data)
|
||||
else {
|
||||
clear_connecetd_devices_list();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When open checkbutton is toogled, disable password entry
|
||||
*/
|
||||
static void on_cb_open_clicked(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
|
||||
gtk_widget_set_sensitive((GtkWidget*)entry_pass, FALSE);
|
||||
} else {
|
||||
gtk_widget_set_sensitive((GtkWidget*)entry_pass, TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,8 @@ static void set_connected_devices_label(); // new
|
||||
|
||||
static void on_refresh_clicked(GtkWidget *widget, gpointer data);
|
||||
|
||||
static void on_cb_open_clicked(GtkWidget *widget, gpointer data);
|
||||
|
||||
static void clear_connecetd_devices_list();
|
||||
|
||||
#endif //WIHOTSPOT_UI_H
|
||||
|
Loading…
Reference in New Issue
Block a user