User: stephent
Date: 05/02/22 11:17:42
Modified: xemacs/src Tag: sjt-xft ChangeLog config.h.in emacs.c
Log:
autoconf fiddling; work on xlwtabs.c
Revision Changes Path
No revision
No revision
1.418.2.9 +11 -0 XEmacs/xemacs/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/ChangeLog,v
retrieving revision 1.418.2.8
retrieving revision 1.418.2.9
diff -u -r1.418.2.8 -r1.418.2.9
--- ChangeLog 2005/02/20 14:00:45 1.418.2.8
+++ ChangeLog 2005/02/22 10:16:50 1.418.2.9
@@ -1,3 +1,14 @@
+2005-02-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * version.sh (XEMACS_RELEASE_DATE): New version info variable.
+
+ * configure.in (XEMACS_RELEASE_DATE):
+ * configure.ac (XEMACS_RELEASE_DATE):
+ Use it.
+
+ * configure.ac (sound):
+ AC_DEFINE_UNQUOTED seems OK, if it's not m4-quoted.
+
2005-02-20 Stephen J. Turnbull <stephen(a)xemacs.org>
* configure.ac (athena): Spells as 3d, not xaw3d, in declaration.
1.232.2.6 +104 -26 XEmacs/xemacs/configure
Index: configure
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure,v
retrieving revision 1.232.2.5
retrieving revision 1.232.2.6
diff -u -r1.232.2.5 -r1.232.2.6
--- configure 2005/02/11 12:19:31 1.232.2.5
+++ configure 2005/02/22 10:16:50 1.232.2.6
@@ -1669,7 +1669,68 @@
{ echo "Error:" --enable-mule, NOT --with-mule >&2; exit 1; }
fi;
+# Check whether --with-menubars or --without-menubars was given.
+if test "${with_menubars+set}" = set; then
+ withval="$with_menubars"
+ { echo "Error:" --enable-menubars, NOT --with-menubars >&2; exit 1;
}
+fi;
+
+# Check whether --with-scrollbars or --without-scrollbars was given.
+if test "${with_scrollbars+set}" = set; then
+ withval="$with_scrollbars"
+ { echo "Error:" --enable-scrollbars, NOT --with-scrollbars >&2; exit
1; }
+fi;
+
+# Check whether --with-dialogs or --without-dialogs was given.
+if test "${with_dialogs+set}" = set; then
+ withval="$with_dialogs"
+ { echo "Error:" --enable-dialogs, NOT --with-dialogs >&2; exit 1; }
+fi;
+
+# Check whether --with-widgets or --without-widgets was given.
+if test "${with_widgets+set}" = set; then
+ withval="$with_widgets"
+ { echo "Error:" --enable-widgets, NOT --with-widgets >&2; exit 1; }
+fi;
+
+# Check whether --with-sound or --without-sound was given.
+if test "${with_sound+set}" = set; then
+ withval="$with_sound"
+ { echo "Error:" --enable-sound, NOT --with-sound >&2; exit 1; }
+fi;
+
+# Check whether --with-default-eol-detection or --without-default-eol-detection was
given.
+if test "${with_default_eol_detection+set}" = set; then
+ withval="$with_default_eol_detection"
+ { echo "Error:" --enable-default-eol-detection, NOT
--with-default-eol-detection >&2; exit 1; }
+fi;
+
+# Check whether --with-clash-detection or --without-clash-detection was given.
+if test "${with_clash_detection+set}" = set; then
+ withval="$with_clash_detection"
+ { echo "Error:" --enable-clash-detection, NOT --with-clash-detection
>&2; exit 1; }
+fi;
+
+# Check whether --with-database or --without-database was given.
+if test "${with_database+set}" = set; then
+ withval="$with_database"
+ { echo "Error:" --enable-database, NOT --with-database >&2; exit 1;
}
+fi;
+# Check whether --with-modules or --without-modules was given.
+if test "${with_modules+set}" = set; then
+ withval="$with_modules"
+ { echo "Error:" --enable-modules, NOT --with-modules >&2; exit 1; }
+fi;
+
+# Check whether --with-toolbars or --without-toolbars was given.
+if test "${with_toolbars+set}" = set; then
+ withval="$with_toolbars"
+ { echo "Error:" --enable-toolbars, NOT --with-toolbars >&2; exit 1;
}
+fi;
+
+
+
# Check whether --with-prefix or --without-prefix was given.
if test "${with_prefix+set}" = set; then
withval="$with_prefix"
@@ -2926,6 +2987,12 @@
_ACEOF
fi
+if test "$xemacs_release_date" != ""; then
+ cat >>confdefs.h <<_ACEOF
+#define XEMACS_RELEASE_DATE "$xemacs_release_date"
+_ACEOF
+
+fi
cat >>confdefs.h <<_ACEOF
#define EMACS_VERSION "$version"
_ACEOF
@@ -33748,27 +33815,13 @@
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
- sound_found=yes
- need_miscplay=yes
- extra_objs="$extra_objs linuxplay.o" && if test
"$extra_verbose" = "yes"; then
- echo " xemacs will be linked with \"linuxplay.o\""
- fi
- cat >>confdefs.h <<_ACEOF
-#define SOUNDCARD_H_FILE "${dir}/soundcard.h"
-_ACEOF
- break
-fi
-
-
- done
- fi
-
- if test "$sound_found" = "yes"; then
- enable_sound_native=yes
-
- if test "$opsys" = "netbsd" ; then
- echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio"
>&5
+ sound_found=yes
+ case "$canonical" in
+ *netbsd* )
+ # #### this is probably not the right way to do this
+ # we should port to native NetBSD stuff
+ echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6
if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -33833,16 +33886,41 @@
echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6
if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
- native_sound_lib="-lossaudio"
+ native_sound_lib=-lossaudio
+ { echo "$as_me:$LINENO: WARNING: Using NetBSD-deprecated -lossaudio"
>&5
+echo "$as_me: WARNING: Using NetBSD-deprecated -lossaudio" >&2;}
+else
+ sound_found=no
fi
- fi
+ ;;
+ esac
+ break
+fi
+
+
+ done
+
+ if test "$sound_found" = "yes"; then
+ need_miscplay=yes
+ extra_objs="$extra_objs linuxplay.o" && if test
"$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"linuxplay.o\""
+ fi
+ cat >>confdefs.h <<_ACEOF
+#define SOUNDCARD_H_FILE "${dir}/soundcard.h"
+_ACEOF
+
+ fi
+ fi
+
+ if test "$sound_found" = "yes"; then
+ enable_sound_native=yes
else
- if test "$enable_sound_native" = "yes" ; then
- { echo "$as_me:$LINENO: WARNING: No native libraries found. Disabling native
sound support." >&5
+ if test "$enable_sound_native" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: No native libraries found. Disabling
native sound support." >&5
echo "$as_me: WARNING: No native libraries found. Disabling native sound
support." >&2;}
- fi
- enable_sound_native=no
+ fi
+ enable_sound_native=no
fi
fi
1.1.14.7 +5 -3 XEmacs/xemacs/configure.ac
Index: configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.ac,v
retrieving revision 1.1.14.6
retrieving revision 1.1.14.7
diff -u -r1.1.14.6 -r1.1.14.7
--- configure.ac 2005/02/20 14:00:45 1.1.14.6
+++ configure.ac 2005/02/22 10:17:07 1.1.14.7
@@ -1064,6 +1064,9 @@
if test "$xemacs_extra_name" != ""; then
AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name")
fi
+if test "$xemacs_release_date" != ""; then
+ AC_DEFINE_UNQUOTED(XEMACS_RELEASE_DATE, "$xemacs_release_date")
+fi
AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
if test "$with_infodock" = "yes"; then
@@ -4807,7 +4810,7 @@
dnl Check for Linux/BSD native sound (also on recent Cygwins)
if test -z "$sound_found"; then
for dir in "machine" "sys" "linux"; do
- AC_CHECK_HEADER(${dir}/soundcard.h, [
+ AC_CHECK_HEADER([${dir}/soundcard.h], [
sound_found=yes
case "$canonical" in
*netbsd* )
@@ -4827,8 +4830,7 @@
if test "$sound_found" = "yes"; then
need_miscplay=yes
XE_ADD_OBJS(linuxplay.o)
- dnl I don't understand, but autoconf chokes on AC_DEFINE_UNQUOTED here
- AC_DEFINE(SOUNDCARD_H_FILE, "${dir}/soundcard.h")
+ AC_DEFINE_UNQUOTED(SOUNDCARD_H_FILE, ["${dir}/soundcard.h"])
fi
fi
1.233.2.4 +3 -0 XEmacs/xemacs/configure.in
Index: configure.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.in,v
retrieving revision 1.233.2.3
retrieving revision 1.233.2.4
diff -u -r1.233.2.3 -r1.233.2.4
--- configure.in 2004/12/11 05:12:28 1.233.2.3
+++ configure.in 2005/02/22 10:17:07 1.233.2.4
@@ -1062,6 +1062,9 @@
if test "$xemacs_extra_name" != ""; then
AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name")
fi
+if test "$xemacs_release_date" != ""; then
+ AC_DEFINE_UNQUOTED(XEMACS_RELEASE_DATE, "$xemacs_release_date")
+fi
AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
if test "$with_infodock" = "yes"; then
1.984.2.3 +1 -0 XEmacs/xemacs/version.sh
Index: version.sh
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/version.sh,v
retrieving revision 1.984.2.2
retrieving revision 1.984.2.3
diff -u -r1.984.2.2 -r1.984.2.3
--- version.sh 2005/02/01 15:46:18 1.984.2.2
+++ version.sh 2005/02/22 10:17:08 1.984.2.3
@@ -9,3 +9,4 @@
infodock_minor_version=0
infodock_build_version=8
xemacs_extra_name="(+Xft+CVS-20041209)"
+xemacs_release_date="2004-10-22"
No revision
No revision
1.599.2.3 +5 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.599.2.2
retrieving revision 1.599.2.3
diff -u -r1.599.2.2 -r1.599.2.3
--- ChangeLog 2005/02/04 16:05:54 1.599.2.2
+++ ChangeLog 2005/02/22 10:17:27 1.599.2.3
@@ -1,3 +1,8 @@
+2005-02-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * about.el (about-xemacs):
+ Compute release date from xemacs-release-date.
+
2005-02-03 Eric Knauel <eric(a)xemacs.org>
* fontconfig.el (fc-try-font):
1.63.2.1 +22 -2 XEmacs/xemacs/lisp/about.el
Index: about.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/about.el,v
retrieving revision 1.63
retrieving revision 1.63.2.1
diff -u -r1.63 -r1.63.2.1
--- about.el 2004/11/07 12:03:58 1.63
+++ about.el 2005/02/22 10:17:29 1.63.2.1
@@ -376,8 +376,28 @@
(t (format "%d.%d"
emacs-major-version
emacs-minor-version))))
- (emacs-about-version (format "version %s of September 2004"
- emacs-short-version)))
+ (emacs-release-date
+ (if (and (boundp 'xemacs-release-date)
+ (stringp xemacs-release-date)
+ (string-match "^\\([0-9]\\{4\\}\\)-\\([0-9][0-9]\\)-"
+ xemacs-release-date))
+ (format "%s %s"
+ (aref [ "January" "February" "March"
"April"
+ "May" "June" "July" "August"
+ "September" "October" "November" "December"
]
+ (1- (string-to-number
+ (match-string 2 xemacs-release-date))))
+ (match-string 1 xemacs-release-date))
+ "February 2005 (defaulted in about.el)"))
+ (emacs-variant-info (if (and xemacs-extra-name
+ (stringp xemacs-extra-name)
+ (< 0 (length xemacs-extra-name)))
+ (format " %s" xemacs-extra-name)
+ ""))
+ (emacs-about-version (format "version %s of %s%s"
+ emacs-short-version
+ emacs-release-date
+ emacs-variant-info)))
(widget-insert (about-center emacs-about-version))
(widget-create 'link :help-echo "What's new in XEmacs"
:action 'about-news
No revision
No revision
1.64.2.4 +13 -0 XEmacs/xemacs/lwlib/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.64.2.3
retrieving revision 1.64.2.4
diff -u -r1.64.2.3 -r1.64.2.4
--- ChangeLog 2005/02/01 15:46:38 1.64.2.3
+++ ChangeLog 2005/02/22 10:17:33 1.64.2.4
@@ -1,3 +1,16 @@
+2005-02-18 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xlwtabs.c (TabsGeometryManager,TabsQueryGeometry): Improve comments.
+ (debug_tabs): New variable, substitute for debug_xft globally.
+ (TabsGeometryManager): Substitute "request" for "req".
+
+2005-02-11 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * xlwtabs.c (PreferredSize3): Let TabLayout choose constraints.
+ (TabLayout): Default size to current size. Fix header comment.
+ (TabsGeometryManager): Comment on redesigning internal API.
+ (TabsGeometryManager): Fix typo in format string.
+
2005-01-27 Stephen J. Turnbull <stephen(a)xemacs.org>
* xlwtabs.c (DrawTab):
1.4.2.6 +73 -53 XEmacs/xemacs/lwlib/xlwtabs.c
Index: xlwtabs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/xlwtabs.c,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -u -r1.4.2.5 -r1.4.2.6
--- xlwtabs.c 2005/02/01 15:46:39 1.4.2.5
+++ xlwtabs.c 2005/02/22 10:17:34 1.4.2.6
@@ -417,9 +417,10 @@
((TabsConstraints)((tab)->core.constraints))->tabs.visible)
-#ifdef USE_XFT_TABS
-extern int debug_xft; /* from lwlib-face.c */
+static int debug_tabs = 1; /* increase for more verbosity */
+
+#ifdef USE_XFT_TABS
/* #### duplicated from xlwmenu.c -- CLEAN THIS SHIT UP!
Undeclared so define at top. */
#define MINL(x,y) ((((unsigned long) (x)) < ((unsigned long) (y))) \
@@ -829,9 +830,9 @@
* Return status, with preferred size in PREFERRED.
*
* According to the X Toolkit Intrinsics manual
- * XtGeometryYes = accept request without change
+ * XtGeometryYes = accept INTENDED without change
* XtGeometryNo = request to stay _exactly_ the same
- * XtGeometryAlmost = request consideration of preference
+ * XtGeometryAlmost = suggest PREFERRED as a compromise
* and the PREFERRED argument must be filled in completely (ie, any fields
* whose bits are set in the request_mode mask must correspond to the
* preferred geometry, which must be consistent with the return value).
@@ -849,7 +850,7 @@
static XtGeometryResult
TabsQueryGeometry (Widget w,
XtWidgetGeometry *intended,
- XtWidgetGeometry *preferred)
+ XtWidgetGeometry *preferred) /* RETURN */
{
TabsWidget tw = (TabsWidget) w;
XtGeometryMask mode = intended->request_mode;
@@ -885,12 +886,18 @@
/*
* Geometry Manager; called when TAB (a child) wants to be resized.
+ *
+ * According to the X Toolkit Intrinsics manual
+ * XtGeometryDone = accept REQUEST and do it (#### check this)
+ * XtGeometryYes = accept REQUEST without change
+ * XtGeometryNo = refuse REQUEST (ie, stay _exactly_ the same)
+ * XtGeometryAlmost = suggest REPLY as a compromise
*/
static XtGeometryResult
TabsGeometryManager (Widget tab,
- XtWidgetGeometry *req,
- XtWidgetGeometry *reply)
+ XtWidgetGeometry *request,
+ XtWidgetGeometry *reply) /* RETURN */
{
TabsWidget control = (TabsWidget) XtParent(tab);
Dimension s = SHADWID;
@@ -905,31 +912,31 @@
#### This is the wrong way to do this. If other parts of the
request can be satisfied, should return XtGeometryAlmost. */
- if (((req->request_mode & CWX) && req->x != tab->core.x) ||
- ((req->request_mode & CWY) && req->y != tab->core.y) ||
+ if (((request->request_mode & CWX) && request->x != tab->core.x)
||
+ ((request->request_mode & CWY) && request->y != tab->core.y)
||
!constraint->tabs.resizable)
return XtGeometryNo;
/* Make all three fields in the request valid */
- if (!(req->request_mode & CWWidth))
- req->width = tab->core.width;
- if (!(req->request_mode & CWHeight))
- req->height = tab->core.height;
- if (!(req->request_mode & CWBorderWidth))
- req->border_width = tab->core.border_width;
+ if (!(request->request_mode & CWWidth))
+ request->width = tab->core.width;
+ if (!(request->request_mode & CWHeight))
+ request->height = tab->core.height;
+ if (!(request->request_mode & CWBorderWidth))
+ request->border_width = tab->core.border_width;
#ifndef DONT_DEBUG_REQUESTS
#define DBG_REQUEST_PRINT(field,size) \
do { \
- if (req->field > size) \
+ if (request->field > size) \
{ \
if (++debug_count == debug_mask) \
{ \
debug_mask <<= 1; \
fprintf (stderr, "ridiculous request #%d: field %d > %d\n", \
- debug_count, req->field, size); \
+ debug_count, request->field, size); \
} \
- req->field = tab->core.field; \
+ request->field = tab->core.field; \
} \
} while (0)
@@ -943,14 +950,14 @@
/* #### this is NONSENSE, isn't it?
AFAICT XtMakeGeometryRequest would already have returned
XtGeometryYes in this case. */
- if (req->width == tab->core.width &&
- req->height == tab->core.height &&
- req->border_width == tab->core.border_width)
+ if (request->width == tab->core.width &&
+ request->height == tab->core.height &&
+ request->border_width == tab->core.border_width)
return XtGeometryNo;
#endif
- rw = req->width + 2 * req->border_width;
- rh = req->height + 2 * req->border_width;
+ rw = request->width + 2 * request->border_width;
+ rh = request->height + 2 * request->border_width;
/* find out how big the children want to be now */
MaxChild (control, tab, rw, rh);
@@ -974,7 +981,7 @@
* for another day.
*/
- if (req->request_mode & (CWWidth | CWHeight | CWBorderWidth))
+ if (request->request_mode & (CWWidth | CWHeight | CWBorderWidth))
{
Dimension cw,ch ; /* children's preferred size */
Dimension aw,ah ; /* available size we can give child */
@@ -986,7 +993,13 @@
ch = control->tabs.max_ch ;
/* find out what *my* resulting preferred size would be */
-
+ /* #### this whole API is wrong; what should happen is
+ 1. app should hint as to #rows and/or aspect ratio
+ 2. tab control should attempt to layout in current space
+ 3. if not all tabs fit, should request resize to achieve
+ layout hints
+ Probably can and should cache preferred size in widget, with
+ cache cleared when labels or core size changes. */
PreferredSize2(control, cw, ch, &wid, &hgt) ;
/* Would my size change? If so, ask to be resized. */
@@ -1006,7 +1019,7 @@
* offer the child a compromise, then make this a query only.
*/
- if( (req->request_mode & XtCWQueryOnly) || rw < cw || rh < ch )
+ if( (request->request_mode & XtCWQueryOnly) || rw < cw || rh < ch )
myrequest.request_mode |= XtCWQueryOnly ;
result = XtMakeGeometryRequest ((Widget) control,
@@ -1062,7 +1075,7 @@
int n = control->composite.num_children;
ah = control->tabs.tab_height;
fprintf (stderr, "Kludging around %d != 1 rows, #children = %d,"
- " total height %d, using %d\n.",
+ " total height %d, using %d.\n",
check_nrows, n, th, ah);
}
@@ -1076,13 +1089,13 @@
/* Acceptable. If this wasn't a query, change *all* children
* to this size.
*/
- if( req->request_mode & XtCWQueryOnly )
+ if( request->request_mode & XtCWQueryOnly )
return XtGeometryYes ;
else
{
Widget *childP = control->composite.children;
int i,bw;
- tab->core.border_width = req->border_width;
+ tab->core.border_width = request->border_width;
for(i = TabsNumChildren (control); --i >= 0; ++childP)
if (TabVisible (*childP))
{
@@ -1104,9 +1117,9 @@
/* Cannot grant child's request. Describe what we *can* do
* and return counter-offer.
*/
- reply->width = aw - 2 * req->border_width ;
- reply->height = ah - 2 * req->border_width ;
- reply->border_width = req->border_width ;
+ reply->width = aw - 2 * request->border_width ;
+ reply->height = ah - 2 * request->border_width ;
+ reply->border_width = request->border_width ;
reply->request_mode = CWWidth | CWHeight | CWBorderWidth ;
return XtGeometryAlmost ;
}
@@ -1580,9 +1593,7 @@
GC gc ;
int x,y ;
-#ifdef USE_XFT_TABS
- if (debug_xft > 1) fprintf (stderr, "DrawTab called.\n");
-#endif
+ if (debug_tabs > 1) fprintf (stderr, "DrawTab called.\n");
if( !XtIsRealized((Widget)tw))
return ;
@@ -1606,10 +1617,10 @@
visual_info_from_widget ((Widget) tw, &visual, &ignored);
colorBG = xft_convert_color (dpy, cmap, visual,
tw->core.background_pixel, 0);
+#endif
- if (debug_xft > 2)
+ if (debug_tabs > 2)
fprintf (stderr, "(Re)drawing labels.\n");
-#endif
if (XtIsSensitive(child))
{
@@ -1679,7 +1690,7 @@
/* #### unnecessary? for the moment, give visual extent */
/* draw background rect */
#if 1
- if (debug_xft > 2)
+ if (debug_tabs > 2)
{
fprintf (stderr, "background color: pixel=%08lx, r=%04x,"
" g=%04x, b=%04x, alpha=%04x.\n",
@@ -1698,7 +1709,7 @@
glyphinfo.width, glyphinfo.height);
#endif
/* draw text */
- if (debug_xft > 2)
+ if (debug_tabs > 2)
{
FcValue name;
FcValue size;
@@ -1959,10 +1970,10 @@
+ tw->tabs.renderFont->ascent
/* #### how can this subtraction be correct? */
- tw->tabs.renderFont->descent)/2;
- if (debug_xft > 2)
+ if (debug_tabs > 2)
fprintf (stderr, "tab: height=%d, width=%d, baseline=%d.\n",
tw->tabs.tab_height, tab->tabs.width, tab->tabs.l_y);
- if (debug_xft > 1)
+ if (debug_tabs > 1)
fprintf (stderr, "font: height=%d, ascent=%d, descent=%d.\n",
tw->tabs.renderFont->height,
tw->tabs.renderFont->ascent,
@@ -1987,6 +1998,7 @@
*
* TODO: if they require more than two rows and the total height:width
* ratio is more than 2:1, then try something else.
+ * Gaak! This is actually already done in PreferredSize()!
*
* TODO SOONER: for reasons unclear, some applications (specifically
* XEmacs) give a nominal geometry (in the core record) which doesn't
@@ -1994,7 +2006,7 @@
* This results in bizarre values for DISPLAY_ROWS and REPLY_HEIGHT.
* Specify a way to say "tell me what you really want" (eg, with WID
* and/or HGT == 0 or == Dimension_MAX), and use it where appropriate.
- * LATE-BREAKING LOSE: This is happening in PreferredSize()!
+ * LATE-BREAKING LOSE: This happens in PreferredSize(), not XEmacs!
*
* TODO EVEN SOONER: some applications lay out the tab control by
* repeatedly querying until a fixed width and height has been filled
@@ -2003,15 +2015,15 @@
static int
TabLayout(TabsWidget tw,
- Dimension wid,
- Dimension hgt,
+ Dimension wid, /* if 0, use core.width as guess */
+ Dimension hgt, /* if 0, use core.height as guess */
Dimension *reply_height, Bool query_only)
{
int i, row, done = 0, display_rows = 0 ;
int num_children = tw->composite.num_children ;
Widget *childP ;
Dimension w ;
- Position x,y ;
+ Position x,y ; /* #### gaak, these are dimensions! */
TabsConstraints tab ;
/* Algorithm: loop through children, assign X positions. If a tab
@@ -2026,20 +2038,25 @@
row = 0 ;
x = INDENT ;
y = 0 ;
- wid -= INDENT ;
-#ifdef USE_XFT_TABS
- if (debug_xft > 0)
+ /* If wid or hgt is 0, we want to guess our own dimensions.
+ Currently the guessing functions are broken....
+ #### When PreferredSize*() get fixed, fix this too. */
+ if (debug_tabs > 0)
+ fprintf (stderr, "arg=%d,", wid);
+ wid = (wid ? wid : tw->core.width) - INDENT ;
+ hgt = hgt ? hgt : tw->core.height;
+ if (debug_tabs > 0)
fprintf (stderr, "wid=%d: x,w,y=", wid);
-#endif
for(i=num_children, childP=tw->composite.children; --i >= 0; ++childP)
if( XtIsManaged(*childP) )
{
tab = (TabsConstraints) (*childP)->core.constraints ;
w = tab->tabs.width ;
- if (debug_xft > 0)
+ if (debug_tabs > 0)
fprintf (stderr, "%d,%d,%d;", x, w, y);
if( x + w > wid ) { /* new row */
+ /* #### algorithm is not robust to wid < child's width */
++row;
x = INDENT ;
y += tw->tabs.tab_height ;
@@ -2059,7 +2076,7 @@
tab->tabs.visible = 1;
}
- if (debug_xft > 0)
+ if (debug_tabs > 0)
fprintf (stderr, "\n");
/* If there was only one row, increase the height by TABDELTA */
if( ++display_rows == 1 )
@@ -2086,7 +2103,7 @@
tw->tabs.realRows = row;
}
- if (debug_xft > 0 && (row > 1 || display_rows > 1))
+ if (debug_tabs > 0 && (row > 1 || display_rows > 1))
fprintf (stderr, "tab: %d display rows, #children = %d,"
" total height %d, total rows %d%s.\n",
display_rows, num_children, y, row,
@@ -2299,7 +2316,10 @@
int nrows ;
if( tw->composite.num_children > 0 )
- nrows = TabLayout(tw, wid, hgt, &th, True) ;
+ /* used to be wid, hgt not 0, 0 but that's obviously wrong
+ since TabLayout wants dimensions of control parent but
+ wid, hgt are dimensions of some child */
+ nrows = TabLayout(tw, 0, 0, &th, True) ;
else {
th = 0 ;
nrows = 0 ;
No revision
No revision
1.758.2.11 +9 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.758.2.10
retrieving revision 1.758.2.11
diff -u -r1.758.2.10 -r1.758.2.11
--- ChangeLog 2005/02/21 08:43:29 1.758.2.10
+++ ChangeLog 2005/02/22 10:17:35 1.758.2.11
@@ -1,5 +1,14 @@
2005-02-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+ * emacs.c (xemacs-release-date): New version info variable.
+ * config.h.in (XEMACS_RELEASE_DATE): New config.h macro.
+
+ * emacs.c (inhibit-early-packages):
+ (inhibit-all-packages):
+ (xemacs-extra-name): Improve docstrings.
+
+2005-02-21 Stephen J. Turnbull <stephen(a)xemacs.org>
+
* objects-x.c (x_finalize_font_instance): Improve debug message.
2005-02-20 Stephen J. Turnbull <stephen(a)xemacs.org>
1.95.2.4 +1 -0 XEmacs/xemacs/src/config.h.in
Index: config.h.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.95.2.3
retrieving revision 1.95.2.4
diff -u -r1.95.2.3 -r1.95.2.4
--- config.h.in 2005/02/01 15:46:52 1.95.2.3
+++ config.h.in 2005/02/22 10:17:38 1.95.2.4
@@ -110,6 +110,7 @@
#undef EMACS_VERSION
#undef XEMACS_CODENAME
#undef XEMACS_EXTRA_NAME
+#undef XEMACS_RELEASE_DATE
/* InfoDock versions, not used with XEmacs */
#undef INFODOCK_MAJOR_VERSION
#undef INFODOCK_MINOR_VERSION
1.150.2.3 +25 -6 XEmacs/xemacs/src/emacs.c
Index: emacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.150.2.2
retrieving revision 1.150.2.3
diff -u -r1.150.2.2 -r1.150.2.3
--- emacs.c 2004/12/10 06:43:48 1.150.2.2
+++ emacs.c 2005/02/22 10:17:38 1.150.2.3
@@ -460,6 +460,7 @@
Lisp_Object Vemacs_beta_version;
Lisp_Object Vxemacs_codename;
Lisp_Object Vxemacs_extra_name;
+Lisp_Object Vxemacs_release_date;
#ifdef INFODOCK
Lisp_Object Vinfodock_major_version;
Lisp_Object Vinfodock_minor_version;
@@ -4116,15 +4117,31 @@
Vxemacs_codename = build_string (XEMACS_CODENAME);
DEFVAR_LISP ("xemacs-extra-name", &Vxemacs_extra_name /*
-Extra string to maybe put into the version string.
+Arbitrary string to place in the version string after the codename.
-Usually used to denote an XEmacs built from a CVS checkout between
-releases. In that case its value would be \"(+CVS)\".
+Appropriate surrounding whitespace will be added, but typically looks best
+if enclosed in parentheses.
+
+A standard use is to indicate the date version.sh was last updated from
+the CVS mainline, where it is automatically given a value similar to
+\"(+CVS-20050221)\". Developers may also use it to indicate particular
+branches, etc.
*/ );
#ifdef XEMACS_EXTRA_NAME
Vxemacs_extra_name = build_string (XEMACS_EXTRA_NAME);
#endif
+ DEFVAR_LISP ("xemacs-release-date", &Vxemacs_release_date /*
+ISO 8601 format date string giving the date of latest release in series.
+
+The time may optionally be given. The time zone may not be given, and
+is (implicitly) UTC. Currently not included in the version string.
+*/ );
+#ifndef XEMACS_RELEASE_DATE
+#define XEMACS_RELEASE_DATE "2005-02-18 (defaulted in emacs.c)"
+#endif
+ Vxemacs_release_date = build_string (XEMACS_RELEASE_DATE);
+
/* Lisp variables which contain command line flags.
The portable dumper stomps on these; they must be saved and restored
@@ -4139,12 +4156,14 @@
*/ );
DEFVAR_BOOL ("inhibit-early-packages", &inhibit_early_packages /*
-Set to non-nil when the early packages should not be respected at startup.
+Set to non-nil when the early packages should be ignored at startup.
+Early package directories will not be added to `load-path', nor set up as
+autoloads, nothing.
*/ );
DEFVAR_BOOL ("inhibit-all-packages", &inhibit_all_packages /*
-Set to non-nil when the no packages should not be respected at startup.
-XEmacs will utterly ignore the packages -- not in load-path, not set up as
+Set to non-nil when all packages should be ignored at startup.
+Package directories will not be added to `load-path', nor set up as
autoloads, nothing.
*/ );