From: Clif H. <ch...@us...> - 2003-02-05 04:58:00
|
Update of /cvsroot/perl-ldap/ldap/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv20228/ldap/contrib Modified Files: tklkup Log Message: Removed an unused label in the ldapAction window. Added state checking before calling deiconify method, if needed then call deiconify method. Added raise method to the display search window. Moved startup location of ldapAction window, causes a slight overlap between the ldapAction window and the displaySearch window, and this is used to play a trick on the displaySearch window raising. Index: tklkup =================================================================== RCS file: /cvsroot/perl-ldap/ldap/contrib/tklkup,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- tklkup 1 Feb 2003 05:46:56 -0000 1.42 +++ tklkup 5 Feb 2003 04:57:57 -0000 1.43 @@ -1508,8 +1508,14 @@ } else { -$Global{'schemaWindow'}->deiconify() if Tk::Exists($Global{'schemaWindow'}); -$Global{'schemaWindow'}->raise() if Tk::Exists($Global{'schemaWindow'}); + my $wstate = $Global{'schemaWindow'}->state(); + if ( $wstate =~ /iconic/ || $wstate =~ /withdrawn/ ) + { + $Global{'schemaWindow'}->deiconify() + if Tk::Exists($Global{'schemaWindow'}); + $Global{'schemaWindow'}->raise() + if Tk::Exists($Global{'schemaWindow'}); + } } sub schema_clear { @@ -1952,16 +1958,23 @@ eval { $Global{'histWindow'} = MainWindow->new(); + $Global{'histWindow'}->title("HIERARCHICAL OBJECTCLASS DISPLAY WINDOW"); }; - print "$@" if ( defined($@)); } + ERROR(\$@) if ( $@ ); +} else { -$Global{'histWindow'}->deiconify() if Tk::Exists($Global{'histWindow'}); -$Global{'histWindow'}->raise() if Tk::Exists($Global{'histWindow'}); + my $wstate = $Global{'histWindow'}->state(); + if ( $wstate =~ /iconic/ || $wstate =~ /withdrawn/ ) + { + $Global{'histWindow'}->deiconify() + if Tk::Exists($Global{'histWindow'}); + $Global{'histWindow'}->raise() + if Tk::Exists($Global{'histWindow'}); + } } $Global{'histWindow'}->geometry("+$x+$y"); -$Global{'histWindow'}->title("HIERARCHICAL OBJECTCLASS DISPLAY WINDOW"); # # Create label box # @@ -2218,7 +2231,7 @@ $Global{'ldapActionDN'} = shift; &globalPos(); -my $x = $Global{'horz'} + 0; +my $x = $Global{'horz'} + 20; my $y = $Global{'vert'} + 30; # @@ -2310,13 +2323,14 @@ } my $objects = $Global{'ldapActionDN'}; +&displaySearch(); # create the entry data display window. + delete($Global{'ldapActionDN'}); $Global{'ldapActionWindow'}->destroy() if Tk::Exists($Global{'ldapActionWindow'}); delete($Global{'ldapActionWindow'}); -&displaySearch(); # create the entry data display window. # clear the entry data display window. if ( $display_clear ) { &display_clear(); } @@ -3246,11 +3260,19 @@ $list->pack(-fill => "both", -expand => 1 ); } -#else -#{ -#$displayWindow->deiconify() if Tk::Exists($displayWindow); -#$displayWindow->raise() if Tk::Exists($displayWindow); -#} +else +{ + + $displayWindow->update; + my $wstate = $displayWindow->state(); + if ( $wstate =~ /iconic/ || $wstate =~ /withdrawn/ ) + { + $displayWindow->deiconify() + if Tk::Exists($displayWindow); + } + $displayWindow->raise() + if Tk::Exists($displayWindow); +} sub display_clear { @@ -3265,7 +3287,6 @@ sub display_cancel{ -# $displayWindow->withdraw if Tk::Exists($displayWindow); $displayWindow->destroy if Tk::Exists($displayWindow); } # End of cancel subroutine @@ -3586,24 +3607,26 @@ eval { $Global{'searchHistWindow'} = MainWindow->new(); + $Global{'searchHistWindow'}->title("SEARCH RESULTS"); }; - print "$@" if ( defined($@)); } + ERROR(\$@) if ( $@ ); + +} else { -$Global{'searchHistWindow'}->deiconify() if Tk::Exists($Global{'searchHistWindow'}); -$Global{'searchHistWindow'}->raise() if Tk::Exists($Global{'searchHistWindow'}); + + my $wstate = $Global{'searchHistWindow'}->state(); + if ( $wstate =~ /iconic/ || $wstate =~ /withdrawn/ ) + { + $Global{'searchHistWindow'}->deiconify() + if Tk::Exists($Global{'searchHistWindow'}); + } + $Global{'searchHistWindow'}->raise() + if Tk::Exists($Global{'searchHistWindow'}); } $Global{'searchHistWindow'}->geometry("+$x+$y"); -$Global{'searchHistWindow'}->title("SEARCH RESULTS"); -# -# Create label box -# -if ( !Exists($Global{'label'}) ) -{ -$Global{'searchLabel'} = $Global{'searchHistWindow'}->Label()->pack; -} # # Create process Exit button @@ -3643,6 +3666,7 @@ ); # End of Scrolled HList. + sub histSearch_clear { # @@ -3829,7 +3853,7 @@ $Global{'searchHList'}->pack(-side => "right"); }; # End of eval -print "$@" if ( defined($@)); +ERROR( \$@ ) if ( $@ ); # |