alpar@174
|
1 |
/* -*- C++ -*-
|
alpar@174
|
2 |
*
|
alpar@174
|
3 |
* This file is a part of LEMON, a generic C++ optimization library
|
alpar@174
|
4 |
*
|
alpar@174
|
5 |
* Copyright (C) 2003-2006
|
alpar@174
|
6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
alpar@174
|
7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
alpar@174
|
8 |
*
|
alpar@174
|
9 |
* Permission to use, modify and distribute this software is granted
|
alpar@174
|
10 |
* provided that this copyright notice appears in all copies. For
|
alpar@174
|
11 |
* precise terms see the accompanying LICENSE file.
|
alpar@174
|
12 |
*
|
alpar@174
|
13 |
* This software is provided "AS IS" with no warranty of any kind,
|
alpar@174
|
14 |
* express or implied, and with no claim as to its suitability for any
|
alpar@174
|
15 |
* purpose.
|
alpar@174
|
16 |
*
|
alpar@174
|
17 |
*/
|
alpar@174
|
18 |
|
ladanyi@173
|
19 |
#include "file_chooser_extra_widget.h"
|
ladanyi@173
|
20 |
#include "mapstorage.h"
|
ladanyi@173
|
21 |
|
ladanyi@173
|
22 |
FileChooserExtraWidget::FileChooserExtraWidget(MapStorage* ms) :
|
ladanyi@173
|
23 |
Gtk::Expander("_Options", true),
|
ladanyi@173
|
24 |
lblGUIData("Save GUI specific data to:"),
|
ladanyi@173
|
25 |
rbGUISection("_GUI section", true),
|
ladanyi@173
|
26 |
rbConfFile("s_eparate .conf file", true)
|
ladanyi@173
|
27 |
{
|
ladanyi@173
|
28 |
std::cout << "FileChooserExtraWidget()" << std::endl;
|
ladanyi@173
|
29 |
|
ladanyi@173
|
30 |
Gtk::RadioButtonGroup group = rbGUISection.get_group();
|
ladanyi@173
|
31 |
rbConfFile.set_group(group);
|
ladanyi@173
|
32 |
|
ladanyi@173
|
33 |
/*
|
ladanyi@173
|
34 |
switch (pMapStorage->getGUIDataSaveLocation())
|
ladanyi@173
|
35 |
{
|
ladanyi@173
|
36 |
case GUI_SECTION:
|
ladanyi@173
|
37 |
break;
|
ladanyi@173
|
38 |
case CONF_FILE:
|
ladanyi@173
|
39 |
break;
|
ladanyi@173
|
40 |
}
|
ladanyi@173
|
41 |
*/
|
ladanyi@173
|
42 |
|
ladanyi@173
|
43 |
add(box);
|
ladanyi@173
|
44 |
box.pack_start(lblGUIData, Gtk::PACK_SHRINK);
|
ladanyi@173
|
45 |
box.pack_start(rbGUISection, Gtk::PACK_SHRINK);
|
ladanyi@173
|
46 |
box.pack_start(rbConfFile, Gtk::PACK_SHRINK);
|
ladanyi@173
|
47 |
|
ladanyi@173
|
48 |
rbConfFile.signal_group_changed().connect(
|
ladanyi@173
|
49 |
sigc::mem_fun(*this, &FileChooserExtraWidget::onRbToggled));
|
ladanyi@173
|
50 |
rbGUISection.signal_group_changed().connect(
|
ladanyi@173
|
51 |
sigc::mem_fun(*this, &FileChooserExtraWidget::onRbToggled));
|
ladanyi@173
|
52 |
|
ladanyi@173
|
53 |
show_all_children();
|
ladanyi@173
|
54 |
}
|
ladanyi@173
|
55 |
|
ladanyi@173
|
56 |
void FileChooserExtraWidget::onRbToggled()
|
ladanyi@173
|
57 |
{
|
ladanyi@173
|
58 |
std::cout << "onRbToggled()" << std::endl;
|
ladanyi@173
|
59 |
}
|
ladanyi@173
|
60 |
|
ladanyi@173
|
61 |
FileChooserExtraWidget::~FileChooserExtraWidget()
|
ladanyi@173
|
62 |
{
|
ladanyi@173
|
63 |
std::cout << "~FileChooserExtraWidget()" << std::endl;
|
ladanyi@173
|
64 |
}
|