diff options
Diffstat (limited to 'logdrake')
-rwxr-xr-x | logdrake | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -19,13 +19,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#$|= 1; -#open F, $ARGV[0]; -#while (1) { -# print while <F>; -# seek F, 0, 1; -#} - use POSIX; use Gtk; @@ -40,7 +33,6 @@ use my_gtk qw(:helpers :wrappers); use MDK::Common; - #------------------------------------------------------------- # i18n routines # IMPORTANT: next two routines have to be redefined here to @@ -103,18 +95,18 @@ my $cal_butt = gtksignal_connect(new Gtk::CheckButton("Show only for this day"), # the menus are not shown # but they provides shiny shortcut like C-q my @menu_items = ( - { path => _("/_File"), type => '<Branch>' }, - { path => _("/File/_New"), accelerator => _("<control>N"), callback => \&print_hello }, - { path => _("/File/_Open"), accelerator => _("<control>O"),callback => \&print_hello }, - { path => _("/File/_Save"), accelerator => _("<control>S"),callback => \&print_hello }, - { path => _("/File/Save _As") }, - { path => _("/File/-"),type => '<Separator>' }, - { path => _("/File/_Quit"), accelerator => _("<control>Q"), callback => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } }, - { path => _("/_Options"), type => '<Branch>' }, - { path => _("/Options/Test") }, - { path => _("/_Help"),type => '<LastBranch>' }, - { path => _("/Help/_About...") } - ); + { path => _("/_File"), type => '<Branch>' }, + { path => _("/File/_New"), accelerator => _("<control>N"), callback => \&print_hello }, + { path => _("/File/_Open"), accelerator => _("<control>O"),callback => \&print_hello }, + { path => _("/File/_Save"), accelerator => _("<control>S"),callback => \&save }, + { path => _("/File/Save _As") }, + { path => _("/File/-"),type => '<Separator>' }, + { path => _("/File/_Quit"), accelerator => _("<control>Q"), callback => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } }, + { path => _("/_Options"), type => '<Branch>' }, + { path => _("/Options/Test") }, + { path => _("/_Help"),type => '<LastBranch>' }, + { path => _("/Help/_About...") } + ); my $menubar = get_main_menu( $window ); ######### menus end @@ -198,6 +190,7 @@ gtkadd($window, createScrolledWindow(my $log_text = new Gtk::Text(undef, undef)) ), 0, gtkadd (gtkset_layout(new Gtk::HButtonBox,-end), + gtksignal_connect(new Gtk::Button (_("Save")), clicked => \&save), gtksignal_connect(new Gtk::Button (_("OK")), clicked=>sub{updateInit();updateAutologin();updateAurora();$::isEmbedded ? kill(USR1,$::CCPID) : Gtk->exit(0)}), gtksignal_connect(new Gtk::Button ($::isEmbedded ? _("Cancel") : _("Quit")), clicked => sub {$::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0)}) ) @@ -234,7 +227,6 @@ sub search { sub parse_file { my $file = $_[0]; - $file =~ s/\.gz$//; my $i=0; gtkadd(my $win_pb = (gtkset_modal new Gtk::Window(), 1), @@ -344,6 +336,11 @@ sub log_output { # menu callback functions #------------------------------------------------------------- + +sub save { + print $log_text->get_length() . "\n"; +} + sub print_hello { print( "mcdtg !\n" ); } @@ -395,6 +392,9 @@ sub destroy_window { # log # $Log$ +# Revision 1.22 2001/08/27 12:22:03 yduret +# back from chamonix +# # Revision 1.21 2001/08/20 15:04:55 siegel # added "Gtk->set_locale;" # |