This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Small fix to regwin


This fixes a small bug. I believe I introduced it myself when I added an item
to the menu and didn't notice that one of the items was being referenced by a
literal value.  I changed another reference to a menu item to use a variable as well.
It is more robust this way.

I will check this in tomorrow.

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com


Index: ChangeLog
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk/library/ChangeLog,v
retrieving revision 1.10.4.8
diff -c -p -r1.10.4.8 ChangeLog
*** ChangeLog   2000/06/21 18:51:45     1.10.4.8
--- ChangeLog   2000/06/23 00:32:12
***************
*** 1,3 ****
--- 1,12 ----
+ 2000-06-22  Fernando Nasser  <fnasser@cygnus.com>
+ 
+       * regwin.itb (build_win, reg_select): Use new variable
+       add_to_watch_menu_item to specify that menu entry, instead of a
+       numeric literal.
+       (delete_from_display_list): Use variable disp_all_menu_item instead
+       of numeric literal.
+       * regwin.ith: Declare add_to_watch_menu_item.
+ 
  2000-06-21  Fernando Nasser  <fnasser@cygnus.com>
  
          These changes implement a Model Specific Register (MSR) selection
Index: regwin.itb
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk/library/regwin.itb,v
retrieving revision 1.3.8.2
diff -c -p -r1.3.8.2 regwin.itb
*** regwin.itb  2000/06/21 18:51:45     1.3.8.2
--- regwin.itb  2000/06/23 00:32:12
*************** body RegWin::build_win {} {
*** 187,192 ****
--- 187,193 ----
        -command "$this update"
      $m add command -label "Remove from Display" -underline 0 -state disabled
      $m add command -label "Add to Watch" -underline 7 -state disabled
+     set add_to_watch_menu_item [$m index last]
      $m add separator
      $m add command -label "Select MSR..." -underline 7 -state normal \
                              -command "$this select_msr"
*************** body RegWin::reg_select { r } {
*** 394,400 ****
      $itk_interior.m.reg.format entryconfigure $i -state $state \
        -variable reg_display($r,format)
    }
!   $itk_interior.m.reg entryconfigure 4 -state normal \
      -command "$this addToWatch $r"
    focus -force $ScrolledWin.$r
    set selected $r
--- 395,401 ----
      $itk_interior.m.reg.format entryconfigure $i -state $state \
        -variable reg_display($r,format)
    }
!   $itk_interior.m.reg entryconfigure $add_to_watch_menu_item -state normal \
      -command "$this addToWatch $r"
    focus -force $ScrolledWin.$r
    set selected $r
*************** body RegWin::delete_from_display_list {r
*** 549,555 ****
    }
    set num_regs $i
    reconfig
!   $itk_interior.m.reg entryconfigure 6 -state normal
  }
  
  
--- 550,556 ----
    }
    set num_regs $i
    reconfig
!   $itk_interior.m.reg entryconfigure $disp_all_menu_item -state normal
  }
  
  
Index: regwin.ith
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtk/library/regwin.ith,v
retrieving revision 1.2.8.2
diff -c -p -r1.2.8.2 regwin.ith
*** regwin.ith  2000/06/21 18:51:45     1.2.8.2
--- regwin.ith  2000/06/23 00:32:12
*************** class RegWin {
*** 19,24 ****
--- 19,25 ----
      variable reg_display_list {}
      variable all_regs_shown    1
      variable disp_all_menu_item
+     variable add_to_watch_menu_item
      variable num_regs 0
      variable nRows
      variable nCols

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]