OSDN Git Service

* library/variables.tcl (postMenu): Add mysterious workaround
authorkseitz <kseitz>
Tue, 22 May 2001 15:46:02 +0000 (15:46 +0000)
committerkseitz <kseitz>
Tue, 22 May 2001 15:46:02 +0000 (15:46 +0000)
for popup menu bug in Tk for windows.
Highlight the selection, too.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/variables.tcl

index 066fa32..cf0eee7 100644 (file)
@@ -1,3 +1,15 @@
+2001-05-22  Keith Seitz  <keiths@cygnus.com>
+
+       * library/variables.tcl (postMenu): Add mysterious workaround
+       for popup menu bug in Tk for windows.
+       Highlight the selection, too.
+
+2001-05-21  Keith Seitz  <keiths@cygnus.com>
+
+       * library/managedwin.itb (_create): Check the geometry of
+       any window we create. Don't create a window that is
+       bigger than the screen.
+
 2001-05-18  Keith Seitz  <keiths@cygnus.com>
 
        * library/managedwin.ith (_geometry): Use a protected variable
index 72d09dd..fd66491 100644 (file)
@@ -340,6 +340,9 @@ class VariableWin {
 
        set variable [getEntry $X $Y]
        if {[string length $variable] > 0} {
+         # First things first: highlight the variable we just selected
+         $Hlist selection set $variable
+
            # Configure menu items
            # the title is always first..
            #set labelIndex [$Popup index "dummy"]
@@ -376,6 +379,16 @@ class VariableWin {
                    -command "$this setDisplay \{$variable\} $fmt"
            }
 
+           if {$::tcl_platform(platform) == "windows"} {
+             # Don't ask me why this works, but it does work around
+             # a Win98/2000 Tcl bug with deleting entries from popups...
+             set no [$Popup index end]
+             for { set k 1 } { $k < $no } { incr k } {
+               $Popup insert 1 command 
+             }
+             $Popup delete 1 [expr {$no - 1}]
+           }
+
            tk_popup $Popup $X $Y
        }
     }