{"thread":{"id":"21995","subject":"[PATCH] git-gui: use themed tk widgets with Tk 8.5","startedAt":"2009-12-20T00:46:56Z","lastAt":"2009-12-20T21:05:58Z","messageCount":6,"participants":["Pat Thoyts","Johannes Schindelin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"130174","messageId":"87my1ev4gi.fsf@users.sourceforge.net","threadId":"21995","inReplyTo":null,"subject":"[PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2009-12-20T00:46:56Z","receivedAt":"2009-12-20T00:46:56Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":" This patch enables the use of themed Tk widgets with Tk 8.5 and above.\n These make a significant difference on Windows in making the application\n appear native. The gui.usettk git config variable may be set to disable\n this if the user prefers the classic Tk look.\n On Windows and MacOSX ttk defaults to the native look as much as possible.\n On X11 the user may select a theme using the TkTheme XRDB resource class.\n Some support is included for Tk 8.6 features (themed spinbox and native\n font chooser for MacOSX and Windows).\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n\nThere is a screenshot of this running on Windows 7 at\nhttp://www.patthoyts.tk/screenshots/git-gui-win32.png\nIt has been tested on Linux but not on MacOSX yet.\n\n---\n git-gui.sh                   |  158 +++++++++++++++++++++++++++---------------\n lib/about.tcl                |   53 +++++++-------\n lib/blame.tcl                |   22 +++---\n lib/branch_checkout.tcl      |   20 +++--\n lib/branch_create.tcl        |   45 ++++++------\n lib/branch_delete.tcl        |   24 +++---\n lib/branch_rename.tcl        |   32 +++++----\n lib/browser.tcl              |   41 ++++++-----\n lib/choose_font.tcl          |   31 +++++----\n lib/choose_repository.tcl    |   94 ++++++++++++-------------\n lib/choose_rev.tcl           |   51 ++++++++------\n lib/class.tcl                |    7 ++\n lib/console.tcl              |   17 +++--\n lib/database.tcl             |   20 +++---\n lib/error.tcl                |   15 +++--\n lib/index.tcl                |   13 ++--\n lib/merge.tcl                |   14 ++--\n lib/option.tcl               |   67 ++++++++++--------\n lib/remote_add.tcl           |   37 +++++-----\n lib/remote_branch_delete.tcl |   51 +++++++-------\n lib/search.tcl               |   11 ++--\n lib/sshkey.tcl               |   20 +++---\n lib/status_bar.tcl           |   14 ++--\n lib/themed.tcl               |  156 +++++++++++++++++++++++++++++++++++++++++\n lib/tools_dlg.tcl            |   87 +++++++++++-------------\n lib/transport.tcl            |   48 +++++++------\n 26 files changed, 695 insertions(+), 453 deletions(-)\n create mode 100644 lib/themed.tcl\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 718277a..0e21a0a 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -649,12 +649,17 @@ if {[is_Windows]} {\n ## config defaults\n \n set cursor_ptr arrow\n-font create font_diff -family Courier -size 10\n font create font_ui\n-catch {\n-\tlabel .dummy\n-\teval font configure font_ui [font actual [.dummy cget -font]]\n-\tdestroy .dummy\n+if {[lsearch -exact [font names] TkDefaultFont] != -1} {\n+\teval [linsert [font actual TkDefaultFont] 0 font configure font_ui]\n+\teval [linsert [font actual TkFixedFont] 0 font create font_diff]\n+} else {\n+\tfont create font_diff -family Courier -size 10\n+\tcatch {\n+\t\tlabel .dummy\n+\t\teval font configure font_ui [font actual [.dummy cget -font]]\n+\t\tdestroy .dummy\n+\t}\n }\n \n font create font_uiitalic\n@@ -669,6 +674,9 @@ foreach class {Button Checkbutton Entry Label\n }\n if {![is_MacOSX]} {\n \toption add *Menu.font font_ui\n+\toption add *Entry.borderWidth 1 startupFile\n+\toption add *Entry.relief sunken startupFile\n+\toption add *RadioButton.anchor w startupFile\n }\n unset class\n \n@@ -721,6 +729,18 @@ proc apply_config {} {\n \t\tfont configure ${font}bold -weight bold\n \t\tfont configure ${font}italic -slant italic\n \t}\n+\n+\tglobal use_ttk NS\n+\tset use_ttk 0\n+\tset NS {}\n+\tif {$repo_config(gui.usettk)} {\n+\t\tset use_ttk [package vsatisfies [package provide Tk] 8.5]\n+\t\tif {$use_ttk} {\n+\t\t\tset NS ttk\n+\t\t\tbind [winfo class .] <<ThemeChanged>> [list InitTheme]\n+\t\t\tpave_toplevel .\n+\t\t}\n+\t}\n }\n \n set default_config(branch.autosetupmerge) true\n@@ -747,6 +767,7 @@ set default_config(gui.fontui) [font configure font_ui]\n set default_config(gui.fontdiff) [font configure font_diff]\n # TODO: this option should be added to the git-config documentation\n set default_config(gui.maxfilesdisplayed) 5000\n+set default_config(gui.usettk) 1\n set font_descs {\n \t{fontui   font_ui   {mc \"Main Font\"}}\n \t{fontdiff font_diff {mc \"Diff/Console Font\"}}\n@@ -1983,7 +2004,7 @@ proc do_quit {{rc {1}}} {\n \tglobal ui_comm is_quitting repo_config commit_type\n \tglobal GITGUI_BCK_exists GITGUI_BCK_i\n \tglobal ui_comm_spell\n-\tglobal ret_code\n+\tglobal ret_code use_ttk\n \n \tif {$is_quitting} return\n \tset is_quitting 1\n@@ -2041,8 +2062,13 @@ proc do_quit {{rc {1}}} {\n \t\t}\n \t\tset cfg_geometry [list]\n \t\tlappend cfg_geometry [wm geometry .]\n-\t\tlappend cfg_geometry [lindex [.vpane sash coord 0] 0]\n-\t\tlappend cfg_geometry [lindex [.vpane.files sash coord 0] 1]\n+\t\tif {$use_ttk} {\n+\t\t\tlappend cfg_geometry [.vpane sashpos 0]\n+\t\t\tlappend cfg_geometry [.vpane.files sashpos 0]\n+\t\t} else {\n+\t\t\tlappend cfg_geometry [lindex [.vpane sash coord 0] 0]\n+\t\t\tlappend cfg_geometry [lindex [.vpane.files sash coord 0] 1]\n+\t\t}\n \t\tif {[catch {set rc_geometry $repo_config(gui.geometry)}]} {\n \t\t\tset rc_geometry {}\n \t\t}\n@@ -2807,14 +2833,13 @@ default {\n \n # -- Branch Control\n #\n-frame .branch \\\n-\t-borderwidth 1 \\\n-\t-relief sunken\n-label .branch.l1 \\\n+${NS}::frame .branch\n+if {!$use_ttk} {.branch configure -borderwidth 1 -relief sunken}\n+${NS}::label .branch.l1 \\\n \t-text [mc \"Current Branch:\"] \\\n \t-anchor w \\\n \t-justify left\n-label .branch.cb \\\n+${NS}::label .branch.cb \\\n \t-textvariable current_branch \\\n \t-anchor w \\\n \t-justify left\n@@ -2824,15 +2849,20 @@ pack .branch -side top -fill x\n \n # -- Main Window Layout\n #\n-panedwindow .vpane -orient horizontal\n-panedwindow .vpane.files -orient vertical\n-.vpane add .vpane.files -sticky nsew -height 100 -width 200\n+${NS}::panedwindow .vpane -orient horizontal\n+${NS}::panedwindow .vpane.files -orient vertical\n+if {$use_ttk} {\n+\t.vpane add .vpane.files\n+} else {\n+\t.vpane add .vpane.files -sticky nsew -height 100 -width 200\n+}\n pack .vpane -anchor n -side top -fill both -expand 1\n \n # -- Index File List\n #\n-frame .vpane.files.index -height 100 -width 200\n-label .vpane.files.index.title -text [mc \"Staged Changes (Will Commit)\"] \\\n+${NS}::frame .vpane.files.index -height 100 -width 200\n+tlabel .vpane.files.index.title \\\n+\t-text [mc \"Staged Changes (Will Commit)\"] \\\n \t-background lightgreen -foreground black\n text $ui_index -background white -foreground black \\\n \t-borderwidth 0 \\\n@@ -2842,8 +2872,8 @@ text $ui_index -background white -foreground black \\\n \t-xscrollcommand {.vpane.files.index.sx set} \\\n \t-yscrollcommand {.vpane.files.index.sy set} \\\n \t-state disabled\n-scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]\n-scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]\n+${NS}::scrollbar .vpane.files.index.sx -orient h -command [list $ui_index xview]\n+${NS}::scrollbar .vpane.files.index.sy -orient v -command [list $ui_index yview]\n pack .vpane.files.index.title -side top -fill x\n pack .vpane.files.index.sx -side bottom -fill x\n pack .vpane.files.index.sy -side right -fill y\n@@ -2851,8 +2881,8 @@ pack $ui_index -side left -fill both -expand 1\n \n # -- Working Directory File List\n #\n-frame .vpane.files.workdir -height 100 -width 200\n-label .vpane.files.workdir.title -text [mc \"Unstaged Changes\"] \\\n+${NS}::frame .vpane.files.workdir -height 100 -width 200\n+tlabel .vpane.files.workdir.title -text [mc \"Unstaged Changes\"] \\\n \t-background lightsalmon -foreground black\n text $ui_workdir -background white -foreground black \\\n \t-borderwidth 0 \\\n@@ -2862,15 +2892,19 @@ text $ui_workdir -background white -foreground black \\\n \t-xscrollcommand {.vpane.files.workdir.sx set} \\\n \t-yscrollcommand {.vpane.files.workdir.sy set} \\\n \t-state disabled\n-scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]\n-scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]\n+${NS}::scrollbar .vpane.files.workdir.sx -orient h -command [list $ui_workdir xview]\n+${NS}::scrollbar .vpane.files.workdir.sy -orient v -command [list $ui_workdir yview]\n pack .vpane.files.workdir.title -side top -fill x\n pack .vpane.files.workdir.sx -side bottom -fill x\n pack .vpane.files.workdir.sy -side right -fill y\n pack $ui_workdir -side left -fill both -expand 1\n \n-.vpane.files add .vpane.files.workdir -sticky nsew\n-.vpane.files add .vpane.files.index -sticky nsew\n+.vpane.files add .vpane.files.workdir\n+.vpane.files add .vpane.files.index\n+if {!$use_ttk} {\n+\t.vpane.files paneconfigure .vpane.files.workdir -sticky news\n+\t.vpane.files paneconfigure .vpane.files.index -sticky news\n+}\n \n foreach i [list $ui_index $ui_workdir] {\n \trmsel_tag $i\n@@ -2880,68 +2914,69 @@ unset i\n \n # -- Diff and Commit Area\n #\n-frame .vpane.lower -height 300 -width 400\n-frame .vpane.lower.commarea\n-frame .vpane.lower.diff -relief sunken -borderwidth 1\n+${NS}::frame .vpane.lower -height 300 -width 400\n+${NS}::frame .vpane.lower.commarea\n+${NS}::frame .vpane.lower.diff -relief sunken -borderwidth 1\n pack .vpane.lower.diff -fill both -expand 1\n pack .vpane.lower.commarea -side bottom -fill x\n-.vpane add .vpane.lower -sticky nsew\n+.vpane add .vpane.lower\n+if {!$use_ttk} {.vpane paneconfigure .vpane.lower -sticky nsew}\n \n # -- Commit Area Buttons\n #\n-frame .vpane.lower.commarea.buttons\n-label .vpane.lower.commarea.buttons.l -text {} \\\n+${NS}::frame .vpane.lower.commarea.buttons\n+${NS}::label .vpane.lower.commarea.buttons.l -text {} \\\n \t-anchor w \\\n \t-justify left\n pack .vpane.lower.commarea.buttons.l -side top -fill x\n pack .vpane.lower.commarea.buttons -side left -fill y\n \n-button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \\\n+${NS}::button .vpane.lower.commarea.buttons.rescan -text [mc Rescan] \\\n \t-command ui_do_rescan\n pack .vpane.lower.commarea.buttons.rescan -side top -fill x\n lappend disable_on_lock \\\n \t{.vpane.lower.commarea.buttons.rescan conf -state}\n \n-button .vpane.lower.commarea.buttons.incall -text [mc \"Stage Changed\"] \\\n+${NS}::button .vpane.lower.commarea.buttons.incall -text [mc \"Stage Changed\"] \\\n \t-command do_add_all\n pack .vpane.lower.commarea.buttons.incall -side top -fill x\n lappend disable_on_lock \\\n \t{.vpane.lower.commarea.buttons.incall conf -state}\n \n if {![is_enabled nocommitmsg]} {\n-\tbutton .vpane.lower.commarea.buttons.signoff -text [mc \"Sign Off\"] \\\n+\t${NS}::button .vpane.lower.commarea.buttons.signoff -text [mc \"Sign Off\"] \\\n \t\t-command do_signoff\n \tpack .vpane.lower.commarea.buttons.signoff -side top -fill x\n }\n \n-button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \\\n+${NS}::button .vpane.lower.commarea.buttons.commit -text [commit_btn_caption] \\\n \t-command do_commit\n pack .vpane.lower.commarea.buttons.commit -side top -fill x\n lappend disable_on_lock \\\n \t{.vpane.lower.commarea.buttons.commit conf -state}\n \n if {![is_enabled nocommit]} {\n-\tbutton .vpane.lower.commarea.buttons.push -text [mc Push] \\\n+\t${NS}::button .vpane.lower.commarea.buttons.push -text [mc Push] \\\n \t\t-command do_push_anywhere\n \tpack .vpane.lower.commarea.buttons.push -side top -fill x\n }\n \n # -- Commit Message Buffer\n #\n-frame .vpane.lower.commarea.buffer\n-frame .vpane.lower.commarea.buffer.header\n+${NS}::frame .vpane.lower.commarea.buffer\n+${NS}::frame .vpane.lower.commarea.buffer.header\n set ui_comm .vpane.lower.commarea.buffer.t\n set ui_coml .vpane.lower.commarea.buffer.header.l\n \n if {![is_enabled nocommit]} {\n-\tradiobutton .vpane.lower.commarea.buffer.header.new \\\n+\t${NS}::radiobutton .vpane.lower.commarea.buffer.header.new \\\n \t\t-text [mc \"New Commit\"] \\\n \t\t-command do_select_commit_type \\\n \t\t-variable selected_commit_type \\\n \t\t-value new\n \tlappend disable_on_lock \\\n \t\t[list .vpane.lower.commarea.buffer.header.new conf -state]\n-\tradiobutton .vpane.lower.commarea.buffer.header.amend \\\n+\t${NS}::radiobutton .vpane.lower.commarea.buffer.header.amend \\\n \t\t-text [mc \"Amend Last Commit\"] \\\n \t\t-command do_select_commit_type \\\n \t\t-variable selected_commit_type \\\n@@ -2950,7 +2985,7 @@ if {![is_enabled nocommit]} {\n \t\t[list .vpane.lower.commarea.buffer.header.amend conf -state]\n }\n \n-label $ui_coml \\\n+${NS}::label $ui_coml \\\n \t-anchor w \\\n \t-justify left\n proc trace_commit_type {varname args} {\n@@ -2982,7 +3017,7 @@ text $ui_comm -background white -foreground black \\\n \t-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \\\n \t-font font_diff \\\n \t-yscrollcommand {.vpane.lower.commarea.buffer.sby set}\n-scrollbar .vpane.lower.commarea.buffer.sby \\\n+${NS}::scrollbar .vpane.lower.commarea.buffer.sby \\\n \t-command [list $ui_comm yview]\n pack .vpane.lower.commarea.buffer.header -side top -fill x\n pack .vpane.lower.commarea.buffer.sby -side right -fill y\n@@ -3048,19 +3083,19 @@ proc trace_current_diff_path {varname args} {\n }\n trace add variable current_diff_path write trace_current_diff_path\n \n-frame .vpane.lower.diff.header -background gold\n-label .vpane.lower.diff.header.status \\\n+gold_frame .vpane.lower.diff.header\n+tlabel .vpane.lower.diff.header.status \\\n \t-background gold \\\n \t-foreground black \\\n \t-width $max_status_desc \\\n \t-anchor w \\\n \t-justify left\n-label .vpane.lower.diff.header.file \\\n+tlabel .vpane.lower.diff.header.file \\\n \t-background gold \\\n \t-foreground black \\\n \t-anchor w \\\n \t-justify left\n-label .vpane.lower.diff.header.path \\\n+tlabel .vpane.lower.diff.header.path \\\n \t-background gold \\\n \t-foreground black \\\n \t-anchor w \\\n@@ -3084,7 +3119,7 @@ bind_button3 .vpane.lower.diff.header.path \"tk_popup $ctxm %X %Y\"\n \n # -- Diff Body\n #\n-frame .vpane.lower.diff.body\n+${NS}::frame .vpane.lower.diff.body\n set ui_diff .vpane.lower.diff.body.t\n text $ui_diff -background white -foreground black \\\n \t-borderwidth 0 \\\n@@ -3093,9 +3128,9 @@ text $ui_diff -background white -foreground black \\\n \t-xscrollcommand {.vpane.lower.diff.body.sbx set} \\\n \t-yscrollcommand {.vpane.lower.diff.body.sby set} \\\n \t-state disabled\n-scrollbar .vpane.lower.diff.body.sbx -orient horizontal \\\n+${NS}::scrollbar .vpane.lower.diff.body.sbx -orient horizontal \\\n \t-command [list $ui_diff xview]\n-scrollbar .vpane.lower.diff.body.sby -orient vertical \\\n+${NS}::scrollbar .vpane.lower.diff.body.sby -orient vertical \\\n \t-command [list $ui_diff yview]\n pack .vpane.lower.diff.body.sbx -side bottom -fill x\n pack .vpane.lower.diff.body.sby -side right -fill y\n@@ -3274,12 +3309,17 @@ $main_status show [mc \"Initializing...\"]\n catch {\n set gm $repo_config(gui.geometry)\n wm geometry . [lindex $gm 0]\n-.vpane sash place 0 \\\n-\t[lindex $gm 1] \\\n-\t[lindex [.vpane sash coord 0] 1]\n-.vpane.files sash place 0 \\\n-\t[lindex [.vpane.files sash coord 0] 0] \\\n-\t[lindex $gm 2]\n+if {$use_ttk} {\n+\t.vpane sashpos 0 [lindex $gm 1]\n+\t.vpane.files sashpos 0 [lindex $gm 2]\n+} else {\n+\t.vpane sash place 0 \\\n+\t\t[lindex $gm 1] \\\n+\t\t[lindex [.vpane sash coord 0] 1]\n+\t.vpane.files sash place 0 \\\n+\t\t[lindex [.vpane.files sash coord 0] 0] \\\n+\t\t[lindex $gm 2]\n+}\n unset gm\n }\n \n@@ -3543,3 +3583,9 @@ if {[is_enabled retcode]} {\n if {$picked && [is_config_true gui.autoexplore]} {\n \tdo_explore\n }\n+\n+# Local variables:\n+# mode: tcl\n+# indent-tabs-mode: t\n+# tab-width: 4\n+# End:\ndiff --git a/lib/about.tcl b/lib/about.tcl\nindex 241ab89..1731ddf 100644\n--- a/lib/about.tcl\n+++ b/lib/about.tcl\n@@ -1,34 +1,45 @@\n # git-gui about git-gui dialog\n # Copyright (C) 2006, 2007 Shawn Pearce\n+proc pad_label {w args} {\n+\tglobal use_ttk\n+\tif {$use_ttk} {\n+\t\tttk::style configure Padded.TLabel \\\n+\t\t\t-padding {5 5} -borderwidth 1 -relief solid\n+\t\tset cmd [linsert $args 0 ttk::label $w -style Padded.TLabel]\n+\t} else {\n+\t\tset cmd [linsert $args 0 label $w \\\n+\t\t\t\t\t -padx 5 -pady 5 \\\n+\t\t\t\t\t -justify left \\\n+\t\t\t\t\t -anchor w \\\n+\t\t\t\t\t -borderwidth 1 \\\n+\t\t\t\t\t -relief solid]\n+\t}\n+\teval $cmd\n+}\n \n proc do_about {} {\n \tglobal appvers copyright oguilib\n \tglobal tcl_patchLevel tk_patchLevel\n-\tglobal ui_comm_spell\n+\tglobal ui_comm_spell NS use_ttk\n \n \tset w .about_dialog\n-\ttoplevel $w\n+\tDialog $w\n \twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n \n \tpack [git_logo $w.git_logo] -side left -fill y -padx 10 -pady 10\n-\tlabel $w.header -text [mc \"About %s\" [appname]] \\\n-\t\t-font font_uibold\n+\t${NS}::label $w.header -text [mc \"About %s\" [appname]] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.close -text {Close} \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.close -text {Close} \\\n \t\t-default active \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.close -side right\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabel $w.desc \\\n-\t\t-text \"[mc \"git-gui - a graphical user interface for Git.\"]\\n$copyright\" \\\n-\t\t-padx 5 -pady 5 \\\n-\t\t-justify left \\\n-\t\t-anchor w \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief solid\n+\tpad_label $w.desc \\\n+\t\t-text \"[mc \"git-gui - a graphical user interface for Git.\"]\\n$copyright\"\n \tpack $w.desc -side top -fill x -padx 5 -pady 5\n \n \tset v {}\n@@ -52,22 +63,10 @@ proc do_about {} {\n \tappend d \"git exec dir: [gitexec]\\n\"\n \tappend d \"git-gui lib: $oguilib\"\n \n-\tlabel $w.vers \\\n-\t\t-text $v \\\n-\t\t-padx 5 -pady 5 \\\n-\t\t-justify left \\\n-\t\t-anchor w \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief solid\n+\tpad_label $w.vers -text $v\n \tpack $w.vers -side top -fill x -padx 5 -pady 5\n \n-\tlabel $w.dirs \\\n-\t\t-text $d \\\n-\t\t-padx 5 -pady 5 \\\n-\t\t-justify left \\\n-\t\t-anchor w \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief solid\n+\tpad_label $w.dirs -text $d\n \tpack $w.dirs -side top -fill x -padx 5 -pady 5\n \n \tmenu $w.ctxm -tearoff 0\ndiff --git a/lib/blame.tcl b/lib/blame.tcl\nindex 8525b79..786b50b 100644\n--- a/lib/blame.tcl\n+++ b/lib/blame.tcl\n@@ -61,7 +61,7 @@ field tooltip_timer     {} ; # Current timer event for our tooltip\n field tooltip_commit    {} ; # Commit(s) in tooltip\n \n constructor new {i_commit i_path i_jump} {\n-\tglobal cursor_ptr M1B M1T have_tk85\n+\tglobal cursor_ptr M1B M1T have_tk85 use_ttk NS\n \tvariable active_color\n \tvariable group_colors\n \n@@ -73,15 +73,15 @@ constructor new {i_commit i_path i_jump} {\n \n \tset font_w [font measure font_diff \"0\"]\n \n-\tframe $w.header -background gold\n-\tlabel $w.header.commit_l \\\n+\tgold_frame $w.header\n+\ttlabel $w.header.commit_l \\\n \t\t-text [mc \"Commit:\"] \\\n \t\t-background gold \\\n \t\t-foreground black \\\n \t\t-anchor w \\\n \t\t-justify left\n \tset w_back $w.header.commit_b\n-\tlabel $w_back \\\n+\ttlabel $w_back \\\n \t\t-image ::blame::img_back_arrow \\\n \t\t-borderwidth 0 \\\n \t\t-relief flat \\\n@@ -94,20 +94,20 @@ constructor new {i_commit i_path i_jump} {\n \t\t\t[cb _history_menu]\n \t\t}\n \t\t\"\n-\tlabel $w.header.commit \\\n+\ttlabel $w.header.commit \\\n \t\t-textvariable @commit \\\n \t\t-background gold \\\n \t\t-foreground black \\\n \t\t-anchor w \\\n \t\t-justify left\n-\tlabel $w.header.path_l \\\n+\ttlabel $w.header.path_l \\\n \t\t-text [mc \"File:\"] \\\n \t\t-background gold \\\n \t\t-foreground black \\\n \t\t-anchor w \\\n \t\t-justify left\n \tset w_path $w.header.path\n-\tlabel $w_path \\\n+\ttlabel $w_path \\\n \t\t-background gold \\\n \t\t-foreground black \\\n \t\t-anchor w \\\n@@ -209,10 +209,10 @@ constructor new {i_commit i_path i_jump} {\n \n \tset w_columns [list $w_amov $w_asim $w_line $w_file]\n \n-\tscrollbar $w.file_pane.out.sbx \\\n+\t${NS}::scrollbar $w.file_pane.out.sbx \\\n \t\t-orient h \\\n \t\t-command [list $w_file xview]\n-\tscrollbar $w.file_pane.out.sby \\\n+\t${NS}::scrollbar $w.file_pane.out.sby \\\n \t\t-orient v \\\n \t\t-command [list scrollbar2many $w_columns yview]\n \teval grid $w_columns $w.file_pane.out.sby -sticky nsew\n@@ -254,10 +254,10 @@ constructor new {i_commit i_path i_jump} {\n \t\t-background $active_color \\\n \t\t-font font_ui\n \t$w_cviewer tag raise sel\n-\tscrollbar $w.file_pane.cm.sbx \\\n+\t${NS}::scrollbar $w.file_pane.cm.sbx \\\n \t\t-orient h \\\n \t\t-command [list $w_cviewer xview]\n-\tscrollbar $w.file_pane.cm.sby \\\n+\t${NS}::scrollbar $w.file_pane.cm.sby \\\n \t\t-orient v \\\n \t\t-command [list $w_cviewer yview]\n \tpack $w.file_pane.cm.sby -side right -fill y\ndiff --git a/lib/branch_checkout.tcl b/lib/branch_checkout.tcl\nindex 6603703..2e459a8 100644\n--- a/lib/branch_checkout.tcl\n+++ b/lib/branch_checkout.tcl\n@@ -10,21 +10,24 @@ field opt_fetch     1; # refetch tracking branch if used?\n field opt_detach    0; # force a detached head case?\n \n constructor dialog {} {\n-\tmake_toplevel top w\n+\tglobal use_ttk NS\n+\tmake_dialog top w\n+\twm withdraw $w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Checkout Branch\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t}\n \n-\tlabel $w.header -text [mc \"Checkout Branch\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Checkout Branch\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.create -text [mc Checkout] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.create -text [mc Checkout] \\\n \t\t-default active \\\n \t\t-command [cb _checkout]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n@@ -33,14 +36,14 @@ constructor dialog {} {\n \t$w_rev bind_listbox <Double-Button-1> [cb _checkout]\n \tpack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5\n \n-\tlabelframe $w.options -text [mc Options]\n+\t${NS}::labelframe $w.options -text [mc Options]\n \n-\tcheckbutton $w.options.fetch \\\n+\t${NS}::checkbutton $w.options.fetch \\\n \t\t-text [mc \"Fetch Tracking Branch\"] \\\n \t\t-variable @opt_fetch\n \tpack $w.options.fetch -anchor nw\n \n-\tcheckbutton $w.options.detach \\\n+\t${NS}::checkbutton $w.options.detach \\\n \t\t-text [mc \"Detach From Local Branch\"] \\\n \t\t-variable @opt_detach\n \tpack $w.options.detach -anchor nw\n@@ -50,6 +53,7 @@ constructor dialog {} {\n \tbind $w <Visibility> [cb _visible]\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [cb _checkout]\\;break\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/branch_create.tcl b/lib/branch_create.tcl\nindex 3817771..a8d8d38 100644\n--- a/lib/branch_create.tcl\n+++ b/lib/branch_create.tcl\n@@ -16,48 +16,48 @@ field opt_fetch     1; # refetch tracking branch if used?\n field reset_ok      0; # did the user agree to reset?\n \n constructor dialog {} {\n-\tglobal repo_config\n+\tglobal repo_config use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n+\twm withdraw $w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Create Branch\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t}\n \n-\tlabel $w.header -text [mc \"Create New Branch\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Create New Branch\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.create -text [mc Create] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.create -text [mc Create] \\\n \t\t-default active \\\n \t\t-command [cb _create]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.desc -text [mc \"Branch Name\"]\n-\tradiobutton $w.desc.name_r \\\n-\t\t-anchor w \\\n+\t${NS}::labelframe $w.desc -text [mc \"Branch Name\"]\n+\t${NS}::radiobutton $w.desc.name_r \\\n \t\t-text [mc \"Name:\"] \\\n \t\t-value user \\\n \t\t-variable @name_type\n+\tif {!$use_ttk} {$w.desc.name_r configure -anchor w}\n \tset w_name $w.desc.name_t\n-\tentry $w_name \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_name \\\n \t\t-width 40 \\\n \t\t-textvariable @name \\\n \t\t-validate key \\\n \t\t-validatecommand [cb _validate %d %S]\n \tgrid $w.desc.name_r $w_name -sticky we -padx {0 5}\n \n-\tradiobutton $w.desc.match_r \\\n-\t\t-anchor w \\\n+\t${NS}::radiobutton $w.desc.match_r \\\n \t\t-text [mc \"Match Tracking Branch Name\"] \\\n \t\t-value match \\\n \t\t-variable @name_type\n+\tif {!$use_ttk} {$w.desc.name_r configure -anchor w}\n \tgrid $w.desc.match_r -sticky we -padx {0 5} -columnspan 2\n \n \tgrid columnconfigure $w.desc 1 -weight 1\n@@ -66,34 +66,34 @@ constructor dialog {} {\n \tset w_rev [::choose_rev::new $w.rev [mc \"Starting Revision\"]]\n \tpack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5\n \n-\tlabelframe $w.options -text [mc Options]\n+\t${NS}::labelframe $w.options -text [mc Options]\n \n-\tframe $w.options.merge\n-\tlabel $w.options.merge.l -text [mc \"Update Existing Branch:\"]\n+\t${NS}::frame $w.options.merge\n+\t${NS}::label $w.options.merge.l -text [mc \"Update Existing Branch:\"]\n \tpack $w.options.merge.l -side left\n-\tradiobutton $w.options.merge.no \\\n+\t${NS}::radiobutton $w.options.merge.no \\\n \t\t-text [mc No] \\\n \t\t-value none \\\n \t\t-variable @opt_merge\n \tpack $w.options.merge.no -side left\n-\tradiobutton $w.options.merge.ff \\\n+\t${NS}::radiobutton $w.options.merge.ff \\\n \t\t-text [mc \"Fast Forward Only\"] \\\n \t\t-value ff \\\n \t\t-variable @opt_merge\n \tpack $w.options.merge.ff -side left\n-\tradiobutton $w.options.merge.reset \\\n+\t${NS}::radiobutton $w.options.merge.reset \\\n \t\t-text [mc Reset] \\\n \t\t-value reset \\\n \t\t-variable @opt_merge\n \tpack $w.options.merge.reset -side left\n \tpack $w.options.merge -anchor nw\n \n-\tcheckbutton $w.options.fetch \\\n+\t${NS}::checkbutton $w.options.fetch \\\n \t\t-text [mc \"Fetch Tracking Branch\"] \\\n \t\t-variable @opt_fetch\n \tpack $w.options.fetch -anchor nw\n \n-\tcheckbutton $w.options.checkout \\\n+\t${NS}::checkbutton $w.options.checkout \\\n \t\t-text [mc \"Checkout After Creation\"] \\\n \t\t-variable @opt_checkout\n \tpack $w.options.checkout -anchor nw\n@@ -109,6 +109,7 @@ constructor dialog {} {\n \tbind $w <Visibility> [cb _visible]\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [cb _create]\\;break\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/branch_delete.tcl b/lib/branch_delete.tcl\nindex 20d5e42..867938e 100644\n--- a/lib/branch_delete.tcl\n+++ b/lib/branch_delete.tcl\n@@ -9,41 +9,40 @@ field w_check         ; # revision picker for merge test\n field w_delete        ; # delete button\n \n constructor dialog {} {\n-\tglobal current_branch\n+\tglobal current_branch use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n+\twm withdraw $w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Delete Branch\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t}\n \n-\tlabel $w.header -text [mc \"Delete Local Branch\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Delete Local Branch\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n+\t${NS}::frame $w.buttons\n \tset w_delete $w.buttons.delete\n-\tbutton $w_delete \\\n+\t${NS}::button $w_delete \\\n \t\t-text [mc Delete] \\\n \t\t-default active \\\n \t\t-state disabled \\\n \t\t-command [cb _delete]\n \tpack $w_delete -side right\n-\tbutton $w.buttons.cancel \\\n+\t${NS}::button $w.buttons.cancel \\\n \t\t-text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.list -text [mc \"Local Branches\"]\n+\t${NS}::labelframe $w.list -text [mc \"Local Branches\"]\n \tset w_heads $w.list.l\n-\tlistbox $w_heads \\\n+\tslistbox $w_heads \\\n \t\t-height 10 \\\n \t\t-width 70 \\\n \t\t-selectmode extended \\\n-\t\t-exportselection false \\\n-\t\t-yscrollcommand [list $w.list.sby set]\n-\tscrollbar $w.list.sby -command [list $w.list.l yview]\n-\tpack $w.list.sby -side right -fill y\n+\t\t-exportselection false\n \tpack $w.list.l -side left -fill both -expand 1\n \tpack $w.list -fill both -expand 1 -pady 5 -padx 5\n \n@@ -67,6 +66,7 @@ constructor dialog {} {\n \t\"\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [cb _delete]\\;break\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/branch_rename.tcl b/lib/branch_rename.tcl\nindex 1665388..6398877 100644\n--- a/lib/branch_rename.tcl\n+++ b/lib/branch_rename.tcl\n@@ -8,9 +8,10 @@ field oldname\n field newname\n \n constructor dialog {} {\n-\tglobal current_branch\n+\tglobal current_branch use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n+\twm withdraw $w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Rename Branch\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n@@ -19,27 +20,31 @@ constructor dialog {} {\n \tset oldname $current_branch\n \tset newname [get_config gui.newbranchtemplate]\n \n-\tlabel $w.header -text [mc \"Rename Branch\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Rename Branch\"]\\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.rename -text [mc Rename] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.rename -text [mc Rename] \\\n \t\t-default active \\\n \t\t-command [cb _rename]\n \tpack $w.buttons.rename -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tframe $w.rename\n-\tlabel $w.rename.oldname_l -text [mc \"Branch:\"]\n-\teval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]\n+\t${NS}::frame $w.rename\n+\t${NS}::label $w.rename.oldname_l -text [mc \"Branch:\"]\n+\tif {$use_ttk} {\n+\t\tttk::combobox $w.rename.oldname_m -textvariable @oldname \\\n+\t\t\t-values [load_all_heads] -state readonly\n+\t} else {\n+\t\teval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads]\n+\t}\n \n-\tlabel $w.rename.newname_l -text [mc \"New Name:\"]\n-\tentry $w.rename.newname_t \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::label $w.rename.newname_l -text [mc \"New Name:\"]\n+\t${NS}::entry $w.rename.newname_t \\\n \t\t-width 40 \\\n \t\t-textvariable @newname \\\n \t\t-validate key \\\n@@ -60,6 +65,7 @@ constructor dialog {} {\n \t\t$w.rename.newname_t icursor end\n \t\tfocus $w.rename.newname_t\n \t\"\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/browser.tcl b/lib/browser.tcl\nindex 0410cc6..c241572 100644\n--- a/lib/browser.tcl\n+++ b/lib/browser.tcl\n@@ -21,23 +21,23 @@ field browser_busy   1\n field ls_buf     {}; # Buffered record output from ls-tree\n \n constructor new {commit {path {}}} {\n-\tglobal cursor_ptr M1B\n-\tmake_toplevel top w\n+\tglobal cursor_ptr M1B use_ttk NS\n+\tmake_dialog top w\n+\twm withdraw $top\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"File Browser\"]]\n \n \tset browser_commit $commit\n \tset browser_path $browser_commit:$path\n \n-\tlabel $w.path \\\n+\t${NS}::label $w.path \\\n \t\t-textvariable @browser_path \\\n \t\t-anchor w \\\n \t\t-justify left \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n \t\t-font font_uibold\n+\tif {!$use_ttk} { $w.path configure -borderwidth 1 -relief sunken}\n \tpack $w.path -anchor w -side top -fill x\n \n-\tframe $w.list\n+\t${NS}::frame $w.list\n \tset w_list $w.list.l\n \ttext $w_list -background white -foreground black \\\n \t\t-borderwidth 0 \\\n@@ -49,19 +49,18 @@ constructor new {commit {path {}}} {\n \t\t-xscrollcommand [list $w.list.sbx set] \\\n \t\t-yscrollcommand [list $w.list.sby set]\n \trmsel_tag $w_list\n-\tscrollbar $w.list.sbx -orient h -command [list $w_list xview]\n-\tscrollbar $w.list.sby -orient v -command [list $w_list yview]\n+\t${NS}::scrollbar $w.list.sbx -orient h -command [list $w_list xview]\n+\t${NS}::scrollbar $w.list.sby -orient v -command [list $w_list yview]\n \tpack $w.list.sbx -side bottom -fill x\n \tpack $w.list.sby -side right -fill y\n \tpack $w_list -side left -fill both -expand 1\n \tpack $w.list -side top -fill both -expand 1\n \n-\tlabel $w.status \\\n+\t${NS}::label $w.status \\\n \t\t-textvariable @browser_status \\\n \t\t-anchor w \\\n-\t\t-justify left \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken\n+\t\t-justify left\n+\tif {!$use_ttk} { $w.status configure -borderwidth 1 -relief sunken}\n \tpack $w.status -anchor w -side bottom -fill x\n \n \tbind $w_list <Button-1>        \"[cb _click 0 @%x,%y];break\"\n@@ -78,6 +77,7 @@ constructor new {commit {path {}}} {\n \tbind $w_list <Right>           break\n \n \tbind $w_list <Visibility> [list focus $w_list]\n+\twm deiconify $top\n \tset w $w_list\n \tif {$path ne {}} {\n \t\t_ls $this $browser_commit:$path $path\n@@ -263,23 +263,27 @@ field w              ; # widget path\n field w_rev          ; # mega-widget to pick the initial revision\n \n constructor dialog {} {\n-\tmake_toplevel top w\n+\tglobal use_ttk NS\n+\tmake_dialog top w\n+\twm withdraw $top\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Browse Branch Files\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n+\t\twm transient $top .\n \t}\n \n-\tlabel $w.header \\\n+\t${NS}::label $w.header \\\n \t\t-text [mc \"Browse Branch Files\"] \\\n-\t\t-font font_uibold\n+\t\t-font font_uibold \\\n+\t\t-anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.browse -text [mc Browse] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.browse -text [mc Browse] \\\n \t\t-default active \\\n \t\t-command [cb _open]\n \tpack $w.buttons.browse -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n@@ -291,6 +295,7 @@ constructor dialog {} {\n \tbind $w <Visibility> [cb _visible]\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [cb _open]\\;break\n+\twm deiconify $top\n \ttkwait window $w\n }\n \ndiff --git a/lib/choose_font.tcl b/lib/choose_font.tcl\nindex 56443b0..ebe50bd 100644\n--- a/lib/choose_font.tcl\n+++ b/lib/choose_font.tcl\n@@ -17,6 +17,7 @@ variable all_families [list]  ; # All fonts known to Tk\n \n constructor pick {path title a_family a_size} {\n \tvariable all_families\n+\tglobal use_ttk NS\n \n \tset v_family $a_family\n \tset v_size $a_size\n@@ -27,29 +28,30 @@ constructor pick {path title a_family a_size} {\n \tset f_family $pv_family\n \tset f_size $pv_size\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n+\twm withdraw $top\n \twm title $top \"[appname] ([reponame]): $title\"\n \twm geometry $top \"+[winfo rootx $path]+[winfo rooty $path]\"\n \n-\tlabel $w.header -text $title -font font_uibold\n+\t${NS}::label $w.header -text $title -font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.select \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.select \\\n \t\t-text [mc Select] \\\n \t\t-default active \\\n \t\t-command [cb _select]\n-\tbutton $w.buttons.cancel \\\n+\t${NS}::button $w.buttons.cancel \\\n \t\t-text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.select -side right\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tframe $w.inner\n+\t${NS}::frame $w.inner\n \n-\tframe $w.inner.family\n-\tlabel $w.inner.family.l \\\n+\t${NS}::frame $w.inner.family\n+\t${NS}::label $w.inner.family.l \\\n \t\t-text [mc \"Font Family\"] \\\n \t\t-anchor w\n \tset w_family $w.inner.family.v\n@@ -64,16 +66,16 @@ constructor pick {path title a_family a_size} {\n \t\t-height 10 \\\n \t\t-yscrollcommand [list $w.inner.family.sby set]\n \trmsel_tag $w_family\n-\tscrollbar $w.inner.family.sby -command [list $w_family yview]\n+\t${NS}::scrollbar $w.inner.family.sby -command [list $w_family yview]\n \tpack $w.inner.family.l -side top -fill x\n \tpack $w.inner.family.sby -side right -fill y\n \tpack $w_family -fill both -expand 1\n \n-\tframe $w.inner.size\n-\tlabel $w.inner.size.l \\\n+\t${NS}::frame $w.inner.size\n+\t${NS}::label $w.inner.size.l \\\n \t\t-text [mc \"Font Size\"] \\\n \t\t-anchor w\n-\tspinbox $w.inner.size.v \\\n+\ttspinbox $w.inner.size.v \\\n \t\t-textvariable @f_size \\\n \t\t-from 2 -to 80 -increment 1 \\\n \t\t-width 3\n@@ -86,8 +88,8 @@ constructor pick {path title a_family a_size} {\n \tgrid columnconfigure $w.inner 0 -weight 1\n \tpack $w.inner -fill both -expand 1 -padx 5 -pady 5\n \n-\tframe $w.example\n-\tlabel $w.example.l \\\n+\t${NS}::frame $w.example\n+\t${NS}::label $w.example.l \\\n \t\t-text [mc \"Font Example\"] \\\n \t\t-anchor w\n \tset w_example $w.example.t\n@@ -129,6 +131,7 @@ constructor pick {path title a_family a_size} {\n \t\tgrab $w\n \t\tfocus $w\n \t\"\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl\nindex 633cc57..4081876 100644\n--- a/lib/choose_repository.tcl\n+++ b/lib/choose_repository.tcl\n@@ -22,9 +22,9 @@ field readtree_err        ; # Error output from read-tree (if any)\n field sorted_recent       ; # recent repositories (sorted)\n \n constructor pick {} {\n-\tglobal M1T M1B\n+\tglobal M1T M1B use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n \twm title $top [mc \"Git Gui\"]\n \n \tif {$top eq {.}} {\n@@ -71,11 +71,11 @@ constructor pick {} {\n \n \tset w_body $w.body\n \tset opts $w_body.options\n-\tframe $w_body\n+\t${NS}::frame $w_body\n \ttext $opts \\\n \t\t-cursor $::cursor_ptr \\\n \t\t-relief flat \\\n-\t\t-background [$w_body cget -background] \\\n+\t\t-background [get_bg_color $w_body] \\\n \t\t-wrap none \\\n \t\t-spacing1 5 \\\n \t\t-width 50 \\\n@@ -132,15 +132,15 @@ constructor pick {} {\n \t\t\t\t-label [mc \"Recent Repositories\"]\n \t\t}\n \n-\t\tlabel $w_body.space\n-\t\tlabel $w_body.recentlabel \\\n+\t\t${NS}::label $w_body.space\n+\t\t${NS}::label $w_body.recentlabel \\\n \t\t\t-anchor w \\\n \t\t\t-text [mc \"Open Recent Repository:\"]\n \t\tset w_recentlist $w_body.recentlist\n \t\ttext $w_recentlist \\\n \t\t\t-cursor $::cursor_ptr \\\n \t\t\t-relief flat \\\n-\t\t\t-background [$w_body.recentlabel cget -background] \\\n+\t\t\t-background [get_bg_color $w_body.recentlabel] \\\n \t\t\t-wrap none \\\n \t\t\t-width 50 \\\n \t\t\t-height 10\n@@ -176,10 +176,10 @@ constructor pick {} {\n \t}\n \tpack $w_body -fill x -padx 10 -pady 10\n \n-\tframe $w.buttons\n+\t${NS}::frame $w.buttons\n \tset w_next $w.buttons.next\n \tset w_quit $w.buttons.quit\n-\tbutton $w_quit \\\n+\t${NS}::button $w_quit \\\n \t\t-text [mc \"Quit\"] \\\n \t\t-command exit\n \tpack $w_quit -side right -padx 5\n@@ -203,6 +203,7 @@ constructor pick {} {\n \twm deiconify $top\n \ttkwait variable @done\n \n+\tgrab release $top\n \tif {$top eq {.}} {\n \t\teval destroy [winfo children $top]\n \t}\n@@ -280,9 +281,10 @@ method _open_recent_path {p} {\n }\n \n method _next {action} {\n+\tglobal NS\n \tdestroy $w_body\n \tif {![winfo exists $w_next]} {\n-\t\tbutton $w_next -default active\n+\t\t${NS}::button $w_next -default active\n \t\tpack $w_next -side right -padx 5 -before $w_quit\n \t}\n \t_do_$action $this\n@@ -371,26 +373,25 @@ proc _objdir {path} {\n ## Create New Repository\n \n method _do_new {} {\n+\tglobal use_ttk NS\n \t$w_next conf \\\n \t\t-state disabled \\\n \t\t-command [cb _do_new2] \\\n \t\t-text [mc \"Create\"]\n \n-\tframe $w_body\n-\tlabel $w_body.h \\\n-\t\t-font font_uibold \\\n+\t${NS}::frame $w_body\n+\t${NS}::label $w_body.h \\\n+\t\t-font font_uibold -anchor center \\\n \t\t-text [mc \"Create New Repository\"]\n \tpack $w_body.h -side top -fill x -pady 10\n \tpack $w_body -fill x -padx 10\n \n-\tframe $w_body.where\n-\tlabel $w_body.where.l -text [mc \"Directory:\"]\n-\tentry $w_body.where.t \\\n+\t${NS}::frame $w_body.where\n+\t${NS}::label $w_body.where.l -text [mc \"Directory:\"]\n+\t${NS}::entry $w_body.where.t \\\n \t\t-textvariable @local_path \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n \t\t-width 50\n-\tbutton $w_body.where.b \\\n+\t${NS}::button $w_body.where.b \\\n \t\t-text [mc \"Browse\"] \\\n \t\t-command [cb _new_local_path]\n \tset w_localpath $w_body.where.t\n@@ -456,63 +457,57 @@ proc _new_ok {p} {\n ## Clone Existing Repository\n \n method _do_clone {} {\n+\tglobal use_ttk NS\n \t$w_next conf \\\n \t\t-state disabled \\\n \t\t-command [cb _do_clone2] \\\n \t\t-text [mc \"Clone\"]\n \n-\tframe $w_body\n-\tlabel $w_body.h \\\n-\t\t-font font_uibold \\\n+\t${NS}::frame $w_body\n+\t${NS}::label $w_body.h \\\n+\t\t-font font_uibold -anchor center \\\n \t\t-text [mc \"Clone Existing Repository\"]\n \tpack $w_body.h -side top -fill x -pady 10\n \tpack $w_body -fill x -padx 10\n \n \tset args $w_body.args\n-\tframe $w_body.args\n+\t${NS}::frame $w_body.args\n \tpack $args -fill both\n \n-\tlabel $args.origin_l -text [mc \"Source Location:\"]\n-\tentry $args.origin_t \\\n+\t${NS}::label $args.origin_l -text [mc \"Source Location:\"]\n+\t${NS}::entry $args.origin_t \\\n \t\t-textvariable @origin_url \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n \t\t-width 50\n-\tbutton $args.origin_b \\\n+\t${NS}::button $args.origin_b \\\n \t\t-text [mc \"Browse\"] \\\n \t\t-command [cb _open_origin]\n \tgrid $args.origin_l $args.origin_t $args.origin_b -sticky ew\n \n-\tlabel $args.where_l -text [mc \"Target Directory:\"]\n-\tentry $args.where_t \\\n+\t${NS}::label $args.where_l -text [mc \"Target Directory:\"]\n+\t${NS}::entry $args.where_t \\\n \t\t-textvariable @local_path \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n \t\t-width 50\n-\tbutton $args.where_b \\\n+\t${NS}::button $args.where_b \\\n \t\t-text [mc \"Browse\"] \\\n \t\t-command [cb _new_local_path]\n \tgrid $args.where_l $args.where_t $args.where_b -sticky ew\n \tset w_localpath $args.where_t\n \n-\tlabel $args.type_l -text [mc \"Clone Type:\"]\n-\tframe $args.type_f\n+\t${NS}::label $args.type_l -text [mc \"Clone Type:\"]\n+\t${NS}::frame $args.type_f\n \tset w_types [list]\n-\tlappend w_types [radiobutton $args.type_f.hardlink \\\n+\tlappend w_types [${NS}::radiobutton $args.type_f.hardlink \\\n \t\t-state disabled \\\n-\t\t-anchor w \\\n \t\t-text [mc \"Standard (Fast, Semi-Redundant, Hardlinks)\"] \\\n \t\t-variable @clone_type \\\n \t\t-value hardlink]\n-\tlappend w_types [radiobutton $args.type_f.full \\\n+\tlappend w_types [${NS}::radiobutton $args.type_f.full \\\n \t\t-state disabled \\\n-\t\t-anchor w \\\n \t\t-text [mc \"Full Copy (Slower, Redundant Backup)\"] \\\n \t\t-variable @clone_type \\\n \t\t-value full]\n-\tlappend w_types [radiobutton $args.type_f.shared \\\n+\tlappend w_types [${NS}::radiobutton $args.type_f.shared \\\n \t\t-state disabled \\\n-\t\t-anchor w \\\n \t\t-text [mc \"Shared (Fastest, Not Recommended, No Backup)\"] \\\n \t\t-variable @clone_type \\\n \t\t-value shared]\n@@ -1001,26 +996,25 @@ method _postcheckout_wait {fd_ph} {\n ## Open Existing Repository\n \n method _do_open {} {\n+\tglobal NS\n \t$w_next conf \\\n \t\t-state disabled \\\n \t\t-command [cb _do_open2] \\\n \t\t-text [mc \"Open\"]\n \n-\tframe $w_body\n-\tlabel $w_body.h \\\n-\t\t-font font_uibold \\\n+\t${NS}::frame $w_body\n+\t${NS}::label $w_body.h \\\n+\t\t-font font_uibold -anchor center \\\n \t\t-text [mc \"Open Existing Repository\"]\n \tpack $w_body.h -side top -fill x -pady 10\n \tpack $w_body -fill x -padx 10\n \n-\tframe $w_body.where\n-\tlabel $w_body.where.l -text [mc \"Repository:\"]\n-\tentry $w_body.where.t \\\n+\t${NS}::frame $w_body.where\n+\t${NS}::label $w_body.where.l -text [mc \"Repository:\"]\n+\t${NS}::entry $w_body.where.t \\\n \t\t-textvariable @local_path \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n \t\t-width 50\n-\tbutton $w_body.where.b \\\n+\t${NS}::button $w_body.where.b \\\n \t\t-text [mc \"Browse\"] \\\n \t\t-command [cb _open_local_path]\n \ndiff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl\nindex c8821c1..b78d216 100644\n--- a/lib/choose_rev.tcl\n+++ b/lib/choose_rev.tcl\n@@ -10,7 +10,7 @@ field w_list          ; # list of currently filtered specs\n field w_filter        ; # filter entry for $w_list\n \n field c_expr        {}; # current revision expression\n-field filter          ; # current filter string\n+field filter        \"\"; # current filter string\n field revtype     head; # type of revision chosen\n field cur_specs [list]; # list of specs for $revtype\n field spec_head       ; # list of all head specs\n@@ -32,7 +32,7 @@ proc new_unmerged {path {title {}}} {\n }\n \n constructor _new {path unmerged_only title} {\n-\tglobal current_branch is_detached\n+\tglobal current_branch is_detached use_ttk NS\n \n \tif {![info exists ::all_remotes]} {\n \t\tload_all_remotes\n@@ -41,65 +41,65 @@ constructor _new {path unmerged_only title} {\n \tset w $path\n \n \tif {$title ne {}} {\n-\t\tlabelframe $w -text $title\n+\t\t${NS}::labelframe $w -text $title\n \t} else {\n-\t\tframe $w\n+\t\t${NS}::frame $w\n \t}\n \tbind $w <Destroy> [cb _delete %W]\n \n \tif {$is_detached} {\n-\t\tradiobutton $w.detachedhead_r \\\n-\t\t\t-anchor w \\\n+\t\t${NS}::radiobutton $w.detachedhead_r \\\n \t\t\t-text [mc \"This Detached Checkout\"] \\\n \t\t\t-value HEAD \\\n \t\t\t-variable @revtype\n+\t\tif {!$use_ttk} {$w.detachedhead configure -anchor w}\n \t\tgrid $w.detachedhead_r -sticky we -padx {0 5} -columnspan 2\n \t}\n \n-\tradiobutton $w.expr_r \\\n+\t${NS}::radiobutton $w.expr_r \\\n \t\t-text [mc \"Revision Expression:\"] \\\n \t\t-value expr \\\n \t\t-variable @revtype\n-\tentry $w.expr_t \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w.expr_t \\\n \t\t-width 50 \\\n \t\t-textvariable @c_expr \\\n \t\t-validate key \\\n \t\t-validatecommand [cb _validate %d %S]\n \tgrid $w.expr_r $w.expr_t -sticky we -padx {0 5}\n \n-\tframe $w.types\n-\tradiobutton $w.types.head_r \\\n+\t${NS}::frame $w.types\n+\t${NS}::radiobutton $w.types.head_r \\\n \t\t-text [mc \"Local Branch\"] \\\n \t\t-value head \\\n \t\t-variable @revtype\n \tpack $w.types.head_r -side left\n-\tradiobutton $w.types.trck_r \\\n+\t${NS}::radiobutton $w.types.trck_r \\\n \t\t-text [mc \"Tracking Branch\"] \\\n \t\t-value trck \\\n \t\t-variable @revtype\n \tpack $w.types.trck_r -side left\n-\tradiobutton $w.types.tag_r \\\n+\t${NS}::radiobutton $w.types.tag_r \\\n \t\t-text [mc \"Tag\"] \\\n \t\t-value tag \\\n \t\t-variable @revtype\n \tpack $w.types.tag_r -side left\n \tset w_filter $w.types.filter\n-\tentry $w_filter \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_filter \\\n \t\t-width 12 \\\n \t\t-textvariable @filter \\\n \t\t-validate key \\\n \t\t-validatecommand [cb _filter %P]\n \tpack $w_filter -side right\n-\tpack [label $w.types.filter_icon \\\n+\tpack [${NS}::label $w.types.filter_icon \\\n \t\t-image ::choose_rev::img_find \\\n \t\t] -side right\n \tgrid $w.types -sticky we -padx {0 5} -columnspan 2\n \n-\tframe $w.list\n+\tif {$use_ttk} {\n+\t\tttk::frame $w.list -style SListbox.TFrame -padding 2\n+\t} else {\n+\t\tframe $w.list\n+\t}\n \tset w_list $w.list.l\n \tlistbox $w_list \\\n \t\t-font font_diff \\\n@@ -109,6 +109,9 @@ constructor _new {path unmerged_only title} {\n \t\t-exportselection false \\\n \t\t-xscrollcommand [cb _sb_set $w.list.sbx h] \\\n \t\t-yscrollcommand [cb _sb_set $w.list.sby v]\n+\tif {$use_ttk} {\n+\t\t$w_list configure -relief flat -highlightthickness 0 -borderwidth 0\n+\t}\n \tpack $w_list -fill both -expand 1\n \tgrid $w.list -sticky nswe -padx {20 5} -columnspan 2\n \tbind $w_list <Any-Motion>  [cb _show_tooltip @%x,%y]\n@@ -235,11 +238,12 @@ constructor _new {path unmerged_only title} {\n }\n \n method none {text} {\n+\tglobal NS use_ttk\n \tif {![winfo exists $w.none_r]} {\n-\t\tradiobutton $w.none_r \\\n-\t\t\t-anchor w \\\n+\t\t${NS}::radiobutton $w.none_r \\\n \t\t\t-value none \\\n \t\t\t-variable @revtype\n+\t\tif {!$use_ttk} {$w.none_r configure -anchor w}\n \t\tgrid $w.none_r -sticky we -padx {0 5} -columnspan 2\n \t}\n \t$w.none_r configure -text $text\n@@ -425,6 +429,7 @@ method _delete {current} {\n }\n \n method _sb_set {sb orient first last} {\n+\tglobal NS\n \tset old_focus [focus -lastfor $w]\n \n \tif {$first == 0 && $last == 1} {\n@@ -440,10 +445,10 @@ method _sb_set {sb orient first last} {\n \n \tif {![winfo exists $sb]} {\n \t\tif {$orient eq {h}} {\n-\t\t\tscrollbar $sb -orient h -command [list $w_list xview]\n+\t\t\t${NS}::scrollbar $sb -orient h -command [list $w_list xview]\n \t\t\tpack $sb -fill x -side bottom -before $w_list\n \t\t} else {\n-\t\t\tscrollbar $sb -orient v -command [list $w_list yview]\n+\t\t\t${NS}::scrollbar $sb -orient v -command [list $w_list yview]\n \t\t\tpack $sb -fill y -side right -before $w_list\n \t\t}\n \t\tif {$old_focus ne {}} {\ndiff --git a/lib/class.tcl b/lib/class.tcl\nindex dc21411..c27b714 100644\n--- a/lib/class.tcl\n+++ b/lib/class.tcl\n@@ -134,6 +134,13 @@ proc delete_this {{t {}}} {\n \tif {[namespace exists $t]} {namespace delete $t}\n }\n \n+proc make_dialog {t w args} {\n+\tupvar $t top $w pfx this this\n+\tglobal use_ttk\n+\tuplevel [linsert $args 0 make_toplevel $t $w]\n+\tpave_toplevel $pfx\n+}\n+\n proc make_toplevel {t w args} {\n \tupvar $t top $w pfx this this\n \ndiff --git a/lib/console.tcl b/lib/console.tcl\nindex c112464..1f3248f 100644\n--- a/lib/console.tcl\n+++ b/lib/console.tcl\n@@ -27,20 +27,20 @@ constructor embed {path title} {\n }\n \n method _init {} {\n-\tglobal M1B\n+\tglobal M1B use_ttk NS\n \n \tif {$is_toplevel} {\n-\t\tmake_toplevel top w -autodelete 0\n+\t\tmake_dialog top w -autodelete 0\n \t\twm title $top \"[appname] ([reponame]): $t_short\"\n \t} else {\n-\t\tframe $w\n+\t\t${NS}::frame $w\n \t}\n \n \tset console_cr 1.0\n \tset w_t $w.m.t\n \n-\tframe $w.m\n-\tlabel $w.m.l1 \\\n+\t${NS}::frame $w.m\n+\t${NS}::label $w.m.l1 \\\n \t\t-textvariable @t_long  \\\n \t\t-anchor w \\\n \t\t-justify left \\\n@@ -78,7 +78,7 @@ method _init {} {\n \t\t\"\n \n \tif {$is_toplevel} {\n-\t\tbutton $w.ok -text [mc \"Close\"] \\\n+\t\t${NS}::button $w.ok -text [mc \"Close\"] \\\n \t\t\t-state disabled \\\n \t\t\t-command [list destroy $w]\n \t\tpack $w.ok -side bottom -anchor e -pady 10 -padx 10\n@@ -206,13 +206,14 @@ method done {ok} {\n }\n \n method _sb_set {sb orient first last} {\n+\tglobal NS\n \tif {![winfo exists $sb]} {\n \t\tif {$first == $last || ($first == 0 && $last == 1)} return\n \t\tif {$orient eq {h}} {\n-\t\t\tscrollbar $sb -orient h -command [list $w_t xview]\n+\t\t\t${NS}::scrollbar $sb -orient h -command [list $w_t xview]\n \t\t\tpack $sb -fill x -side bottom -before $w_t\n \t\t} else {\n-\t\t\tscrollbar $sb -orient v -command [list $w_t yview]\n+\t\t\t${NS}::scrollbar $sb -orient v -command [list $w_t yview]\n \t\t\tpack $sb -fill y -side right -before $w_t\n \t\t}\n \t}\ndiff --git a/lib/database.tcl b/lib/database.tcl\nindex d4e0bed..1f187ed 100644\n--- a/lib/database.tcl\n+++ b/lib/database.tcl\n@@ -2,6 +2,7 @@\n # Copyright (C) 2006, 2007 Shawn Pearce\n \n proc do_stats {} {\n+\tglobal use_ttk NS\n \tset fd [git_read count-objects -v]\n \twhile {[gets $fd line] > 0} {\n \t\tif {[regexp {^([^:]+): (\\d+)$} $line _ name value]} {\n@@ -21,24 +22,22 @@ proc do_stats {} {\n \t}\n \n \tset w .stats_view\n-\ttoplevel $w\n+\tDialog $w\n+\twm withdraw $w\n \twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n \n-\tlabel $w.header -text [mc \"Database Statistics\"]\n-\tpack $w.header -side top -fill x\n-\n-\tframe $w.buttons -border 1\n-\tbutton $w.buttons.close -text [mc Close] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.close -text [mc Close] \\\n \t\t-default active \\\n \t\t-command [list destroy $w]\n-\tbutton $w.buttons.gc -text [mc \"Compress Database\"] \\\n+\t${NS}::button $w.buttons.gc -text [mc \"Compress Database\"] \\\n \t\t-default normal \\\n \t\t-command \"destroy $w;do_gc\"\n \tpack $w.buttons.close -side right\n \tpack $w.buttons.gc -side left\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tframe $w.stat -borderwidth 1 -relief solid\n+\t${NS}::labelframe $w.stat -text [mc \"Database Statistics\"]\n \tforeach s {\n \t\t{count           {mc \"Number of loose objects\"}}\n \t\t{size            {mc \"Disk space used by loose objects\"} { KiB}}\n@@ -55,8 +54,8 @@ proc do_stats {} {\n \t\t\tset value \"$value[lindex $s 2]\"\n \t\t}\n \n-\t\tlabel $w.stat.l_$name -text \"$label:\" -anchor w\n-\t\tlabel $w.stat.v_$name -text $value -anchor w\n+\t\t${NS}::label $w.stat.l_$name -text \"$label:\" -anchor w\n+\t\t${NS}::label $w.stat.v_$name -text $value -anchor w\n \t\tgrid $w.stat.l_$name $w.stat.v_$name -sticky we -padx {0 5}\n \t}\n \tpack $w.stat -pady 10 -padx 10\n@@ -65,6 +64,7 @@ proc do_stats {} {\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [list destroy $w]\n \twm title $w [append \"[appname] ([reponame]): \" [mc \"Database Statistics\"]]\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/error.tcl b/lib/error.tcl\nindex 7565015..c0fa69a 100644\n--- a/lib/error.tcl\n+++ b/lib/error.tcl\n@@ -71,11 +71,13 @@ proc ask_popup {msg} {\n }\n \n proc hook_failed_popup {hook msg {is_fatal 1}} {\n+\tglobal use_ttk NS\n \tset w .hookfail\n-\ttoplevel $w\n+\tDialog $w\n+\twm withdraw $w\n \n-\tframe $w.m\n-\tlabel $w.m.l1 -text \"$hook hook failed:\" \\\n+\t${NS}::frame $w.m\n+\t${NS}::label $w.m.l1 -text \"$hook hook failed:\" \\\n \t\t-anchor w \\\n \t\t-justify left \\\n \t\t-font font_uibold\n@@ -87,10 +89,10 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {\n \t\t-width 80 -height 10 \\\n \t\t-font font_diff \\\n \t\t-yscrollcommand [list $w.m.sby set]\n-\tscrollbar $w.m.sby -command [list $w.m.t yview]\n+\t${NS}::scrollbar $w.m.sby -command [list $w.m.t yview]\n \tpack $w.m.l1 -side top -fill x\n \tif {$is_fatal} {\n-\t\tlabel $w.m.l2 \\\n+\t\t${NS}::label $w.m.l2 \\\n \t\t\t-text [mc \"You must correct the above errors before committing.\"] \\\n \t\t\t-anchor w \\\n \t\t\t-justify left \\\n@@ -104,7 +106,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {\n \t$w.m.t insert 1.0 $msg\n \t$w.m.t conf -state disabled\n \n-\tbutton $w.ok -text OK \\\n+\t${NS}::button $w.ok -text OK \\\n \t\t-width 15 \\\n \t\t-command \"destroy $w\"\n \tpack $w.ok -side bottom -anchor e -pady 10 -padx 10\n@@ -112,5 +114,6 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {\n \tbind $w <Visibility> \"grab $w; focus $w\"\n \tbind $w <Key-Return> \"destroy $w\"\n \twm title $w [strcat \"[appname] ([reponame]): \" [mc \"error\"]]\n+\twm deiconify $w\n \ttkwait window $w\n }\ndiff --git a/lib/index.tcl b/lib/index.tcl\nindex d33896a..3b96777 100644\n--- a/lib/index.tcl\n+++ b/lib/index.tcl\n@@ -8,13 +8,15 @@ proc _delete_indexlock {} {\n }\n \n proc _close_updateindex {fd after} {\n+\tglobal use_ttk NS\n \tfconfigure $fd -blocking 1\n \tif {[catch {close $fd} err]} {\n \t\tset w .indexfried\n-\t\ttoplevel $w\n+\t\tDialog $w\n+\t\twm withdraw $w\n \t\twm title $w [strcat \"[appname] ([reponame]): \" [mc \"Index Error\"]]\n \t\twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n-\t\tpack [label $w.msg \\\n+\t\tpack [${NS}::label $w.msg \\\n \t\t\t-justify left \\\n \t\t\t-anchor w \\\n \t\t\t-text [strcat \\\n@@ -22,12 +24,12 @@ proc _close_updateindex {fd after} {\n \t\t\t\t\"\\n\\n$err\"] \\\n \t\t\t] -anchor w\n \n-\t\tframe $w.buttons\n-\t\tbutton $w.buttons.continue \\\n+\t\t${NS}::frame $w.buttons\n+\t\t${NS}::button $w.buttons.continue \\\n \t\t\t-text [mc \"Continue\"] \\\n \t\t\t-command [list destroy $w]\n \t\tpack $w.buttons.continue -side right -padx 5\n-\t\tbutton $w.buttons.unlock \\\n+\t\t${NS}::button $w.buttons.unlock \\\n \t\t\t-text [mc \"Unlock Index\"] \\\n \t\t\t-command \"destroy $w; _delete_indexlock\"\n \t\tpack $w.buttons.unlock -side right\n@@ -38,6 +40,7 @@ proc _close_updateindex {fd after} {\n \t\t\tgrab $w\n \t\t\tfocus $w.buttons.continue\n \t\t\"\n+\t\twm deiconify $w\n \t\ttkwait window $w\n \n \t\t$::main_status stop\ndiff --git a/lib/merge.tcl b/lib/merge.tcl\nindex 283e491..5cded23 100644\n--- a/lib/merge.tcl\n+++ b/lib/merge.tcl\n@@ -139,14 +139,14 @@ method _finish {cons ok} {\n \n constructor dialog {} {\n \tglobal current_branch\n-\tglobal M1B\n+\tglobal M1B use_ttk NS\n \n \tif {![_can_merge $this]} {\n \t\tdelete_this\n \t\treturn\n \t}\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Merge\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n@@ -154,21 +154,21 @@ constructor dialog {} {\n \n \tset _start [cb _start]\n \n-\tlabel $w.header \\\n+\t${NS}::label $w.header \\\n \t\t-text [mc \"Merge Into %s\" $current_branch] \\\n \t\t-font font_uibold\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.visualize \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.visualize \\\n \t\t-text [mc Visualize] \\\n \t\t-command [cb _visualize]\n \tpack $w.buttons.visualize -side left\n-\tbutton $w.buttons.merge \\\n+\t${NS}::button $w.buttons.merge \\\n \t\t-text [mc Merge] \\\n \t\t-command $_start\n \tpack $w.buttons.merge -side right\n-\tbutton $w.buttons.cancel \\\n+\t${NS}::button $w.buttons.cancel \\\n \t\t-text [mc \"Cancel\"] \\\n \t\t-command [cb _cancel]\n \tpack $w.buttons.cancel -side right -padx 5\ndiff --git a/lib/option.tcl b/lib/option.tcl\nindex 1d55b49..d4c5e45 100644\n--- a/lib/option.tcl\n+++ b/lib/option.tcl\n@@ -91,7 +91,7 @@ proc save_config {} {\n proc do_options {} {\n \tglobal repo_config global_config font_descs\n \tglobal repo_config_new global_config_new\n-\tglobal ui_comm_spell\n+\tglobal ui_comm_spell use_ttk NS\n \n \tarray unset repo_config_new\n \tarray unset global_config_new\n@@ -110,26 +110,28 @@ proc do_options {} {\n \t}\n \n \tset w .options_editor\n-\ttoplevel $w\n+\tDialog $w\n+\twm withdraw $w\n+\twm transient $w [winfo parent $w]\n \twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.restore -text [mc \"Restore Defaults\"] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.restore -text [mc \"Restore Defaults\"] \\\n \t\t-default normal \\\n \t\t-command do_restore_defaults\n \tpack $w.buttons.restore -side left\n-\tbutton $w.buttons.save -text [mc Save] \\\n+\t${NS}::button $w.buttons.save -text [mc Save] \\\n \t\t-default active \\\n \t\t-command [list do_save_config $w]\n \tpack $w.buttons.save -side right\n-\tbutton $w.buttons.cancel -text [mc \"Cancel\"] \\\n+\t${NS}::button $w.buttons.cancel -text [mc \"Cancel\"] \\\n \t\t-default normal \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.repo -text [mc \"%s Repository\" [reponame]]\n-\tlabelframe $w.global -text [mc \"Global (All Repositories)\"]\n+\t${NS}::labelframe $w.repo -text [mc \"%s Repository\" [reponame]]\n+\t${NS}::labelframe $w.global -text [mc \"Global (All Repositories)\"]\n \tpack $w.repo -side left -fill both -expand 1 -pady 5 -padx 5\n \tpack $w.global -side right -fill both -expand 1 -pady 5 -padx 5\n \n@@ -161,7 +163,7 @@ proc do_options {} {\n \t\tforeach f {repo global} {\n \t\t\tswitch -glob -- $type {\n \t\t\tb {\n-\t\t\t\tcheckbutton $w.$f.$optid -text $text \\\n+\t\t\t\t${NS}::checkbutton $w.$f.$optid -text $text \\\n \t\t\t\t\t-variable ${f}_config_new($name) \\\n \t\t\t\t\t-onvalue true \\\n \t\t\t\t\t-offvalue false\n@@ -169,10 +171,10 @@ proc do_options {} {\n \t\t\t}\n \t\t\ti-* {\n \t\t\t\tregexp -- {-(\\d+)\\.\\.(\\d+)$} $type _junk min max\n-\t\t\t\tframe $w.$f.$optid\n-\t\t\t\tlabel $w.$f.$optid.l -text \"$text:\"\n+\t\t\t\t${NS}::frame $w.$f.$optid\n+\t\t\t\t${NS}::label $w.$f.$optid.l -text \"$text:\"\n \t\t\t\tpack $w.$f.$optid.l -side left -anchor w -fill x\n-\t\t\t\tspinbox $w.$f.$optid.v \\\n+\t\t\t\ttspinbox $w.$f.$optid.v \\\n \t\t\t\t\t-textvariable ${f}_config_new($name) \\\n \t\t\t\t\t-from $min \\\n \t\t\t\t\t-to $max \\\n@@ -184,11 +186,9 @@ proc do_options {} {\n \t\t\t}\n \t\t\tc -\n \t\t\tt {\n-\t\t\t\tframe $w.$f.$optid\n-\t\t\t\tlabel $w.$f.$optid.l -text \"$text:\"\n-\t\t\t\tentry $w.$f.$optid.v \\\n-\t\t\t\t\t-borderwidth 1 \\\n-\t\t\t\t\t-relief sunken \\\n+\t\t\t\t${NS}::frame $w.$f.$optid\n+\t\t\t\t${NS}::label $w.$f.$optid.l -text \"$text:\"\n+\t\t\t\t${NS}::entry $w.$f.$optid.v \\\n \t\t\t\t\t-width 20 \\\n \t\t\t\t\t-textvariable ${f}_config_new($name)\n \t\t\t\tpack $w.$f.$optid.l -side left -anchor w\n@@ -199,7 +199,7 @@ proc do_options {} {\n \t\t\t\t\tmenu $w.$f.$optid.m\n \t\t\t\t\tbuild_encoding_menu $w.$f.$optid.m \\\n \t\t\t\t\t\t[list set ${f}_config_new($name)] 1\n-\t\t\t\t\tbutton $w.$f.$optid.b \\\n+\t\t\t\t\t${NS}::button $w.$f.$optid.b \\\n \t\t\t\t\t\t-text [mc \"Change\"] \\\n \t\t\t\t\t\t-command [list popup_btn_menu \\\n \t\t\t\t\t\t\t$w.$f.$optid.m $w.$f.$optid.b]\n@@ -226,11 +226,17 @@ proc do_options {} {\n \t\t\tset ${f}_config_new(gui.spellingdictionary) $value\n \t\t}\n \n-\t\tframe $w.$f.$optid\n-\t\tlabel $w.$f.$optid.l -text [mc \"Spelling Dictionary:\"]\n-\t\teval tk_optionMenu $w.$f.$optid.v \\\n-\t\t\t${f}_config_new(gui.spellingdictionary) \\\n-\t\t\t$all_dicts\n+\t\t${NS}::frame $w.$f.$optid\n+\t\t${NS}::label $w.$f.$optid.l -text [mc \"Spelling Dictionary:\"]\n+\t\tif {$use_ttk} {\n+\t\t\tttk::combobox $w.$f.$optid.v \\\n+\t\t\t\t-textvariable ${f}_config_new(gui.spellingdictionary) \\\n+\t\t\t\t-values $all_dicts -state readonly\n+\t\t} else {\n+\t\t\teval tk_optionMenu $w.$f.$optid.v \\\n+\t\t\t\t${f}_config_new(gui.spellingdictionary) \\\n+\t\t\t\t$all_dicts\n+\t\t}\n \t\tpack $w.$f.$optid.l -side left -anchor w -fill x\n \t\tpack $w.$f.$optid.v -side right -anchor e -padx 5\n \t\tpack $w.$f.$optid -side top -anchor w -fill x\n@@ -248,20 +254,20 @@ proc do_options {} {\n \t\tset global_config_new(gui.$font^^size) \\\n \t\t\t[font configure $font -size]\n \n-\t\tframe $w.global.$name\n-\t\tlabel $w.global.$name.l -text \"$text:\"\n-\t\tbutton $w.global.$name.b \\\n+\t\t${NS}::frame $w.global.$name\n+\t\t${NS}::label $w.global.$name.l -text \"$text:\"\n+\t\t${NS}::button $w.global.$name.b \\\n \t\t\t-text [mc \"Change Font\"] \\\n \t\t\t-command [list \\\n-\t\t\t\tchoose_font::pick \\\n+\t\t\t\ttchoosefont \\\n \t\t\t\t$w \\\n \t\t\t\t[mc \"Choose %s\" $text] \\\n \t\t\t\tglobal_config_new(gui.$font^^family) \\\n \t\t\t\tglobal_config_new(gui.$font^^size) \\\n \t\t\t\t]\n-\t\tlabel $w.global.$name.f -textvariable global_config_new(gui.$font^^family)\n-\t\tlabel $w.global.$name.s -textvariable global_config_new(gui.$font^^size)\n-\t\tlabel $w.global.$name.pt -text [mc \"pt.\"]\n+\t\t${NS}::label $w.global.$name.f -textvariable global_config_new(gui.$font^^family)\n+\t\t${NS}::label $w.global.$name.s -textvariable global_config_new(gui.$font^^size)\n+\t\t${NS}::label $w.global.$name.pt -text [mc \"pt.\"]\n \t\tpack $w.global.$name.l -side left -anchor w\n \t\tpack $w.global.$name.b -side right -anchor e\n \t\tpack $w.global.$name.pt -side right -anchor w\n@@ -280,6 +286,7 @@ proc do_options {} {\n \t\tset t [mc \"Options\"]\n \t}\n \twm title $w \"[appname] ([reponame]): $t\"\n+\twm deiconify $w\n \ttkwait window $w\n }\n \ndiff --git a/lib/remote_add.tcl b/lib/remote_add.tcl\nindex fb29422..50029d0 100644\n--- a/lib/remote_add.tcl\n+++ b/lib/remote_add.tcl\n@@ -13,45 +13,43 @@ field location     {}; # location of the remote the user has chosen\n field opt_action fetch; # action to do after registering the remote locally\n \n constructor dialog {} {\n-\tglobal repo_config\n+\tglobal repo_config use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n+\twm withdraw $top\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Add Remote\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t}\n \n-\tlabel $w.header -text [mc \"Add New Remote\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Add New Remote\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.create -text [mc Add] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.create -text [mc Add] \\\n \t\t-default active \\\n \t\t-command [cb _add]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.desc -text [mc \"Remote Details\"]\n+\t${NS}::labelframe $w.desc -text [mc \"Remote Details\"]\n \n-\tlabel $w.desc.name_l -text [mc \"Name:\"]\n+\t${NS}::label $w.desc.name_l -text [mc \"Name:\"]\n \tset w_name $w.desc.name_t\n-\tentry $w_name \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_name \\\n \t\t-width 40 \\\n \t\t-textvariable @name \\\n \t\t-validate key \\\n \t\t-validatecommand [cb _validate_name %d %S]\n \tgrid $w.desc.name_l $w_name -sticky we -padx {0 5}\n \n-\tlabel $w.desc.loc_l -text [mc \"Location:\"]\n+\t${NS}::label $w.desc.loc_l -text [mc \"Location:\"]\n \tset w_loc $w.desc.loc_t\n-\tentry $w_loc \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_loc \\\n \t\t-width 40 \\\n \t\t-textvariable @location\n \tgrid $w.desc.loc_l $w_loc -sticky we -padx {0 5}\n@@ -59,21 +57,21 @@ constructor dialog {} {\n \tgrid columnconfigure $w.desc 1 -weight 1\n \tpack $w.desc -anchor nw -fill x -pady 5 -padx 5\n \n-\tlabelframe $w.action -text [mc \"Further Action\"]\n+\t${NS}::labelframe $w.action -text [mc \"Further Action\"]\n \n-\tradiobutton $w.action.fetch \\\n+\t${NS}::radiobutton $w.action.fetch \\\n \t\t-text [mc \"Fetch Immediately\"] \\\n \t\t-value fetch \\\n \t\t-variable @opt_action\n \tpack $w.action.fetch -anchor nw\n \n-\tradiobutton $w.action.push \\\n+\t${NS}::radiobutton $w.action.push \\\n \t\t-text [mc \"Initialize Remote Repository and Push\"] \\\n \t\t-value push \\\n \t\t-variable @opt_action\n \tpack $w.action.push -anchor nw\n \n-\tradiobutton $w.action.none \\\n+\t${NS}::radiobutton $w.action.none \\\n \t\t-text [mc \"Do Nothing Else Now\"] \\\n \t\t-value none \\\n \t\t-variable @opt_action\n@@ -85,6 +83,7 @@ constructor dialog {} {\n \tbind $w <Visibility> [cb _visible]\n \tbind $w <Key-Escape> [list destroy $w]\n \tbind $w <Key-Return> [cb _add]\\;break\n+\twm deiconify $top\n \ttkwait window $w\n }\n \ndiff --git a/lib/remote_branch_delete.tcl b/lib/remote_branch_delete.tcl\nindex 2416420..f872a3d 100644\n--- a/lib/remote_branch_delete.tcl\n+++ b/lib/remote_branch_delete.tcl\n@@ -23,34 +23,40 @@ field full_cache\n field cached\n \n constructor dialog {} {\n-\tglobal all_remotes M1B\n+\tglobal all_remotes M1B use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Delete Branch Remotely\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t}\n \n-\tlabel $w.header -text [mc \"Delete Branch Remotely\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Delete Branch Remotely\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.delete -text [mc Delete] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.delete -text [mc Delete] \\\n \t\t-default active \\\n \t\t-command [cb _delete]\n \tpack $w.buttons.delete -side right\n-\tbutton $w.buttons.cancel -text [mc \"Cancel\"] \\\n+\t${NS}::button $w.buttons.cancel -text [mc \"Cancel\"] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.dest -text [mc \"From Repository\"]\n+\t${NS}::labelframe $w.dest -text [mc \"From Repository\"]\n \tif {$all_remotes ne {}} {\n-\t\tradiobutton $w.dest.remote_r \\\n+\t\t${NS}::radiobutton $w.dest.remote_r \\\n \t\t\t-text [mc \"Remote:\"] \\\n \t\t\t-value remote \\\n \t\t\t-variable @urltype\n-\t\teval tk_optionMenu $w.dest.remote_m @remote $all_remotes\n+\t\tif {$use_ttk} {\n+\t\t\tttk::combobox $w.dest.remote_m -textvariable @remote \\\n+\t\t\t\t-values $all_remotes -state readonly\n+\t\t} else {\n+\t\t\teval tk_optionMenu $w.dest.remote_m @remote $all_remotes\n+\t\t}\n \t\tgrid $w.dest.remote_r $w.dest.remote_m -sticky w\n \t\tif {[lsearch -sorted -exact $all_remotes origin] != -1} {\n \t\t\tset remote origin\n@@ -62,13 +68,11 @@ constructor dialog {} {\n \t} else {\n \t\tset urltype url\n \t}\n-\tradiobutton $w.dest.url_r \\\n+\t${NS}::radiobutton $w.dest.url_r \\\n \t\t-text [mc \"Arbitrary Location:\"] \\\n \t\t-value url \\\n \t\t-variable @urltype\n-\tentry $w.dest.url_t \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w.dest.url_t \\\n \t\t-width 50 \\\n \t\t-textvariable @url \\\n \t\t-validate key \\\n@@ -81,33 +85,30 @@ constructor dialog {} {\n \tgrid columnconfigure $w.dest 1 -weight 1\n \tpack $w.dest -anchor nw -fill x -pady 5 -padx 5\n \n-\tlabelframe $w.heads -text [mc \"Branches\"]\n-\tlistbox $w.heads.l \\\n+\t${NS}::labelframe $w.heads -text [mc \"Branches\"]\n+\tslistbox $w.heads.l \\\n \t\t-height 10 \\\n \t\t-width 70 \\\n \t\t-listvariable @head_list \\\n-\t\t-selectmode extended \\\n-\t\t-yscrollcommand [list $w.heads.sby set]\n-\tscrollbar $w.heads.sby -command [list $w.heads.l yview]\n+\t\t-selectmode extended\n \n-\tframe $w.heads.footer\n-\tlabel $w.heads.footer.status \\\n+\t${NS}::frame $w.heads.footer\n+\t${NS}::label $w.heads.footer.status \\\n \t\t-textvariable @status \\\n \t\t-anchor w \\\n \t\t-justify left\n-\tbutton $w.heads.footer.rescan \\\n+\t${NS}::button $w.heads.footer.rescan \\\n \t\t-text [mc \"Rescan\"] \\\n \t\t-command [cb _rescan]\n \tpack $w.heads.footer.status -side left -fill x\n \tpack $w.heads.footer.rescan -side right\n \n \tpack $w.heads.footer -side bottom -fill x\n-\tpack $w.heads.sby -side right -fill y\n \tpack $w.heads.l -side left -fill both -expand 1\n \tpack $w.heads -fill both -expand 1 -pady 5 -padx 5\n \n-\tlabelframe $w.validate -text [mc \"Delete Only If\"]\n-\tradiobutton $w.validate.head_r \\\n+\t${NS}::labelframe $w.validate -text [mc \"Delete Only If\"]\n+\t${NS}::radiobutton $w.validate.head_r \\\n \t\t-text [mc \"Merged Into:\"] \\\n \t\t-value head \\\n \t\t-variable @checktype\n@@ -115,7 +116,7 @@ constructor dialog {} {\n \ttrace add variable @head_list write [cb _write_head_list]\n \ttrace add variable @check_head write [cb _write_check_head]\n \tgrid $w.validate.head_r $w.validate.head_m -sticky w\n-\tradiobutton $w.validate.always_r \\\n+\t${NS}::radiobutton $w.validate.always_r \\\n \t\t-text [mc \"Always (Do not perform merge checks)\"] \\\n \t\t-value always \\\n \t\t-variable @checktype\ndiff --git a/lib/search.tcl b/lib/search.tcl\nindex b371e9a..7fdbf87 100644\n--- a/lib/search.tcl\n+++ b/lib/search.tcl\n@@ -14,15 +14,16 @@ field smarktop\n field smarkbot\n \n constructor new {i_w i_text args} {\n+\tglobal use_ttk NS\n \tset w      $i_w\n \tset ctext  $i_text\n \n-\tframe  $w\n-\tlabel  $w.l       -text [mc Find:]\n+\t${NS}::frame  $w\n+\t${NS}::label  $w.l       -text [mc Find:]\n \tentry  $w.ent -textvariable ${__this}::searchstring -background lightgreen\n-\tbutton $w.bn      -text [mc Next] -command [cb find_next]\n-\tbutton $w.bp      -text [mc Prev] -command [cb find_prev]\n-\tcheckbutton $w.cs -text [mc Case-Sensitive] \\\n+\t${NS}::button $w.bn      -text [mc Next] -command [cb find_next]\n+\t${NS}::button $w.bp      -text [mc Prev] -command [cb find_prev]\n+\t${NS}::checkbutton $w.cs -text [mc Case-Sensitive] \\\n \t\t-variable ${__this}::casesensitive -command [cb _incrsearch]\n \tpack   $w.l   -side left\n \tpack   $w.cs  -side right\ndiff --git a/lib/sshkey.tcl b/lib/sshkey.tcl\nindex 82a1a80..5f75bc9 100644\n--- a/lib/sshkey.tcl\n+++ b/lib/sshkey.tcl\n@@ -15,7 +15,7 @@ proc find_ssh_key {} {\n }\n \n proc do_ssh_key {} {\n-\tglobal sshkey_title have_tk85 sshkey_fd\n+\tglobal sshkey_title have_tk85 sshkey_fd use_ttk NS\n \n \tset w .sshkey_dialog\n \tif {[winfo exists $w]} {\n@@ -23,7 +23,7 @@ proc do_ssh_key {} {\n \t\treturn\n \t}\n \n-\ttoplevel $w\n+\tDialog $w\n \twm transient $w .\n \n \tset finfo [find_ssh_key]\n@@ -35,9 +35,9 @@ proc do_ssh_key {} {\n \t\tset gen_state   disabled\n \t}\n \n-\tframe $w.header -relief flat\n-\tlabel $w.header.lbl -textvariable sshkey_title -anchor w\n-\tbutton $w.header.gen -text [mc \"Generate Key\"] \\\n+\t${NS}::frame $w.header\n+\t${NS}::label $w.header.lbl -textvariable sshkey_title -anchor w\n+\t${NS}::button $w.header.gen -text [mc \"Generate Key\"] \\\n \t\t-command [list make_ssh_key $w] -state $gen_state\n \tpack $w.header.lbl -side left -expand 1 -fill x\n \tpack $w.header.gen -side right\n@@ -46,14 +46,16 @@ proc do_ssh_key {} {\n \ttext $w.contents -width 60 -height 10 -wrap char -relief sunken\n \tpack $w.contents -fill both -expand 1\n \tif {$have_tk85} {\n-\t\t$w.contents configure -inactiveselectbackground darkblue\n+\t\tset clr darkblue\n+\t\tif {$use_ttk} { set clr [ttk::style lookup . -selectbackground] }\n+\t\t$w.contents configure -inactiveselectbackground $clr\n \t}\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.close -text [mc Close] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.close -text [mc Close] \\\n \t\t-default active -command [list destroy $w]\n \tpack $w.buttons.close -side right\n-\tbutton $w.buttons.copy -text [mc \"Copy To Clipboard\"] \\\n+\t${NS}::button $w.buttons.copy -text [mc \"Copy To Clipboard\"] \\\n \t\t-command [list tk_textCopy $w.contents]\n \tpack $w.buttons.copy -side left\n \tpack $w.buttons -side bottom -fill x -pady 5 -padx 5\ndiff --git a/lib/status_bar.tcl b/lib/status_bar.tcl\nindex 51d4177..5fe3aad 100644\n--- a/lib/status_bar.tcl\n+++ b/lib/status_bar.tcl\n@@ -13,14 +13,16 @@ field units   {}; # unit of progress\n field meter   {}; # current core git progress meter (if active)\n \n constructor new {path} {\n+\tglobal use_ttk NS\n \tset w $path\n \tset w_l $w.l\n \tset w_c $w.c\n \n-\tframe $w \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken\n-\tlabel $w_l \\\n+\t${NS}::frame $w\n+\tif {!$use_ttk} {\n+\t\t$w configure -borderwidth 1 -relief sunken\n+\t}\n+\t${NS}::label $w_l \\\n \t\t-textvariable @status \\\n \t\t-anchor w \\\n \t\t-justify left\n@@ -41,8 +43,8 @@ constructor two_line {path} {\n \tset w_l $w.l\n \tset w_c $w.c\n \n-\tframe $w\n-\tlabel $w_l \\\n+\t${NS}::frame $w\n+\t${NS}::label $w_l \\\n \t\t-textvariable @status \\\n \t\t-anchor w \\\n \t\t-justify left\ndiff --git a/lib/themed.tcl b/lib/themed.tcl\nnew file mode 100644\nindex 0000000..518a5d5\n--- /dev/null\n+++ b/lib/themed.tcl\n@@ -0,0 +1,156 @@\n+# Functions for supporting the use of themed Tk widgets in git-gui.\n+# Copyright (C) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>\n+\n+proc InitTheme {} {\n+\t# Create a color label style (bg can be overridden by widget option)\n+\tttk::style layout Color.TLabel {\n+\t\tColor.Label.border -sticky news -children {\n+\t\t\tColor.label.fill -sticky news -children {\n+\t\t\t\tColor.Label.padding -sticky news -children {\n+\t\t\t\t\tColor.Label.label -sticky news}}}}\n+\teval [linsert [ttk::style configure TLabel] 0 \\\n+\t\t\t  ttk::style configure Color.TLabel]\n+\tttk::style configure Color.TLabel \\\n+\t\t-borderwidth 0 -relief flat -padding 2\n+\tttk::style map Color.TLabel -background {{} gold}\n+\t# We need a gold frame.\n+\tttk::style layout Gold.TFrame {\n+\t\tGold.Frame.border -sticky nswe -children {\n+\t\t\tGold.Frame.fill -sticky nswe}}\n+\tttk::style configure Gold.TFrame -background gold -relief flat\n+\t# listboxes should have a theme border so embed in ttk::frame\n+\tttk::style layout SListbox.TFrame {\n+        SListbox.Frame.Entry.field -sticky news -border true -children {\n+            SListbox.Frame.padding -sticky news\n+        }\n+    }\n+}\n+\n+proc gold_frame {w args} {\n+\tglobal use_ttk\n+\tif {$use_ttk} {\n+\t\teval [linsert $args 0 ttk::frame $w -style Gold.TFrame]\n+\t} else {\n+\t\teval [linsert $args 0 frame $w -background gold]\n+\t}\n+}\n+\n+proc tlabel {w args} {\n+\tglobal use_ttk\n+\tif {$use_ttk} {\n+\t\tset cmd [list ttk::label $w -style Color.TLabel]\n+\t\tforeach {k v} $args {\n+\t\t\tswitch -glob -- $k {\n+\t\t\t\t-activebackground {}\n+\t\t\t\tdefault { lappend cmd $k $v }\n+\t\t\t}\n+\t\t}\n+\t\teval $cmd\n+\t} else {\n+\t\teval [linsert $args 0 label $w]\n+\t}\n+}\n+\n+# Create a toplevel for use as a dialog.\n+# If available, sets the EWMH dialog hint and if ttk is enabled\n+# place a themed frame over the surface.\n+proc Dialog {w args} {\n+\teval [linsert $args 0 toplevel $w -class Dialog]\n+\tpave_toplevel $w\n+\treturn $w\n+}\n+\n+# Tk toplevels are not themed - so pave it over with a themed frame to get\n+# the base color correct per theme.\n+proc pave_toplevel {w} {\n+\tglobal use_ttk\n+\tif {$use_ttk && ![winfo exists $w.!paving]} {\n+\t\tset paving [ttk::frame $w.!paving]\n+\t\tplace $paving -x 0 -y 0 -relwidth 1 -relheight 1\n+\t\tlower $paving\n+\t}\n+}\n+\n+# Create a scrolled listbox with appropriate border for the current theme.\n+# On many themes the border for a scrolled listbox needs to go around the\n+# listbox and the scrollbar.\n+proc slistbox {w args} {\n+\tglobal use_ttk NS\n+\tif {$use_ttk} {\n+\t\tset f [ttk::frame $w -style SListbox.TFrame -padding 2]\n+\t} else {\n+\t\tset f [frame $w -relief flat]\n+\t}\n+    if {[catch {\n+\t\tif {$use_ttk} {\n+\t\t\teval [linsert $args 0 listbox $f.list -relief flat \\\n+\t\t\t\t\t  -highlightthickness 0 -borderwidth 0]\n+\t\t} else {\n+\t\t\teval [linsert $args 0 listbox $f.list]\n+\t\t}\n+        ${NS}::scrollbar $f.vs -command [list $f.list yview]\n+        $f.list configure -yscrollcommand [list $f.vs set]\n+        grid $f.list $f.vs -sticky news\n+        grid rowconfigure $f 0 -weight 1\n+        grid columnconfigure $f 0 -weight 1\n+\t\tbind $f.list <<ListboxSelect>> \\\n+\t\t\t[list event generate $w <<ListboxSelect>>]\n+        interp hide {} $w\n+        interp alias {} $w {} $f.list\n+    } err]} {\n+        destroy $f\n+        return -code error $err\n+    }\n+    return $w\n+}\n+\n+# fetch the background color from a widget.\n+proc get_bg_color {w} {\n+\tglobal use_ttk\n+\tif {$use_ttk} {\n+\t\tset bg [ttk::style lookup [winfo class $w] -background]\n+\t} else {\n+\t\tset bg [$w cget -background]\n+\t}\n+\treturn $bg\n+}\n+\n+# ttk::spinbox didn't get added until 8.6\n+proc tspinbox {w args} {\n+\tglobal use_ttk\n+\tif {$use_ttk && [llength [info commands ttk::spinbox]] > 0} {\n+\t\teval [linsert $args 0 ttk::spinbox $w]\n+\t} else {\n+\t\teval [linsert $args 0 spinbox $w]\n+\t}\n+}\n+\n+# Tk 8.6 provides a standard font selection dialog. This uses the native\n+# dialogs on Windows and MacOSX or a standard Tk dialog on X11.\n+proc tchoosefont {w title familyvar sizevar} {\n+\tif {[package vsatisfies [package provide Tk] 8.6]} {\n+\t\tupvar #0 $familyvar family\n+\t\tupvar #0 $sizevar size\n+\t\ttk fontchooser configure -parent $w -title $title \\\n+\t\t\t-font [list $family $size] \\\n+\t\t\t-command [list on_choosefont $familyvar $sizevar]\n+\t\ttk fontchooser show\n+\t} else {\n+\t\tchoose_font::pick $w $title $familyvar $sizevar\n+\t}\n+}\n+\n+# Called when the Tk 8.6 fontchooser selects a font.\n+proc on_choosefont {familyvar sizevar font} {\n+\tupvar #0 $familyvar family\n+\tupvar #0 $sizevar size\n+\tset font [font actual $font]\n+\tset family [dict get $font -family]\n+\tset size [dict get $font -size]\n+}\n+\n+# Local variables:\n+# mode: tcl\n+# indent-tabs-mode: t\n+# tab-width: 4\n+# End:\ndiff --git a/lib/tools_dlg.tcl b/lib/tools_dlg.tcl\nindex 5f7f08e..7eeda9d 100644\n--- a/lib/tools_dlg.tcl\n+++ b/lib/tools_dlg.tcl\n@@ -16,53 +16,50 @@ field ask_branch    0; # ask for a revision\n field ask_args      0; # ask for additional args\n \n constructor dialog {} {\n-\tglobal repo_config\n+\tglobal repo_config use_ttk NS\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Add Tool\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t\twm transient $top .\n \t}\n \n-\tlabel $w.header -text [mc \"Add New Tool Command\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Add New Tool Command\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tcheckbutton $w.buttons.global \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::checkbutton $w.buttons.global \\\n \t\t-text [mc \"Add globally\"] \\\n \t\t-variable @add_global\n \tpack $w.buttons.global -side left -padx 5\n-\tbutton $w.buttons.create -text [mc Add] \\\n+\t${NS}::button $w.buttons.create -text [mc Add] \\\n \t\t-default active \\\n \t\t-command [cb _add]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.desc -text [mc \"Tool Details\"]\n+\t${NS}::labelframe $w.desc -text [mc \"Tool Details\"]\n \n-\tlabel $w.desc.name_cmnt -anchor w\\\n+\t${NS}::label $w.desc.name_cmnt -anchor w\\\n \t\t-text [mc \"Use '/' separators to create a submenu tree:\"]\n \tgrid x $w.desc.name_cmnt -sticky we -padx {0 5} -pady {0 2}\n-\tlabel $w.desc.name_l -text [mc \"Name:\"]\n+\t${NS}::label $w.desc.name_l -text [mc \"Name:\"]\n \tset w_name $w.desc.name_t\n-\tentry $w_name \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_name \\\n \t\t-width 40 \\\n \t\t-textvariable @name \\\n \t\t-validate key \\\n \t\t-validatecommand [cb _validate_name %d %S]\n \tgrid $w.desc.name_l $w_name -sticky we -padx {0 5}\n \n-\tlabel $w.desc.cmd_l -text [mc \"Command:\"]\n+\t${NS}::label $w.desc.cmd_l -text [mc \"Command:\"]\n \tset w_cmd $w.desc.cmd_t\n-\tentry $w_cmd \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w_cmd \\\n \t\t-width 40 \\\n \t\t-textvariable @command\n \tgrid $w.desc.cmd_l $w_cmd -sticky we -padx {0 5} -pady {0 3}\n@@ -70,30 +67,30 @@ constructor dialog {} {\n \tgrid columnconfigure $w.desc 1 -weight 1\n \tpack $w.desc -anchor nw -fill x -pady 5 -padx 5\n \n-\tcheckbutton $w.confirm \\\n+\t${NS}::checkbutton $w.confirm \\\n \t\t-text [mc \"Show a dialog before running\"] \\\n \t\t-variable @confirm -command [cb _check_enable_dlg]\n \n-\tlabelframe $w.dlg -labelwidget $w.confirm\n+\t${NS}::labelframe $w.dlg -labelwidget $w.confirm\n \n-\tcheckbutton $w.dlg.askbranch \\\n+\t${NS}::checkbutton $w.dlg.askbranch \\\n \t\t-text [mc \"Ask the user to select a revision (sets \\$REVISION)\"] \\\n \t\t-variable @ask_branch -state disabled\n \tpack $w.dlg.askbranch -anchor w -padx 15\n \n-\tcheckbutton $w.dlg.askargs \\\n+\t${NS}::checkbutton $w.dlg.askargs \\\n \t\t-text [mc \"Ask the user for additional arguments (sets \\$ARGS)\"] \\\n \t\t-variable @ask_args -state disabled\n \tpack $w.dlg.askargs -anchor w -padx 15\n \n \tpack $w.dlg -anchor nw -fill x -pady {0 8} -padx 5\n \n-\tcheckbutton $w.noconsole \\\n+\t${NS}::checkbutton $w.noconsole \\\n \t\t-text [mc \"Don't show the command output window\"] \\\n \t\t-variable @no_console\n \tpack $w.noconsole -anchor w -padx 5\n \n-\tcheckbutton $w.needsfile \\\n+\t${NS}::checkbutton $w.needsfile \\\n \t\t-text [mc \"Run only if a diff is selected (\\$FILENAME not empty)\"] \\\n \t\t-variable @needs_file\n \tpack $w.needsfile -anchor w -padx 5\n@@ -182,40 +179,38 @@ field w              ; # widget path\n field w_names        ; # name list\n \n constructor dialog {} {\n-\tglobal repo_config global_config system_config\n+\tglobal repo_config global_config system_config use_ttk NS\n \n \tload_config 1\n \n-\tmake_toplevel top w\n+\tmake_dialog top w\n \twm title $top [append \"[appname] ([reponame]): \" [mc \"Remove Tool\"]]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n \t\twm transient $top .\n \t}\n \n-\tlabel $w.header -text [mc \"Remove Tool Commands\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Remove Tool Commands\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.create -text [mc Remove] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.create -text [mc Remove] \\\n \t\t-default active \\\n \t\t-command [cb _remove]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc Cancel] \\\n+\t${NS}::button $w.buttons.cancel -text [mc Cancel] \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tframe $w.list\n+\t${NS}::frame $w.list\n \tset w_names $w.list.l\n-\tlistbox $w_names \\\n+\tslistbox $w_names \\\n \t\t-height 10 \\\n \t\t-width 30 \\\n \t\t-selectmode extended \\\n-\t\t-exportselection false \\\n-\t\t-yscrollcommand [list $w.list.sby set]\n-\tscrollbar $w.list.sby -command [list $w.list.l yview]\n-\tpack $w.list.sby -side right -fill y\n+\t\t-exportselection false\n \tpack $w.list.l -side left -fill both -expand 1\n \tpack $w.list -fill both -expand 1 -pady 5 -padx 5\n \n@@ -232,7 +227,7 @@ constructor dialog {} {\n \t}\n \n \tif {$local_cnt > 0} {\n-\t\tlabel $w.colorlbl -foreground blue \\\n+\t\t${NS}::label $w.colorlbl -foreground blue \\\n \t\t\t-text [mc \"(Blue denotes repository-local tools)\"]\n \t\tpack $w.colorlbl -fill x -pady 5 -padx 5\n \t}\n@@ -277,14 +272,14 @@ field is_ok         0; # ok to start\n field argstr       {}; # arguments\n \n constructor dialog {fullname} {\n-\tglobal M1B\n+\tglobal M1B use_ttk NS\n \n \tset title [get_config \"guitool.$fullname.title\"]\n \tif {$title eq {}} {\n \t\tregsub {/} $fullname { / } title\n \t}\n \n-\tmake_toplevel top w -autodelete 0\n+\tmake_dialog top w -autodelete 0\n \twm title $top [append \"[appname] ([reponame]): \" $title]\n \tif {$top ne {.}} {\n \t\twm geometry $top \"+[winfo rootx .]+[winfo rooty .]\"\n@@ -297,7 +292,7 @@ constructor dialog {fullname} {\n \t\tset prompt [mc \"Run Command: %s\" $command]\n \t}\n \n-\tlabel $w.header -text $prompt -font font_uibold\n+\t${NS}::label $w.header -text $prompt -font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n \tset argprompt [get_config \"guitool.$fullname.argprompt\"]\n@@ -311,12 +306,10 @@ constructor dialog {fullname} {\n \t\t\tset argprompt [mc \"Arguments\"]\n \t\t}\n \n-\t\tlabelframe $w.arg -text $argprompt\n+\t\t${NS}::labelframe $w.arg -text $argprompt\n \n \t\tset w_args $w.arg.txt\n-\t\tentry $w_args \\\n-\t\t\t-borderwidth 1 \\\n-\t\t\t-relief sunken \\\n+\t\t${NS}::entry $w_args \\\n \t\t\t-width 40 \\\n \t\t\t-textvariable @argstr\n \t\tpack $w_args -padx 5 -pady 5 -fill both\n@@ -337,18 +330,18 @@ constructor dialog {fullname} {\n \t\tpack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5\n \t}\n \n-\tframe $w.buttons\n+\t${NS}::frame $w.buttons\n \tif {$is_ask_revs} {\n-\t\tbutton $w.buttons.visualize \\\n+\t\t${NS}::button $w.buttons.visualize \\\n \t\t\t-text [mc Visualize] \\\n \t\t\t-command [cb _visualize]\n \t\tpack $w.buttons.visualize -side left\n \t}\n-\tbutton $w.buttons.ok \\\n+\t${NS}::button $w.buttons.ok \\\n \t\t-text [mc OK] \\\n \t\t-command [cb _start]\n \tpack $w.buttons.ok -side right\n-\tbutton $w.buttons.cancel \\\n+\t${NS}::button $w.buttons.cancel \\\n \t\t-text [mc \"Cancel\"] \\\n \t\t-command [cb _cancel]\n \tpack $w.buttons.cancel -side right -padx 5\ndiff --git a/lib/transport.tcl b/lib/transport.tcl\nindex b18d9c7..60e3a64 100644\n--- a/lib/transport.tcl\n+++ b/lib/transport.tcl\n@@ -91,50 +91,55 @@ trace add variable push_remote write \\\n proc do_push_anywhere {} {\n \tglobal all_remotes current_branch\n \tglobal push_urltype push_remote push_url push_thin push_tags\n-\tglobal push_force\n+\tglobal push_force use_ttk NS\n \n \tset w .push_setup\n \ttoplevel $w\n+\twm withdraw $w\n \twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n+\tpave_toplevel $w\n \n-\tlabel $w.header -text [mc \"Push Branches\"] -font font_uibold\n+\t${NS}::label $w.header -text [mc \"Push Branches\"] \\\n+\t\t-font font_uibold -anchor center\n \tpack $w.header -side top -fill x\n \n-\tframe $w.buttons\n-\tbutton $w.buttons.create -text [mc Push] \\\n+\t${NS}::frame $w.buttons\n+\t${NS}::button $w.buttons.create -text [mc Push] \\\n \t\t-default active \\\n \t\t-command [list start_push_anywhere_action $w]\n \tpack $w.buttons.create -side right\n-\tbutton $w.buttons.cancel -text [mc \"Cancel\"] \\\n+\t${NS}::button $w.buttons.cancel -text [mc \"Cancel\"] \\\n \t\t-default normal \\\n \t\t-command [list destroy $w]\n \tpack $w.buttons.cancel -side right -padx 5\n \tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n \n-\tlabelframe $w.source -text [mc \"Source Branches\"]\n-\tlistbox $w.source.l \\\n+\t${NS}::labelframe $w.source -text [mc \"Source Branches\"]\n+\tslistbox $w.source.l \\\n \t\t-height 10 \\\n \t\t-width 70 \\\n-\t\t-selectmode extended \\\n-\t\t-yscrollcommand [list $w.source.sby set]\n+\t\t-selectmode extended\n \tforeach h [load_all_heads] {\n \t\t$w.source.l insert end $h\n \t\tif {$h eq $current_branch} {\n \t\t\t$w.source.l select set end\n \t\t}\n \t}\n-\tscrollbar $w.source.sby -command [list $w.source.l yview]\n-\tpack $w.source.sby -side right -fill y\n \tpack $w.source.l -side left -fill both -expand 1\n \tpack $w.source -fill both -expand 1 -pady 5 -padx 5\n \n-\tlabelframe $w.dest -text [mc \"Destination Repository\"]\n+\t${NS}::labelframe $w.dest -text [mc \"Destination Repository\"]\n \tif {$all_remotes ne {}} {\n-\t\tradiobutton $w.dest.remote_r \\\n+\t\t${NS}::radiobutton $w.dest.remote_r \\\n \t\t\t-text [mc \"Remote:\"] \\\n \t\t\t-value remote \\\n \t\t\t-variable push_urltype\n-\t\teval tk_optionMenu $w.dest.remote_m push_remote $all_remotes\n+\t\tif {$use_ttk} {\n+\t\t\tttk::combobox $w.dest.remote_m -textvariable push_remote \\\n+\t\t\t\t-values $all_remotes\n+\t\t} else {\n+\t\t\teval tk_optionMenu $w.dest.remote_m push_remote $all_remotes\n+\t\t}\n \t\tgrid $w.dest.remote_r $w.dest.remote_m -sticky w\n \t\tif {[lsearch -sorted -exact $all_remotes origin] != -1} {\n \t\t\tset push_remote origin\n@@ -145,13 +150,11 @@ proc do_push_anywhere {} {\n \t} else {\n \t\tset push_urltype url\n \t}\n-\tradiobutton $w.dest.url_r \\\n+\t${NS}::radiobutton $w.dest.url_r \\\n \t\t-text [mc \"Arbitrary Location:\"] \\\n \t\t-value url \\\n \t\t-variable push_urltype\n-\tentry $w.dest.url_t \\\n-\t\t-borderwidth 1 \\\n-\t\t-relief sunken \\\n+\t${NS}::entry $w.dest.url_t \\\n \t\t-width 50 \\\n \t\t-textvariable push_url \\\n \t\t-validate key \\\n@@ -166,16 +169,16 @@ proc do_push_anywhere {} {\n \tgrid columnconfigure $w.dest 1 -weight 1\n \tpack $w.dest -anchor nw -fill x -pady 5 -padx 5\n \n-\tlabelframe $w.options -text [mc \"Transfer Options\"]\n-\tcheckbutton $w.options.force \\\n+\t${NS}::labelframe $w.options -text [mc \"Transfer Options\"]\n+\t${NS}::checkbutton $w.options.force \\\n \t\t-text [mc \"Force overwrite existing branch (may discard changes)\"] \\\n \t\t-variable push_force\n \tgrid $w.options.force -columnspan 2 -sticky w\n-\tcheckbutton $w.options.thin \\\n+\t${NS}::checkbutton $w.options.thin \\\n \t\t-text [mc \"Use thin pack (for slow network connections)\"] \\\n \t\t-variable push_thin\n \tgrid $w.options.thin -columnspan 2 -sticky w\n-\tcheckbutton $w.options.tags \\\n+\t${NS}::checkbutton $w.options.tags \\\n \t\t-text [mc \"Include tags\"] \\\n \t\t-variable push_tags\n \tgrid $w.options.tags -columnspan 2 -sticky w\n@@ -191,5 +194,6 @@ proc do_push_anywhere {} {\n \tbind $w <Key-Escape> \"destroy $w\"\n \tbind $w <Key-Return> [list start_push_anywhere_action $w]\n \twm title $w [append \"[appname] ([reponame]): \" [mc \"Push\"]]\n+\twm deiconify $w\n \ttkwait window $w\n }\n-- \n1.6.5.1.1367.gcd48\n"},{"id":"130188","messageId":"alpine.DEB.1.00.0912201412420.4985@pacific.mpi-cbg.de","threadId":"21995","inReplyTo":"87my1ev4gi.fsf@users.sourceforge.net","subject":"Re: [msysGit] [PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-12-20T13:16:58Z","receivedAt":"2009-12-20T13:16:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 20 Dec 2009, Pat Thoyts wrote:\n\n>  This patch enables the use of themed Tk widgets with Tk 8.5 and above.\n>  These make a significant difference on Windows in making the application\n>  appear native. The gui.usettk git config variable may be set to disable\n>  this if the user prefers the classic Tk look.\n>\n>  On Windows and MacOSX ttk defaults to the native look as much as possible.\n>  On X11 the user may select a theme using the TkTheme XRDB resource class.\n\nMaybe you could describe a quick way to set that resource?\n\n>  Some support is included for Tk 8.6 features (themed spinbox and native\n>  font chooser for MacOSX and Windows).\n> \n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> \n> There is a screenshot of this running on Windows 7 at\n> http://www.patthoyts.tk/screenshots/git-gui-win32.png\n> It has been tested on Linux but not on MacOSX yet.\n\nPlease put this paragraph after the \"---\". Oh, and could you also include \na screenshot without ttk?\n\nAs to the patch: it is huge.  I suspect that it would be easier to read \nand verify if it was done in two patches: the first one introducing helper \nprocs that replace the existing repeated code, and a second patch that \nmodifies only the helper procs to handle ttk if desired.  You did that \nwith pad_label, but that proc is not defined in a central place, but \nlimited to about.tcl.\n\nHmm?\n\nThanks,\nDscho\n"},{"id":"130189","messageId":"a5b261830912200723s131f0b93w2f5ab94f19faf86a@mail.gmail.com","threadId":"21995","inReplyTo":"alpine.DEB.1.00.0912201412420.4985@pacific.mpi-cbg.de","subject":"Re: [msysGit] [PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Pat Thoyts","fromEmail":"patthoyts@googlemail.com","sentAt":"2009-12-20T15:23:11Z","receivedAt":"2009-12-20T15:23:11Z","isPatch":true,"sender":{"key":"patthoyts@googlemail.com","avatar":"https://gravatar.com/avatar/2300f94d9f59174a551dbc71278ac2cb2489f56afda920a57e189ad9de0a3f92?d=mp&s=160"},"body":"2009/12/20 Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n>>\n>>  On Windows and MacOSX ttk defaults to the native look as much as possible.\n>>  On X11 the user may select a theme using the TkTheme XRDB resource class.\n>\n> Maybe you could describe a quick way to set that resource?\n\necho '*TkTheme: clam' | xrdb -merge -\n\nOr edit ~/.Xdefaults or maybe ~/.Xresources to add a line containing\n *TkTheme: clam\nUsed to be the X resource database was the way to customize X11. The\nbuiltin themes are:\ndefault: thin borders, kind of windows98ish\nclassic: motif style\nalt: more windowsy still.\nclam: based on some version of the XFCE look a few years ago.\n\nOn Windows you also get winnative, xpnative or vista but the intention\nis that Tk just makes everything look native by selecting the correct\ntheme when it starts up. MacOSX gets an aqua theme. There is some work\nin progress to get the Qt or Gtk styling engines to draw the ttk\nelements so that it can pick up the current GNOME/KDE desktop -\neffectively making it look native on such systems there too. However,\non Windows is where this stuff makes the most difference and works\nbest.\n\nYou can of course just run git-gui in any git repository to see how it\nlooks at the moment. However I put up another screenshot at\nhttp://www.patthoyts.tk/screenshots/git-gui-old.png which is the\nunmodified git-gui code with tcl8.5. The fonts look worse with 8.4\n(even on windows).\n\n> As to the patch: it is huge.  I suspect that it would be easier to read\n> and verify if it was done in two patches: the first one introducing helper\n> procs that replace the existing repeated code, and a second patch that\n> modifies only the helper procs to handle ttk if desired.  You did that\n> with pad_label, but that proc is not defined in a central place, but\n> limited to about.tcl.\n\nI could split it up but it is quite hard to validate without switching\nthemes to ensure you got everything. I toggle through some themes\nlooking for unchanged widgets or rogue borders.\nI did find a bug in the choose_rev conversion when I rechecked with\ntcl 8.4 so I will reissue this.\n\nPat Thoyts\n"},{"id":"130191","messageId":"7vws0ha2mt.fsf@alter.siamese.dyndns.org","threadId":"21995","inReplyTo":"a5b261830912200723s131f0b93w2f5ab94f19faf86a@mail.gmail.com","subject":"Re: [PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-20T19:04:10Z","receivedAt":"2009-12-20T19:04:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@googlemail.com> writes:\n\n> 2009/12/20 Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n>>>\n>>>  On Windows and MacOSX ttk defaults to the native look as much as possible.\n>>>  On X11 the user may select a theme using the TkTheme XRDB resource class.\n>>\n>> Maybe you could describe a quick way to set that resource?\n>\n> echo '*TkTheme: clam' | xrdb -merge -\n>\n> Or edit ~/.Xdefaults or maybe ~/.Xresources to add a line containing\n>  *TkTheme: clam\n> Used to be the X resource database was the way to customize X11. The\n> builtin themes are:\n> default: thin borders, kind of windows98ish\n> classic: motif style\n> alt: more windowsy still.\n> clam: based on some version of the XFCE look a few years ago.\n\nOn X, does the \"default: thin borders, kind of windows98ish\" look very\ndifferent from the non-themed classic Tk style?\n\nWhat I am trying to get at is to gain enough information so that I can\nsuggest a rewrite of these two lines (quoted at the beginning by Dscho)\nlike this:\n\n   Ttk defaults to the native look as much as possible on Windows and\n   MacOSX; the default on X is the _________ look.\n\n   The user may choose a theme by:\n\n   - on Windows, doing ________;\n   - on MacOSX, doing _________;\n   - on X, selecting a theme using the TkTheme XRDB resource class;\n\nwhich I think would be much easier to read.\n"},{"id":"130192","messageId":"a5b261830912201225q7d596b55qb54676922301954e@mail.gmail.com","threadId":"21995","inReplyTo":"7vws0ha2mt.fsf@alter.siamese.dyndns.org","subject":"Re: [msysGit] [PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Pat Thoyts","fromEmail":"patthoyts@googlemail.com","sentAt":"2009-12-20T20:25:02Z","receivedAt":"2009-12-20T20:25:02Z","isPatch":true,"sender":{"key":"patthoyts@googlemail.com","avatar":"https://gravatar.com/avatar/2300f94d9f59174a551dbc71278ac2cb2489f56afda920a57e189ad9de0a3f92?d=mp&s=160"},"body":"2009/12/20 Junio C Hamano <gitster@pobox.com>:\n>\n> On X, does the \"default: thin borders, kind of windows98ish\" look very\n> different from the non-themed classic Tk style?\n>\n\nHere is a big set of screenshots then:\n\nUnmodified or with Tk 8.4:\noriginal windows: http://www.patthoyts.tk/screenshots/git-gui-old.png\noriginal unix:        http://www.patthoyts.tk/screenshots/git-gui-x11.png\n\nWith Tk 8.5 and using themed widgets:\nunix default: http://www.patthoyts.tk/screenshots/git-gui-default.png\nunix alt:        http://www.patthoyts.tk/screenshots/git-gui-alt.png\nunix classic: http://www.patthoyts.tk/screenshots/git-gui-classic.png\nunix clam:     http://www.patthoyts.tk/screenshots/git-gui-clam.png\nunix tileqt:    http://www.patthoyts.tk/screenshots/git-gui-tileqt.png\n (experimental)\n\nwindows7:     http://www.patthoyts.tk/screenshots/git-gui-win32.png\n\n\n> What I am trying to get at is to gain enough information so that I can\n> suggest a rewrite of these two lines (quoted at the beginning by Dscho)\n> like this:\n>\n>   Ttk defaults to the native look as much as possible on Windows and\n>   MacOSX; the default on X is the _________ look.\n>\n>   The user may choose a theme by:\n>\n>   - on Windows, doing ________;\n>   - on MacOSX, doing _________;\n>   - on X, selecting a theme using the TkTheme XRDB resource class;\n>\n> which I think would be much easier to read.\n\nYou write better than I do. The theme used globally by themed Tk can\nbe selected on at least Ubuntu's GNOME desktop by adding the following\nline into ~/.Xresources:\n  *TkTheme: clam\nIt is also possible to add a Theme menu or selection combobox onto the\noptions dialog and record a theme selection along with the other\ngit-gui saved options. Then a user could use 'git config gui.theme\nclam'. The set of available themes can be extended with packages and\nis somewhat platform dependent (ie: xpnative can only be present on\nWindows XP and above).\n\nPat Thoyts.\n"},{"id":"130193","messageId":"7vskb59wzt.fsf@alter.siamese.dyndns.org","threadId":"21995","inReplyTo":"a5b261830912201225q7d596b55qb54676922301954e@mail.gmail.com","subject":"Re: [msysGit] [PATCH] git-gui: use themed tk widgets with Tk 8.5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-20T21:05:58Z","receivedAt":"2009-12-20T21:05:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@googlemail.com> writes:\n\n> 2009/12/20 Junio C Hamano <gitster@pobox.com>:\n>>\n>> On X, does the \"default: thin borders, kind of windows98ish\" look very\n>> different from the non-themed classic Tk style?\n>>\n>\n> Here is a big set of screenshots then:\n\nWhich is probably very helpful to others.  Thanks.\n\nOn the other hand, if you wanted to give me just a quick answer, you\nsimply could have said \"The default X11 theme looks like the good old\nclassic Tk that draws diamond shaped radio-buttons\". (which is the\nimpression I got after running the current git-gui installation on my box\nand comparing it with your \"Tk 8.5 themed with unix default\").\n"}]}