comparison contrib/hgk @ 12634:43f42de733d0

hgk: remember main window position
author Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
date Wed, 06 Oct 2010 23:07:52 +0300
parents 60cefb8b3c85
children d11405848abd
comparison
equal deleted inserted replaced
12633:301d7626e0ff 12634:43f42de733d0
467 global entries sha1entry sha1string sha1but 467 global entries sha1entry sha1string sha1but
468 global maincursor textcursor curtextcursor 468 global maincursor textcursor curtextcursor
469 global rowctxmenu gaudydiff mergemax 469 global rowctxmenu gaudydiff mergemax
470 global hgvdiff bgcolor fgcolor diffremcolor diffaddcolor diffmerge1color 470 global hgvdiff bgcolor fgcolor diffremcolor diffaddcolor diffmerge1color
471 global diffmerge2color hunksepcolor 471 global diffmerge2color hunksepcolor
472 472 global posx posy
473
474 if {[info exists posx]} {
475 wm geometry . +$posx+$posy
476 }
477
473 menu .bar 478 menu .bar
474 .bar add cascade -label "File" -menu .bar.file 479 .bar add cascade -label "File" -menu .bar.file
475 menu .bar.file 480 menu .bar.file
476 .bar.file add command -label "Reread references" -command rereadrefs 481 .bar.file add command -label "Reread references" -command rereadrefs
477 .bar.file add command -label "Quit" -command doquit 482 .bar.file add command -label "Quit" -command doquit
739 / [font measure $textfont "0"]}] 744 / [font measure $textfont "0"]}]
740 puts $f "set geometry(ctextw) $wid" 745 puts $f "set geometry(ctextw) $wid"
741 set wid [expr {([winfo width $cflist] - 11) \ 746 set wid [expr {([winfo width $cflist] - 11) \
742 / [font measure [$cflist cget -font] "0"]}] 747 / [font measure [$cflist cget -font] "0"]}]
743 puts $f "set geometry(cflistw) $wid" 748 puts $f "set geometry(cflistw) $wid"
749 puts $f "#"
750 puts $f "# main window position:"
751 puts $f "set posx [winfo x .]"
752 puts $f "set posy [winfo y .]"
744 puts $f "#" 753 puts $f "#"
745 puts $f "# authorcolors format:" 754 puts $f "# authorcolors format:"
746 puts $f "#" 755 puts $f "#"
747 puts $f "# zero or more sublists of" 756 puts $f "# zero or more sublists of"
748 puts $f "#" 757 puts $f "#"