git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-gui: Call do_quit before destroying the main window

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Aug 6, 2019, 19:04 UTC
Message-ID
<549ad583-5ca1-7096-f4ce-10e8a836f7f9@yadavpratyush.com>
In-Reply-To
<xmqqftmejgr1.fsf@gitster-ct.c.googlers.com>
On 8/6/19 11:52 PM, Junio C Hamano wrote:
Show 12 quoted lines
> Pratyush Yadav <me@yadavpratyush.com> writes:
> 
>> If there are no comments/objections with this patch, can it be merged
>> please?
> 
> It usually works the other way around (no comments by default means
> no interests), but sadly, a larger problem with this area is that
> there currently is nobody who is actively working on maintaining the
> 'git-gui' project, which is a separate project that our tree merely
> pulls from time to time.  So we need to find a volunteer to run that
> project, send the patch in that direction and get it merged, and
> then finally we can pull from them X-<.

I'm not too optimistic on finding someone to run this project. I asked on the list who the maintainer is [0], and no one came up. The repo at [1] also seems abandoned.

So if I fork the project, will you pull from my fork? If yes, what exactly would I have to do? Make a set of changes and then ask on the list for you to pull from my fork?

I am a relatively inexperienced programmer, and it feels like a kinda big responsibility that I'm not sure I am ready for. But maybe you can look at the changes from a high level POV before pulling, so there is someone sanity checking my changes.

[0] https://public-inbox.org/git/35506bd2-aae9-6608-ed4d-a408e0c831b8@yadavpratyush.com/ [1] https://repo.or.cz/w/git-gui.git/

Show 45 quoted lines
> 
>>
>> On 8/4/19 8:09 PM, Pratyush Yadav wrote:
>>> If the toplevel window for the window being destroyed is the main window
>>> (aka "."), then simply destroying it means the cleanup tasks are not
>>> executed like saving the commit message buffer, saving window state,
>>> etc. All this is handled by do_quit so, call it instead of directly
>>> destroying the main window. For other toplevel windows, the old behavior
>>> remains.
>>>
>>> Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
>>> ---
>>>    git-gui/git-gui.sh | 19 +++++++++++++++++--
>>>    1 file changed, 17 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
>>> index 6de74ce639..6ec562d5da 100755
>>> --- a/git-gui/git-gui.sh
>>> +++ b/git-gui/git-gui.sh
>>> @@ -3030,8 +3030,23 @@ unset doc_path doc_url
>>>    wm protocol . WM_DELETE_WINDOW do_quit
>>>    bind all <$M1B-Key-q> do_quit
>>>    bind all <$M1B-Key-Q> do_quit
>>> -bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
>>> -bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
>>> +
>>> +set m1b_w_script {
>>> +	set toplvl_win [winfo toplevel %W]
>>> +
>>> +	# If we are destroying the main window, we should call do_quit to take
>>> +	# care of cleanup before exiting the program.
>>> +	if {$toplvl_win eq "."} {
>>> +		do_quit
>>> +	} else {
>>> +		destroy $toplvl_win
>>> +	}
>>> +}
>>> +
>>> +bind all <$M1B-Key-w> $m1b_w_script
>>> +bind all <$M1B-Key-W> $m1b_w_script
>>> +
>>> +unset m1b_w_script
>>>      set subcommand_args {}
>>>    proc usage {} {
>>>
-- 
Regards,
Pratyush Yadav
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 13 in “git-gui: Call do_quit before destroying the main window”
  1. git-gui: Call do_quit before destroying the main windowPratyush Yadav, Aug 4, 2019
  2. Pratyush YadavAug 6, 2019
  3. Junio C HamanoAug 6, 2019
  4. Pratyush YadavAug 6, 2019
  5. Junio C HamanoAug 7, 2019
  6. Junio C HamanoAug 7, 2019
  7. Junio C HamanoAug 7, 2019
  8. Pratyush YadavAug 7, 2019
  9. Junio C HamanoAug 7, 2019
  10. Pratyush YadavAug 9, 2019
  11. Junio C HamanoAug 9, 2019
  12. Pratyush YadavAug 13, 2019
  13. Junio C HamanoAug 13, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.