1
/* AppArmor Profile Editor (C) 2006 Novell, Inc.
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 2 of the License, or
6
* (at your option) any later version.
10
#include "wx/wxprec.h"
16
#include <wx/wfstream.h>
17
#include "AboutDialog.h"
18
#include "opensuse_logo.xpm"
20
IMPLEMENT_DYNAMIC_CLASS(AboutDialog, wxDialog)
22
BEGIN_EVENT_TABLE(AboutDialog, wxDialog)
25
AboutDialog::AboutDialog()
29
AboutDialog::AboutDialog(wxWindow* parent,
31
const wxString& caption,
36
Create(parent, id, caption, pos, size, style);
39
bool AboutDialog::Create(wxWindow* parent,
41
const wxString& caption,
47
mpVersionStaticText = NULL;
48
mpCopyrightStaticText = NULL;
49
mpOkButtonSizer = NULL;
52
SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);
53
wxDialog::Create(parent, id, caption, pos, size, style);
56
GetSizer()->Fit(this);
57
GetSizer()->SetSizeHints(this);
63
void AboutDialog::CreateControls()
65
SetBackgroundColour(wxColour(255, 255, 255));
66
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
69
wxBitmap mpLogoBitmapBitmap(opensuse_logo_xpm);
70
mpLogoBitmap = new wxStaticBitmap(this,
76
mainSizer->Add(mpLogoBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
78
mpVersionStaticText = new wxStaticText(this,
84
mainSizer->Add(mpVersionStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
86
mpCopyrightStaticText = new wxStaticText(this,
88
_("(C) 2006 Novell, Inc\n"),
92
mainSizer->Add(mpCopyrightStaticText, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5);
94
mpLicenseTextCtrl = new wxTextCtrl(this,
99
wxTE_MULTILINE|wxTE_READONLY);
100
mpLicenseTextCtrl->SetValue(GPL_STRING);
101
mainSizer->Add(mpLicenseTextCtrl, 0, wxGROW|wxALL, 5);
103
mpOkButtonSizer = new wxStdDialogButtonSizer;
105
mainSizer->Add(mpOkButtonSizer, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
106
mpOkButton = new wxButton(this,
112
mpOkButtonSizer->AddButton(mpOkButton);
113
mpOkButtonSizer->Realize();