/[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.11 by tv, Thu Nov 27 12:22:37 2003 UTC revision 1.12 by tv, Thu Nov 27 12:36:13 2003 UTC
# Line 44  my $window = Gtk2::Window->new('toplevel Line 44  my $window = Gtk2::Window->new('toplevel
44  $window->signal_connect(delete_event => sub { ugtk2->exit(0) });  $window->signal_connect(delete_event => sub { ugtk2->exit(0) });
45  $window->set_border_width(5);  $window->set_border_width(5);
46  $window->set_position('center');  $window->set_position('center');
47  $window->set_title(N('ISDN answering machine configuration'));  $window->set_title(N("ISDN answering machine configuration"));
48    
49  #we create the list model  #we create the list model
50  my $users_clist_model = Gtk2::ListStore->new('Glib::String');  my $users_clist_model = Gtk2::ListStore->new('Glib::String');
# Line 52  my $users_clist_model = Gtk2::ListStore- Line 52  my $users_clist_model = Gtk2::ListStore-
52  #we add widget in the main window  #we add widget in the main window
53  gtkadd($window,  gtkadd($window,
54         gtkpack_(Gtk2::VBox->new(0,5),         gtkpack_(Gtk2::VBox->new(0,5),
55                  0, N('ISDN Answering Machine Configurator'),                  0, N("ISDN Answering Machine Configurator"),
56    
57                  #global section                  #global section
58                  1, gtkadd(new Gtk2::Frame(N('General parameters')),                  1, gtkadd(new Gtk2::Frame(N("General parameters")),
59                            gtkset_border_width(construct_table($struct,                            gtkset_border_width(construct_table($struct,
60                                [ N('Audio snippets directory'), '{GLOBAL}{audio_dir}'],                                [ N("Audio snippets directory"), '{GLOBAL}{audio_dir}'],
61                                [ N('User-specific data directory'), '{GLOBAL}{voice_user_dir}' ],                                [ N("User-specific data directory"), '{GLOBAL}{voice_user_dir}' ],
62                                [ N('Search for audio files'), '{GLOBAL}{user_audio_files}' ],                                [ N("Search for audio files"), '{GLOBAL}{user_audio_files}' ],
63                                [ N('Voice delay (in sec.)'), '{GLOBAL}{voice_delay}' ],                                [ N("Voice delay (in sec.)"), '{GLOBAL}{voice_delay}' ],
64                                [ N('Announcement'), '{GLOBAL}{announcement}' ],                                [ N("Announcement"), '{GLOBAL}{announcement}' ],
65                                [ N('Record length (in sec.)'), '{GLOBAL}{record_length}' ],                                [ N("Record length (in sec.)"), '{GLOBAL}{record_length}' ],
66                                [ N('Record silence timeout (in sec.)'), '{GLOBAL}{record_silence_timeout}' ],                                [ N("Record silence timeout (in sec.)"), '{GLOBAL}{record_silence_timeout}' ],
67                                               ), 5),                                               ), 5),
68                           ),                           ),
69    
70                  #users section                  #users section
71                  1, gtkadd(new Gtk2::Frame(N('Users')),                  1, gtkadd(new Gtk2::Frame(N("Users")),
72                            gtkset_border_width(gtkpack_(Gtk2::HBox->new(0,5),                            gtkset_border_width(gtkpack_(Gtk2::HBox->new(0,5),
73                                     1, my $users_clist = Gtk2::TreeView->new_with_model($users_clist_model),                                     1, my $users_clist = Gtk2::TreeView->new_with_model($users_clist_model),
74                                     0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'start'),                                     0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'start'),
# Line 89  gtkadd($window, Line 89  gtkadd($window,
89        );        );
90    
91  # we set up the column title of the list  # we set up the column title of the list
92  $users_clist->append_column(Gtk2::TreeViewColumn->new_with_attributes(N('Name'), Gtk2::CellRendererText->new, 'text' => 0));  $users_clist->append_column(Gtk2::TreeViewColumn->new_with_attributes(N("Name"), Gtk2::CellRendererText->new, 'text' => 0));
93    
94  # we fill the list entries  # we fill the list entries
95  build_user_list();  build_user_list();
# Line 122  sub construct_table { Line 122  sub construct_table {
122                               getBestWidget($struct, $path),                               getBestWidget($struct, $path),
123                               gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'),                               gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'),
124                                                 clicked => sub {                                                 clicked => sub {
125                                                     create_dialog(N('Help'),                                                     create_dialog(N("Help"),
126                                                                   new Gtk2::Label(getDescription($struct, $path)),                                                                   new Gtk2::Label(getDescription($struct, $path)),
127                                                                   {                                                                   {
128                                                                    stock => 'gtk-dialog-info',                                                                    stock => 'gtk-dialog-info',
# Line 152  sub build_user_list { Line 152  sub build_user_list {
152  sub user_add {  sub user_add {
153    
154      # we ask for the name of the new user      # we ask for the name of the new user
155      if (create_dialog(N('Enter the name of the user to add'),      if (create_dialog(N("Enter the name of the user to add"),
156                        gtkpack_(gtkset_border_width(Gtk2::HBox->new(0,5), 5),                        gtkpack_(gtkset_border_width(Gtk2::HBox->new(0,5), 5),
157                                 0, N('Name :'),                                 0, N("Name :"),
158                                 1, my $entry = Gtk2::Entry->new(),                                 1, my $entry = Gtk2::Entry->new(),
159                                ),                                ),
160                        {                        {
# Line 202  sub user_edit { Line 202  sub user_edit {
202    
203      # 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
204      if (create_dialog($user,      if (create_dialog($user,
205                        gtkadd(new Gtk2::Frame(N('User parameters')),                        gtkadd(new Gtk2::Frame(N("User parameters")),
206                               gtkset_border_width(construct_table($user_struct,                               gtkset_border_width(construct_table($user_struct,
207                                   [ N('Voice delay (in sec.)'), "{$user}{voice_delay}" ],                                   [ N("Voice delay (in sec.)"), "{$user}{voice_delay}" ],
208                                   [ N('Announcement'), "{$user}{announcement}" ],                                   [ N("Announcement"), "{$user}{announcement}" ],
209                                   [ N('Record length (in sec.)'), "{$user}{record_length}" ],                                   [ N("Record length (in sec.)"), "{$user}{record_length}" ],
210                                   [ N('Record silence timeout (in sec.)'), "{$user}{record_silence_timeout}" ],                                   [ N("Record silence timeout (in sec.)"), "{$user}{record_silence_timeout}" ],
211                                   [ N('Voice numbers'), "{$user}{voice_numbers}" ],                                   [ N("Voice numbers"), "{$user}{voice_numbers}" ],
212                                   [ N('Pin'), "{$user}{pin}" ],                                   [ N("Pin"), "{$user}{pin}" ],
213                                   [ N('Voice action'), "{$user}{voice_action}" ],                                   [ N("Voice action"), "{$user}{voice_action}" ],
214                                   ), 5),                                   ), 5),
215                              ),                              ),
216                        {                        {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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