From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3278 invoked by alias); 17 Apr 2002 16:37:00 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 3259 invoked from network); 17 Apr 2002 16:36:58 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 17 Apr 2002 16:36:58 -0000 Received: from cse.cygnus.com (cse.sfbay.redhat.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id JAA18706 for ; Wed, 17 Apr 2002 09:36:58 -0700 (PDT) Received: from localhost (keiths@localhost) by cse.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id JAA07538 for ; Wed, 17 Apr 2002 09:36:58 -0700 (PDT) X-Authentication-Warning: cse.cygnus.com: keiths owned process doing -bs Date: Wed, 17 Apr 2002 09:37:00 -0000 From: Keith Seitz X-X-Sender: To: Insight Maling List Subject: [PATCH] itcl/iwidgets3.0.0/generic/scrolledhtml.itk images Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-q2/txt/msg00041.txt.bz2 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 From investigative work by Ton van Overbeek : * 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