[gtkmm] FileChooserDialog: Allow constructing with use-header-bar



commit 346c8082e359fb13171ef2fc8f6bb3fe06619733
Author: Daniel Boles <dboles src gnome org>
Date:   Mon Mar 27 18:15:44 2017 +0100

    FileChooserDialog: Allow constructing with use-header-bar
    
    This property is handy e.g. for ensuring consistent UI across platforms.
    This is a construct-only property, so we must specifically implement it.
    Doing so is free, by adding it as a defaulted argument to our remaining
    ctors, with the default value of false equivalent to what we got before.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780004

 gtk/src/filechooserdialog.ccg |    8 ++++----
 gtk/src/filechooserdialog.hg  |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/src/filechooserdialog.ccg b/gtk/src/filechooserdialog.ccg
index 9ea6d86..9ffdc46 100644
--- a/gtk/src/filechooserdialog.ccg
+++ b/gtk/src/filechooserdialog.ccg
@@ -22,16 +22,16 @@
 namespace Gtk
 {
 
-FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction 
action)
+FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction 
action, bool use_header_bar)
 :
-  _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
+  _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action), "use-header-bar", 
static_cast<int>(use_header_bar))
 {
   set_transient_for(parent);
 }
 
-FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
+FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, bool 
use_header_bar)
 :
-  _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
+  _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action), "use-header-bar", 
static_cast<int>(use_header_bar))
 {
 }
 
diff --git a/gtk/src/filechooserdialog.hg b/gtk/src/filechooserdialog.hg
index c7def9b..2d18ab3 100644
--- a/gtk/src/filechooserdialog.hg
+++ b/gtk/src/filechooserdialog.hg
@@ -41,8 +41,8 @@ class FileChooserDialog
   _UNMANAGEABLE
 public:
   _IGNORE(gtk_file_chooser_dialog_new)
-  FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN);
-  explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN);
+  FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN, bool use_header_bar = false);
+  explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN, bool use_header_bar = false);
 };
 
 } // namespace Gtk


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