Revision: 42395
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42395&view=rev
Author:   starseeker
Date:     2011-01-17 14:38:14 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
Put itk_redefines.tcl into trunk version of archer

Modified Paths:
--------------
    brlcad/trunk/src/archer/archer
    brlcad/trunk/src/tclscripts/archer/Makefile.am

Added Paths:
-----------
    brlcad/trunk/src/tclscripts/archer/itk_redefines.tcl

Modified: brlcad/trunk/src/archer/archer
===================================================================
--- brlcad/trunk/src/archer/archer      2011-01-17 14:37:24 UTC (rev 42394)
+++ brlcad/trunk/src/archer/archer      2011-01-17 14:38:14 UTC (rev 42395)
@@ -58,6 +58,18 @@
 #\
 exec $WISH $0 $@
 
+# Itk's default class doesn't keep the menu, but Archer needs it - redefine 
itk:Toplevel
+set itk_file [file join [bu_brlcad_data "tclscripts"] archer itk_redefines.tcl]
+if { ![file exists $itk_file] } {
+       #try src tree
+       set itk_file [file join [bu_brlcad_data "src"] tclscripts archer 
itk_redefines.tcl]
+       if { ![file exists $itk_file] } {
+               #try local relative
+               set itk_file [file join src tclscripts archer itk_redefines.tcl]
+       }
+}
+source $itk_file
+
 # Set ttk theme
 if {[tk windowingsystem] eq "aqua"} {
    ::ttk::style theme use aqua

Modified: brlcad/trunk/src/tclscripts/archer/Makefile.am
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Makefile.am      2011-01-17 14:37:24 UTC 
(rev 42394)
+++ brlcad/trunk/src/tclscripts/archer/Makefile.am      2011-01-17 14:38:14 UTC 
(rev 42395)
@@ -39,6 +39,7 @@
        Wizard.tcl \
        bgerror.tcl \
        cursor.tcl \
+       itk_redefines \
        tabwindow.itk
 
 BUILT_SOURCES = \

Added: brlcad/trunk/src/tclscripts/archer/itk_redefines.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/itk_redefines.tcl                        
        (rev 0)
+++ brlcad/trunk/src/tclscripts/archer/itk_redefines.tcl        2011-01-17 
14:38:14 UTC (rev 42395)
@@ -0,0 +1,53 @@
+itcl::delete class itk::Toplevel
+
+itcl::class itk::Toplevel {
+    inherit itk::Archetype
+
+    constructor {args} {
+        #
+        #  Create a toplevel window with the same name as this object
+        #
+        set itk_hull [namespace tail $this]
+        set itk_interior $itk_hull
+
+        itk_component add hull {
+            toplevel $itk_hull -class [namespace tail [info class]]
+        } {
+            keep -menu -background -cursor -takefocus
+        }
+        bind itk-delete-$itk_hull <Destroy> [list itcl::delete object $this]
+
+        set tags [bindtags $itk_hull]
+        bindtags $itk_hull [linsert $tags 0 itk-delete-$itk_hull]
+
+        eval itk_initialize $args
+    }
+
+    destructor {
+        if {[winfo exists $itk_hull]} {
+            set tags [bindtags $itk_hull]
+            set i [lsearch $tags itk-delete-$itk_hull]
+            if {$i >= 0} {
+                bindtags $itk_hull [lreplace $tags $i $i]
+            }
+            destroy $itk_hull
+        }
+        itk_component delete hull
+
+        set components [component]
+        foreach component $components {
+            set path($component) [component $component]
+        }
+        foreach component $components {
+            if {[winfo exists $path($component)]} {
+                destroy $path($component)
+            }
+        }
+    }
+
+    itk_option define -title title Title "" {
+        wm title $itk_hull $itk_option(-title)
+    }
+
+    private variable itk_hull ""
+}


Property changes on: brlcad/trunk/src/tclscripts/archer/itk_redefines.tcl
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to