[gtkmm] About Dialog: Add construtor with a use_header_bar parameter.



commit 886f6b816700493848751dd305f003655ca3de77
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 14 09:06:57 2017 +0100

    About Dialog: Add construtor with a use_header_bar parameter.
    
    Bug #780004 (Daniel Boles)

 gtk/src/aboutdialog.ccg |    8 ++++++++
 gtk/src/aboutdialog.hg  |    9 +++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtk/src/aboutdialog.ccg b/gtk/src/aboutdialog.ccg
index 6a17370..6382f3c 100644
--- a/gtk/src/aboutdialog.ccg
+++ b/gtk/src/aboutdialog.ccg
@@ -23,6 +23,14 @@
 namespace Gtk
 {
 
+// use-header-bar is construct-only. It must be set in the constructor,
+// if you don't want the default value.
+AboutDialog::AboutDialog(bool use_header_bar)
+:
+  _CONSTRUCT("use-header-bar", static_cast<int>(use_header_bar))
+{
+}
+
 void AboutDialog::unset_license()
 {
   gtk_about_dialog_set_license(gobj(), nullptr);
diff --git a/gtk/src/aboutdialog.hg b/gtk/src/aboutdialog.hg
index ccf961d..dc5a6dc 100644
--- a/gtk/src/aboutdialog.hg
+++ b/gtk/src/aboutdialog.hg
@@ -53,6 +53,15 @@ class AboutDialog : public Dialog
 public:
   _CTOR_DEFAULT()
 
+  /** Constructor.
+   *
+   * @param use_header_bar <tt>true</tt> if the dialog shall use a HeaderBar
+   *        for action buttons instead of the action-area.
+   *
+   * @newin{3,90}
+   */
+  explicit AboutDialog(bool use_header_bar);
+
   _WRAP_METHOD(Glib::ustring get_program_name() const, gtk_about_dialog_get_program_name)
   _WRAP_METHOD(void set_program_name(const Glib::ustring& name), gtk_about_dialog_set_program_name)
 


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