From: Jonathan Nieder <jrnieder@gmail.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Steve Cotton <steve0001@s.cotton.clara.co.uk>,
Alexander Gavrilov <angavrilov@gmail.com>,
git@vger.kernel.org
Subject: [PATCH 2/2] gitk: Stop clobbering "Remember This View" setting
Date: Sat, 6 Mar 2010 16:58:42 -0600 [thread overview]
Message-ID: <20100306225842.GC7064@progeny.tock> (raw)
In-Reply-To: <20100306224605.GA7064@progeny.tock>
In the View → Edit View... dialog, the "Remember this view" option
always starts out unset. Using the dialog to change an existing view
and ignoring the parts of the dialog that aren’t relevant results in
both the old and new versions of the view being lost.
The cause: right after newviewopts($curview,perm) is set to an
appropriate value, decode_view_opts is clobbering it with the default
value. If that call is moved a little earlier, the "Remember this
view" option gets properly set to its previous value, fixing the
problem.
Reported-by: Steve Cotton <steve0001@s.cotton.clara.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
gitk | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index 7f498b5..c3ef275 100755
--- a/gitk
+++ b/gitk
@@ -3805,10 +3805,10 @@ proc newview {ishighlight} {
raise $top
return
}
+ decode_view_opts $nextviewnum $revtreeargs
set newviewname($nextviewnum) "[mc "View"] $nextviewnum"
set newviewopts($nextviewnum,perm) 0
set newviewopts($nextviewnum,cmd) $viewargscmd($curview)
- decode_view_opts $nextviewnum $revtreeargs
vieweditor $top $nextviewnum [mc "Gitk view definition"]
}
@@ -3962,10 +3962,10 @@ proc editview {} {
raise $top
return
}
+ decode_view_opts $curview $viewargs($curview)
set newviewname($curview) $viewname($curview)
set newviewopts($curview,perm) $viewperm($curview)
set newviewopts($curview,cmd) $viewargscmd($curview)
- decode_view_opts $curview $viewargs($curview)
vieweditor $top $curview "[mc "Gitk: edit view"] $viewname($curview)"
}
--
1.7.0
prev parent reply other threads:[~2010-03-06 22:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 22:46 [PATCH gitk 0/2] stop clobbering "Remember This View" setting Jonathan Nieder
2010-03-06 22:48 ` [PATCH 1/2] gitk: Add comments to explain encode_view_opts and decode_view_opts Jonathan Nieder
2010-03-06 22:58 ` Jonathan Nieder [this message]
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=20100306225842.GC7064@progeny.tock \
--to=jrnieder@gmail.com \
--cc=angavrilov@gmail.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=steve0001@s.cotton.clara.co.uk \
/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 NNTP newsgroup(s).