5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2001 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 #include "silcerbasewin.hh"
21 #include "silcerapp.hh"
23 SilcerBaseWindow::SilcerBaseWindow(const char *widgetname)
25 _thisGH = Silcer_App->load_resource(widgetname);
26 _thisWindow = SilcerGetWidget<Gtk::Window>(_thisGH, widgetname);
30 void SilcerBaseWindow::set_dynamic()
32 SigC::Object::set_dynamic();
36 void SilcerBaseWindow::close()
41 SilcerBaseWindow::~SilcerBaseWindow()
44 _thisWindow->destroy();
45 gtk_object_unref(GTK_OBJECT(_thisGH));
48 SilcerBaseDialog::SilcerBaseDialog(const char *widgetname,
50 : SilcerBaseWindow(widgetname)
52 _thisDialog = static_cast<Gnome::Dialog*>(_thisWindow);
53 _thisDialog->close_hides(close_hides);
55 _thisDialog->close.connect(slot(this, &SilcerBaseDialog::on_Dialog_close));
58 gboolean SilcerBaseDialog::on_Dialog_close()
60 _thisWindow->destroy();
64 SilcerBaseWidget::SilcerBaseWidget(const char *widgetname,
67 _thisGH = Silcer_App->load_resource(widgetname, filename);
68 _thisWidget = SilcerGetWidget<Gtk::Widget>(_thisGH, widgetname);
72 void SilcerBaseWidget::set_dynamic()
74 SigC::Object::set_dynamic();
78 void SilcerBaseWidget::close()
83 SilcerBaseWidget::~SilcerBaseWidget()
86 _thisWidget->destroy();
87 gtk_object_unref(GTK_OBJECT(_thisGH));