summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-11-24 18:04:14 (GMT)
committerjenglish <jenglish@flightlab.com>2006-11-24 18:04:14 (GMT)
commita3220fdf64e35fe118d44af78a8d9582b416fbd7 (patch)
tree5b155465341298f1a6a698db16a5c8cd767801a4 /generic
parent1f9a3b07076ff41b7ee08baa31e992abc40687cc (diff)
downloadtk-a3220fdf64e35fe118d44af78a8d9582b416fbd7.zip
tk-a3220fdf64e35fe118d44af78a8d9582b416fbd7.tar.gz
tk-a3220fdf64e35fe118d44af78a8d9582b416fbd7.tar.bz2
* library/ttk/altTheme.tcl, library/ttk/clamTheme.tcl,
library/ttk/defaults.tcl, library/ttk/winTheme.tcl, library/ttk/xpTheme.tcl: explicitly specify -anchor w on TMenubutton * tests/ttk/entry.test: Fixed font dependency; test entry-3.2 should work on all platforms now. * library/classicTheme.tcl: Don't define or use TkClassicDefaultFont. * generic/ttk/ttkTreeview.c, generic/ttk/ttkPanedwindow.c: Handle missing layouts.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkEvent.c4
-rw-r--r--generic/ttk/ttkPanedwindow.c42
-rw-r--r--generic/ttk/ttkTreeview.c7
3 files changed, 29 insertions, 24 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 91a286e..fda8ac9 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -12,12 +12,10 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEvent.c,v 1.33 2006/02/03 22:40:34 dkf Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.34 2006/11/24 18:04:14 jenglish Exp $
*/
-#include "tkPort.h"
#include "tkInt.h"
-#include <signal.h>
/*
* There's a potential problem if a handler is deleted while it's current
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index ac8d9cc..e207a58 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -1,4 +1,4 @@
-/* $Id: ttkPanedwindow.c,v 1.3 2006/11/07 03:45:28 jenglish Exp $
+/* $Id: ttkPanedwindow.c,v 1.4 2006/11/24 18:04:14 jenglish Exp $
*
* Copyright (c) 2005, Joe English. Freely redistributable.
*
@@ -447,29 +447,35 @@ static Ttk_Layout PanedGetLayout(
{
Paned *pw = recordPtr;
Ttk_Layout panedLayout = TtkWidgetGetLayout(interp, themePtr, recordPtr);
- int horizontal = pw->paned.orient == TTK_ORIENT_HORIZONTAL;
- const char *layoutName = horizontal ? ".Vertical.Sash" : ".Horizontal.Sash";
- Ttk_Layout sashLayout = Ttk_CreateSublayout(interp, themePtr, panedLayout,
- layoutName, pw->core.optionTable);
- if (sashLayout) {
- int sashWidth, sashHeight;
+ if (panedLayout) {
+ int horizontal = pw->paned.orient == TTK_ORIENT_HORIZONTAL;
+ const char *layoutName =
+ horizontal ? ".Vertical.Sash" : ".Horizontal.Sash";
+ Ttk_Layout sashLayout = Ttk_CreateSublayout(
+ interp, themePtr, panedLayout, layoutName, pw->core.optionTable);
- if (pw->paned.sashLayout)
- Ttk_FreeLayout(pw->paned.sashLayout);
- pw->paned.sashLayout = sashLayout;
+ if (sashLayout) {
+ int sashWidth, sashHeight;
- Ttk_LayoutSize(sashLayout, 0, &sashWidth, &sashHeight);
+ Ttk_LayoutSize(sashLayout, 0, &sashWidth, &sashHeight);
+ pw->paned.sashThickness = horizontal ? sashWidth : sashHeight;
- pw->paned.sashThickness = horizontal ? sashWidth : sashHeight;
+ if (pw->paned.sashLayout)
+ Ttk_FreeLayout(pw->paned.sashLayout);
+ pw->paned.sashLayout = sashLayout;
+ } else {
+ Ttk_FreeLayout(panedLayout);
+ return 0;
+ }
+ }
- /* Sanity-check:
- */
- if (pw->paned.sashThickness < MIN_SASH_THICKNESS)
- pw->paned.sashThickness = MIN_SASH_THICKNESS;
+ /* Sanity-check:
+ */
+ if (pw->paned.sashThickness < MIN_SASH_THICKNESS)
+ pw->paned.sashThickness = MIN_SASH_THICKNESS;
- Ttk_ManagerSizeChanged(pw->paned.mgr);
- }
+ Ttk_ManagerSizeChanged(pw->paned.mgr);
return panedLayout;
}
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index f34d452..6d8a4eb 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -1,8 +1,8 @@
/*
- * $Id: ttkTreeview.c,v 1.3 2006/11/07 03:45:28 jenglish Exp $
+ * $Id: ttkTreeview.c,v 1.4 2006/11/24 18:04:14 jenglish Exp $
* Copyright (c) 2004, Joe English
*
- * Ttk widget set: treeview widget.
+ * ttk::treeview widget implementation.
*/
#include <string.h>
@@ -1279,7 +1279,8 @@ static Ttk_Layout TreeviewGetLayout(
Ttk_Layout treeLayout = TtkWidgetGetLayout(interp, themePtr, recordPtr);
if (!(
- GetSublayout(interp, themePtr, treeLayout, ".Item",
+ treeLayout
+ && GetSublayout(interp, themePtr, treeLayout, ".Item",
tv->tree.itemOptionTable, &tv->tree.itemLayout)
&& GetSublayout(interp, themePtr, treeLayout, ".Cell",
tv->tree.tagOptionTable, &tv->tree.cellLayout) /*@@@HERE*/