lumiera_/src/gui/dialog/preferences-dialog.hpp

76 lines
2.2 KiB
C++
Raw Normal View History

2008-04-21 23:59:35 +02:00
/*
2015-01-07 00:53:03 +01:00
PREFERENCES-DIALOG.hpp - dialog for application preferences
2010-12-17 23:28:49 +01:00
2008-04-21 23:59:35 +02:00
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
2010-12-17 23:28:49 +01:00
2008-04-21 23:59:35 +02:00
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
2010-12-17 23:28:49 +01:00
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
2008-04-21 23:59:35 +02:00
This program 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 General Public License for more details.
2010-12-17 23:28:49 +01:00
2008-04-21 23:59:35 +02:00
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2010-12-17 23:28:49 +01:00
2008-04-21 23:59:35 +02:00
*/
2008-04-21 23:59:35 +02:00
2015-01-07 00:53:03 +01:00
#ifndef GUI_DIALOG_PREFERENCES_DIALOG_H
#define GUI_DIALOG_PREFERENCES_DIALOG_H
2008-04-21 23:59:35 +02:00
#include "gui/gtk-lumiera.hpp"
#include "gui/dialog/dialog.hpp"
2008-04-21 23:59:35 +02:00
namespace gui {
namespace dialog {
2008-11-24 18:12:47 +01:00
2015-01-07 00:53:03 +01:00
class PreferencesDialog
: public Gtk::Dialog
{
Gtk::Notebook notebook_;
2015-01-07 00:53:03 +01:00
Gtk::VBox interfaceBox_;
Gtk::ComboBox interfaceThemeCombo_;
2015-01-07 00:53:03 +01:00
public:
PreferencesDialog (Gtk::Window &parent)
2015-01-07 00:53:03 +01:00
: Dialog(_("Preferences"), parent, true)
{
using namespace Gtk;
Box *v_box = get_vbox();
REQUIRE (v_box != NULL);
interfaceBox_.pack_start (interfaceThemeCombo_, PACK_SHRINK);
interfaceBox_.set_spacing(4);
interfaceBox_.set_border_width(5);
2015-01-07 00:53:03 +01:00
notebook_.append_page (interfaceBox_, _("Interface"));
2015-01-07 00:53:03 +01:00
v_box->pack_start (notebook_);
2015-01-07 00:53:03 +01:00
// Configure the dialog
v_box->set_spacing (BoxSpacing);
set_border_width (BorderPadding);
set_resizable (false);
// Configure the Cancel and OK buttons
add_button (Stock::CANCEL, RESPONSE_CANCEL);
add_button (Stock::OK, RESPONSE_OK);
show_all_children();
}
};
}} // namespace gui::dialog
#endif /*GUI_DIALOG_PREFERENCES_DIALOG_H*/