* Re: [RFA] Address, line number and download progress.
[not found] <3BCB3664.C2CD64A2@redhat.com>
@ 2001-11-02 8:20 ` Keith Seitz
2001-11-02 8:52 ` Fernando Nasser
0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2001-11-02 8:20 UTC (permalink / raw)
To: Ian Roxborough; +Cc: insight
On Mon, 15 Oct 2001, Ian Roxborough wrote:
> this patch is part of the GUI enhancements we discussed the other
> week. It moves the address and line number fields to the lower
> right of the window (on the status bar) and moves the download
> progress meter from hiding behind the search box to hide behind
> the address and line number on the status bar.
>
> 2001-10-15 Ian Roxborough <irox@redhat.com>
>
> * library/srcbar.itcl (SrcBar::create_buttons): Line number
> and address fields have been removed and added to the
> status bar.
> * library/srcwin.itb (SrcWin::_build_win): Add address and
> line number fields to status bar. Moved download progress
> bar to status bar.
> (SrcWin::download_progress): Use canvas on status bar.
> (SrcWin::location): Set line number and address on status bar.
> * library/srcwin.ith (SrcWin): Added new private variable.
Ok, I think I owe you an answer on this...
I don't know if others have tried it or not, but I think that it looks
pretty good.
However, I must admit, I would rather see this status bar code cleaned up
instead of just whacking another thing into it. The SrcWin and the
SrcTextWin are the two most complicated and confusing pieces of code that
we have, and I think this just makes SrcWin more complicated.
I think we need a status bar class now before I can really accept this. I
know this is a bunch of work (rather trivial, I think), but it's now or
never.
I'm sure you don't have time to do this, but if you do find the time, let
me know, or I will start it. I don't want to see us duplicate too much
efffort here.
(Maybe we should accept these patches and then separate out the statusbar?
Fernando/Jim?)
Keith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Address, line number and download progress.
2001-11-02 8:20 ` [RFA] Address, line number and download progress Keith Seitz
@ 2001-11-02 8:52 ` Fernando Nasser
2001-11-02 8:58 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Fernando Nasser @ 2001-11-02 8:52 UTC (permalink / raw)
To: Keith Seitz; +Cc: Ian Roxborough, insight
Keith Seitz wrote:
>
> On Mon, 15 Oct 2001, Ian Roxborough wrote:
>
> > this patch is part of the GUI enhancements we discussed the other
> > week. It moves the address and line number fields to the lower
> > right of the window (on the status bar) and moves the download
> > progress meter from hiding behind the search box to hide behind
> > the address and line number on the status bar.
> >
> > 2001-10-15 Ian Roxborough <irox@redhat.com>
> >
> > * library/srcbar.itcl (SrcBar::create_buttons): Line number
> > and address fields have been removed and added to the
> > status bar.
> > * library/srcwin.itb (SrcWin::_build_win): Add address and
> > line number fields to status bar. Moved download progress
> > bar to status bar.
> > (SrcWin::download_progress): Use canvas on status bar.
> > (SrcWin::location): Set line number and address on status bar.
> > * library/srcwin.ith (SrcWin): Added new private variable.
>
> Ok, I think I owe you an answer on this...
>
> I don't know if others have tried it or not, but I think that it looks
> pretty good.
>
> However, I must admit, I would rather see this status bar code cleaned up
> instead of just whacking another thing into it. The SrcWin and the
> SrcTextWin are the two most complicated and confusing pieces of code that
> we have, and I think this just makes SrcWin more complicated.
>
> I think we need a status bar class now before I can really accept this. I
> know this is a bunch of work (rather trivial, I think), but it's now or
> never.
>
> I'm sure you don't have time to do this, but if you do find the time, let
> me know, or I will start it. I don't want to see us duplicate too much
> efffort here.
>
> (Maybe we should accept these patches and then separate out the statusbar?
> Fernando/Jim?)
>
I vote that we accept it now and we all do our best to get to the
cleanup
(I will do it if I can find the time). I almost got to the StatuBar
class
once, when I run out of time.
I am aware of the risks of accepting the patch without the cleanup. But
Ian
has done a lot lately and this is sort of his last batch of UI changes,
I
wouldn't like to leave a bit of it out.
Unless Ian thinks he can do this bit more and create the GDBStatusBar
class...
Can you Ian?
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Address, line number and download progress.
2001-11-02 8:52 ` Fernando Nasser
@ 2001-11-02 8:58 ` Keith Seitz
2001-11-02 9:57 ` Ian Roxborough
0 siblings, 1 reply; 4+ messages in thread
From: Keith Seitz @ 2001-11-02 8:58 UTC (permalink / raw)
To: Fernando Nasser; +Cc: Ian Roxborough, insight
On Fri, 2 Nov 2001, Fernando Nasser wrote:
> I am aware of the risks of accepting the patch without the cleanup. But Ian
> has done a lot lately and this is sort of his last batch of UI changes, I
> wouldn't like to leave a bit of it out.
>
> Unless Ian thinks he can do this bit more and create the GDBStatusBar
> class...
> Can you Ian?
I thought as much, too, which is why I asked. :v)
Ian, if you don't have the time (and I am pretty certain you don't right
now), please check in your changes.
FWIW, here's your patches against current sources.
Keith
Index: library/srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.17
diff -u -p -r1.17 srcwin.itb
--- library/srcwin.itb 2001/10/04 15:01:36 1.17
+++ library/srcwin.itb 2001/11/02 16:57:12
@@ -112,17 +112,13 @@ body SrcWin::_build_win {} {
$_statbar.mode list insert end SRC+ASM
- # Search/download progress frame
+ # Search
frame $_statbar.frame
entry $_statbar.frame.search -bd 3 -font src-font -width 10
bind_plain_key $_statbar.frame.search \
Return [code $this _search forwards]
bind_plain_key $_statbar.frame.search \
Shift-Return [code $this _search backwards]
- canvas $_statbar.frame.progress -relief sunken -borderwidth 2 \
- -highlightthickness 0 -takefocus 0 -width 100 -height 0 -confine 1
- $_statbar.frame.progress create rectangle 0 0 0 \
- [winfo height $_statbar.frame.progress] -outline blue -fill blue -tags rect
pack $_statbar.frame -side right -pady 4 -padx 10 -fill y -expand 1 -anchor e
pack $_statbar.mode -side right -padx 10 -pady 4
@@ -140,8 +136,32 @@ body SrcWin::_build_win {} {
# add status line
set _status [conAdd status -resizable 0]
+ set _statusframe [frame $_status]
+ set _status $_statusframe.con
label $_status -relief sunken -bd 3 -font global/status -height 1
- pack $_status -expand 1 -fill both
+
+ # add download progress meter
+ canvas $_statusframe.progress -relief sunken -borderwidth 2 \
+ -highlightthickness 0 -takefocus 0 -width 100 -height 0 -confine 1
+ $_statusframe.progress create rectangle 0 0 0 \
+ [winfo height $_statusframe.progress] -outline blue -fill blue -tags rect
+
+ # add address and line number indicators
+ label $_statusframe.addr -text "" -width 10 -relief sunken \
+ -bd 1 -anchor e -font src-font
+ label $_statusframe.line -text "" -width 6 -relief sunken \
+ -bd 1 -anchor e -font src-font
+
+ balloon register $_statusframe.addr "Address"
+ balloon register $_statusframe.line "Line number"
+
+ pack $_statusframe -expand 1 -fill both
+ grid $_status -row 0 -column 1 -sticky news -pady 2 -padx 2
+ grid $_statusframe.addr -row 0 -column 3 -sticky nes -pady 4
+ grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
+ grid columnconfigure $_statusframe 1 -weight 10
+ grid columnconfigure $_statusframe 2 -minsize 5
+ grid columnconfigure $_statusframe 5 -minsize 5
}
set_execution_status
@@ -206,8 +226,8 @@ body SrcWin::download_progress { section
#debug "$section $num $tot $msg"
if {$last_section_start == 0} {
- pack forget $_statbar.frame.search
- pack $_statbar.frame.progress -fill both -expand yes
+ grid forget $_statusframe.addr $_statusframe.line
+ grid $_statusframe.progress -row 0 -column 4 -padx 4 -sticky news
::update idletasks
}
@@ -232,7 +252,7 @@ body SrcWin::download_progress { section
set_status "Downloading section $section - $num bytes"
}
- set canvas $_statbar.frame.progress
+ set canvas $_statusframe.progress
set height [winfo height $canvas]
if {$last_done} {
set width [winfo width $canvas]
@@ -259,8 +279,9 @@ body SrcWin::download_progress { section
set last_done 0
set last_section_start 0
- pack forget $_statbar.frame.progress
- pack $_statbar.frame.search -fill x -expand yes
+ grid forget $_statusframe.progress
+ grid $_statusframe.addr -row 0 -column 3 -sticky new -pady 4
+ grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
::update idletasks
}
}
@@ -458,7 +479,9 @@ body SrcWin::location {tag linespec} {
}
# set address and line widgets
- $_toolbar configure -address $addr -line $line
+ $_statusframe.addr configure -text $addr
+ $_statusframe.line configure -text $line
+
# set function combobox
$_statbar.func entryset $funcname
Index: library/srcwin.ith
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.ith,v
retrieving revision 1.7
diff -u -p -r1.7 srcwin.ith
--- library/srcwin.ith 2001/06/04 15:49:53 1.7
+++ library/srcwin.ith 2001/11/02 16:57:12
@@ -79,6 +79,7 @@ class SrcWin {
variable _statbar
variable _status
variable _toolbar
+ variable _statusframe
variable top
variable twin
variable current
Index: library/srcbar.itcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v
retrieving revision 1.13
diff -u -p -r1.13 srcbar.itcl
--- library/srcbar.itcl 2001/10/29 21:45:30 1.13
+++ library/srcbar.itcl 2001/11/02 16:57:22
@@ -534,12 +534,6 @@ class SrcBar {
$Tool add separator
}
- $Tool add label addr $address "Address" -relief sunken \
- -bd 1 -anchor e -font src-font
-
- $Tool add label line $line "Line Number" -width 6 -relief sunken \
- -bd 1 -anchor e -font src-font
-
$Tool toolbar_button_right_justify
create_stack_buttons
@@ -1165,23 +1159,6 @@ Do you want to continue?" \
public variable updatevalue 0 {
global GDBSrcBar_state
::set GDBSrcBar_state($this) $updatevalue
- }
-
- # This holds the text that is shown in the address label.
- public variable address {} {
- if {[string length $address] > 10} {
- # 64-bit address plus "0x"
- set width 18
- } else {
- # 32-bit address plus "0x"
- set width 10
- }
- $Tool itemconfigure addr -text $address -font src-font -width $width
- }
-
- # This holds the text that is shown in the line label.
- public variable line {} {
- $Tool itemconfigure line -text $line
}
# This holds the source window's display mode. Valid values are
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Address, line number and download progress.
2001-11-02 8:58 ` Keith Seitz
@ 2001-11-02 9:57 ` Ian Roxborough
0 siblings, 0 replies; 4+ messages in thread
From: Ian Roxborough @ 2001-11-02 9:57 UTC (permalink / raw)
To: Keith Seitz; +Cc: Fernando Nasser, insight
Hi,
I like the GDBStatusBar idea. Also in it's current state the UI
patch will remove some of Martin's 64-bit addresses patch.
I'll see if I can move things out of the source window class and
into a simple no-frills StatusBar class. If I don't get time to
do that I'll just fix the parts that break the 64-bit addresses
(the setting of the label width part) and submit it again.
Either way, I'll try to submit something by next friday.
Ian.
Keith Seitz wrote:
>
> On Fri, 2 Nov 2001, Fernando Nasser wrote:
>
> > I am aware of the risks of accepting the patch without the cleanup. But Ian
> > has done a lot lately and this is sort of his last batch of UI changes, I
> > wouldn't like to leave a bit of it out.
> >
> > Unless Ian thinks he can do this bit more and create the GDBStatusBar
> > class...
> > Can you Ian?
>
> I thought as much, too, which is why I asked. :v)
>
> Ian, if you don't have the time (and I am pretty certain you don't right
> now), please check in your changes.
>
> FWIW, here's your patches against current sources.
> Keith
>
> Index: library/srcwin.itb
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
> retrieving revision 1.17
> diff -u -p -r1.17 srcwin.itb
> --- library/srcwin.itb 2001/10/04 15:01:36 1.17
> +++ library/srcwin.itb 2001/11/02 16:57:12
> @@ -112,17 +112,13 @@ body SrcWin::_build_win {} {
> $_statbar.mode list insert end SRC+ASM
>
> - # Search/download progress frame
> + # Search
> frame $_statbar.frame
> entry $_statbar.frame.search -bd 3 -font src-font -width 10
> bind_plain_key $_statbar.frame.search \
> Return [code $this _search forwards]
> bind_plain_key $_statbar.frame.search \
> Shift-Return [code $this _search backwards]
> - canvas $_statbar.frame.progress -relief sunken -borderwidth 2 \
> - -highlightthickness 0 -takefocus 0 -width 100 -height 0 -confine 1
> - $_statbar.frame.progress create rectangle 0 0 0 \
> - [winfo height $_statbar.frame.progress] -outline blue -fill blue -tags rect
>
> pack $_statbar.frame -side right -pady 4 -padx 10 -fill y -expand 1 -anchor e
> pack $_statbar.mode -side right -padx 10 -pady 4
> @@ -140,8 +136,32 @@ body SrcWin::_build_win {} {
>
> # add status line
> set _status [conAdd status -resizable 0]
> + set _statusframe [frame $_status]
> + set _status $_statusframe.con
> label $_status -relief sunken -bd 3 -font global/status -height 1
> - pack $_status -expand 1 -fill both
> +
> + # add download progress meter
> + canvas $_statusframe.progress -relief sunken -borderwidth 2 \
> + -highlightthickness 0 -takefocus 0 -width 100 -height 0 -confine 1
> + $_statusframe.progress create rectangle 0 0 0 \
> + [winfo height $_statusframe.progress] -outline blue -fill blue -tags rect
> +
> + # add address and line number indicators
> + label $_statusframe.addr -text "" -width 10 -relief sunken \
> + -bd 1 -anchor e -font src-font
> + label $_statusframe.line -text "" -width 6 -relief sunken \
> + -bd 1 -anchor e -font src-font
> +
> + balloon register $_statusframe.addr "Address"
> + balloon register $_statusframe.line "Line number"
> +
> + pack $_statusframe -expand 1 -fill both
> + grid $_status -row 0 -column 1 -sticky news -pady 2 -padx 2
> + grid $_statusframe.addr -row 0 -column 3 -sticky nes -pady 4
> + grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
> + grid columnconfigure $_statusframe 1 -weight 10
> + grid columnconfigure $_statusframe 2 -minsize 5
> + grid columnconfigure $_statusframe 5 -minsize 5
> }
>
> set_execution_status
> @@ -206,8 +226,8 @@ body SrcWin::download_progress { section
>
> #debug "$section $num $tot $msg"
> if {$last_section_start == 0} {
> - pack forget $_statbar.frame.search
> - pack $_statbar.frame.progress -fill both -expand yes
> + grid forget $_statusframe.addr $_statusframe.line
> + grid $_statusframe.progress -row 0 -column 4 -padx 4 -sticky news
> ::update idletasks
> }
>
> @@ -232,7 +252,7 @@ body SrcWin::download_progress { section
> set_status "Downloading section $section - $num bytes"
> }
>
> - set canvas $_statbar.frame.progress
> + set canvas $_statusframe.progress
> set height [winfo height $canvas]
> if {$last_done} {
> set width [winfo width $canvas]
> @@ -259,8 +279,9 @@ body SrcWin::download_progress { section
> set last_done 0
> set last_section_start 0
>
> - pack forget $_statbar.frame.progress
> - pack $_statbar.frame.search -fill x -expand yes
> + grid forget $_statusframe.progress
> + grid $_statusframe.addr -row 0 -column 3 -sticky new -pady 4
> + grid $_statusframe.line -row 0 -column 4 -sticky nws -pady 4
> ::update idletasks
> }
> }
> @@ -458,7 +479,9 @@ body SrcWin::location {tag linespec} {
> }
>
> # set address and line widgets
> - $_toolbar configure -address $addr -line $line
> + $_statusframe.addr configure -text $addr
> + $_statusframe.line configure -text $line
> +
>
> # set function combobox
> $_statbar.func entryset $funcname
> Index: library/srcwin.ith
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.ith,v
> retrieving revision 1.7
> diff -u -p -r1.7 srcwin.ith
> --- library/srcwin.ith 2001/06/04 15:49:53 1.7
> +++ library/srcwin.ith 2001/11/02 16:57:12
> @@ -79,6 +79,7 @@ class SrcWin {
> variable _statbar
> variable _status
> variable _toolbar
> + variable _statusframe
> variable top
> variable twin
> variable current
> Index: library/srcbar.itcl
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.itcl,v
> retrieving revision 1.13
> diff -u -p -r1.13 srcbar.itcl
> --- library/srcbar.itcl 2001/10/29 21:45:30 1.13
> +++ library/srcbar.itcl 2001/11/02 16:57:22
> @@ -534,12 +534,6 @@ class SrcBar {
> $Tool add separator
> }
>
> - $Tool add label addr $address "Address" -relief sunken \
> - -bd 1 -anchor e -font src-font
> -
> - $Tool add label line $line "Line Number" -width 6 -relief sunken \
> - -bd 1 -anchor e -font src-font
> -
> $Tool toolbar_button_right_justify
>
> create_stack_buttons
> @@ -1165,23 +1159,6 @@ Do you want to continue?" \
> public variable updatevalue 0 {
> global GDBSrcBar_state
> ::set GDBSrcBar_state($this) $updatevalue
> - }
> -
> - # This holds the text that is shown in the address label.
> - public variable address {} {
> - if {[string length $address] > 10} {
> - # 64-bit address plus "0x"
> - set width 18
> - } else {
> - # 32-bit address plus "0x"
> - set width 10
> - }
> - $Tool itemconfigure addr -text $address -font src-font -width $width
> - }
> -
> - # This holds the text that is shown in the line label.
> - public variable line {} {
> - $Tool itemconfigure line -text $line
> }
>
> # This holds the source window's display mode. Valid values are
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-02 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3BCB3664.C2CD64A2@redhat.com>
2001-11-02 8:20 ` [RFA] Address, line number and download progress Keith Seitz
2001-11-02 8:52 ` Fernando Nasser
2001-11-02 8:58 ` Keith Seitz
2001-11-02 9:57 ` Ian Roxborough
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).