1 // Copyright (C) 2020 Ben Asselstine
2 //
3 // This program is free software; you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation; either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU Library General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17
18 #include <config.h>
19
20 #include <gtkmm.h>
21 #include <map>
22 #include <sigc++/functors/mem_fun.h>
23
24 #include "defs.h"
25 #include "quick-help-window.h"
26
27 #include "builder-cache.h"
28
29 #define method(x) sigc::mem_fun(*this, &QuickHelpWindow::x)
QuickHelpWindow()30 QuickHelpWindow::QuickHelpWindow()
31 {
32 xml = BuilderCache::get("quick-help-window.ui");
33 xml->get_widget("window", window);
34 window->set_title (_("Quick Help"));
35 xml->get_widget("close_button", close_button);
36 close_button->signal_clicked().connect (method(on_close_button_clicked));
37 }
38
on_close_button_clicked()39 void QuickHelpWindow::on_close_button_clicked ()
40 {
41 window->hide ();
42 }
43