-
-
-#$ua->credentials("${ARGV[0]}:80","snom","root","geheim");
+close(INIFILE);
+
+for my $section (@sections) {
+ if (defined(${$Config{$section}}{host})) {
+ $g_host->append_text($section);
+ if (defined(${$Config{$section}}{login}) &&
+ defined(${$Config{$section}}{password})) {
+ $ua->credentials(${$Config{$section}}{host}.":80",
+ "snom",
+ ${$Config{$section}}{login},
+ ${$Config{$section}}{password});
+ }
+ }
+}
+$g_host->set_active(0);
+UpdatePhoneInfo();
+$g_host->signal_connect(changed => \&UpdatePhoneInfo);
+$g_host->show();
+$g_host->signal_connect(changed => \&SwitchIdentity);
+$g_identity->show();