public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: insight <insight@sourceware.org>
Subject: [PATCH] Fix Memory Window Preferences
Date: Fri, 24 Apr 2009 03:29:00 -0000	[thread overview]
Message-ID: <49F13213.2020103@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Hi,

The other day I noticed that memory window preferences were really 
broken, so I've committed the following patch to fix them again.

If anyone notices any problems, please let me know.

Keith

ChangeLog
2009-04-23  Keith Seitz  <keiths@redhat.com>

	* library/mempref.itb (build_win): Replace libgui's "Labelledframe"
	with the iwidget's LabeledFrame. Replaced all occurrances.
	* libarary/memwin.itb (create_prefs): Use ManagedWin::open_dlg
	instead of ManagedWin::open.

[-- Attachment #2: memwin.patach --]
[-- Type: text/plain, Size: 3667 bytes --]

Index: library/mempref.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/mempref.itb,v
retrieving revision 1.7
diff -u -p -r1.7 mempref.itb
--- library/mempref.itb	24 Jan 2006 01:32:26 -0000	1.7
+++ library/mempref.itb	24 Apr 2009 03:25:54 -0000
@@ -1,5 +1,5 @@
 # Memory display preferences window for Insight.
-# Copyright (C) 1998, 1999, 2002, 2003, 2006 Red Hat
+# Copyright (C) 1998, 1999, 2002, 2003, 2006, 2009 Red Hat, Inc
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -72,8 +72,8 @@ itcl::body MemPref::build_win {} {
   frame $itk_interior.f.b
 
   # SIZE
-  Labelledframe $f.f1 -anchor nw -text Size
-  set fr [$f.f1 get_frame]
+  iwidgets::Labeledframe $f.f1 -labelpos nw -labeltext [gettext "Size"]
+  set fr [$f.f1 childsite]
 
   set Widgets(rb-Byte) [radiobutton $fr.1 -variable [scope gsize] -text Byte \
 			  -value 1 -command [code $this enable_format]]
@@ -91,8 +91,8 @@ itcl::body MemPref::build_win {} {
   grid $fr.2 $fr.8 $fr.d -sticky w -padx 4
 
   # FORMAT
-  Labelledframe $f.f2 -anchor nw -text Format
-  set fr [$f.f2 get_frame]
+  iwidgets::Labeledframe $f.f2 -labelpos nw -labeltext [gettext "Format"]
+  set fr [$f.f2 childsite]
   set Widgets(rb-binary) [radiobutton $fr.1 -variable [scope gformat] \
 			    -text Binary -value t]
   set Widgets(rb-octal) [radiobutton $fr.2 -variable [scope gformat] \
@@ -108,7 +108,8 @@ itcl::body MemPref::build_win {} {
   grid $fr.4 $fr.5 x -sticky w -padx 4
 
   # TOTAL BYTES
-  Labelledframe $f.fx -anchor nw -text "Number of Bytes"
+  iwidgets::Labeledframe $f.fx -labelpos nw \
+      -labeltext [gettext "Number of Bytes"]
 
   if {$gnumbytes == 0} {
     set gnumbytes $default_numbytes
@@ -117,7 +118,7 @@ itcl::body MemPref::build_win {} {
     set gvar 1
   }
 
-  set fr [$f.fx get_frame] 
+  set fr [$f.fx childsite]
   set Widgets(rb-win_size) [radiobutton $fr.1 -variable [scope gvar] -text "Depends on window size" \
 			      -value 0 -command [code $this toggle_size_control]]
   frame $fr.2
@@ -143,8 +144,9 @@ itcl::body MemPref::build_win {} {
   grid columnconfigure $fr 1 -weight 1
 
   # MISC
-  Labelledframe $f.1 -anchor nw -text "Miscellaneous"
-  set fr [$f.1 get_frame] 
+  iwidgets::Labeledframe $f.1 -labelpos nw \
+      -labeltext [gettext "Miscellaneous"]
+  set fr [$f.1 childsite]
   frame $fr.1
   label $fr.1.plabel -height 1 -width 1 -bg $color -relief raised  
   set Widgets(b-color) [button $fr.1.pc -text "Change color..."  \
Index: library/memwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.itb,v
retrieving revision 1.25
diff -u -p -r1.25 memwin.itb
--- library/memwin.itb	9 Feb 2008 01:23:42 -0000	1.25
+++ library/memwin.itb	24 Apr 2009 03:25:54 -0000
@@ -1,5 +1,5 @@
 # Memory display window class definition for Insight.
-# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008 Red Hat, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008, 2009 Red Hat, Inc.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License (GPL) as published by
@@ -236,7 +236,7 @@ itcl::body MemWin::create_prefs {} {
     set rheight [lindex [$itk_component(table) bbox 0,0] 3]
   }
 
-  set prefs_win [ManagedWin::open MemPref -force -over $this\
+  set prefs_win [ManagedWin::open_dlg MemPref -force -over $this\
 		   -transient -win $this \
 		   -size $size -format $format -numbytes $numbytes \
 		   -bpr $bytes_per_row -ascii $ascii \

                 reply	other threads:[~2009-04-24  3:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F13213.2020103@redhat.com \
    --to=keiths@redhat.com \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).