RE: [gtkmm] output of Glib::PropertyProxy<Gtk::Color>



> From: Anton Sodja [mailto:asodja email si]  
> In code which outputs setting file is such a function:
> 
> void TSettings::out_color(const Gdk::Color &cl) {
>    out.fill('0');
>    out << std::hex << std::setw(2) << (cl.get_red() % 0x100)
>        << std::hex << std::setw(2) << (cl.get_green() % 0x100)
>        << std::hex << std::setw(2) << (cl.get_blue() % 0x100) 
> << std::dec
>        << std::flush;
>    out.fill(' ');
> }
> 
> In my code, this method is called like that:
> if (style_tag && style_tag->property_foreground_set()) {
>      // ...
>      out_color(style_tag->property_foreground_gdk().get_value());
> }
> 
> Output is fine, but I get such warning:
> (hc11asm-gui:8239): GLib-GObject-WARNING **: gvalue.c:86: cannot 
> initialize GValue with type `GdkColor', the value has already been 
> initialized as `GdkColor'

I can't think what the problem might be, but I'd like to invesstigate it if
you can add a complete but small-as-possible, compileable example to
bugzilla.

Murray Cumming
murrayc usa net
www.murrayc.com 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]