{"thread":{"id":"6824","subject":"\"freezing\" gitk geometry","startedAt":"2007-02-14T17:23:51Z","lastAt":"2007-02-14T17:53:26Z","messageCount":2,"participants":["David Tweed","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"34577","messageId":"e1dab3980702140923m1e4e430ci28f8ed246c5fe786@mail.gmail.com","threadId":"6824","inReplyTo":null,"subject":"\"freezing\" gitk geometry","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2007-02-14T17:23:51Z","receivedAt":"2007-02-14T17:23:51Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"Hi,\n\nnow I've installed 1.5.0, I've discovered gitk is still the\nvisualisation tool for graphically browsing history. I think gitk is a\ngood program, but one thing I'd like to be able to change is to have a\nway to force gitk not to update its saved internal geometry (position\nof internal dividers, etc) when it exits. I tried making ~/.gitk not\nwritable but that didn't work. I don't know tcl: is there a simple way\nto prevent gitk updating this upon quitting?\n\n(Why do I want this? A tiling window manager often changes the size of\nclients automatically to fit things onto the screen as new windows\nappear. Sometimes this results in windows being made quite small. If I\nquit gitk without expanding it up to full size \"just to get the\ngeometry right\" it stores a crushed geometry which gets restored when\nit's restarted regardless of the actual window space currently\navailable.)\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\nDetails are all that matters; God dwells there, and you never get to\nsee Him if you don't struggle to get them right. -- Stephen Jay Gould\n"},{"id":"34587","messageId":"7vsld8pqw9.fsf@assigned-by-dhcp.cox.net","threadId":"6824","inReplyTo":"e1dab3980702140923m1e4e430ci28f8ed246c5fe786@mail.gmail.com","subject":"Re: \"freezing\" gitk geometry","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-14T17:53:26Z","receivedAt":"2007-02-14T17:53:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"David Tweed\" <david.tweed@gmail.com> writes:\n\n> now I've installed 1.5.0, I've discovered gitk is still the\n> visualisation tool for graphically browsing history. I think gitk is a\n> good program, but one thing I'd like to be able to change is to have a\n> way to force gitk not to update its saved internal geometry (position\n> of internal dividers, etc) when it exits. I tried making ~/.gitk not\n> writable but that didn't work. I don't know tcl: is there a simple way\n> to prevent gitk updating this upon quitting?\n\nI do not talk Tcl, but I think you can apply this patch and then\nif you add\n\n\tset dontsave 1\n\nat the end of ~/.gitk with your editor, it would stop updating\nyour geometry (or anything else for that matter).\n\ndiff --git a/gitk b/gitk\nindex 9ddff3e..cd0d68d 100755\n--- a/gitk\n+++ b/gitk\n@@ -813,9 +813,10 @@ proc savestuff {w} {\n     global maxwidth showneartags\n     global viewname viewfiles viewargs viewperm nextviewnum\n     global cmitmode wrapcomment\n-    global colors bgcolor fgcolor diffcolors\n+    global colors bgcolor fgcolor diffcolors dontsave\n \n     if {$stuffsaved} return\n+    if {$dontsave} return\n     if {![winfo viewable .]} return\n     catch {\n \tset f [open \"~/.gitk-new\" w]\n@@ -6251,6 +6252,7 @@ set bgcolor white\n set fgcolor black\n set diffcolors {red \"#00a000\" blue}\n \n+set dontsave 0\n catch {source ~/.gitk}\n \n font create optionfont -family sans-serif -size -12\n"}]}