Source

lrc / src / gui / AddRemoveHandlers.cxx

/*
 * AddRemoveHandlers.cxx
 *
 * Copyright 2012 Andreas Tscharner <andy@vis.ethz.ch>
 *
 * 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., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 */


#include <gtkmm/builder.h>
#include <gtkmm/button.h>
#include "AddRemoveHandlers.hxx"


void AddRemoveHandlers::on_add_button_clicked(void)
{
	int dlgRet;


	dlgRet = m_addFilesDlg->run();
	m_addFilesDlg->hide();
}

void AddRemoveHandlers::on_remove_button_clicked(void)
{
}

AddRemoveHandlers::AddRemoveHandlers(Glib::RefPtr<Gtk::Builder> p_refBuilder)
{
	p_refBuilder->get_widget("bnAdd", m_addButton);
	m_addButton->signal_clicked().connect(sigc::mem_fun(*this,
	                                         &AddRemoveHandlers::on_add_button_clicked));

	p_refBuilder->get_widget("bnRemove", m_removeButton);
	m_removeButton->signal_clicked().connect(sigc::mem_fun(*this,
	                                            &AddRemoveHandlers::on_remove_button_clicked));

	p_refBuilder->get_widget("dlgAddFiles", m_addFilesDlg);
}

AddRemoveHandlers::~AddRemoveHandlers(void)
{
	delete m_addFilesDlg;
	delete m_removeButton;
	delete m_addButton;
}