[gtkmm/gtkmm-3-24] Gtk::AboutDialog: Add constructor with a use_header_bar parameter
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-24] Gtk::AboutDialog: Add constructor with a use_header_bar parameter
- Date: Sun, 4 Nov 2018 16:18:03 +0000 (UTC)
commit c3404efb044859a209b80c10510974ddbe0eaf71
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Nov 4 17:14:19 2018 +0100
Gtk::AboutDialog: Add constructor 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(+)
---
diff --git a/gtk/src/aboutdialog.ccg b/gtk/src/aboutdialog.ccg
index 6a17370a..6382f3ca 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 32dfcdd7..323184c5 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,24}
+ */
+ 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]