Patch for Gedi
Sean Kamath <[email protected]> Thu, 25 May 2006 17:33:11 -0700
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm finally back (not that I expect anyone to know I was gone ;-)) after about a year and a half. It's a long story, but I'm no longer at Xerox. ;-) Anyway, at my new gig, I compiled Perl/TK from scratch off CPAN as of a couple of days ago (5.8.8 w/ Tk 804.027), and one of my checks to make sure everything was working was to run gedi, which failed with: bad option "expand": must be -after, -anchor, -before, -expand, -fill, -in, -ipadx, -ipady, -padx, -pady, or -side at /home/skamath/work/perl/lib/site_perl/5.8.8/i686-linux/Tk/Widget.pm line 1144. The fixes are trivial (all are fixes to pack() arguments), so I have a patch. I can't remember what do wo with the patch. I searched the archives, and there is in fact a patch two sent to the mailing list, so here's mine (I'm now using Thunderbird for email, so I'm hoping attaching it will work). Sean
gedi.patch
(text/x-patch, 4.8 KB)
*** gedi 2003-07-19 01:39:09.000000000 -0700
--- /home/skamath/work/perl/bin/gedi 2006-05-24 10:15:42.000000000 -0700
***************
*** 71,77 ****
# my $menu_frame = $top->Frame->pack(-anchor=>'nw');
my $text_frame = $top->Frame->pack
! (-anchor=>'nw', expand=>'yes', -fill => 'both'); # autosizing
my $counter_frame = $top->Frame->pack(-anchor=>'nw');
##############################################
--- 74,80 ----
# my $menu_frame = $top->Frame->pack(-anchor=>'nw');
my $text_frame = $top->Frame->pack
! (-anchor=>'nw', -expand=>'yes', -fill => 'both'); # autosizing
my $counter_frame = $top->Frame->pack(-anchor=>'nw');
##############################################
***************
*** 114,149 ****
##############################################
##############################################
my $current_line_label = $counter_frame
! -> Label(text=>'line: 1')
-> grid(-row=>1,-column=>1, -sticky=>'nw' );
my $total_line_label = $counter_frame
! -> Label(text=>'total lines: 1')
-> grid(-row=>2,-column=>1, -sticky=>'nw' );
my $current_column_label = $counter_frame
! -> Label(text=>'column: 0')
-> grid(-row=>3,-column=>1, -sticky=>'nw' );
my $insert_overstrike_mode_label = $counter_frame
! -> Label(text=>' ')
-> grid(-row=>5,-column=>1, -sticky=>'nw' );
sub update_indicators
{
my ($line,$column)= split(/\./,$textwindow->index('insert'));
! $current_line_label->configure (text=> "line: $line");
! $current_column_label->configure (text=> "column: $column");
my ($last_line,$last_col) = split(/\./,$textwindow->index('end'));
! $total_line_label->configure (text=> "total lines: $last_line");
my $mode = $textwindow->OverstrikeMode;
my $overstrke_insert='Insert Mode';
if ($mode)
{$overstrke_insert='Overstrike Mode';}
$insert_overstrike_mode_label->configure
! (text=> "$overstrke_insert");
my $filename = $textwindow->FileName;
$filename = 'NoName' unless(defined($filename));
--- 117,152 ----
##############################################
##############################################
my $current_line_label = $counter_frame
! -> Label(-text=>'line: 1')
-> grid(-row=>1,-column=>1, -sticky=>'nw' );
my $total_line_label = $counter_frame
! -> Label(-text=>'total lines: 1')
-> grid(-row=>2,-column=>1, -sticky=>'nw' );
my $current_column_label = $counter_frame
! -> Label(-text=>'column: 0')
-> grid(-row=>3,-column=>1, -sticky=>'nw' );
my $insert_overstrike_mode_label = $counter_frame
! -> Label(-text=>' ')
-> grid(-row=>5,-column=>1, -sticky=>'nw' );
sub update_indicators
{
my ($line,$column)= split(/\./,$textwindow->index('insert'));
! $current_line_label->configure (-text=> "line: $line");
! $current_column_label->configure (-text=> "column: $column");
my ($last_line,$last_col) = split(/\./,$textwindow->index('end'));
! $total_line_label->configure (-text=> "total lines: $last_line");
my $mode = $textwindow->OverstrikeMode;
my $overstrke_insert='Insert Mode';
if ($mode)
{$overstrke_insert='Overstrike Mode';}
$insert_overstrike_mode_label->configure
! (-text=> "$overstrke_insert");
my $filename = $textwindow->FileName;
$filename = 'NoName' unless(defined($filename));
***************
*** 184,202 ****
my $pop = $top->Toplevel();
$pop->title("About");
! $pop->Label(text=>"Gedi (Gregs EDItor)")->pack();
! $pop->Label(text=>"Ver. 1.0")->pack();
! $pop->Label(text=>"Copyright 1999")->pack();
! $pop->Label(text=>"Greg London")->pack();
! $pop->Label(text=>"All Rights Reserved.")->pack();
! $pop->Label(text=>"This program is free software.")->pack();
! $pop->Label(text=>"You can redistribute it and/or")->pack();
! $pop->Label(text=>"modify it under the same terms")->pack();
! $pop->Label(text=>"as Perl itself.")->pack();
! $pop->Label(text=>"Special Thanks to")->pack();
! $pop->Label(text=>"Nick Ing-Simmons.")->pack();
! my $button_ok = $pop->Button(text=>'OK',
command => sub {$pop->destroy();
$about_pop_up_reference = undef;
} )
--- 187,205 ----
my $pop = $top->Toplevel();
$pop->title("About");
! $pop->Label(-text=>"Gedi (Gregs EDItor)")->pack();
! $pop->Label(-text=>"Ver. 1.0")->pack();
! $pop->Label(-text=>"Copyright 1999")->pack();
! $pop->Label(-text=>"Greg London")->pack();
! $pop->Label(-text=>"All Rights Reserved.")->pack();
! $pop->Label(-text=>"This program is free software.")->pack();
! $pop->Label(-text=>"You can redistribute it and/or")->pack();
! $pop->Label(-text=>"modify it under the same terms")->pack();
! $pop->Label(-text=>"as Perl itself.")->pack();
! $pop->Label(-text=>"Special Thanks to")->pack();
! $pop->Label(-text=>"Nick Ing-Simmons.")->pack();
! my $button_ok = $pop->Button(-text=>'OK',
command => sub {$pop->destroy();
$about_pop_up_reference = undef;
} )