[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: heatbugs and 1.0.4
From: |
Marcus G. Daniels |
Subject: |
Re: heatbugs and 1.0.4 |
Date: |
05 Jan 1998 00:01:46 -0800 |
>>>>> "PT" == Pietro Terna <address@hidden> writes:
PT> starting heatbugs (1.0.1) compiled with swarm 1.0.4 in my
PT> Linux Box (I've adopted the binary distribution "linux-gnulibc1")
PT> I'm obtaining the messages reported below; heatbugs runs, but I'm
PT> noticing a minor problem: in the graph the line color no more
PT> changes to blue when a line is pointed.
Hmm, I suspect this behavior where the active line was blue was just an
idiosyncrasy. Instead, how about if the line width changes, but the
color remains the same? Below is a patch to do that, you can apply it with:
$ cd $SWARMHOME
$ patch -p1 < this-file
$ make
Index: src/tkobjc/BLTGraph.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/BLTGraph.m,v
retrieving revision 1.6
diff -c -r1.6 BLTGraph.m
*** BLTGraph.m 1997/12/11 02:31:35 1.6
--- BLTGraph.m 1998/01/05 07:51:26
***************
*** 121,137 ****
{
if (ownerGraph == nil)
[InvalidCombination raiseEvent: "This element has no owner graph!\n"];
! name = strdup(tclObjc_objectToName(self));
xData = [BLTVector create: [self getZone]];
yData = [BLTVector create: [self getZone]];
! [globalTkInterp
! eval: "%s element create %s -xdata %s -ydata %s -symbol none",
! [ownerGraph getWidgetName],
! [self getName],
! [xData getName],
! [yData getName]];
!
return self;
}
--- 121,165 ----
{
if (ownerGraph == nil)
[InvalidCombination raiseEvent: "This element has no owner graph!\n"];
! name = strdup (tclObjc_objectToName(self));
xData = [BLTVector create: [self getZone]];
yData = [BLTVector create: [self getZone]];
! if ([globalTkInterp newBLTp])
! {
! #if 0
! // Create a pen for a small, hollow circle.
! [globalTkInterp
! eval: "%s pen create %s_line -symbol circle -outlinewidth 1 -fill
\"\" -pixels 0.05i",
! [ownerGraph getWidgetName],
! [self getName]];
! #else
! // Create a pen for a wider line.
! [globalTkInterp
! eval: "%s pen create %s_line -symbol none -linewidth 3",
! [ownerGraph getWidgetName],
! [self getName]];
! #endif
!
! // When inactive, use no symbol. When active, use the new pen.
! [globalTkInterp
! eval: "%s element create %s -xdata %s -ydata %s -symbol none
-activepen %s_line",
! [ownerGraph getWidgetName],
! [self getName],
! [xData getName],
! [yData getName],
! [self getName]];
! }
! else
! // If we are using old BLT, only change line width.
! [globalTkInterp
! eval: "%s element create %s -xdata %s -ydata %s -symbol none
-activelinewidth 3",
! [ownerGraph getWidgetName],
! [self getName],
! [xData getName],
! [yData getName],
! [self getName]];
!
return self;
}
***************
*** 190,199 ****
- setColor: (const char *)color
{
! [globalTkInterp eval: "%s element configure %s -color \"%s\"",
! [ownerGraph getWidgetName],
! name,
! color];
return self;
}
--- 218,242 ----
- setColor: (const char *)color
{
! if ([globalTkInterp newBLTp])
! {
! [globalTkInterp eval: "%s element configure %s -color %s",
! [ownerGraph getWidgetName],
! name,
! color];
! [globalTkInterp
! eval: "%s pen configure %s_line -color %s -outline %s",
! [ownerGraph getWidgetName],
! [self getName],
! color, color];
! }
! else
! [globalTkInterp
! eval: "%s element configure %s -color %s -activecolor %s",
! [ownerGraph getWidgetName],
! name,
! color, color];
!
return self;
}
***************
*** 204,210 ****
return self;
}
! -setSymbol: (const char *)s
{
[globalTkInterp eval: "%s element configure %s -symbol %s",
[ownerGraph getWidgetName],
--- 247,253 ----
return self;
}
! - setSymbol: (const char *)s
{
[globalTkInterp eval: "%s element configure %s -symbol %s",
[ownerGraph getWidgetName],
Index: src/tkobjc/ChangeLog
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/ChangeLog,v
retrieving revision 1.28
diff -c -r1.28 ChangeLog
*** ChangeLog 1997/12/16 20:59:49 1.28
--- ChangeLog 1998/01/05 07:51:26
***************
*** 1,3 ****
--- 1,21 ----
+ 1998-01-05 Marcus G. Daniels <address@hidden>
+
+ * BLTGraph.m ([GraphElement -createEnd]): Use different code
+ for setting active line width and symbol between BLT 2.1 and BLT 2.3.
+ ([GraphElement -setColor:]): Set the active line color to be the
+ same as the inactive line color. Different versions for BLT 2.1
+ and BLT 2.3.
+
+ * DragDrop.m (new_BLT_p): Remove.
+ (setupDragAndDrop): Use newBLTp method now in TkExtra.
+ (setupDragAndDropArg): Likewise.
+ (setupHandler): Likewise.
+
+ * TkExtra.m ([TkExtra -newBLTp]): Move new_BLT_p predicate from
+ DragDrop and rename it to newBLTp.
+
+ * TkExtra.h: Add newBLTp.
+
1997-12-16 Marcus G. Daniels <address@hidden>
* WindowGeometryRecord.h: Remove get_expr_func_t and
Index: src/tkobjc/DragDrop.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/DragDrop.m,v
retrieving revision 1.3
diff -c -r1.3 DragDrop.m
*** DragDrop.m 1997/12/10 23:41:13 1.3
--- DragDrop.m 1998/01/05 07:51:26
***************
*** 6,21 ****
#import <tkobjc/global.h>
#import <tkobjc/Widget.h>
- static BOOL
- new_BLT_p (void)
- {
- const char *version_string = [globalTkInterp getBltVersion];
- int major, minor;
-
- sscanf (version_string, "%d.%d", &major, &minor);
- return (major >= 2 && minor >= 3);
- }
-
void
dragAndDropTarget (id target, id object)
{
--- 6,11 ----
***************
*** 63,69 ****
static void
setupDragAndDrop (id source, id object)
{
! if (new_BLT_p ())
newSetupDragAndDrop (source, object);
else
oldSetupDragAndDrop (source, object);
--- 53,59 ----
static void
setupDragAndDrop (id source, id object)
{
! if ([globalTkInterp newBLTp])
newSetupDragAndDrop (source, object);
else
oldSetupDragAndDrop (source, object);
***************
*** 98,104 ****
void
setupDragAndDropArg (id source, id object, int arg)
{
! if (new_BLT_p ())
newSetupDragAndDropArg (source, object, arg);
else
oldSetupDragAndDropArg (source, object, arg);
--- 88,94 ----
void
setupDragAndDropArg (id source, id object, int arg)
{
! if ([globalTkInterp newBLTp])
newSetupDragAndDropArg (source, object, arg);
else
oldSetupDragAndDropArg (source, object, arg);
***************
*** 123,129 ****
void
setupHandler (id source)
{
! if (new_BLT_p ())
newSetupHandler (source);
else
oldSetupHandler (source);
--- 113,119 ----
void
setupHandler (id source)
{
! if ([globalTkInterp newBLTp])
newSetupHandler (source);
else
oldSetupHandler (source);
***************
*** 143,147 ****
setupDragAndDropArg (source, object, arg);
setupHandler (source);
}
-
--- 133,136 ----
Index: src/tkobjc/TkExtra.h
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/TkExtra.h,v
retrieving revision 1.3
diff -c -r1.3 TkExtra.h
*** TkExtra.h 1997/11/16 18:07:54 1.3
--- TkExtra.h 1998/01/05 07:51:26
***************
*** 11,14 ****
--- 11,15 ----
@interface TkExtra : Tk {
}
- (const char *)getBltVersion;
+ - (BOOL)newBLTp;
@end
Index: src/tkobjc/TkExtra.m
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/TkExtra.m,v
retrieving revision 1.4
diff -c -r1.4 TkExtra.m
*** TkExtra.m 1997/12/10 18:52:08 1.4
--- TkExtra.m 1998/01/05 07:51:26
***************
*** 19,27 ****
// now init extras widget sets.
! if (Blt_Init(interp) == TCL_ERROR)
{
! char *msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
if (msg == NULL)
msg = interp->result;
[self error:msg];
--- 19,28 ----
// now init extras widget sets.
! if (Blt_Init (interp) == TCL_ERROR)
{
! char *msg = Tcl_GetVar (interp, "errorInfo", TCL_GLOBAL_ONLY);
!
if (msg == NULL)
msg = interp->result;
[self error:msg];
***************
*** 52,55 ****
--- 53,65 ----
return version_string;
}
+ - (BOOL)newBLTp
+ {
+ const char *version_string = [self getBltVersion];
+ int major, minor;
+
+ sscanf (version_string, "%d.%d", &major, &minor);
+ return (major >= 2 && minor >= 3);
+ }
+
@end
Index: src/tkobjc/global.h
===================================================================
RCS file: /opt/src/hive/cvs/Swarm/swarm/src/tkobjc/global.h,v
retrieving revision 1.2
diff -c -r1.2 global.h
*** global.h 1997/11/13 03:54:13 1.2
--- global.h 1998/01/05 07:51:26
***************
*** 6,12 ****
#import <defobj.h>
#import <tkobjc/TkExtra.h>
! extern TkExtra * globalTkInterp;
extern id <Error>
WindowCreation, // error while creating a window
--- 6,12 ----
#import <defobj.h>
#import <tkobjc/TkExtra.h>
! extern TkExtra *globalTkInterp;
extern id <Error>
WindowCreation, // error while creating a window
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================
- Re: heatbugs and 1.0.4,
Marcus G. Daniels <=
Re: heatbugs and 1.0.4, Pietro Terna, 1998/01/06