public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] itcl/iwidgets3.0.0/generic/scrolledhtml.itk images
@ 2002-04-17  9:37 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2002-04-17  9:37 UTC (permalink / raw)
  To: Insight Maling List

Hi,

Thanks to some astute investigation by Ton van Overbeek, this patch fixes
the help windows problems displaying images!

Of course, the rest of the help is probably pretty out of date. :-(

One step at a time. Thanks, Ton!

Keith

ChangeLog
2002-04-17  Keith Seitz  <keiths@redhat.com>

        From investigative work by Ton van Overbeek <tvoverbe@cistron.nl>:
        * iwidgets3.0.0/generic/scrolledhtml.itk (_defUnknownImg): Add
        global namespace qualifier to "image" command, since a parent
        class now defines an image method.
        (::iwidgets::scrolledhtml::destructor): Likewise.
        (::iwidgets::Scrolledhtml::unknownimage): Likewise.
        (::iwidgets::scrolledhtml::clear): Likewise.
        (::iwidgets::scrolledhtml::_entity_img): Likewise.

Patch
Index: iwidgets3.0.0/generic/scrolledhtml.itk
===================================================================
RCS file: /cvs/src/src/itcl/iwidgets3.0.0/generic/scrolledhtml.itk,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 scrolledhtml.itk
*** iwidgets3.0.0/generic/scrolledhtml.itk	9 Sep 2001 19:49:08 -0000	1.1.1.2
--- iwidgets3.0.0/generic/scrolledhtml.itk	17 Apr 2002 16:32:45 -0000
*************** class iwidgets::Scrolledhtml {
*** 305,311 ****

    private variable _initialized 0

!   private variable _defUnknownImg [image create photo -data {
  R0lGODdhHwAgAPQAAP///wAAAMzMzC9PT76+vvnTogCR/1WRVaoAVf//qvT09OKdcWlcx19f
  X9/f339/f8vN/J2d/aq2qoKCggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  ACwAAAAAHwAgAAAF/iAgjqRDnmiKmqOkqsTaToDjvudTttLjOITJbTQhGI+iQE0xMvZqQIDw
--- 305,311 ----

    private variable _initialized 0

!   private variable _defUnknownImg [::image create photo -data {
  R0lGODdhHwAgAPQAAP///wAAAMzMzC9PT76+vvnTogCR/1WRVaoAVf//qvT09OKdcWlcx19f
  X9/f339/f8vN/J2d/aq2qoKCggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  ACwAAAAAHwAgAAAF/iAgjqRDnmiKmqOkqsTaToDjvudTttLjOITJbTQhGI+iQE0xMvZqQIDw
*************** body iwidgets::Scrolledhtml::constructor
*** 350,359 ****
  # ------------------------------------------------------------------
  body iwidgets::Scrolledhtml::destructor {} {
      foreach x $_images {
!       image delete $x
      }
      if {$_unknownimg != $_defUnknownImg} {
!       image delete $_unknownimg
      }
  }

--- 350,359 ----
  # ------------------------------------------------------------------
  body iwidgets::Scrolledhtml::destructor {} {
      foreach x $_images {
!       ::image delete $x
      }
      if {$_unknownimg != $_defUnknownImg} {
!       ::image delete $_unknownimg
      }
  }

*************** configbody iwidgets::Scrolledhtml::unkno
*** 432,445 ****
     set oldimage $_unknownimg
     if {$itk_option(-unknownimage) != {}} {
        set uki $itk_option(-unknownimage)
!       if [catch { set _unknownimg [image create photo -file $uki] } err] {
           error "Couldn't create image $uki:\n$err\nUnknown image not found"
        }
     } else {
        set _unknownimg $_defUnknownImg
     }
     if {$oldimage != {} && $oldimage != $_defUnknownImg} {
!       image delete $oldimage
     }
  }

--- 432,445 ----
     set oldimage $_unknownimg
     if {$itk_option(-unknownimage) != {}} {
        set uki $itk_option(-unknownimage)
!       if [catch { set _unknownimg [::image create photo -file $uki] } err] {
           error "Couldn't create image $uki:\n$err\nUnknown image not found"
        }
     } else {
        set _unknownimg $_defUnknownImg
     }
     if {$oldimage != {} && $oldimage != $_defUnknownImg} {
!       ::image delete $oldimage
     }
  }

*************** body iwidgets::Scrolledhtml::clear {} {
*** 483,489 ****
      $itk_component(text) config -state normal
      $itk_component(text) delete 1.0 end
      foreach x $_images {
!       image delete $x
      }
      set _images {}
      _setup
--- 483,489 ----
      $itk_component(text) config -state normal
      $itk_component(text) delete 1.0 end
      foreach x $_images {
!       ::image delete $x
      }
      set _images {}
      _setup
*************** body iwidgets::Scrolledhtml::_entity_img
*** 1642,1648 ****
      } else {
         set file $_cwd/$ar(src)
      }
!     if [catch {set img [image create photo -file $file]} err] {
        if {[info exists ar(width)] && [info exists ar(height)] } {
          # suggestions exist, so make frame appropriate size and add a border
          $imgframe configure -width $ar(width) -height $ar(height) -borderwidth 2
--- 1642,1648 ----
      } else {
         set file $_cwd/$ar(src)
      }
!     if [catch {set img [::image create photo -file $file]} err] {
        if {[info exists ar(width)] && [info exists ar(height)] } {
          # suggestions exist, so make frame appropriate size and add a border
          $imgframe configure -width $ar(width) -height $ar(height) -borderwidth 2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-17 16:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-17  9:37 [PATCH] itcl/iwidgets3.0.0/generic/scrolledhtml.itk images Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).