over time, a specific Lumiera code writing style has emerged. The GUI, as it stood, used somewhat different conventions, which now have been aligned to the common standard. Basically we use GNU style, with some adjustments for OO-programming, we prefer CamelCase, and write TypeNames uppercase, variableNames lowercase
75 lines
2.2 KiB
C++
75 lines
2.2 KiB
C++
/*
|
|
PREFERENCES-DIALOG.hpp - dialog for application preferences
|
|
|
|
Copyright (C) Lumiera.org
|
|
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License as
|
|
published by the Free Software Foundation; either version 2 of
|
|
the License, or (at your option) any later version.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
|
#ifndef GUI_DIALOG_PREFERENCES_DIALOG_H
|
|
#define GUI_DIALOG_PREFERENCES_DIALOG_H
|
|
|
|
|
|
#include "gui/gtk-lumiera.hpp"
|
|
#include "gui/dialog/dialog.hpp"
|
|
|
|
namespace gui {
|
|
namespace dialog {
|
|
|
|
|
|
class PreferencesDialog
|
|
: public Gtk::Dialog
|
|
{
|
|
Gtk::Notebook notebook_;
|
|
|
|
Gtk::VBox interfaceBox_;
|
|
Gtk::ComboBox interfaceThemeCombo_;
|
|
|
|
public:
|
|
PreferencesDialog (Gtk::Window &parent)
|
|
: 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);
|
|
|
|
notebook_.append_page (interfaceBox_, _("Interface"));
|
|
|
|
v_box->pack_start (notebook_);
|
|
|
|
// 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*/
|