#!/bin/sh
-#$Id: snom.pl,v 1.42 2006-05-22 13:06:47 michael Exp $
+#$Id: snom.pl,v 1.43 2006-05-23 19:14:09 michael Exp $
PATH=/opt/csw/bin:/opt/local/bin:/usr/bin:/bin exec perl -w -x "$0" "$@"
$g_host->set_active(0);
UpdatePhoneInfo();
$g_host->signal_connect(changed => \&UpdatePhoneInfo);
-$g_host->show();
+$g_host->show() if($#sections);
$g_identity->signal_connect(changed => \&SwitchIdentity);
-$g_identity->show();
set_locale Gtk2;
$g_identity->set_active(0);
}
my @lines=split("\n", $response->content());
+ my $num = 0;
foreach (@lines) {
chomp;
#<option value="1" selected>51@stargate.gernoth.loc</option>
my $line = $3;
$g_identity->append_text("${3}");
$g_identity->set_active(${1}-1) if(defined($2));
+ $num++;
}
}
+ if ($num > 1) {
+ $g_identity->show;
+ } else {
+ $g_identity->hide;
+ }
}
sub SwitchIdentity