OSDN Git Service

2002-11-07 Martin M. Hunt <hunt@redhat.com>
authorMartin Hunt <hunt@redhat.com>
Fri, 8 Nov 2002 05:25:20 +0000 (05:25 +0000)
committerMartin Hunt <hunt@redhat.com>
Fri, 8 Nov 2002 05:25:20 +0000 (05:25 +0000)
* library/util.tcl (CygScrolledListbox): Delete.

* library/srctextwin.itb: Change from CygScrolledListbox
to iwidgets::scrolledlistbox. Set foreground and background.
Center popup over source window.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/srctextwin.itb
gdb/gdbtk/library/tclIndex
gdb/gdbtk/library/util.tcl

index 56b631b..7822399 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-07  Martin M. Hunt  <hunt@redhat.com>
+
+       * library/util.tcl (CygScrolledListbox): Delete.
+
+       * library/srctextwin.itb: Change from CygScrolledListbox
+       to iwidgets::scrolledlistbox. Set foreground and background.
+       Center popup over source window.
+
 2002-11-06  Martin M. Hunt  <hunt@redhat.com>
 
        * library/locals.tcl (build_win): Fix so window opens
index d92c0f6..2405e78 100644 (file)
@@ -2822,8 +2822,11 @@ itcl::body SrcTextWin::ask_thread_bp {} {
   
   set a [toplevel .[gensym]]
   wm title $a "Thread Selection"
-  CygScrolledListbox $a.slb -selectmode multiple -height $num_threads
-  
+
+  iwidgets::scrolledlistbox $a.slb \
+    -vscrollmode dynamic -hscrollmode dynamic \
+    -selectmode multiple -textfont global/fixed
+
   set i [expr $num_threads - 1]
   set width 0
   foreach line $threads {
@@ -2837,19 +2840,21 @@ itcl::body SrcTextWin::ask_thread_bp {} {
       if {[string length $line] > $width} {
        set width [string length $line]
       }
-      $a.slb.list insert 0 $line 
+      $a.slb insert 0 $line 
       incr i -1
     }
   }
-  $a.slb.list configure -width $width
+  $a.slb configure -visibleitems ${width}x$num_threads 
+  [$a.slb component listbox] configure -bg $::Colors(textbg) -fg $::Colors(textfg)
 
   frame $a.b
   button $a.b.ok -text OK -underline 0 -width 7 \
-    -command "$this do_thread_bp $a.slb.list"
+    -command "$this do_thread_bp $a.slb"
   button $a.b.cancel -text Cancel -width 7 -underline 0 -command "destroy $a"
   pack $a.b.ok $a.b.cancel -side left
   standard_button_box $a.b
   pack $a.b -fill x -expand yes -side bottom -padx 5 -pady 5
+  center_window $a -over [winfo toplevel [namespace tail $this]]
   pack $a.slb -side top -fill both -expand yes
   bind $a.b.ok <Return> "$a.b.ok flash; $a.b.ok invoke"
   focus $a.b.ok
index dcf2e28..fe54976 100644 (file)
@@ -120,15 +120,12 @@ set auto_index(save_trace_commands) [list source [file join $dir util.tcl]]
 set auto_index(do_test) [list source [file join $dir util.tcl]]
 set auto_index(gdbtk_read_defs) [list source [file join $dir util.tcl]]
 set auto_index(bp_exists) [list source [file join $dir util.tcl]]
-set auto_index(CygScrolledListbox) [list source [file join $dir util.tcl]]
 set auto_index(gridCGet) [list source [file join $dir util.tcl]]
 set auto_index(get_disassembly_flavor) [list source [file join $dir util.tcl]]
 set auto_index(list_disassembly_flavors) [list source [file join $dir util.tcl]]
 set auto_index(init_disassembly_flavor) [list source [file join $dir util.tcl]]
 set auto_index(list_element_strcmp) [list source [file join $dir util.tcl]]
 set auto_index(gdbtk_endian) [list source [file join $dir util.tcl]]
-set auto_index(VariableWin) [list source [file join $dir variables.tcl]]
-set auto_index(::VariableWin::getLocals) [list source [file join $dir variables.tcl]]
 set auto_index(WarningDlg) [list source [file join $dir warning.tcl]]
 set auto_index(::WarningDlg::constructor) [list source [file join $dir warning.tcl]]
 set auto_index(WatchWin) [list source [file join $dir watch.tcl]]
index 3383580..cd6a927 100644 (file)
@@ -185,28 +185,6 @@ proc bp_exists {linespec} {
 }
 
 
-# Scrolled Listbox - this could be in libgui,
-# but we'll probably just start using new iwidgets stuff 
-# soon so keep it here temporarily.  This is based on
-# code from Welch's book.
-
-proc CygScrolledListbox { win args } {
-  frame $win
-  # Create listbox attached to scrollbars, pass thru $args
-  eval {listbox $win.list -yscrollcommand [list $win.sy set]} $args
-  scrollbar $win.sy -orient vertical -command [list $win.list yview]
-  
-  # Create padding based on the scrollbar width and border
-  set pad [expr [$win.sy cget -width] + 2* \
-            ([$win.sy cget -bd] + \
-               [$win.sy cget -highlightthickness])]
-
-  frame $win.pad -width $pad -height $pad
-  pack $win.sy -side right -fill y
-  pack $win.list -side left -fill both -expand true
-  return $win.list
-}
-
 # gridCGet - This provides the missing grid cget
 # command.