00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "creditsdialog.h"
00019
00020 #include "config.h"
00021
00022 #include <gtkmm/stock.h>
00023
00027 CreditsDialog::CreditsDialog(){
00028
00029 Gtk::VBox *vbox;
00030 Gtk::HButtonBox *hButtonBox;
00031 Gtk::Button *buttonOk;
00032 Gtk::Label *label;
00033 Gtk::HSeparator *hSep;
00034 Gtk::Notebook *notebook;
00035 Gtk::VBox *vboxWrittenBy, *vboxDocumentedBy;
00036 Gtk::ScrolledWindow *scrolledWindowWrittenBy, *scrolledWindowDocumentedBy;
00037
00038 #ifdef DEBUG
00039 cout << "starting Credits Dialog" << endl;
00040 #endif
00041
00042 set_title("Credits");
00043 set_border_width(5);
00044 set_resizable(true);
00045 set_modal(false);
00046 vbox = manage(new Gtk::VBox(false, 0));
00047 vbox->set_spacing(5);
00048 add(*vbox);
00049
00050 notebook = manage(new Gtk::Notebook());
00051 vbox->pack_start(*notebook, Gtk::PACK_EXPAND_WIDGET, 0);
00052
00053 scrolledWindowWrittenBy = manage(new Gtk::ScrolledWindow());
00054 scrolledWindowWrittenBy->set_border_width(5);
00055 scrolledWindowWrittenBy->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
00056 scrolledWindowWrittenBy->set_size_request(-1,-1);
00057 notebook->append_page(*scrolledWindowWrittenBy, "Written by", "", true);
00058 vboxWrittenBy = manage(new Gtk::VBox(false, 0));
00059 vboxWrittenBy->set_spacing(5);
00060 scrolledWindowWrittenBy->add(*vboxWrittenBy);
00061 label = manage (new Gtk::Label("Michael Otto <gstockcalc@saskathex.de>"));
00062 vboxWrittenBy->pack_start(*label, Gtk::PACK_SHRINK, 0);
00063
00064 scrolledWindowDocumentedBy = manage(new Gtk::ScrolledWindow());
00065 scrolledWindowDocumentedBy->set_border_width(5);
00066 scrolledWindowDocumentedBy->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
00067 scrolledWindowDocumentedBy->set_size_request(-1,-1);
00068 notebook->append_page(*scrolledWindowDocumentedBy, "Documented by", "", true);
00069 vboxDocumentedBy = manage(new Gtk::VBox(false, 0));
00070 vboxDocumentedBy->set_spacing(5);
00071 scrolledWindowDocumentedBy->add(*vboxDocumentedBy);
00072 label = manage (new Gtk::Label("Michael Otto <gstockcalc@saskathex.de>"));
00073 vboxDocumentedBy->pack_start(*label, Gtk::PACK_SHRINK, 0);
00074
00075 hSep = manage(new Gtk::HSeparator());
00076 vbox->pack_start(*hSep, Gtk::PACK_SHRINK, 0);
00077 hButtonBox = manage( new Gtk::HButtonBox());
00078 hButtonBox->set_spacing(5);
00079 vbox->pack_start(*hButtonBox, Gtk::PACK_SHRINK, 0);
00080 buttonOk = manage( new Gtk::Button(Gtk::Stock::OK));
00081 buttonOk->signal_clicked().connect(slot(*this,&CreditsDialog::quit));
00082 hButtonBox->pack_start(*buttonOk, Gtk::PACK_SHRINK, 0);
00083 set_size_request(350,200);
00084 show_all();
00085 }
00086
00087
00091 CreditsDialog::~CreditsDialog(){
00092 }
00093
00097 void CreditsDialog::quit() {
00098 #ifdef DEBUG
00099 cout << "quiting Credits Dialog" << endl;
00100 #endif
00101 delete this;
00102 }
00103
00104
00109 bool CreditsDialog::on_delete_event(GdkEventAny *event) {
00110 quit();
00111 return true;
00112 }