From b327f43b97113390a6249dcfb0a535cc9783db27 Mon Sep 17 00:00:00 2001 From: Yves Duret Date: Mon, 27 Aug 2001 12:22:03 +0000 Subject: back from chamonix --- logdrake | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'logdrake') diff --git a/logdrake b/logdrake index 78aecdae..346285fe 100755 --- a/logdrake +++ b/logdrake @@ -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 ; -# 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 => '' }, - { path => _("/File/_New"), accelerator => _("N"), callback => \&print_hello }, - { path => _("/File/_Open"), accelerator => _("O"),callback => \&print_hello }, - { path => _("/File/_Save"), accelerator => _("S"),callback => \&print_hello }, - { path => _("/File/Save _As") }, - { path => _("/File/-"),type => '' }, - { path => _("/File/_Quit"), accelerator => _("Q"), callback => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } }, - { path => _("/_Options"), type => '' }, - { path => _("/Options/Test") }, - { path => _("/_Help"),type => '' }, - { path => _("/Help/_About...") } - ); + { path => _("/_File"), type => '' }, + { path => _("/File/_New"), accelerator => _("N"), callback => \&print_hello }, + { path => _("/File/_Open"), accelerator => _("O"),callback => \&print_hello }, + { path => _("/File/_Save"), accelerator => _("S"),callback => \&save }, + { path => _("/File/Save _As") }, + { path => _("/File/-"),type => '' }, + { path => _("/File/_Quit"), accelerator => _("Q"), callback => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0) } }, + { path => _("/_Options"), type => '' }, + { path => _("/Options/Test") }, + { path => _("/_Help"),type => '' }, + { 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;" # -- cgit v1.2.1