GNOME Bugzilla – Bug 708194
Wrap GtkHeaderBar
Last modified: 2013-09-18 08:18:25 UTC
Created attachment 255064 [details] [review] Wrap GtkHeaderBar First version of a GtkHeaderBar. An example of how to use it is still under development.
Review of attachment 255064 [details] [review]: There were just some simple mistakes here, which I've noted just to help you learn. I have fixed them and pushed the patch. Many thanks. ::: gtk/src/headerbar.hg @@ +50,3 @@ + _WRAP_METHOD(void set_title(const Glib::ustring& title), gtk_header_bar_set_title) + // The returned string is owned by the widget and must not be modified of freed + _WRAP_METHOD(const Glib::ustring& get_title() const, gtk_header_bar_get_title) We do not generally return const & strings. Just returning by value is simpler. Some people like to do this, but it's generally an premature optimisation that risks memory problems. @@ +57,3 @@ + + _WRAP_METHOD(void set_custom_title(Gtk::Widget& title_widget), gtk_header_bar_set_custom_title) + _WRAP_METHOD(Gtk::Widget* get_custom_title(), gtk_header_bar_get_custom_title) // transfer none We don't need the Gtk:: prefix while we are in the Gtk namespace. The "transfer none" is also not interesting when dealing with Widgets rather than Objects (not using RefPtr). @@ +67,3 @@ + + + _WRAP_PROPERTY("custom-title", Gtk::Widget*) These properties are not in any .defs file yet.