/* Copyright (C) 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
namespace Gtk
{
FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
:
_CONSTRUCT("title", title.c_str(), "action", static_cast(action))
{
set_transient_for(parent);
}
FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
:
_CONSTRUCT("title", title.c_str(), "action", static_cast(action))
{
}
FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title,
FileChooserAction action, DialogFlags flags)
:
_CONSTRUCT("transient-for", parent.gobj(),
"title", title.c_str(),
"action", static_cast(action),
"use-header-bar", (flags & DIALOG_USE_HEADER_BAR) != 0,
"modal", (flags & DIALOG_MODAL) != 0,
"destroy-with-parent", (flags & DIALOG_DESTROY_WITH_PARENT) != 0)
{
}
FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action,
DialogFlags flags)
:
_CONSTRUCT("title", title.c_str(),
"action", static_cast(action),
"use-header-bar", (flags & DIALOG_USE_HEADER_BAR) != 0,
"modal", (flags & DIALOG_MODAL) != 0,
"destroy-with-parent", (flags & DIALOG_DESTROY_WITH_PARENT) != 0)
{
}
_DEPRECATE_IFDEF_START
FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
:
_CONSTRUCT("title", title.c_str(), "action", static_cast(action), "file-system-backend", backend.c_str())
{
}
FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
:
_CONSTRUCT("title", title.c_str(), "action", static_cast(action), "file-system-backend", backend.c_str())
{
set_transient_for(parent);
}
_DEPRECATE_IFDEF_END
} // namespace Gtk