On Tue, 22, Jul, 2003 at 08:44:58AM +0100, Richard Bown spoke thus..
> Had to hack the diff a bit to rename the directories and you might want
> to use the unified diff format in future.  Althought I might be talking
> out of my arse there as I'm never quite sure with diffs. 

It should have worked if you used the -p1 option to patch; i.e.
something like:
[EMAIL PROTECTED]:~/CVS/rosegarden]$ patch -Np1 -i 
../rosegarden-patches/final_colour.patch
patching file base/ColourMap.C
patching file base/ColourMap.h
patching file base/Composition.C
Hunk #1 succeeded at 1322 (offset 63 lines).
patching file base/Composition.h
Hunk #1 succeeded at 586 (offset 18 lines).
patching file base/Segment.C
etc...

Oh, and it was a unified diff.


> I know these options work for most people:
> 
> $ cvs diff -b -u -p

I'd normally use cvs diff but the blasted thing doesn't work properly
when you add files which aren't in the repository.  There is an option
-n but I've never got it to work.  Needless to say, I'll use cvs diff
whenever I'm not adding extra files (it's less work for starters)!


> Other than that only had to fix a couple of type problems with Qt3.0 and otherwise
> it applied and built OK.  

Damn.  I keep forgetting that rosegarden only uses Qt3.0.  I'll change
my bookmark to the Qt documentation.

> The current test/colour.C doesn't build for me at the moment
> however.

The attached patch fixes this.  I changed my mind and figured out that
Guilliame was right - the getContrastColour thing is best handled by
Qt.  I removed it from the Rosegarden::Colour class but not the test
program.  The patch needs -Np1 again (AnonCVS doesn't have the changes
you committed in yet so I had to just diff two trees)


> As to the what the patch does - yes, works nicely.  Couple of things apart from
> the load/save that are missing:
> 
> - we need a default colourmap or say 40 or so nice colours, add these to the
>   default autoload file once the load/save code is in.  For exporting -
>   base/XmlExportable is your friend.
> - segment parameter box drop down doesn't appear to sync with selected segments
>   (I think you mentioned this already but we need to sort out this case a little).

OK.  Added to my TODO list.

Mark

-- 
Mark Hymers <markh at linuxfromscratch dot org>

"Don't you hate those Claims Direct adverts?
 'I slipped on a banana skin and sued the Dominican Republic!'"
     Linda Smith on the News Quiz talking about the Compensation Culture
diff --exclude-from=rosegarden-test/.cvsignore --exclude-from=exclude -Naur 
rosegarden-test/base/test/colour.C rosegarden-temp/base/test/colour.C
--- rosegarden-test/base/test/colour.C  2003-07-22 14:55:29.000000000 +0100
+++ rosegarden-temp/base/test/colour.C  2003-07-22 14:38:10.000000000 +0100
@@ -194,15 +194,8 @@
 
     cout << "\nTEST: Generic Colour routines\n\n";
 
-    cout << "Try getting a contrasting colour:\n";
-    Colour blah = map2->getColourByIndex(0);
-    cout << "Original colour:\n";
-    printRC(&blah);
-    cout << "Contrast colour:\n";
-    blah = getContrastColour(blah);
-    printRC(&blah);
-
     cout << "Try getting a combination colour:\n";
+    Colour blah = map2->getColourByIndex(0);
     Colour blah2 = map2->getColourByIndex(1);
     cout << "Original colours:\n";
     printRC(&blah);
diff --exclude-from=rosegarden-test/.cvsignore --exclude-from=exclude -Naur 
rosegarden-test/base/test/colour.output rosegarden-temp/base/test/colour.output
--- rosegarden-test/base/test/colour.output     2003-07-22 14:34:10.000000000 +0100
+++ rosegarden-temp/base/test/colour.output     2003-07-22 14:56:11.000000000 +0100
@@ -16,7 +16,7 @@
 
 Can we create a ColourMap with the right default Colour + String
 Can we get the default colour back out of it?
-name:   red:  230 green: 230 blue:  230
+name:   red:  197 green: 211 blue:  125
 Can we create a ColourMap with a specified default Colour?
 Can we get the information back out of it?
 name:   red:  210 green: 0 blue:  100
@@ -55,14 +55,9 @@
 
 TEST: Generic Colour routines
 
-Try getting a contrasting colour:
-Original colour:
-red:  210 green: 0 blue:  100
-Contrast colour:
-red:  45 green: 255 blue:  155
 Try getting a combination colour:
 Original colours:
-red:  45 green: 255 blue:  155
+red:  210 green: 0 blue:  100
 red:  100 green: 101 blue:  102
 Combination colour:
-red:  72 green: 178 blue:  128
+red:  155 green: 50 blue:  101

Reply via email to