summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-01-29 17:35:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-01-29 17:35:46 (GMT)
commit9ccc1a8aa914ebe1de82ca8644458ddb0b411d45 (patch)
tree64759761e5b84adf8c5300742390224c87afa0a1
parenteabe2bf04950081714881265b538ee8d12cfe6be (diff)
downloadtk-9ccc1a8aa914ebe1de82ca8644458ddb0b411d45.zip
tk-9ccc1a8aa914ebe1de82ca8644458ddb0b411d45.tar.gz
tk-9ccc1a8aa914ebe1de82ca8644458ddb0b411d45.tar.bz2
merge updates from HEAD
-rw-r--r--ChangeLog11
-rw-r--r--doc/ttk_button.n11
-rw-r--r--doc/ttk_checkbutton.n11
-rw-r--r--doc/ttk_combobox.n7
-rw-r--r--doc/ttk_entry.n8
-rw-r--r--doc/ttk_frame.n7
-rw-r--r--doc/ttk_label.n11
-rw-r--r--doc/ttk_labelframe.n7
-rw-r--r--doc/ttk_menubutton.n11
-rw-r--r--doc/ttk_notebook.n7
-rw-r--r--doc/ttk_panedwindow.n7
-rw-r--r--doc/ttk_progressbar.n7
-rw-r--r--doc/ttk_radiobutton.n11
-rw-r--r--doc/ttk_scrollbar.n7
-rw-r--r--doc/ttk_separator.n8
-rw-r--r--doc/ttk_sizegrip.n8
-rw-r--r--doc/ttk_treeview.n8
-rw-r--r--unix/tkUnixRFont.c39
18 files changed, 100 insertions, 86 deletions
diff --git a/ChangeLog b/ChangeLog
index a4bbc8f..6bdafaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-01-29 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * doc/ttk_*.n: Adjusted handling of the standard options part of the
+ Ttk manual pages so that they are documented in the correct location.
+ [Bug 1876493]
+
+2008-01-28 Joe English <jenglish@users.sourceforge.net>
+
+ * unix/tkUnixRFont.c: Re-fix strict-aliasing warnings
+ reintroduced by last patch.
+
2008-01-27 Joe English <jenglish@users.sourceforge.net>
* generic/ttk/ttkNotebook.c: Make sure to schedule a
diff --git a/doc/ttk_button.n b/doc/ttk_button.n
index 2f357de..0fb4f44 100644
--- a/doc/ttk_button.n
+++ b/doc/ttk_button.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_button.n,v 1.3.2.4 2008/01/29 17:35:47 dgp Exp $
'\"
.so man.macros
.TH ttk::button n 8.5 Tk "Tk Themed Widget"
@@ -17,10 +17,11 @@ ttk::button \- Widget that issues a command when pressed
.SH DESCRIPTION
A \fBttk::button\fR widget displays a textual label and/or image,
and evaluates a command when pressed.
-.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+.SO ttk_widget
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
diff --git a/doc/ttk_checkbutton.n b/doc/ttk_checkbutton.n
index 77ad2ec..3f64533 100644
--- a/doc/ttk_checkbutton.n
+++ b/doc/ttk_checkbutton.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_checkbutton.n,v 1.4.2.4 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::checkbutton n 8.5 Tk "Tk Themed Widget"
@@ -18,10 +18,11 @@ ttk::checkbutton \- On/off widget
A \fBttk::checkbutton\fR widget is used to show or change a setting.
It has two states, selected and deselected.
The state of the checkbutton may be linked to a Tcl variable.
-.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+.SO ttk_widget
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
diff --git a/doc/ttk_combobox.n b/doc/ttk_combobox.n
index 8a23fab..b1ccc60 100644
--- a/doc/ttk_combobox.n
+++ b/doc/ttk_combobox.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.6 2007/12/10 18:39:28 dgp Exp $
+'\" RCS: @(#) $Id: ttk_combobox.n,v 1.4.2.7 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::combobox n 8.5 Tk "Tk Themed Widget"
@@ -18,8 +18,9 @@ ttk::combobox \- text field with popdown selection list
A \fBttk::combobox\fR combines a text field with a pop-down list of values;
the user may select the value of the text field from among the
values in the list.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.\" ALSO: Other entry widget options
.SH "WIDGET-SPECIFIC OPTIONS"
diff --git a/doc/ttk_entry.n b/doc/ttk_entry.n
index df60f2c..b32a5ce 100644
--- a/doc/ttk_entry.n
+++ b/doc/ttk_entry.n
@@ -7,7 +7,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SOURCE: entry.n, r1.12
-'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.4 2007/12/10 18:39:28 dgp Exp $
+'\" RCS: @(#) $Id: ttk_entry.n,v 1.3.2.5 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::entry n 8.5 Tk "Tk Themed Widget"
@@ -25,9 +25,9 @@ The value of the string may be linked to a Tcl variable
with the \fB\-textvariable\fR option.
Entry widgets support horizontal scrolling with the
standard \fB\-xscrollcommand\fR option and \fBxview\fR widget command.
-.SO
-\-class \-cursor \-style \-takefocus
-\-xscrollcommand
+.SO ttk_widget
+\-class \-cursor \-style
+\-takefocus \-xscrollcommand
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-exportselection exportSelection ExportSelection
diff --git a/doc/ttk_frame.n b/doc/ttk_frame.n
index f0070ed..b9fbaad 100644
--- a/doc/ttk_frame.n
+++ b/doc/ttk_frame.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_frame.n,v 1.3.2.4 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::frame n 8.5 Tk "Tk Themed Widget"
@@ -17,8 +17,9 @@ ttk::frame \- Simple container widget
.SH DESCRIPTION
A \fBttk::frame\fR widget is a container, used to group other widgets
together.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-borderwidth borderWidth BorderWidth
diff --git a/doc/ttk_label.n b/doc/ttk_label.n
index 95d45f3..133405d 100644
--- a/doc/ttk_label.n
+++ b/doc/ttk_label.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_label.n,v 1.3.2.4 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::label n 8.5 Tk "Tk Themed Widget"
@@ -18,10 +18,11 @@ ttk::label \- Display a text string and/or image
A \fBttk::label\fR widget displays a textual label and/or image.
The label may be linked to a Tcl variable
to automatically change the displayed text.
-.SO
-\-class \-compound \-cursor \-image
-\-style \-takefocus \-text \-textvariable
-\-underline \-width
+.SO ttk_widget
+\-class \-compound \-cursor
+\-image \-style \-takefocus
+\-text \-textvariable \-underline
+\-width
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-anchor anchor Anchor
diff --git a/doc/ttk_labelframe.n b/doc/ttk_labelframe.n
index ef6498c..eb3d89a 100644
--- a/doc/ttk_labelframe.n
+++ b/doc/ttk_labelframe.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_labelframe.n,v 1.3.2.4 2008/01/29 17:35:48 dgp Exp $
'\"
.so man.macros
.TH ttk::labelframe n 8.5 Tk "Tk Themed Widget"
@@ -18,8 +18,9 @@ ttk::labelframe \- Container widget with optional label
A \fBttk::labelframe\fR widget is a container used to group other widgets
together. It has an optional label, which may be a plain text string or
another widget.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.\" XXX: Currently included, but may go away:
diff --git a/doc/ttk_menubutton.n b/doc/ttk_menubutton.n
index 2711e1f..d80a28e 100644
--- a/doc/ttk_menubutton.n
+++ b/doc/ttk_menubutton.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_menubutton.n,v 1.3.2.4 2008/01/29 17:35:50 dgp Exp $
'\"
.so man.macros
.TH ttk::menubutton n 8.5 Tk "Tk Themed Widget"
@@ -17,10 +17,11 @@ ttk::menubutton \- Widget that pops down a menu when pressed
.SH DESCRIPTION
A \fBttk::menubutton\fR widget displays a textual label and/or image,
and displays a menu when pressed.
-.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+.SO ttk_widget
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-direction direction Direction
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n
index d86331a..ba8e6db 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.4 2007/11/25 19:19:21 dgp Exp $
+'\" RCS: @(#) $Id: ttk_notebook.n,v 1.3.2.5 2008/01/29 17:35:50 dgp Exp $
'\"
.so man.macros
.TH ttk::notebook n 8.5 Tk "Tk Themed Widget"
@@ -24,8 +24,9 @@ A \fBttk::notebook\fR widget manages a collection of windows
and displays a single one at a time.
Each slave window is associated with a \fItab\fR,
which the user may select to change the currently-displayed window.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-height height Height
diff --git a/doc/ttk_panedwindow.n b/doc/ttk_panedwindow.n
index 3fbe76b..46130f2 100644
--- a/doc/ttk_panedwindow.n
+++ b/doc/ttk_panedwindow.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.5 2007/12/13 06:28:47 dgp Exp $
+'\" RCS: @(#) $Id: ttk_panedwindow.n,v 1.4.2.6 2008/01/29 17:35:50 dgp Exp $
'\"
.so man.macros
.TH ttk::panedwindow n 8.5 Tk "Tk Themed Widget"
@@ -23,8 +23,9 @@ ttk::panedwindow \- Multi-pane container window
A \fBttk::panedwindow\fR widget displays a number of subwindows, stacked
either vertically or horizontally. The user may adjust the relative sizes
of the subwindows by dragging the sash between panes.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
diff --git a/doc/ttk_progressbar.n b/doc/ttk_progressbar.n
index 8631fbb..86bcf86 100644
--- a/doc/ttk_progressbar.n
+++ b/doc/ttk_progressbar.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_progressbar.n,v 1.3.2.4 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::progressbar n 8.5 Tk "Tk Themed Widget"
@@ -20,8 +20,9 @@ operation. They can operate in two modes: \fIdeterminate\fR mode shows the
amount completed relative to the total amount of work to be done, and
\fIindeterminate\fR mode provides an animated display to let the user know
that something is happening.
-.SO
-\-class \-cursor \-takefocus \-style
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
diff --git a/doc/ttk_radiobutton.n b/doc/ttk_radiobutton.n
index 7b04271..0fce698 100644
--- a/doc/ttk_radiobutton.n
+++ b/doc/ttk_radiobutton.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_radiobutton.n,v 1.3.2.4 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::radiobutton n 8.5 Tk "Tk Themed Widget"
@@ -20,10 +20,11 @@ a set of mutually-exclusive options.
Radiobuttons are linked to a Tcl variable,
and have an associated value; when a radiobutton is clicked,
it sets the variable to its associated value.
-.SO
-\-class \-compound \-cursor \-image
-\-state \-style \-takefocus \-text
-\-textvariable \-underline \-width
+.SO ttk_widget
+\-class \-compound \-cursor
+\-image \-state \-style
+\-takefocus \-text \-textvariable
+\-underline \-width
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
diff --git a/doc/ttk_scrollbar.n b/doc/ttk_scrollbar.n
index 57a8cf5..00db842 100644
--- a/doc/ttk_scrollbar.n
+++ b/doc/ttk_scrollbar.n
@@ -6,7 +6,7 @@
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\" SOURCE: tk/doc/scrollbar.n, r1.4
-'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.4 2007/12/10 18:39:28 dgp Exp $
+'\" RCS: @(#) $Id: ttk_scrollbar.n,v 1.3.2.5 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::scrollbar n 8.5 Tk "Tk Themed Widget"
@@ -26,8 +26,9 @@ document visible in the associated window.
The thumb may be dragged by the user to control the visible region.
Depending on the theme, two or more arrow buttons may also be present;
these are used to scroll the visible region in discrete units.
-.SO
-\-class \-cursor \-style \-takefocus
+.SO ttk_widget
+\-class \-cursor \-style
+\-takefocus
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-command command Command
diff --git a/doc/ttk_separator.n b/doc/ttk_separator.n
index aa1e5d1..5f51151 100644
--- a/doc/ttk_separator.n
+++ b/doc/ttk_separator.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.3 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_separator.n,v 1.3.2.4 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::separator n 8.5 Tk "Tk Themed Widget"
@@ -17,9 +17,9 @@ ttk::separator \- Separator bar
.SH DESCRIPTION
A \fBttk::separator\fR widget displays a horizontal or vertical separator
bar.
-.SO
-\-class \-cursor \-state \-style
-\-takefocus
+.SO ttk_widget
+\-class \-cursor \-state
+\-style \-takefocus
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-orient orient Orient
diff --git a/doc/ttk_sizegrip.n b/doc/ttk_sizegrip.n
index ae0fb37..28ad32c 100644
--- a/doc/ttk_sizegrip.n
+++ b/doc/ttk_sizegrip.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.5 2007/11/01 16:37:16 dgp Exp $
+'\" RCS: @(#) $Id: ttk_sizegrip.n,v 1.3.2.6 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::sizegrip n 8.5 Tk "Tk Themed Widget"
@@ -18,9 +18,9 @@ ttk::sizegrip \- Bottom-right corner resize widget
A \fBttk::sizegrip\fR widget (also known as a \fIgrow box\fR)
allows the user to resize the containing toplevel window
by pressing and dragging the grip.
-.SO
-\-class \-cursor \-state \-style
-\-takefocus
+.SO ttk_widget
+\-class \-cursor \-state
+\-style \-takefocus
.SE
.SH "WIDGET COMMAND"
Sizegrip widgets support the standard
diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n
index ee65f5f..13994b2 100644
--- a/doc/ttk_treeview.n
+++ b/doc/ttk_treeview.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.6 2008/01/23 16:39:11 dgp Exp $
+'\" RCS: @(#) $Id: ttk_treeview.n,v 1.5.2.7 2008/01/29 17:35:51 dgp Exp $
'\"
.so man.macros
.TH ttk::treeview n 8.5 Tk "Tk Themed Widget"
@@ -43,9 +43,9 @@ and control the appearance of the item.
Treeview widgets support horizontal and vertical scrolling with the
standard \fB\-\fR[\fBxy\fR]\fBscrollcommand\fR options
and [\fBxy\fR]\fBview\fR widget commands.
-.SO
-\-class \-cursor \-takefocus \-style
-\-xscrollcommand \-yscrollcommand
+.SO ttk_widget
+\-class \-cursor \-takefocus
+\-style \-xscrollcommand \-yscrollcommand
.SE
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-columns columns Columns
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index e262f22..99d2c57 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixRFont.c,v 1.20.2.1 2008/01/28 14:22:29 dgp Exp $
+ * RCS: @(#) $Id: tkUnixRFont.c,v 1.20.2.2 2008/01/29 17:35:51 dgp Exp $
*/
#include "tkUnixInt.h"
@@ -100,14 +100,11 @@ GetTkFontAttributes(
XftFont *ftFont,
TkFontAttributes *faPtr)
{
- char *family;
+ char *family = "Unknown", **familyPtr = &family;
int weight, slant, size, pxsize;
double ptsize;
- if (XftPatternGetString(ftFont->pattern, XFT_FAMILY, 0,
- &family) != XftResultMatch) {
- family = "Unknown";
- }
+ (void)XftPatternGetString(ftFont->pattern, XFT_FAMILY, 0, familyPtr);
if (XftPatternGetDouble(ftFont->pattern, XFT_SIZE, 0,
&ptsize) == XftResultMatch) {
size = (int)ptsize;
@@ -406,10 +403,9 @@ TkpGetFontFamilies(
Tcl_Interp *interp, /* Interp to hold result. */
Tk_Window tkwin) /* For display to query. */
{
- Tcl_Obj *resultPtr, *strPtr;
+ Tcl_Obj *resultPtr;
XftFontSet *list;
int i;
- char *family;
resultPtr = Tcl_NewListObj(0, NULL);
@@ -417,9 +413,11 @@ TkpGetFontFamilies(
(char*)0, /* pattern elements */
XFT_FAMILY, (char*)0); /* fields */
for (i = 0; i < list->nfont; i++) {
- if (XftPatternGetString(list->fonts[i], XFT_FAMILY, 0,
- &family) == XftResultMatch) {
- strPtr = Tcl_NewStringObj(Tk_GetUid(family), -1);
+ char *family, **familyPtr = &family;
+ if (XftPatternGetString(list->fonts[i], XFT_FAMILY, 0, familyPtr)
+ == XftResultMatch)
+ {
+ Tcl_Obj *strPtr = Tcl_NewStringObj(family, -1);
Tcl_ListObjAppendElement(NULL, resultPtr, strPtr);
}
}
@@ -449,7 +447,9 @@ TkpGetSubFonts(
Tcl_Obj *objv[3], *listPtr, *resultPtr;
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
FcPattern *pattern;
- char *family, *foundry, *encoding;
+ char *family = "Unknown", **familyPtr = &family;
+ char *foundry = "Unknown", **foundryPtr = &foundry;
+ char *encoding = "Unknown", **encodingPtr = &encoding;
int i;
resultPtr = Tcl_NewListObj(0, NULL);
@@ -458,18 +458,9 @@ TkpGetSubFonts(
pattern = FcFontRenderPrepare(0, fontPtr->pattern,
fontPtr->faces[i].source);
- if (XftPatternGetString(pattern, XFT_FAMILY, 0,
- &family) != XftResultMatch) {
- family = "Unknown";
- }
- if (XftPatternGetString(pattern, XFT_FOUNDRY, 0,
- &foundry) != XftResultMatch) {
- foundry = "Unknown";
- }
- if (XftPatternGetString(pattern, XFT_ENCODING, 0,
- &encoding) != XftResultMatch) {
- encoding = "Unknown";
- }
+ XftPatternGetString(pattern, XFT_FAMILY, 0, familyPtr);
+ XftPatternGetString(pattern, XFT_FOUNDRY, 0, foundryPtr);
+ XftPatternGetString(pattern, XFT_ENCODING, 0, encodingPtr);
objv[0] = Tcl_NewStringObj(family, -1);
objv[1] = Tcl_NewStringObj(foundry, -1);
objv[2] = Tcl_NewStringObj(encoding, -1);