32 |
use Data::Dumper; |
use Data::Dumper; |
33 |
|
|
34 |
# we ask glueconf to give us the structure representing the answering_machine config file |
# we ask glueconf to give us the structure representing the answering_machine config file |
35 |
my $struct = new Libconf::Glueconf::Answering_Machine('/home/dams/isdn_libconf/answering_machine.conf'); |
my $struct = new Libconf::Glueconf::Answering_Machine('/etc/capisuite/answering_machine.conf'); |
36 |
|
|
37 |
# we dump the content for debugging purpose |
# we dump the content for debugging purpose |
38 |
print Dumper($struct) . "\n"; |
print Dumper($struct) . "\n"; |
70 |
gtkset_border_width(gtkpack_(Gtk2::HBox->new(0,5), |
gtkset_border_width(gtkpack_(Gtk2::HBox->new(0,5), |
71 |
1, my $users_clist = Gtk2::TreeView->new_with_model($users_clist_model), |
1, my $users_clist = Gtk2::TreeView->new_with_model($users_clist_model), |
72 |
0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'start'), |
0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'start'), |
73 |
gtksignal_connect(new Gtk2::Button(N("Add New...")), clicked => sub { user_add() }), |
gtksignal_connect(new Gtk2::Button(N("Add...")), clicked => sub { user_add() }), |
74 |
gtksignal_connect(new Gtk2::Button(N("Delete")), clicked => sub { user_del() }), |
gtksignal_connect(new Gtk2::Button(N("Delete")), clicked => sub { user_del() }), |
75 |
gtksignal_connect(new Gtk2::Button(N("Edit...")), clicked => sub { user_edit() }), |
gtksignal_connect(new Gtk2::Button(N("Edit...")), clicked => sub { user_edit() }), |
76 |
) |
) |
161 |
$user_struct= new Libconf::Glueconf::Answering_Machine(); |
$user_struct= new Libconf::Glueconf::Answering_Machine(); |
162 |
|
|
163 |
# we copy the settings (need work, should be easier than that. |
# we copy the settings (need work, should be easier than that. |
164 |
$user_struct->{$user}{$_} = $struct->{$user}{$_} foreach (qw(voice_delay announcement record_length record_silence_timeout voice_numbers pin voice_action))a; |
$user_struct->{$user}{$_} = $struct->{$user}{$_} foreach (qw(voice_delay announcement record_length record_silence_timeout voice_numbers pin voice_action)); |
165 |
} |
} |
166 |
|
|
167 |
# we create the dialog so that it's possible to edit the settings |
# we create the dialog so that it's possible to edit the settings |