comparison contrib/hgk @ 18806:932f5d3587c9

hgk: in popups, replace labels with window titles Replace labels with window titles. That also requires to change grid placement manager settings to compensate padding which used to be applied to now non-existent labels.
author Andrew Shadura <bugzilla@tut.by>
date Sun, 10 Mar 2013 16:42:23 +0100
parents 6a0578d07024
children 962844e8dd8e
comparison
equal deleted inserted replaced
18805:6a0578d07024 18806:932f5d3587c9
3740 set newhead [lindex $commitinfo($newid) 0] 3740 set newhead [lindex $commitinfo($newid) 0]
3741 set top .patch 3741 set top .patch
3742 set patchtop $top 3742 set patchtop $top
3743 catch {destroy $top} 3743 catch {destroy $top}
3744 toplevel $top 3744 toplevel $top
3745 ttk::label $top.title -text "Generate patch"
3746 grid $top.title - -pady 10
3747 ttk::label $top.from -text "From:" 3745 ttk::label $top.from -text "From:"
3748 ttk::entry $top.fromsha1 -width 40 3746 ttk::entry $top.fromsha1 -width 40
3749 $top.fromsha1 insert 0 $oldid 3747 $top.fromsha1 insert 0 $oldid
3750 $top.fromsha1 conf -state readonly 3748 $top.fromsha1 conf -state readonly
3751 grid $top.from $top.fromsha1 -sticky w 3749 grid $top.from $top.fromsha1 -sticky w -pady {10 0}
3752 ttk::entry $top.fromhead -width 60 3750 ttk::entry $top.fromhead -width 60
3753 $top.fromhead insert 0 $oldhead 3751 $top.fromhead insert 0 $oldhead
3754 $top.fromhead conf -state readonly 3752 $top.fromhead conf -state readonly
3755 grid x $top.fromhead -sticky w 3753 grid x $top.fromhead -sticky w
3756 ttk::label $top.to -text "To:" 3754 ttk::label $top.to -text "To:"
3776 grid columnconfigure $top.buts 0 -weight 1 -uniform a 3774 grid columnconfigure $top.buts 0 -weight 1 -uniform a
3777 grid columnconfigure $top.buts 1 -weight 1 -uniform a 3775 grid columnconfigure $top.buts 1 -weight 1 -uniform a
3778 grid $top.buts - -pady 10 -sticky ew 3776 grid $top.buts - -pady 10 -sticky ew
3779 focus $top.fname 3777 focus $top.fname
3780 popupify $top 3778 popupify $top
3779 wm title $top "Generate a patch"
3781 } 3780 }
3782 3781
3783 proc mkpatchrev {} { 3782 proc mkpatchrev {} {
3784 global patchtop 3783 global patchtop
3785 3784
3821 3820
3822 set top .maketag 3821 set top .maketag
3823 set mktagtop $top 3822 set mktagtop $top
3824 catch {destroy $top} 3823 catch {destroy $top}
3825 toplevel $top 3824 toplevel $top
3826 ttk::label $top.title -text "Create tag"
3827 grid $top.title - -pady 10
3828 ttk::label $top.id -text "ID:" 3825 ttk::label $top.id -text "ID:"
3829 ttk::entry $top.sha1 -width 40 3826 ttk::entry $top.sha1 -width 40
3830 $top.sha1 insert 0 $rowmenuid 3827 $top.sha1 insert 0 $rowmenuid
3831 $top.sha1 conf -state readonly 3828 $top.sha1 conf -state readonly
3832 grid $top.id $top.sha1 -sticky w 3829 grid $top.id $top.sha1 -sticky w -pady {10 0}
3833 ttk::entry $top.head -width 60 3830 ttk::entry $top.head -width 60
3834 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] 3831 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
3835 $top.head conf -state readonly 3832 $top.head conf -state readonly
3836 grid x $top.head -sticky w 3833 grid x $top.head -sticky w
3837 ttk::label $top.tlab -text "Tag name:" 3834 ttk::label $top.tlab -text "Tag name:"
3844 grid columnconfigure $top.buts 0 -weight 1 -uniform a 3841 grid columnconfigure $top.buts 0 -weight 1 -uniform a
3845 grid columnconfigure $top.buts 1 -weight 1 -uniform a 3842 grid columnconfigure $top.buts 1 -weight 1 -uniform a
3846 grid $top.buts - -pady 10 -sticky ew 3843 grid $top.buts - -pady 10 -sticky ew
3847 focus $top.tag 3844 focus $top.tag
3848 popupify $top 3845 popupify $top
3846 wm title $top "Create a tag"
3849 } 3847 }
3850 3848
3851 proc domktag {} { 3849 proc domktag {} {
3852 global mktagtop env tagids idtags 3850 global mktagtop env tagids idtags
3853 3851
3902 3900
3903 set top .writecommit 3901 set top .writecommit
3904 set wrcomtop $top 3902 set wrcomtop $top
3905 catch {destroy $top} 3903 catch {destroy $top}
3906 toplevel $top 3904 toplevel $top
3907 ttk::label $top.title -text "Write commit to file"
3908 grid $top.title - -pady 10
3909 ttk::label $top.id -text "ID:" 3905 ttk::label $top.id -text "ID:"
3910 ttk::entry $top.sha1 -width 40 3906 ttk::entry $top.sha1 -width 40
3911 $top.sha1 insert 0 $rowmenuid 3907 $top.sha1 insert 0 $rowmenuid
3912 $top.sha1 conf -state readonly 3908 $top.sha1 conf -state readonly
3913 grid $top.id $top.sha1 -sticky w 3909 grid $top.id $top.sha1 -sticky w -pady {10 0}
3914 ttk::entry $top.head -width 60 3910 ttk::entry $top.head -width 60
3915 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] 3911 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
3916 $top.head conf -state readonly 3912 $top.head conf -state readonly
3917 grid x $top.head -sticky w 3913 grid x $top.head -sticky w
3918 ttk::label $top.clab -text "Command:" 3914 ttk::label $top.clab -text "Command:"
3929 grid columnconfigure $top.buts 0 -weight 1 -uniform a 3925 grid columnconfigure $top.buts 0 -weight 1 -uniform a
3930 grid columnconfigure $top.buts 1 -weight 1 -uniform a 3926 grid columnconfigure $top.buts 1 -weight 1 -uniform a
3931 grid $top.buts - -pady 10 -sticky ew 3927 grid $top.buts - -pady 10 -sticky ew
3932 focus $top.fname 3928 focus $top.fname
3933 popupify $top 3929 popupify $top
3930 wm title $top "Write commit to a file"
3934 } 3931 }
3935 3932
3936 proc wrcomgo {} { 3933 proc wrcomgo {} {
3937 global wrcomtop 3934 global wrcomtop
3938 3935