Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwife.git;a=commitdiff;h=a39f65b27fe00c2e3cbc966091364e5040f73f8a

commit a39f65b27fe00c2e3cbc966091364e5040f73f8a
Author: Elentir <elen...@mailoo.org>
Date:   Sat Jan 23 20:03:35 2010 +0100

configsource: add msgbox if a connection have been detected

only if previous connection's type detection have failed

diff --git a/src/plugins/configsource.c b/src/plugins/configsource.c
index 98bb5d6..592466f 100644
--- a/src/plugins/configsource.c
+++ b/src/plugins/configsource.c
@@ -1106,6 +1106,7 @@ int run_net_config(GList **config)
fwnet_interface_t *newinterface = NULL;
struct dirent *ent = NULL;
DIR *dir;
+       int brk = 0;

/* profile used do write configuration */
fwnet_profile_t *newprofile = NULL;
@@ -1136,6 +1137,7 @@ int run_net_config(GList **config)
return 0;
}
case GTK_RESPONSE_NO:
+                                       brk = 1;
break;
}
free(ptr);
@@ -1158,12 +1160,24 @@ int run_net_config(GList **config)
free(ptr);
return 0;
case GTK_RESPONSE_NO:
+                                               brk = 1;
break;
}
free(ptr);
}
}
closedir(dir);
+
+               // ask only if previous detection fail
+               if(brk == 0) {
+                       switch(fwife_question(_("An active connection seems to 
have been found but the connection's type have not been found.\nDo you want to 
use it anyway?")))
+                       {
+                               case GTK_RESPONSE_YES:
+                                       return 0;
+                               case GTK_RESPONSE_NO:
+                                       break;
+                       }
+               }
}

if(select_interface(newinterface) == -1)
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to