/[libconf]/libconf/applications/isdn/isdn_answering
ViewVC logotype

Diff of /libconf/applications/isdn/isdn_answering

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by dams, Mon Nov 24 01:01:40 2003 UTC revision 1.3 by dams, Mon Nov 24 20:31:31 2003 UTC
# Line 32  use Libconf::GUI::Gtk2 qw(:generators); Line 32  use Libconf::GUI::Gtk2 qw(:generators);
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";
# Line 70  gtkadd($window, Line 70  gtkadd($window,
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                                              )                                              )
# Line 161  sub user_edit { Line 161  sub user_edit {
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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26