1
0
mirror of git://projects.qi-hardware.com/vido.git synced 2024-12-22 19:43:21 +02:00
vido/src/search_dialog.cc

47 lines
2.1 KiB
C++
Raw Normal View History

/***************************************************************************
* Copyright (C) 2009 by Mirko Lindner *
* mirko@qi-hardware.com *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "config.h"
#include "search_dialog.hh"
#include "vido.hh"
#include <gtkmm.h>
search_dialog::search_dialog(main_window* parent, const Glib::ustring& input)
{
Gtk::Dialog dialog("Search", parent, true);
Gtk::Label label("Enter search Term:");
dialog.get_vbox()->pack_start(label, true, true);
Gtk::Entry entry;
entry.set_text("");
dialog.get_vbox()->pack_start(entry, true, true);
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
dialog.show_all();
int result = dialog.run();
if (result == Gtk::RESPONSE_OK)
{
set_search(entry.get_text().c_str());
}
}