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