mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-24 05:00:14 +00:00
commit
3dc3eeeee9
@ -233,6 +233,19 @@
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_no_haveged">
|
||||
<property name="label" translatable="false">No Haveged</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_psk">
|
||||
<property name="label" translatable="yes">Use psk</property>
|
||||
|
@ -116,6 +116,9 @@ const char *build_wh_mkconfig_command(ConfigValues* cv){
|
||||
if(cv->hidden!=NULL && (strcmp(cv->hidden,"1") == 0))
|
||||
strcat(cmd_mkconfig," --hidden ");
|
||||
|
||||
if(cv->no_haveged!=NULL && (strcmp(cv->no_haveged,"1") == 0))
|
||||
strcat(cmd_mkconfig," --no-haveged ");
|
||||
|
||||
if(cv->channel!=NULL && (strcmp(cv->channel,"default") != 0) && (cv->freq==NULL||(strcmp(cv->freq,"2.4") == 0)|| (strcmp(cv->freq,"5") == 0))){
|
||||
|
||||
strcat(cmd_mkconfig," -c ");
|
||||
@ -472,4 +475,4 @@ PtrToNode add_device_node(PtrToNode l, int number, char line[BUFSIZE], int marke
|
||||
next->Next = NULL;
|
||||
l->Next = next;
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,9 @@ static void setConfigValues(const char * key, char *value){
|
||||
if( !strcmp ( HIDDEN, key ))
|
||||
configValues.hidden = value;
|
||||
|
||||
if( !strcmp ( NO_HAVEGED, key ))
|
||||
configValues.no_haveged = value;
|
||||
|
||||
if( !strcmp ( NO_VIRT, key ))
|
||||
configValues.no_virt = value;
|
||||
|
||||
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define NO_DNS "NO_DNS"
|
||||
#define NO_DNSMASQ "NO_DNSMASQ"
|
||||
#define HIDDEN "HIDDEN"
|
||||
#define NO_HAVEGED "NO_HAVEGED"
|
||||
#define MAC_FILTER "MAC_FILTER"
|
||||
#define MAC_FILTER_ACCEP "MAC_FILTER_ACCEPT"
|
||||
#define ISOLATE_CLIENTS "ISOLATE_CLIENTS"
|
||||
@ -90,6 +91,7 @@ typedef struct{
|
||||
char *accepted_macs;
|
||||
char *ieee80211n;
|
||||
char *ieee80211ac;
|
||||
char *no_haveged;
|
||||
} ConfigValues;
|
||||
|
||||
|
||||
|
14
src/ui/ui.c
14
src/ui/ui.c
@ -82,6 +82,7 @@ GtkRadioButton *rb_freq_2;
|
||||
GtkRadioButton *rb_freq_5;
|
||||
|
||||
GtkCheckButton *cb_hidden;
|
||||
GtkCheckButton *cb_no_haveged;
|
||||
GtkCheckButton *cb_psk;
|
||||
GtkCheckButton *cb_mac;
|
||||
GtkCheckButton *cb_novirt;
|
||||
@ -385,6 +386,7 @@ int initUi(int argc, char *argv[]){
|
||||
combo_internet = (GtkComboBox *) gtk_builder_get_object(builder, "combo_internet");
|
||||
|
||||
cb_hidden = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_hidden");
|
||||
cb_no_haveged = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_no_haveged");
|
||||
cb_psk = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_psk");
|
||||
cb_mac = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac");
|
||||
cb_novirt = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_novirt");
|
||||
@ -480,10 +482,15 @@ void init_ui_from_config(){
|
||||
}
|
||||
|
||||
if(strcmp(values->hidden,"1")==0){
|
||||
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_hidden,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->no_haveged,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_no_haveged,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->use_psk,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_psk,TRUE);
|
||||
@ -838,6 +845,11 @@ static int init_config_val_input(ConfigValues* cv){
|
||||
else
|
||||
cv->hidden =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_no_haveged)))
|
||||
cv->no_haveged = "1";
|
||||
|
||||
else
|
||||
cv->no_haveged =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_novirt)))
|
||||
cv->no_virt = "1";
|
||||
|
Loading…
Reference in New Issue
Block a user