[gtkmm/gtkmm-3-24] Button: Remove mentions of NULL args @ set_image()



commit 679f3d2b89cc75a5d86281cd4320895ea3e2091d
Author: Daniel Boles <dboles src gmail com>
Date:   Tue Nov 19 14:37:02 2019 +0000

    Button: Remove mentions of NULL args @ set_image()
    
    ...by copying the documentation generated from the C docs and fixing it
    up, because neither a string nor a Widget& in C++ can be NULL/nullptr.
    
    The documentation as generated and previously left in the .h file was:
    
    >>>
    ```cpp
      /** Set the image of @a button to the given widget. The image will be
       * displayed if the label text is <tt>nullptr</tt> or if
       * Gtk::Button::property_always_show_image() is <tt>true</tt>. You don’t have to call
       * Gtk::Widget::show() on @a image yourself.
       *
       * @newin{2,6}
       *
       * @param image A widget to set as the image for the button, or <tt>nullptr</tt> to unset.
       */
    ```
    >>>
    
    https://gitlab.gnome.org/GNOME/gtkmm/issues/58
    https://gitlab.gnome.org/GNOME/gtkmm/merge_requests/22

 gtk/src/button.hg | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 7d82e0dc..c570d666 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -138,6 +138,16 @@ public:
    */
   void set_image_from_icon_name(const Glib::ustring& icon_name, IconSize size, bool use_fallback);
 
+  /** Set the image of the button to the given widget.
+   *
+   * The @a image will be displayed if the property_label() text is empty or if
+   * property_always_show_image() is <tt>true</tt>. You don’t have to call
+   * Gtk::Widget::show() on the @a image yourself.
+   *
+   * @newin{2,6}
+   *
+   * @param image A widget to set as the image for the button.
+   */
   _WRAP_METHOD(void set_image(Widget& image), gtk_button_set_image)
   _WRAP_METHOD(Widget* get_image(), gtk_button_get_image)
   _WRAP_METHOD(const Widget* get_image() const, gtk_button_get_image, constversion)


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