Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/vlg/develop/gwavmerger/src/FileOpen.cpp

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 //                              FileOpen.cpp
00004 //------------------------------------------------------------------------------
00005 // $Id: FileOpen.cpp,v 1.6 2003/02/07 05:15:09 vlg Exp $
00006 //------------------------------------------------------------------------------
00007 //  Copyright (c) 2001,2002 by Vladislav Grinchenko
00008 //
00009 //  This program is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU General Public License
00011 //  as published by the Free Software Foundation; either version
00012 //  2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 
00015 #include <assa/Logger.h>
00016 #include "FileOpen.h"
00017 
00018 
00019 FileOpen::FileOpen (Config& cfg_) : 
00020     Gtk::FileSelection ("Open Project"),
00021     m_config (cfg_)
00022 { 
00023     trace("FileOpen::FileOpen");
00024 
00025     // clicked () is an 'emittable signal' defined in Gtk::Button class
00026     get_ok_button ()->
00027         signal_clicked ().connect (slot (*this, &FileOpen::ok_cb));
00028 
00029     // hide() is an 'emittable signal' defined in Gtk::Widget class
00030     get_cancel_button ()->
00031         signal_clicked ().connect (slot (*this, &FileOpen::cancel_cb));
00032 
00033     // Set up file filter based on extention
00034     // complete ("*.gwm");
00035     show_all ();
00036 }
00037 
00038 void
00039 FileOpen::ok_cb ()
00040 {
00041     trace("FileOpen::ok_cb");
00042 
00043     m_config.load_project (get_filename ());
00044     hide ();
00045 
00046     // Gtk 2.0 doesn't have destroy?
00047     //destroy ();
00048 }
00049 
00050 void 
00051 FileOpen::cancel_cb ()
00052 {
00053     trace("FileOpen::cancel_cb");
00054     hide ();
00055 
00056     // Gtk 2.0 doesn't have destroy ?
00057     // destroy ();
00058 }
00059     

Generated on Tue Feb 11 23:05:19 2003 for gwavmerger by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002