krege pushed to iwidgets (master). "Fix compatibility with Itk4"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Apr 24 02:59:42 UTC 2015


>From f2686b8e49f444370d0f40023dc672457397ba31 Mon Sep 17 00:00:00 2001
From: "Dmitrij S. Kryzhevich" <krege at land.ru>
Date: Fri, 24 Apr 2015 08:59:34 +0600
Subject: Fix compatibility with Itk4


diff --git a/iwidgets.spec b/iwidgets.spec
index 530a35c..8710498 100644
--- a/iwidgets.spec
+++ b/iwidgets.spec
@@ -3,7 +3,7 @@
 
 Name:           iwidgets
 Version:        4.0.2
-Release:        15%{?dist}
+Release:        16%{?dist}
 Summary:        A set of useful widgets based on itcl and itk
 
 Group:          Development/Libraries
@@ -12,6 +12,7 @@ URL:            http://incrtcl.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/sourceforge/incrtcl/iwidgets4.0.1.tar.gz
 Patch0:         iwidgets4.0.1-calls.patch
 Patch1:         iwidgets4.0.1-wish85.diff
+Patch2:         iwidgets4.0.2-itk4.patch
 
 BuildArch:      noarch
 Requires:       tcl(abi) = 8.6 itk
@@ -24,6 +25,7 @@ A set of useful widgets based on itcl and itk.
 %setup -q -n iwidgets4.0.1
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 # The configure script and Makefile for this package is horribly broken.
@@ -71,6 +73,9 @@ rm %{buildroot}/%{_mandir}/mann/datefield.n
 %doc README license.terms doc/iwidgets.ps
 
 %changelog
+* Sat Oct 18 2014 Dmitrij S. Kryzhevich <krege at land.ru> - 4.0.2-16
+- Fix compatibility with Itk4.
+
 * Sat Oct 18 2014 Dmitrij S. Kryzhevich <krege at land.ru> - 4.0.2-15
 - Fix itcl/itk calls (to lowercase).
 
