git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC with a proof of concept PATCH] Add Bonsai-like query options to gitk
@ 2009-03-09 19:42 newren
  2009-03-23 10:07 ` Paul Mackerras
  0 siblings, 1 reply; 4+ messages in thread
From: newren @ 2009-03-09 19:42 UTC (permalink / raw)
  To: git; +Cc: angavrilov, paulus, Elijah Newren

From: Elijah Newren <newren@gmail.com>

Hi,

(If you like screenshots, I've got some before & after ones up at
http://www.gnome.org/~newren/temp/gitk/gitk-edit-view.html, but
remember that this is just a proof of concept and call for comments.)

I've talked a little bit with the Trilinos project[1] about git.  One
issue that has come up is that they need a replacement for Bonsai (see
http://bonsai.mozilla.org/cvsqueryform.cgi).  When I pointed out git
log and its many option, I was told that they wanted something that
would only be used infrequently by any given individual, and thus they
wanted something that didn't require memorizing or looking up command
line options.  gitk, particularly the View->Edit View menu option,
looks like a step in the right direction.  I'm guessing that with a
tweak or two, it could probably satisfy this use case.  The issues I
see are:
  * many important options (--author, --grep, -S, --pickaxe-regex) are
    still selected in gitk by typing in command line options into the
    appropriate box
  * the format of some fields is not clear; examples: (1) it is not
    clear which date format is acceptable, and (2) it is not clear
    that the "Skip" field takes integers as input.

My below proof of concept patch:
  * Adds options for selecting revisions based on branch/tag names,
    author, committer, commit message, and patch contents (technically
    this was all available before, but only if you were familiar with
    the command line options to git log)
  * Provides hints for input format (for example, lists some sample
    date strings in a few different formats)
  * Puts related query items into subsections, to make it easier to
    digest the sheer number of options that now exist
  * Rearranges the previous dialog options due to the above changes

Potential issues with my patch:
  * Maybe this is the wrong place to put Bonsai-like querying and I
    should look at gitweb or cgit instead (while I personally like
    client-side solutions, maybe others won't?)  Further, this may
    push gitk in a way that others don't like.
  * I'm pretty sure I broke the view remembering feature.  I can work
    on fixing this up if people generally like the idea behind the
    patch.
  * Is this dialog too overwhelming or too large now?
  * My lack of Tcl/Tk skills, and UI design skills.


Elijah

[1] http://trilinos.sandia.gov/  I'm not part of the Trilinos project;
I'm just a co-worker.
---
 gitk-git/gitk |   95 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 69 insertions(+), 26 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1773ae6..79f18b5 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -3631,17 +3631,35 @@ proc newview {ishighlight} {
 }
 
 set known_view_options {
-    {perm    b    . {}               {mc "Remember this view"}}
-    {args    t50= + {}               {mc "Commits to include (arguments to git log):"}}
-    {all     b    * "--all"          {mc "Use all refs"}}
-    {dorder  b    . {"--date-order" "-d"}      {mc "Strictly sort by date"}}
-    {lright  b    . "--left-right"   {mc "Mark branch sides"}}
-    {since   t15  + {"--since=*" "--after=*"}  {mc "Since date:"}}
-    {until   t15  . {"--until=*" "--before=*"} {mc "Until date:"}}
-    {limit   t10  + "--max-count=*"  {mc "Max count:"}}
-    {skip    t10  . "--skip=*"       {mc "Skip:"}}
-    {first   b    . "--first-parent" {mc "Limit to first parent"}}
-    {cmd     t50= + {}               {mc "Command to generate more commits to include:"}}
+    {perm      b    .  {}               {mc "Remember this view"}}
+    {reflabel  l    +  {}               {mc "References (space separated list):"}}
+    {refs      t15  .. {}               {mc "Branches & tags:"}}
+    {allrefs   b    *. "--all"          {mc "All refs"}}
+    {branches  b    .  "--branches"     {mc "All (local) branches"}}
+    {tags      b    .  "--tags"         {mc "All tags"}}
+    {remotes   b    .  "--remotes"      {mc "All remote-tracking branches"}}
+    {commitlbl l    +  {}               {mc "Commit Info (regular expressions):"}}
+    {author    t15  .. "--author=*"     {mc "Author:"}}
+    {committer t15  .  "--committer=*"  {mc "Committer:"}}
+    {loginfo   t15  .. "--grep=*"       {mc "Commit Message:"}}
+    {allmatch  b    .. "--all-match"    {mc "Matches all Commit Info criteria"}}
+    {changes_l l    +  {}               {mc "Changes to Files:"}}
+    {pickaxe_s r0   .  {}               {mc "Fixed String"}}
+    {pickaxe_t r1   .  "--pickaxe-regex"  {mc "Regular Expression"}}
+    {pickaxe   t15  .. "-S*"            {mc "Search string:"}}
+    {datelabel l    +  {}               {mc "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 15:27:38\"):"}}
+    {since     t15  ..  {"--since=*" "--after=*"}  {mc "Since:"}}
+    {until     t15  .   {"--until=*" "--before=*"} {mc "Until:"}}
+    {limit_lbl l    +  {}               {mc "Limit and/or skip a number of revisions (positive integer):"}}
+    {limit     t10  *. "--max-count=*"  {mc "Number to show:"}}
+    {skip      t10  .  "--skip=*"       {mc "Number to skip:"}}
+    {misc_lbl  l    +  {}               {mc "Miscellaneous options:"}}
+    {dorder    b    *. {"--date-order" "-d"}      {mc "Strictly sort by date"}}
+    {lright    b    .  "--left-right"   {mc "Mark branch sides"}}
+    {first     b    .  "--first-parent" {mc "Limit to first parent"}}
+    {args      t50  *. {}               {mc "Additional arguments to git log:"}}
+    {allpaths  path +  {}               {mc "Enter files and directories to include, one per line:"}}
+    {cmd       t50= +  {}               {mc "Command to generate more commits to include:"}}
     }
 
 proc encode_view_opts {n} {
@@ -3659,6 +3677,11 @@ proc encode_view_opts {n} {
 	    if {$val} {
 		lappend rargs $pattern
 	    }
+	} elseif {[regexp {^r(\d+)$} [lindex $opt 1] type value]} {
+            regexp {^(.*_)} [lindex $opt 0] uselessvar button_id
+	    if {$newviewopts($n,$button_id) eq $value} {
+		lappend rargs $pattern
+	    }
 	} else {
 	    set val [string trim $val]
 	    if {$val ne {}} {
@@ -3667,6 +3690,7 @@ proc encode_view_opts {n} {
 	    }
 	}
     }
+    set rargs [concat $rargs [shellsplit $newviewopts($n,refs)]]
     return [concat $rargs [shellsplit $newviewopts($n,args)]]
 }
 
@@ -3757,6 +3781,11 @@ proc vieweditor {top n title} {
     pack $top.name -in $top.nfr -side left
 
     # View options
+    frame $top.ifr
+    label $top.il -text [mc "* Please specify criteria for selecting revisions to view * "]
+    pack $top.il -anchor center
+
+    # View options
     set cframe $top.nfr
     set cexpand 0
     set cnt 0
@@ -3773,14 +3802,29 @@ proc vieweditor {top n title} {
 	    frame $cframe
 	    pack $cframe -in $top -fill x -pady 3 -padx 3
 	    set cexpand [expr {$flags eq "*"}]
+        } elseif {$flags eq ".." || $flags eq "*."} {
+	    set cframe $top.fr$cnt
+	    incr cnt
+	    frame $cframe
+	    pack $cframe -in $top -fill x -pady 3 -padx [list 15 3]
+	    set cexpand [expr {$flags eq "*."}]
 	} else {
 	    set lxpad 5
 	}
 
-	if {$type eq "b"} {
+	if {$type eq "l"} {
+            label $cframe.l_$id -text $title
+            pack $cframe.l_$id -in $cframe -side left -pady [list 3 0] -anchor w
+	} elseif {$type eq "b"} {
 	    checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
 	    pack $cframe.c_$id -in $cframe -side left \
 		-padx [list $lxpad 0] -expand $cexpand -anchor w
+	} elseif {[regexp {^r(\d+)$} $type type sz]} {
+            regexp {^(.*_)} $id uselessvar button_id
+	    set newviewopts($n,$button_id) 0
+	    radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
+	    pack $cframe.c_$id -in $cframe -side left \
+		-padx [list $lxpad 0] -expand $cexpand -anchor w
 	} elseif {[regexp {^t(\d+)$} $type type sz]} {
 	    message $cframe.l_$id -aspect 1500 -text $title
 	    entry $cframe.e_$id -width $sz -background $bgcolor \
@@ -3793,23 +3837,22 @@ proc vieweditor {top n title} {
 		-textvariable newviewopts($n,$id)
 	    pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w
 	    pack $cframe.e_$id -in $cframe -side top -fill x
+	} elseif {$type eq "path"} {
+	    message $top.l -aspect 1500 -text $title
+	    pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
+	    text $top.t -width 40 -height 5 -background $bgcolor -font uifont
+	    if {[info exists viewfiles($n)]} {
+		foreach f $viewfiles($n) {
+		    $top.t insert end $f
+		    $top.t insert end "\n"
+		}
+		$top.t delete {end - 1c} end
+		$top.t mark set insert 0.0
+	    }
+	    pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3
 	}
     }
 
-    # Path list
-    message $top.l -aspect 1500 \
-	-text [mc "Enter files and directories to include, one per line:"]
-    pack $top.l -in $top -side top -pady [list 7 0] -anchor w -padx 3
-    text $top.t -width 40 -height 5 -background $bgcolor -font uifont
-    if {[info exists viewfiles($n)]} {
-	foreach f $viewfiles($n) {
-	    $top.t insert end $f
-	    $top.t insert end "\n"
-	}
-	$top.t delete {end - 1c} end
-	$top.t mark set insert 0.0
-    }
-    pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3
     frame $top.buts
     button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
     button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
-- 
1.6.2.95.g934f7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC with a proof of concept PATCH] Add Bonsai-like query options to gitk
  2009-03-09 19:42 [RFC with a proof of concept PATCH] Add Bonsai-like query options to gitk newren
@ 2009-03-23 10:07 ` Paul Mackerras
       [not found]   ` <51419b2c0903231054g621787b6i8537b8e0d5bf121d@mail.gmail.com>
  2009-03-23 17:57   ` [PATCH] gitk: Make more options easily accessible from Edit View dialog newren
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Mackerras @ 2009-03-23 10:07 UTC (permalink / raw)
  To: newren; +Cc: git, angavrilov

