+2001-01-23 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * FormPreferences.C (LoadBrowserLyX): convert unsigned short to
+ unsigned char correctly and so fix 2 bugs loading/changing colors.
+
2001-01-21 Dekel Tsur <dekelts@tau.ac.il>
* FormRef.C (update): Do not update dialog_->{ref,name,type}
// Note that X stores the RGB values in the range 0 - 65535
// whilst we require them in the range 0 - 255.
RGBColor col;
- col.r = static_cast<unsigned char>(xcol.red);
- col.g = static_cast<unsigned char>(xcol.green);
- col.b = static_cast<unsigned char>(xcol.blue);
+ col.r = xcol.red / 256;
+ col.g = xcol.green / 256;
+ col.b = xcol.blue / 256;
// Create a valid X11 name of the form "#rrggbb" and change the
// LColor X11name to this. Don't want to trigger a redraw,
test: clean $(OBJS)
updatesrc: test
- for fil in *.C *.h; \
- do cmp -s $$fil ../$$fil || mv $$fil ..; \
- done
+ for fil in *.C *.h; do cmp -s $$fil ../$$fil || mv $$fil ..; done
+ rm -f *.[hHcC] *.bak
.fd.C:
${SHELL} ./fdfix.sh $<
clean:
- rm -f *.[hHcC] *.bak
+ rm -f *.[hHcC] *.bak fdfixc_modified.sed
distclean: clean
rm -f *.orig *.rej *~