diff --git a/iwidgets4.0.2-itk4.patch b/iwidgets4.0.2-itk4.patch
new file mode 100644
index 0000000..10de02a
--- /dev/null
+++ b/iwidgets4.0.2-itk4.patch
@@ -0,0 +1,108 @@
+diff -urp iwidgets4.0.1/generic/combobox.itk iwidgets4.0.1-itk4/generic/combobox.itk
+--- iwidgets4.0.1/generic/combobox.itk	2002-09-09 13:43:55.000000000 +0700
++++ iwidgets4.0.1-itk4/generic/combobox.itk	2015-04-24 08:56:40.641645510 +0600
+@@ -521,7 +521,8 @@ itcl::body iwidgets::Combobox::insert {c
+ 	    } else {
+ 		if {$itk_option(-state) == "normal"} {
+ 		    eval iwidgets::Entryfield::insert $index $args
+-		    [itcl::code $this _lookup ""]
++		    #RZ [itcl::code $this _lookup ""]
++		    eval [itcl::code $this _lookup ""]
+ 		}
+ 	    }
+ 	}
+diff -urp iwidgets4.0.1/generic/labeledframe.itk iwidgets4.0.1-itk4/generic/labeledframe.itk
+--- iwidgets4.0.1/generic/labeledframe.itk	2001-08-16 01:32:51.000000000 +0700
++++ iwidgets4.0.1-itk4/generic/labeledframe.itk	2015-04-24 08:56:40.691643809 +0600
+@@ -289,6 +289,7 @@ itcl::configbody iwidgets::Labeledframe:
+ #     {"-relx" "-rely" <rowconfigure|columnconfigure> <row/column number>}
+ # -----------------------------------------------------------------------------
+ itcl::body iwidgets::Labeledframe::_initTable {} {
++  if {![catch {set _LAYOUT_TABLE(nw-relx)}]} return ;#RZ
+   array set _LAYOUT_TABLE {
+     nw-relx 0.0  nw-rely 0.0  nw-wrap 0 nw-conf rowconfigure    nw-num 0
+     n-relx  0.5  n-rely  0.0  n-wrap  0 n-conf  rowconfigure    n-num  0
+@@ -313,7 +314,7 @@ itcl::body iwidgets::Labeledframe::_init
+   #
+   # NOTE: Be careful to use the "body" command, or the proc will get lost!
+   #
+-  itcl::body ::iwidgets::Labeledframe::_initTable {} {}
++  #RZ itcl::body ::iwidgets::Labeledframe::_initTable {} {}
+ }
+ 
+ # -----------------------------------------------------------------------------
+diff -urp iwidgets4.0.1/generic/menubar.itk iwidgets4.0.1-itk4/generic/menubar.itk
+--- iwidgets4.0.1/generic/menubar.itk	2001-08-16 01:33:13.000000000 +0700
++++ iwidgets4.0.1-itk4/generic/menubar.itk	2015-04-24 08:56:40.691643809 +0600
+@@ -160,6 +160,7 @@ itcl::class iwidgets::Menubar {
+ 
+ 	variable _menuOption          ;# The -menu option
+ 	variable _helpString          ;# The -helpstr optio
++	variable _fixed 0 ;#RZ bug fix
+     }
+ }
+ 
+@@ -198,7 +199,7 @@ itcl::body iwidgets::Menubar::constructo
+     set _pathMap(.) $itk_component(menubar)
+ 
+     eval itk_initialize $args
+-
++    set _fixed 1 ;#RZ
+     #
+     # HACK HACK HACK
+     # Tk expects some variables to be defined and due to some
+@@ -357,7 +358,8 @@ itcl::configbody iwidgets::Menubar::menu
+ 
+ 	# IF one exists already, delete the old one and create
+ 	# a new one
+-	if { ! [catch {_parsePath .0}] } {
++	#RZ if { ! [catch {_parsePath .0}] } 
++	if { $_fixed && ! [catch {_parsePath .0}] } {
+ 	    delete .0 .last
+ 	} 
+ 
+@@ -2071,9 +2073,7 @@ itcl::body iwidgets::Menubar::_parsePath
+ 
+     set concatPath ""
+     foreach seg $segments {
+-
+ 	set concatPath [_getSymbolicPath $concatPath $seg]
+-
+ 	if { [catch {set _pathMap($concatPath)} ] } {
+ 	    error "bad path: \"$path\" does not exist. \"$seg\" not valid"
+ 	}
+diff -urp iwidgets4.0.1/generic/scrolledhtml.itk iwidgets4.0.1-itk4/generic/scrolledhtml.itk
+--- iwidgets4.0.1/generic/scrolledhtml.itk	2002-02-16 11:11:08.000000000 +0600
++++ iwidgets4.0.1-itk4/generic/scrolledhtml.itk	2015-04-24 08:56:40.692643775 +0600
+@@ -139,7 +139,7 @@ itcl::class iwidgets::Scrolledhtml {
+   itk_option define -alink alink ALink red
+   itk_option define -linkhighlight alink ALink red
+   itk_option define -unknownimage unknownimage File {}
+-  itk_option define -textbackground textBackground Background {}
++  itk_option define -textbackground textBackground Background {#ffffff};#RZ
+   itk_option define -update update Update 1
+   itk_option define -debug debug Debug 0
+ 
+@@ -352,7 +352,8 @@ itcl::body iwidgets::Scrolledhtml::destr
+     foreach x $_images {
+       ::image delete $x
+     }
+-    if {$_unknownimg != $_defUnknownImg} {
++    #RZ if {$_unknownimg != $_defUnknownImg}
++    if {$_unknownimg != "" && $_unknownimg != $_defUnknownImg} {
+       ::image delete $_unknownimg
+     }
+ }
+diff -urp iwidgets4.0.1/generic/toolbar.itk iwidgets4.0.1-itk4/generic/toolbar.itk
+--- iwidgets4.0.1/generic/toolbar.itk	2001-08-18 02:05:54.000000000 +0700
++++ iwidgets4.0.1-itk4/generic/toolbar.itk	2015-04-24 08:56:40.692643775 +0600
+@@ -684,7 +684,8 @@ itcl::body iwidgets::Toolbar::_addWidget
+     foreach optionSet [$itk_component($name) configure] {
+ 	set option [lindex $optionSet 0]
+ 	if { [lsearch $_optionList $option] != -1 } {
+-	    itk_option add $name.$option
++	    #RZ itk_option add $name.$option
++	    itk_option add $name.[string range $option 1 end]
+ 	}
+     }
+     
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/iwidgets.git/commit/?h=master&id=f2686b8e49f444370d0f40023dc672457397ba31


More information about the scm-commits mailing list