Elijah Newren <newren@gmail.com> writes:

> (If you like screenshots, I've got some before & after ones up at
> http://www.gnome.org/~newren/temp/gitk/gitk-edit-view.html, but
> remember that this is just a proof of concept and call for comments.)

Looks reasonable... have you developed the patch any further?

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC with a proof of concept PATCH] Add Bonsai-like query options  to gitk
       [not found]   ` <51419b2c0903231054g621787b6i8537b8e0d5bf121d@mail.gmail.com>
@ 2009-03-23 17:56     ` Elijah Newren
  0 siblings, 0 replies; 4+ messages in thread
From: Elijah Newren @ 2009-03-23 17:56 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Git Mailing List, Alexander Gavrilov

(Sorry, resending my own email since I accidentally left of the cc's.)

On Mon, Mar 23, 2009 at 4:07 AM, Paul Mackerras <paulus@samba.org> wrote:
> Elijah Newren <newren@gmail.com> writes:
>
>> (If you like screenshots, I've got some before & after ones up at
>> http://www.gnome.org/~newren/temp/gitk/gitk-edit-view.html, but
>> remember that this is just a proof of concept and call for comments.)
>
> Looks reasonable... have you developed the patch any further?

Yes, I have.  There was a cosmetic tweak or two, but the main change
was fixing the view remembering stuff that I noted I broke in the
original patch.  I've also showed this modified dialog in two
different git presentations, to dozens of new and potential users of
git, and it seems to have been well received[1].  I'll send a
follow-up patch shortly (I'd copy it inline, but I'm afraid gmail will
screw it up).

Elijah


[1] For one of the two groups, a lack of a Bonsai replacement actually
derailed their conversion to svn about a year ago.  This group was
very interested in git after my presentation and seemed satisfied with
gitk (with my proposed changes) as a replacement for Bonsai.  There
was one minor question that did come up each time -- one person in
each presentation asked why it is that when you specify --author=smith
(at the command line or via the equivalent box in the gui), you also
see commits authored by e.g. "jones" in gitk; however, once I
mentioned the different colored dots in gitk and the fact that it's
showing the commits that the patches are relative to, there was no
more issue and everyone was happy.  I'm guessing it'd be slightly more
intuitive to them to have gitk filter out these parent commits from
the graph unless they also meet the search criteria, but it's a pretty
minor issue.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] gitk: Make more options easily accessible from Edit View dialog
  2009-03-23 10:07 ` Paul Mackerras
       [not found]   ` <51419b2c0903231054g621787b6i8537b8e0d5bf121d@mail.gmail.com>
