8
#include "rwaboutpanel.h"
16
static void closeWindow(WMWidget *self, void *data)
18
RWAboutPanel *about = (RWAboutPanel*)data;
24
RWAboutPanel::RWAboutPanel(RWWindow *parent)
25
: RWWindow(parent, "about")
28
WMScreen *scr = WMWidgetScreen(parent->window());
32
WMColor *white = WMWhiteColor(scr);
35
WMSetWindowMinSize(_win, 360, 240);
36
WMSetWindowMaxSize(_win, 360, 240);
38
vbox = WMCreateBox(_win);
39
WMSetViewExpandsToParent(WMWidgetView(vbox), 0, 0, 0, 0);
40
WMSetBoxBorderWidth(vbox, 10);
41
WMSetWidgetBackgroundColor(vbox, white);
45
hbox = WMCreateBox(vbox);
46
WMSetBoxHorizontal(hbox, True);
47
WMSetWidgetBackgroundColor(hbox, white);
48
WMAddBoxSubview(vbox, WMWidgetView(hbox), False, True, 60, 0, 5);
50
icon = WMCreateLabel(hbox);
51
WMSetWidgetBackgroundColor(icon, white);
52
pix = WMCreatePixmapFromXPMData(scr, cnc_xpm);
53
WMSetLabelImagePosition(icon, WIPImageOnly);
54
WMSetLabelImage(icon, pix);
56
WMAddBoxSubview(hbox, WMWidgetView(icon), False, True, 100, 0, 5);
58
icon = WMCreateLabel(hbox);
59
WMSetWidgetBackgroundColor(icon, white);
60
pix = WMCreatePixmapFromXPMData(scr, logo_xpm);
61
WMSetLabelImagePosition(icon, WIPImageOnly);
62
WMSetLabelImage(icon, pix);
64
WMAddBoxSubview(hbox, WMWidgetView(icon), True, True, 100, 0, 5);
66
icon = WMCreateLabel(hbox);
67
WMSetWidgetBackgroundColor(icon, white);
68
pix = WMCreatePixmapFromXPMData(scr, deb_xpm);
69
WMSetLabelImagePosition(icon, WIPImageOnly);
70
WMSetLabelImage(icon, pix);
72
WMAddBoxSubview(hbox, WMWidgetView(icon), False, True, 50, 0, 5);
74
label = WMCreateLabel(vbox);
75
WMSetWidgetBackgroundColor(label, WMWhiteColor(scr));
76
// WMCreateNamedColor(scr, "#ddddee", False));
77
WMSetLabelRelief(label, WRFlat);
78
WMSetLabelText(label, _("Copyright (c) 2001 Conectiva S/A\n\n"
79
"Author: Alfredo K. Kojima <kojima@conectiva.com.br>\n"
80
"Icons shamelessly ripped from KDE\n"
81
"APT backend: Jason Gunthorpe <jgg@debian.org>\n\n"
82
"This software is licensed under the terms of the\n"
83
"GNU General Public License, Version 2"));
85
WMAddBoxSubview(vbox, WMWidgetView(label), True, True, 125, 0, 5);
87
WMButton *button = WMCreateCommandButton(vbox);
89
WMSetButtonText(button, _("Dismiss"));
90
WMAddBoxSubview(vbox, WMWidgetView(button), False, True, 24, 0, 0);
91
WMSetButtonAction(button, closeWindow, this);
93
WMMapSubwidgets(hbox);
94
WMMapSubwidgets(vbox);
96
setTitle(PACKAGE" version "VERSION);
98
WMRealizeWidget(_win);