#!/opt/bin/perl

eval 'exec /opt/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell
 
#
# 11/7/99 <brendy@swipnet.se>
# Guides are pretty good, but I want to be able to remove them.
#
# 7/15/03 <sjburges@gimp.org>
# Changed spot that its registered from <Image>/Guides to <Image>/Image/Guides
# to reduce horizontal clutter on menubar
 
use Gimp;
use Gimp::Fu;
use Gimp::Util;
 
# Gimp::set_trace(TRACE_ALL);
 
register "guide_remove",
         "guideremove - erases all existing guides\n",
         "Just does it!\n",
         "Brendon Humphrey",
         "Brendon Humphrey <brendy\@swipnet.se>",
         "1999-07-20",
         N_"<Image>/Image/Guides/Remove Guides",
         "*",
         [],
         [],
         ['gimp-1.1'],
         sub {
    my($img,$layer,$xspace, $yspace, $xoffset, $yoffset) =@_;
 
    #
    # Remove all existing guides
    #    
    $i=$img->find_next_guide(0);
    while ($i != 0) {
      $img->delete_guide($i);
      $i=$img->find_next_guide(0);
    }         

    #
    # Refresh the display (probably not good, works for me!)
    #
    $img->selection_all();
    $img->selection_none();        
 
    return();
};
exit main;                                       

=head1 LICENSE

Copyright unknown, but believed to be with Brenden Humphrey.
Unknown distribution terms.

=cut