@ 2009-03-23 17:57   ` newren
  1 sibling, 0 replies; 4+ messages in thread
From: newren @ 2009-03-23 17:57 UTC (permalink / raw)
  To: paulus; +Cc: git, angavrilov, Elijah Newren

From: Elijah Newren <newren@gmail.com>

Commit 218a900bd8efd0d49f8a0d9491aa4786a998d4f4 added a number of new
individual fields for the Edit View dialog to make them more accessible
to end users, while still allowing all options to be specified in the
"arguments to git log" field.  This patch extends the dialog further,
to include refs, author, committer, commit message, and patch contents.
As before everything still remains accessible from the "arguments to
git log" input field.

Additionally, this provides hints for the format of the various input
fields (for example, listing some sample date strings in different
formats), and puts related query items into subsections to make it
easier to digest the number of options that exist.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 gitk-git/gitk |  131 +++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 94 insertions(+), 37 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 1773ae6..6c08031 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -3631,17 +3631,35 @@ proc newview {ishighlight} {
 }
 
 set known_view_options {
-    {perm    b    . {}               {mc "Remember this view"}}
-    {args    t50= + {}               {mc "Commits to include (arguments to git log):"}}
-    {all     b    * "--all"          {mc "Use all refs"}}
-    {dorder  b    . {"--date-order" "-d"}      {mc "Strictly sort by date"}}
-    {lright  b    . "--left-right"   {mc "Mark branch sides"}}
-    {since   t15  + {"--since=*" "--after=*"}  {mc "Since date:"}}
-    {until   t15  . {"--until=*" "--before=*"} {mc "Until date:"}}
-    {limit   t10  + "--max-count=*"  {mc "Max count:"}}
-    {skip    t10  . "--skip=*"       {mc "Skip:"}}
-    {first   b    . "--first-parent" {mc "Limit to first parent"}}
-    {cmd     t50= + {}               {mc "Command to generate more commits to include:"}}
+    {perm      b    .  {}               {mc "Remember this view"}}
+    {reflabel  l    +  {}               {mc "References (space separated list):"}}
+    {refs      t15  .. {}               {mc "Branches & tags:"}}
+    {allrefs   b    *. "--all"          {mc "All refs"}}
+    {branches  b    .  "--branches"     {mc "All (local) branches"}}
+    {tags      b    .  "--tags"         {mc "All tags"}}
+    {remotes   b    .  "--remotes"      {mc "All remote-tracking branches"}}
+    {commitlbl l    +  {}               {mc "Commit Info (regular expressions):"}}
+    {author    t15  .. "--author=*"     {mc "Author:"}}
+    {committer t15  .  "--committer=*"  {mc "Committer:"}}
+    {loginfo   t15  .. "--grep=*"       {mc "Commit Message:"}}
+    {allmatch  b    .. "--all-match"    {mc "Matches all Commit Info criteria"}}
+    {changes_l l    +  {}               {mc "Changes to Files:"}}
+    {pickaxe_s r0   .  {}               {mc "Fixed String"}}
+    {pickaxe_t r1   .  "--pickaxe-regex"  {mc "Regular Expression"}}
+    {pickaxe   t15  .. "-S*"            {mc "Search string:"}}
+    {datelabel l    +  {}               {mc "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 15:27:38\"):"}}
+    {since     t15  ..  {"--since=*" "--after=*"}  {mc "Since:"}}
+    {until     t15  .   {"--until=*" "--before=*"} {mc "Until:"}}
+    {limit_lbl l    +  {}               {mc "Limit and/or skip a number of revisions (positive integer):"}}
+    {limit     t10  *. "--max-count=*"  {mc "Number to show:"}}
+    {skip      t10  .  "--skip=*"       {mc "Number to skip:"}}
+    {misc_lbl  l    +  {}               {mc "Miscellaneous options:"}}
+    {dorder    b    *. {"--date-order" "-d"}      {mc "Strictly sort by date"}}
+    {lright    b    .  "--left-right"   {mc "Mark branch sides"}}
+    {first     b    .  "--first-parent" {mc "Limit to first parent"}}
+    {args      t50  *. {}               {mc "Additional arguments to git log:"}}
+    {allpaths  path +  {}               {mc "Enter files and directories to include, one per line:"}}
+    {cmd       t50= +  {}               {mc "Command to generate more commits to include:"}}
     }
 
 proc encode_view_opts {n} {
@@ -3653,13 +3671,19 @@ proc encode_view_opts {n} {
 	if {$patterns eq {}} continue
 	set pattern [lindex $patterns 0]
 
-	set val $newviewopts($n,[lindex $opt 0])
-	
 	if {[lindex $opt 1] eq "b"} {
+	    set val $newviewopts($n,[lindex $opt 0])
 	    if {$val} {
 		lappend rargs $pattern
 	    }
+	} elseif {[regexp {^r(\d+)$} [lindex $opt 1] type value]} {
+	    regexp {^(.*_)} [lindex $opt 0] uselessvar button_id
+	    set val $newviewopts($n,$button_id)
+	    if {$val eq $value} {
+		lappend rargs $pattern
+	    }
 	} else {
+	    set val $newviewopts($n,[lindex $opt 0])
 	    set val [string trim $val]
 	    if {$val ne {}} {
 		set pfix [string range $pattern 0 end-1]
@@ -3667,6 +3691,7 @@ proc encode_view_opts {n} {
 	    }
 	}
     }
+    set rargs [concat $rargs [shellsplit $newviewopts($n,refs)]]
     return [concat $rargs [shellsplit $newviewopts($n,args)]]
 }
 
@@ -3674,14 +3699,22 @@ proc decode_view_opts {n view_args} {
     global known_view_options newviewopts
 
     foreach opt $known_view_options {
+	set id [lindex $opt 0]
 	if {[lindex $opt 1] eq "b"} {
+	    # Checkboxes
+	    set val 0
+        } elseif {[regexp {^r(\d+)$} [lindex $opt 1]]} {
+	    # Radiobuttons
+	    regexp {^(.*_)} $id uselessvar id
 	    set val 0
 	} else {
+	    # Text fields
 	    set val {}
 	}
-	set newviewopts($n,[lindex $opt 0]) $val
+	set newviewopts($n,$id) $val
     }
     set oargs [list]
+    set refargs [list]
     foreach arg $view_args {
 	if {[regexp -- {^-([0-9]+)$} $arg arg cnt]
 	    && ![info exists found(limit)]} {
@@ -3695,11 +3728,17 @@ proc decode_view_opts {n view_args} {
 	    if {[info exists found($id)]} continue
 	    foreach pattern [lindex $opt 3] {
 		if {![string match $pattern $arg]} continue
-		if {[lindex $opt 1] ne "b"} {
+		if {[lindex $opt 1] eq "b"} {
+		    # Check buttons
+		    set val 1
+		} elseif {[regexp {^r(\d+)$} [lindex $opt 1] match num]} {
+		    # Radio buttons
+		    regexp {^(.*_)} $id uselessvar id
+		    set val $num
+		} else {
+		    # Text input fields
 		    set size [string length $pattern]
 		    set val [string range $arg [expr {$size-1}] end]
-		} else {
-		    set val 1
 		}
 		set newviewopts($n,$id) $val
 		set found($id) 1
@@ -3708,8 +3747,13 @@ proc decode_view_opts {n view_args} {
 	    if {[info exists val]} break
 	}
 	if {[info exists val]} continue
-	lappend oargs $arg
+	if {[regexp {^-} $arg]} {
+	    lappend oargs $arg
+	} else {
+	    lappend refargs $arg
+	}
     }
+    set newviewopts($n,refs) [shellarglist $refargs]
     set newviewopts($n,args) [shellarglist $oargs]
 }
 
@@ -3745,16 +3789,16 @@ proc vieweditor {top n title} {
     global known_view_options
 
     toplevel $top
-    wm title $top $title
+    wm title $top [concat $title "-- criteria for selecting revisions"]
     make_transient $top .
 
     # View name
     frame $top.nfr
-    label $top.nl -text [mc "Name"]
+    label $top.nl -text [mc "View Name:"]
     entry $top.name -width 20 -textvariable newviewname($n)
     pack $top.nfr -in $top -fill x -pady 5 -padx 3
-    pack $top.nl -in $top.nfr -side left -padx {0 30}
-    pack $top.name -in $top.nfr -side left
+    pack $top.nl -in $top.nfr -side left -padx {0 5}
+    pack $top.name -in $top.nfr -side left -padx {0 25}
 
     # View options
     set cframe $top.nfr
@@ -3773,14 +3817,28 @@ proc vieweditor {top n title} {
 	    frame $cframe
 	    pack $cframe -in $top -fill x -pady 3 -padx 3
 	    set cexpand [expr {$flags eq "*"}]
+        } elseif {$flags eq ".." || $flags eq "*."} {
+	    set cframe $top.fr$cnt
+	    incr cnt
+	    frame $cframe
+	    pack $cframe -in $top -fill x -pady 3 -padx [list 15 3]
+	    set cexpand [expr {$flags eq "*."}]
 	} else {
 	    set lxpad 5
 	}
 
-	if {$type eq "b"} {
+	if {$type eq "l"} {
+            label $cframe.l_$id -text $title
+            pack $cframe.l_$id -in $cframe -side left -pady [list 3 0] -anchor w
+	} elseif {$type eq "b"} {
 	    checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
 	    pack $cframe.c_$id -in $cframe -side left \
 		-padx [list $lxpad 0] -expand $cexpand -anchor w
+	} elseif {[regexp {^r(\d+)$} $type type sz]} {
+	    regexp {^(.*_)} $id uselessvar button_id
+	    radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
+	    pack $cframe.c_$id -in $cframe -side left \
+		-padx [list $lxpad 0] -expand $cexpand -anchor w
 	} elseif {[regexp {^t(\d+)$} $type type sz]} {
 	    message $cframe.l_$id -aspect 1500 -text $title
 	    entry $cframe.e_$id -width $sz -background $bgcolor \
@@ -3793,23 +3851,22 @@ proc vieweditor {top n title} {
 		-textvariable newviewopts($n,$id)
 	    pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w
 	    pack $cframe.e_$id -in $cframe -side top -fill x
+	} elseif {$type eq "path"} {
+	    message $top.l -aspect 1500 -text $title
+	    pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
+	    text $top.t -width 40 -height 5 -background $bgcolor -font uifont
+	    if {[info exists viewfiles($n)]} {
+		foreach f $viewfiles($n) {
+		    $top.t insert end $f
+		    $top.t insert end "\n"
+		}
+		$top.t delete {end - 1c} end
+		$top.t mark set insert 0.0
+	    }
+	    pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3
 	}
     }
 
-    # Path list
-    message $top.l -aspect 1500 \
-	-text [mc "Enter files and directories to include, one per line:"]
-    pack $top.l -in $top -side top -pady [list 7 0] -anchor w -padx 3
-    text $top.t -width 40 -height 5 -background $bgcolor -font uifont
-    if {[info exists viewfiles($n)]} {
-	foreach f $viewfiles($n) {
-	    $top.t insert end $f
-	    $top.t insert end "\n"
-	}
-	$top.t delete {end - 1c} end
-	$top.t mark set insert 0.0
-    }
-    pack $top.t -in $top -side top -pady [list 0 5] -fill both -expand 1 -padx 3
     frame $top.buts
     button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
     button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-23 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 19:42 [RFC with a proof of concept PATCH] Add Bonsai-like query options to gitk newren
2009-03-23 10:07 ` Paul Mackerras
     [not found]   ` <51419b2c0903231054g621787b6i8537b8e0d5bf121d@mail.gmail.com>
2009-03-23 17:56     ` Elijah Newren
2009-03-23 17:57   ` [PATCH] gitk: Make more options easily accessible from Edit View dialog newren

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 NNTP newsgroup(s).