summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-01-11 11:51:39 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-01-11 11:51:39 (GMT)
commit9cf1b3f4c61056a489fc431e79d6408223c2399d (patch)
treed8f5b59b2cf1768969b646eb693f62ec67595e3f
parent9049917e02eac18124825d8b467ac9a57a58ed38 (diff)
downloadtk-9cf1b3f4c61056a489fc431e79d6408223c2399d.zip
tk-9cf1b3f4c61056a489fc431e79d6408223c2399d.tar.gz
tk-9cf1b3f4c61056a489fc431e79d6408223c2399d.tar.bz2
Pretty up the messagebox on unix using PNG images for the icons and group the icons into one place.
-rw-r--r--ChangeLog7
-rw-r--r--library/bgerror.tcl49
-rw-r--r--library/icons.tcl156
-rw-r--r--library/msgbox.tcl60
-rw-r--r--library/tk.tcl3
5 files changed, 185 insertions, 90 deletions
diff --git a/ChangeLog b/ChangeLog
index 344098d..9be8319 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-11 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * library/bgerror.tcl: Pretty up the unix tk_messageBox
+ * library/icons.tcl: icons with PNG images and grouped
+ * library/msgbox.tcl: all the stock icons in one file.
+ * library/tk.tcl:
+
2009-01-11 Joe English <jenglish@users.sourceforge.net>
* generic/ttk/ttkNotebook.c(NotebookCleanup):
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 029f44c..54e764e 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -11,7 +11,7 @@
# Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
# Copyright (c) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.39 2009/01/08 16:31:03 patthoyts Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.40 2009/01/11 11:51:39 patthoyts Exp $
#
namespace eval ::tk::dialog::error {
@@ -30,46 +30,6 @@ namespace eval ::tk::dialog::error {
}
}
-image create photo ::tk::dialog::error::image::stop -data {
- iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAABHNCSVQICAgI
- fAhkiAAAAAlwSFlzAAAJbAAACWwBxlKDcgAAABl0RVh0U29mdHdhcmUAd3d3
- Lmlua3NjYXBlLm9yZ5vuPBoAAAXrSURBVEiJlZdNjBtFFsf/r6q73d0ex/Z8
- KpMZJsmyImImCQixe8gIBOFDEI0EF1gFiQsbTtwiLhxAWpS9cOCyuUTZA1qx
- J4RWawlBQAKhhOTAhwiQrJIsJMMwkw9nPB5/dLe7qx4Ht+22x55JWnrq6tfV
- 7/d/5ap6ZWJmbHUViCSAeVfKv1ppd5+5LZu2clmbtUZYLvthpVJr1Orn60qd
- BHB6gVltFZM2AxeIHFuINzM7Jl+a2rc3Pzq1YyhlmEAUAUGj2SllAlLCDwIU
- l5erS9//UKpev/G+r/XfFpi9uwafkvIld2T477MHH9uey2RNFIuA5/ft247g
- 2EAug9Lt1fDC2XMr3u3SG08p9f4dgQtE5Ej5j51/eujw7tm5HN0sAo3GYFjc
- bsVhAGyZoLSNn/9/ZW3xm/P/9rV+baEH1AUuEFE6lTo19/ij82O5vI1SeSAI
- PbBuEfFDLoNiedW/+MWZ014QPJWEi6QK1zCOzz1yYH7Mdm2Uys0gCdPMXcYA
- dPsdoLh517Ffr1WQd4bsPY/8ed6W8niS1QZ/KuXLOx964PCoYdrs+X1h3SI6
- pjghAAwGQ7es7iOXydlTD84e/kTKl7vABSLXGckfmxkdybJuwtQdZtUUkoQl
- MmYGM0NXPExOTWXt4dyxApHbBttCvHnfg/snuOongnVnpXkQqAlTLSEtwdzj
- rzWw+4H7Jywh3gIAUSCS7vjYX7aZlsm2vQHUbwhVn6w4AevrZyBtpEx3bPjF
- ApEUAOa377pnmIOw7xAOyqo9KkQda31HBC1Ex4jARFD1AKMzk8MA5g1HyiMj
- +VyGIwEmAESd5QKKG9wO2FoyXX50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1I9PSEafzRcizbdFImM1PD
- byjfawTLYXTtFPOXnwMXAVRjq/S0V5k5HJQxAXAAZGOwCyAd3x0ANoAUABOA
- ROssCDQABAB8AF6cYT2GrgKoMnO05W8cixAAjBjkxHcrthZYA4gAhAm4FwsI
- ecBf1t8Bael4x3h6yMUAAAAASUVORK5CYII=
-}
-
proc ::tk::dialog::error::Return {} {
variable button
@@ -190,10 +150,6 @@ proc ::tk::dialog::error::bgerror err {
ttk::frame $dlg.bot
ttk::frame $dlg.top
- if {$windowingsystem eq "x11"} {
- #$dlg.bot configure -relief raised -border 1
- #$dlg.top configure -relief raised -border 1
- }
pack $dlg.bot -side bottom -fill both
pack $dlg.top -side top -fill both -expand 1
@@ -220,9 +176,10 @@ proc ::tk::dialog::error::bgerror err {
# the window manager decorations and aesthetics.
set wrapwidth [expr {$wrapwidth-60-[winfo pixels $dlg 9m]}]
ttk::label $dlg.msg -justify left -text $text -wraplength $wrapwidth
- ttk::label $dlg.bitmap -image ::tk::dialog::error::image::stop
+ ttk::label $dlg.bitmap -image ::tk::icons::error
grid $dlg.bitmap $dlg.msg -in $dlg.top -row 0 -padx 3m -pady 3m
+ grid configure $dlg.bitmap -sticky ne
grid configure $dlg.msg -sticky nsw -padx {0 3m}
grid rowconfigure $dlg.top 1 -weight 1
grid columnconfigure $dlg.top 1 -weight 1
diff --git a/library/icons.tcl b/library/icons.tcl
new file mode 100644
index 0000000..452ae50
--- /dev/null
+++ b/library/icons.tcl
@@ -0,0 +1,156 @@
+# icons.tcl --
+#
+# A set of stock icons for use in Tk dialogs. The icons used here
+# were provided by the Tango Desktop project which provides a
+# unified set of high quality icons licensed under the
+# Creative Commons Attribution Share-Alike license
+# (http://creativecommons.org/licenses/by-sa/3.0/)
+#
+# See http://tango.freedesktop.org/Tango_Desktop_Project
+#
+# Copyright (c) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
+#
+# RCS: @(#) $Id: icons.tcl,v 1.1 2009/01/11 11:51:39 patthoyts Exp $
+#
+
+namespace eval ::tk::icons {}
+
+image create photo ::tk::icons::warning -data {
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAABSZJREFU
+ WIXll1toVEcYgL+Zc87u2Yu7MYmrWRuTJuvdiMuqiJd4yYKXgMQKVkSjFR80kFIVJfWCWlvpg4h9
+ 8sXGWGof8iKNICYSo6JgkCBEJRG8ImYThNrNxmaTeM7pQ5IlJkabi0/9YZhhZv7///4z/8zPgf+7
+ KCNRLgdlJijXwRyuDTlcxV9hbzv8nQmxMjg+XDtiOEplkG9PSfkztGmTgmFQd+FCVzwa3fYN/PHZ
+ AcpBaReicW5xcbb64IEQqko8Lc26d/58cxS+/BY6hmJvyEfQBoUpwWCmW1FErKaGWHU13uRk4QkE
+ UtxQNFR7QwIoB4eiKD9PWbVKbb10CZmaCqmpxCormRYO26QQx85B0mcD+AeK0xYvHqu1tNDx+DH6
+ gQM4jh0j3tCA3tGBLyfHLuD7zwJwAcYqun44sHy51nr5MsqsWWj5+djCYdS5c4ldvUr24sU2qarf
+ lUL6qAN0wqH0vDy7+fAhXZEI+v79CNmt7igpofPVK5SmJvyhkJBwYlQBSiHd7vUWZ86bp8WqqtCW
+ LkVbuBAhBEIItGAQ2+rVxG7cICMY1KTDsekc5IwagIQTmStXis47dzBiMfR9+xCi+wb39s79+zFi
+ MczGRjLmzTMlnBoVgLMwyzF+/Cb/lClq2/Xr2AoKUKdPxzAMWltbiUajmKaJkpGBY8sW3tbW4g8E
+ VNXrXVEKK0YMoMKp7Px8K15Tg2VZOHbvBiASiRAMBgkGg0QiEYQQOIuLsRSFrnv3yJo/HxVOW594
+ 7D4KUAa57qysvNSUFOVtbS32rVuRfj9CCFwuV2Kfy+VCCIFMScFVVET7/fukJidLm883rQy+HhaA
+ BUII8cvUNWt4W1WFcLvRd+5MnHl/AOjOB+eOHchx44jX1ZEdCqkSTpaDbcgA5+GrpNmzc9ymKdvr
+ 67Hv2oVMSko4cjgc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u9B
+ b3bgkTs3LPN+52srzPlX5V7RUerTy6M8/0Zj4uUDH45Hg13PdB/9425gzLUhQH0RgDQgC8hKLyid
+ 7a/c9oCV4d9WVTpLbF5TmX5tRaGYkecjJ8MLAkZD4wyMRGg636PrDjfHzrT26NhYT33w1Kt/Hh/u
+ 6XUDh4BBIHwlDIBTohlANpBhWb6s7PKNK30FCzZa6dnVYORoIX2OExVF26Px8NCZSN/5d0bb3mlK
+ JGIhHLpDwLAL4jPnxSs9nBqABXhddrw4XdRygSrABuKuxYBx9/6KDqlf2vo3PYe56vmkuwMAAAAA
+ SUVORK5CYII=
+}
diff --git a/library/msgbox.tcl b/library/msgbox.tcl
index 33c50bc..a518308 100644
--- a/library/msgbox.tcl
+++ b/library/msgbox.tcl
@@ -3,7 +3,7 @@
# Implements messageboxes for platforms that do not have native
# messagebox support.
#
-# RCS: @(#) $Id: msgbox.tcl,v 1.37 2008/12/11 18:13:08 jenglish Exp $
+# RCS: @(#) $Id: msgbox.tcl,v 1.38 2009/01/11 11:51:39 patthoyts Exp $
#
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
#
@@ -271,15 +271,11 @@ proc ::tk::MessageBox {args} {
::tk::unsupported::MacWindowStyle style $w moveableModal {}
}
- ttk::frame $w.bot;# -background $bg
+ ttk::frame $w.bot
grid anchor $w.bot center
pack $w.bot -side bottom -fill both
- ttk::frame $w.top;# -background $bg
+ ttk::frame $w.top
pack $w.top -side top -fill both -expand 1
- if {$windowingsystem ne "aqua"} {
- #$w.bot configure -relief raised -bd 1
- #$w.top configure -relief raised -bd 1
- }
# 4. Fill the top part with bitmap, message and detail (use the
# option database for -wraplength and -font so that they can be
@@ -291,53 +287,32 @@ proc ::tk::MessageBox {args} {
option add *Dialog.dtl.font TkDefaultFont widgetDefault
ttk::label $w.msg -anchor nw -justify left -text $data(-message)
- #-background $bg
if {$data(-detail) ne ""} {
ttk::label $w.dtl -anchor nw -justify left -text $data(-detail)
- #-background $bg
}
if {$data(-icon) ne ""} {
- if {$windowingsystem eq "aqua"
- || ([winfo depth $w] < 4) || $tk_strictMotif} {
+ if {([winfo depth $w] < 4) || $tk_strictMotif} {
# ttk::label has no -bitmap option
label $w.bitmap -bitmap $data(-icon) -background $bg
} else {
- canvas $w.bitmap -width 32 -height 32 -highlightthickness 0 \
- -background $bg
switch $data(-icon) {
- error {
- $w.bitmap create oval 0 0 31 31 -fill red -outline black
- $w.bitmap create line 9 9 23 23 -fill white -width 4
- $w.bitmap create line 9 23 23 9 -fill white -width 4
- }
- info {
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::b1
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::b2
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::i
- }
- question {
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::b1
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::b2
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::q
- }
- default {
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::w1
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::w2
- $w.bitmap create image 0 0 -anchor nw \
- -image ::tk::dialog::w3
- }
+ error {
+ ttk::label $w.bitmap -image ::tk::icons::error
+ }
+ info {
+ ttk::label $w.bitmap -image ::tk::icons::information
+ }
+ question {
+ ttk::label $w.bitmap -image ::tk::icons::question
+ }
+ default {
+ ttk::label $w.bitmap -image ::tk::icons::warning
+ }
}
}
}
grid $w.bitmap $w.msg -in $w.top -sticky news -padx 2m -pady 2m
+ grid configure $w.bitmap -sticky nw
grid columnconfigure $w.top 1 -weight 1
if {$data(-detail) ne ""} {
grid ^ $w.dtl -in $w.top -sticky news -padx 2m -pady {0 2m}
@@ -360,7 +335,6 @@ proc ::tk::MessageBox {args} {
eval [list tk::AmpWidget ttk::button $w.$name] $opts \
[list -command [list set tk::Priv(button) $name]]
- # -padx 3m
if {$name eq $data(-default)} {
$w.$name configure -default active
diff --git a/library/tk.tcl b/library/tk.tcl
index 1721429..7f0cd91 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.81 2008/12/19 14:32:25 dgp Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.82 2009/01/11 11:51:39 patthoyts Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -404,6 +404,7 @@ if {$::tk_library ne ""} {
namespace eval :: [list source [file join $::tk_library $file.tcl]]
}
namespace eval ::tk {
+ SourceLibFile icons
SourceLibFile button
SourceLibFile entry
SourceLibFile listbox