GNOME Bugzilla – Bug 450574
New tooltips API
Last modified: 2007-08-31 09:42:05 UTC
Wrapped the Tooltip class and Widget's functions and signal.
Created attachment 90543 [details] New files and patch
Well done. Please commit. It looks quite straightforward. I wonder if set_icon_from_stock(const Glib::ustring& stock_id, IconSize size) should use a StockID. I forget when we use a string and when we use a StockID. Are there no signals or properties or implemented interfaces?
(In reply to comment #2) > I wonder if > set_icon_from_stock(const Glib::ustring& stock_id, IconSize size) > should use a StockID. I forget when we use a string and when we use a StockID. Right, should be StockID. It's used in most cases, except that ToolButton::get_stock_id() return a string. StockID has constructors for strings and BuiltInStockID, which can perform implicit conversion, and are very convenient. Btw for properties (there is not stock_id property here, just for the sake of the discussion) it is a bit diverse: action.hg:99: _WRAP_PROPERTY("stock_id", StockID) cellrendererpixbuf.hg:51: _WRAP_PROPERTY("stock_id", Glib::ustring) image.hg:111: _WRAP_PROPERTY("stock", Glib::ustring) statusicon.hg:152: _WRAP_PROPERTY("stock", StockID) toolbutton.hg:93: _WRAP_PROPERTY("stock_id", Glib::ustring) > Are there no signals or properties or implemented interfaces? There is one signal, for Widget, query_tooltip. But (oops) I forgot to check the properties - there are three for Widget. Committed, with these modifications included. I'll get to making an example soon.
Closed because this was committed. An example would still be nice, but can be a separate patch.