Новые иконки
This commit is contained in:
parent
8cacfc30d4
commit
517a724780
68
lib/git.tcl
68
lib/git.tcl
|
@ -64,6 +64,9 @@ namespace eval Git {
|
||||||
list {
|
list {
|
||||||
lappend cmd "-l"
|
lappend cmd "-l"
|
||||||
}
|
}
|
||||||
|
new {
|
||||||
|
lappend cmd "-c"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch $cmd pipe
|
catch $cmd pipe
|
||||||
if [regexp -nocase -- {^fatal:} $pipe match] {
|
if [regexp -nocase -- {^fatal:} $pipe match] {
|
||||||
|
@ -296,6 +299,8 @@ namespace eval Git {
|
||||||
proc DialogUpdate {w} {
|
proc DialogUpdate {w} {
|
||||||
global activeProject
|
global activeProject
|
||||||
# Git repo status
|
# Git repo status
|
||||||
|
set lblText "$activeProject | [::msgcat::mc "Branch"]: [Git::Branches current]"
|
||||||
|
ttk::label $w.header.lblGit -text $lblText -justify right
|
||||||
$w.body.t delete 1.0 end
|
$w.body.t delete 1.0 end
|
||||||
$w.body.tCommit delete 1.0 end
|
$w.body.tCommit delete 1.0 end
|
||||||
$w.body.lCommit delete 0 end
|
$w.body.lCommit delete 0 end
|
||||||
|
@ -388,6 +393,62 @@ namespace eval Git {
|
||||||
#set frm_btn [frame .add.frm_btn -border 0]
|
#set frm_btn [frame .add.frm_btn -border 0]
|
||||||
.auth_win.frm_btn.btn_ok configure -command "Git::GetAuthData $url"
|
.auth_win.frm_btn.btn_ok configure -command "Git::GetAuthData $url"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc BranchDialog {x y} {
|
||||||
|
global editors lexers
|
||||||
|
variable win
|
||||||
|
# set txt $w.frmText.t
|
||||||
|
set win .branch
|
||||||
|
# set x [winfo rootx .frmWork]
|
||||||
|
# set y [winfo rooty .frmWork]
|
||||||
|
|
||||||
|
if { [winfo exists $win] } { destroy $win }
|
||||||
|
toplevel $win
|
||||||
|
wm transient $win .
|
||||||
|
wm overrideredirect $win 1
|
||||||
|
ttk::button $win.bAdd -image new_14x14 -command "Git::Branch new" \
|
||||||
|
-compound left -text "[::msgcat::mc "Add new branch"]"
|
||||||
|
listbox $win.lBox -width 30 -border 2 -yscrollcommand "$win.yscroll set" -border 1
|
||||||
|
ttk::scrollbar $win.yscroll -orient vertical -command "$win.lBox yview"
|
||||||
|
# pack $win.lBox -expand true -fill y -side left
|
||||||
|
# pack $win.yscroll -side left -expand false -fill y
|
||||||
|
grid $win.bAdd -column 0 -row 0 -columnspan 2 -sticky new
|
||||||
|
grid $win.lBox -column 0 -row 1
|
||||||
|
grid $win.yscroll -column 1 -row 1
|
||||||
|
|
||||||
|
set lst [Git::Branches all]
|
||||||
|
foreach { word } $lst {
|
||||||
|
$win.lBox insert end $word
|
||||||
|
}
|
||||||
|
|
||||||
|
focus -force $win.lBox
|
||||||
|
catch { $win.lBox activate 0 ; $win.lBox selection set 0 0 }
|
||||||
|
|
||||||
|
if { [set height [llength $lst]] > 10 } { set height 10 }
|
||||||
|
$win.lBox configure -height $height
|
||||||
|
|
||||||
|
bind $win <Escape> {
|
||||||
|
destroy .branch
|
||||||
|
break
|
||||||
|
}
|
||||||
|
bind $win.lBox <Escape> {
|
||||||
|
destroy .branch
|
||||||
|
break
|
||||||
|
}
|
||||||
|
bind $win.lBox <Return> {
|
||||||
|
}
|
||||||
|
bind $win.lBox <Any-Key> {}
|
||||||
|
# Определям расстояние до края экрана (основного окна) и если
|
||||||
|
# оно меньше размера окна со списком то сдвигаем его вверх
|
||||||
|
set winGeom [winfo reqheight $win]
|
||||||
|
set topHeight [winfo height .]
|
||||||
|
# puts "$x, $y, $winGeom, $topHeight"
|
||||||
|
if [expr [expr $topHeight - $y] < $winGeom] {
|
||||||
|
set y [expr $topHeight - $winGeom]
|
||||||
|
}
|
||||||
|
wm geom $win +$x+$y
|
||||||
|
}
|
||||||
|
|
||||||
proc Dialog {} {
|
proc Dialog {} {
|
||||||
global cfgVariables activeProject nbEditor
|
global cfgVariables activeProject nbEditor
|
||||||
variable fr
|
variable fr
|
||||||
|
@ -400,10 +461,9 @@ namespace eval Git {
|
||||||
}
|
}
|
||||||
set fr [NB::InsertItem $nbEditor git_browse "git"]
|
set fr [NB::InsertItem $nbEditor git_browse "git"]
|
||||||
ttk::frame $fr.header
|
ttk::frame $fr.header
|
||||||
set lblName "lblGit"
|
|
||||||
set lblText "$activeProject | [::msgcat::mc "Branch"]: [Git::Branches current]"
|
set lblText "$activeProject | [::msgcat::mc "Branch"]: [Git::Branches current]"
|
||||||
ttk::label $fr.header.$lblName -text $lblText -justify right
|
ttk::label $fr.header.lblGit -text $lblText -justify right
|
||||||
pack $fr.header.$lblName -side right -expand true -fill x
|
pack $fr.header.lblGit -side right -expand true -fill x
|
||||||
pack $fr.header -side top -fill x -padx 3
|
pack $fr.header -side top -fill x -padx 3
|
||||||
|
|
||||||
ttk::frame $fr.body
|
ttk::frame $fr.body
|
||||||
|
@ -479,7 +539,6 @@ namespace eval Git {
|
||||||
grid $fr.body.vLog -column 5 -row 8 -sticky nsw
|
grid $fr.body.vLog -column 5 -row 8 -sticky nsw
|
||||||
grid $fr.body.hLog -column 0 -row 9 -sticky new -columnspan 5
|
grid $fr.body.hLog -column 0 -row 9 -sticky new -columnspan 5
|
||||||
|
|
||||||
|
|
||||||
grid rowconfigure $fr.body $fr.body.t -weight 1
|
grid rowconfigure $fr.body $fr.body.t -weight 1
|
||||||
grid columnconfigure $fr.body $fr.body.t -weight 1
|
grid columnconfigure $fr.body $fr.body.t -weight 1
|
||||||
grid rowconfigure $fr.body $fr.body.tCommit -weight 1
|
grid rowconfigure $fr.body $fr.body.tCommit -weight 1
|
||||||
|
@ -504,6 +563,7 @@ namespace eval Git {
|
||||||
|
|
||||||
catch { $fr.body.lBox activate 0 ; $fr.body.lBox selection set 0 0 }
|
catch { $fr.body.lBox activate 0 ; $fr.body.lBox selection set 0 0 }
|
||||||
|
|
||||||
|
bind $fr.header.lblGit <Button-1><ButtonRelease-1> {catch [Git::BranchDialog %X %Y]}
|
||||||
bind $fr.body.lBox <Return> "Git::CommitAdd $fr"
|
bind $fr.body.lBox <Return> "Git::CommitAdd $fr"
|
||||||
bind $fr.body.lBox <Double-Button-1> "catch {Git::CommitAdd $fr}"
|
bind $fr.body.lBox <Double-Button-1> "catch {Git::CommitAdd $fr}"
|
||||||
bind $fr.body.lBox <Button-1><ButtonRelease-1> "Git::ListBoxPress $fr"
|
bind $fr.body.lBox <Button-1><ButtonRelease-1> "Git::ListBoxPress $fr"
|
||||||
|
|
|
@ -81,6 +81,8 @@ pack .frmStatus -side top -padx 1 -fill x
|
||||||
#pack [label .frmMenu.lbl -text "ddd"]
|
#pack [label .frmMenu.lbl -text "ddd"]
|
||||||
pack [ttk::label .frmStatus.lblGitLogo -justify left] -side left
|
pack [ttk::label .frmStatus.lblGitLogo -justify left] -side left
|
||||||
pack [ttk::label .frmStatus.lblGit] -side left
|
pack [ttk::label .frmStatus.lblGit] -side left
|
||||||
|
bind .frmStatus.lblGit <Button-1><ButtonRelease-1> {catch [Git::BranchDialog %X %Y]}
|
||||||
|
|
||||||
pack [ttk::label .frmStatus.lblPosition -justify right] -side right
|
pack [ttk::label .frmStatus.lblPosition -justify right] -side right
|
||||||
|
|
||||||
ttk::menubutton .frmMenu.mnuFile -text [::msgcat::mc "File"] -menu .frmMenu.mnuFile.m
|
ttk::menubutton .frmMenu.mnuFile -text [::msgcat::mc "File"] -menu .frmMenu.mnuFile.m
|
||||||
|
|
|
@ -1228,3 +1228,19 @@ image create photo key_64x64 -data {
|
||||||
lv5nqmvzpLrc9PcBCBHHCsaqDxeqWR9WcBn170nIHpyxHHs1pQbZhZFTqW4gCfsXgiSRx0hxjm0w
|
lv5nqmvzpLrc9PcBCBHHCsaqDxeqWR9WcBn170nIHpyxHHs1pQbZhZFTqW4gCfsXgiSRx0hxjm0w
|
||||||
dh5PQV++Po08melyFTqZXF95R/4NG2ENnSFASIsAAAAASUVORK5CYII=
|
dh5PQV++Po08melyFTqZXF95R/4NG2ENnSFASIsAAAAASUVORK5CYII=
|
||||||
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K61gD7/OmaZqbYRhOgU+gB7aZdsyNKe9KRBSwKWm7YyxO1ab1t58jIo8hhKtiHQWcAwfAKzDm
|
||||||
|
xBfyfGViwB4MCgAAAABJRU5ErkJggg==
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
::msgcat::mcset ru "Add as new project" "Добавить как Новый Проект"
|
::msgcat::mcset ru "Add as new project" "Добавить как Новый Проект"
|
||||||
::msgcat::mcset ru "Add to existing project" "Добавить в существующий проект"
|
::msgcat::mcset ru "Add to existing project" "Добавить в существующий проект"
|
||||||
::msgcat::mcset ru "Add to project" "Добавить в проект"
|
::msgcat::mcset ru "Add to project" "Добавить в проект"
|
||||||
|
::msgcat::mcset ru "Add new branch" "Создать новую ветку"
|
||||||
::msgcat::mcset ru "Archive created in" "Архив помещен в"
|
::msgcat::mcset ru "Archive created in" "Архив помещен в"
|
||||||
::msgcat::mcset ru "Archive directory" "Каталог c архивами"
|
::msgcat::mcset ru "Archive directory" "Каталог c архивами"
|
||||||
::msgcat::mcset ru "Archive file mask" "Маска архива"
|
::msgcat::mcset ru "Archive file mask" "Маска архива"
|
||||||
|
|
|
@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
|
||||||
######################################################
|
######################################################
|
||||||
# Version: 2.0.0
|
# Version: 2.0.0
|
||||||
# Release: alpha
|
# Release: alpha
|
||||||
# Build: 20102022105211
|
# Build: 21102022114408
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
# определим текущую версию, релиз и т.д.
|
# определим текущую версию, релиз и т.д.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user