From 96103f1a7a1516f1137788f6a4e50daba1248b36 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 1 Apr 2012 16:01:02 +0200 Subject: fix XML output of guideline color (this does not fix loading of guide color) Fixed bugs: - https://launchpad.net/bugs/823739 (bzr r11138) --- src/sp-guide.cpp | 2 +- src/sp-guide.h | 2 +- src/ui/dialog/guides.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index 6cdc75c41..6a71cf4f0 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -440,7 +440,7 @@ void sp_guide_set_normal(SPGuide &guide, Geom::Point const normal_to_line, bool */ } -void sp_guide_set_color(SPGuide &guide, const unsigned char r, const unsigned char g, const unsigned char b, bool const commit) +void sp_guide_set_color(SPGuide &guide, const unsigned r, const unsigned g, const unsigned b, bool const commit) { g_assert(SP_IS_GUIDE(&guide)); guide.color = (r << 24) | (g << 16) | (b << 8) | 0x7f; diff --git a/src/sp-guide.h b/src/sp-guide.h index 5d2a05791..319e12305 100644 --- a/src/sp-guide.h +++ b/src/sp-guide.h @@ -65,7 +65,7 @@ void sp_guide_delete_all_guides(SPDesktop *dt); void sp_guide_moveto(SPGuide &guide, Geom::Point const point_on_line, bool const commit); void sp_guide_set_normal(SPGuide &guide, Geom::Point const normal_to_line, bool const commit); void sp_guide_set_label(SPGuide &guide, const char* label, bool const commit); -void sp_guide_set_color(SPGuide &guide, const unsigned char r, const unsigned char g, const unsigned char b, bool const commit); +void sp_guide_set_color(SPGuide &guide, const unsigned r, const unsigned g, const unsigned b, bool const commit); void sp_guide_remove(SPGuide *guide); char *sp_guide_description(SPGuide const *guide, const bool verbose = true); diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 088290b6f..ce21f9c6e 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -71,7 +71,7 @@ void GuidelinePropertiesDialog::showDialog(SPGuide *guide, SPDesktop *desktop) { void GuidelinePropertiesDialog::_colorChanged() { const Gdk::Color c = _color.get_color(); - char r = c.get_red()/257, g = c.get_green()/257, b = c.get_blue()/257; + unsigned r = c.get_red()/257, g = c.get_green()/257, b = c.get_blue()/257; //TODO: why 257? verify this! sp_guide_set_color(*_guide, r, g, b, true); } -- cgit v1.2.3