~ubuntu-branches/debian/squeeze/synaptic/squeeze

« back to all changes in this revision

Viewing changes to wings/rwaboutpanel.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2005-04-06 00:39:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050406003952-eld0cxghnpl1q6fj
Tags: 0.55+cvs20050406-1
translation updates for: fr, es, lt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
 
4
 
#include "config.h"
5
 
 
6
 
#include "i18n.h"
7
 
 
8
 
#include "rwaboutpanel.h"
9
 
 
10
 
 
11
 
#include "cnc.xpm"
12
 
#include "deb.xpm"
13
 
#include "logo.xpm"
14
 
 
15
 
 
16
 
static void closeWindow(WMWidget *self, void *data)
17
 
{
18
 
    RWAboutPanel *about = (RWAboutPanel*)data;
19
 
    
20
 
    about->hide();
21
 
}
22
 
 
23
 
 
24
 
RWAboutPanel::RWAboutPanel(RWWindow *parent) 
25
 
    : RWWindow(parent, "about")
26
 
{
27
 
    WMBox *vbox, *hbox;
28
 
    WMScreen *scr = WMWidgetScreen(parent->window());
29
 
    WMLabel *label;
30
 
    WMLabel *icon;
31
 
    WMPixmap *pix;
32
 
    WMColor *white = WMWhiteColor(scr);
33
 
 
34
 
 
35
 
    WMSetWindowMinSize(_win, 360, 240);
36
 
    WMSetWindowMaxSize(_win, 360, 240);
37
 
    
38
 
    vbox = WMCreateBox(_win);
39
 
    WMSetViewExpandsToParent(WMWidgetView(vbox), 0, 0, 0, 0);
40
 
    WMSetBoxBorderWidth(vbox, 10);
41
 
    WMSetWidgetBackgroundColor(vbox, white);
42
 
    WMMapWidget(vbox);
43
 
    
44
 
        
45
 
    hbox = WMCreateBox(vbox);
46
 
    WMSetBoxHorizontal(hbox, True);
47
 
    WMSetWidgetBackgroundColor(hbox, white);
48
 
    WMAddBoxSubview(vbox, WMWidgetView(hbox), False, True, 60, 0, 5);
49
 
    
50
 
    icon = WMCreateLabel(hbox);
51
 
    WMSetWidgetBackgroundColor(icon, white);
52
 
    pix = WMCreatePixmapFromXPMData(scr, cnc_xpm);
53
 
    WMSetLabelImagePosition(icon, WIPImageOnly);
54
 
    WMSetLabelImage(icon, pix);
55
 
    WMReleasePixmap(pix);
56
 
    WMAddBoxSubview(hbox, WMWidgetView(icon), False, True, 100, 0, 5);
57
 
 
58
 
    icon = WMCreateLabel(hbox);
59
 
    WMSetWidgetBackgroundColor(icon, white);
60
 
    pix = WMCreatePixmapFromXPMData(scr, logo_xpm);
61
 
    WMSetLabelImagePosition(icon, WIPImageOnly);
62
 
    WMSetLabelImage(icon, pix);
63
 
    WMReleasePixmap(pix);
64
 
    WMAddBoxSubview(hbox, WMWidgetView(icon), True, True, 100, 0, 5);
65
 
 
66
 
    icon = WMCreateLabel(hbox);
67
 
    WMSetWidgetBackgroundColor(icon, white);
68
 
    pix = WMCreatePixmapFromXPMData(scr, deb_xpm);
69
 
    WMSetLabelImagePosition(icon, WIPImageOnly);
70
 
    WMSetLabelImage(icon, pix);
71
 
    WMReleasePixmap(pix);
72
 
    WMAddBoxSubview(hbox, WMWidgetView(icon), False, True, 50, 0, 5);
73
 
 
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"));
84
 
        
85
 
    WMAddBoxSubview(vbox, WMWidgetView(label), True, True, 125, 0, 5);
86
 
 
87
 
    WMButton *button = WMCreateCommandButton(vbox);
88
 
    WMMapWidget(button);
89
 
    WMSetButtonText(button, _("Dismiss"));
90
 
    WMAddBoxSubview(vbox, WMWidgetView(button), False, True, 24, 0, 0);
91
 
    WMSetButtonAction(button, closeWindow, this);
92
 
    
93
 
    WMMapSubwidgets(hbox);
94
 
    WMMapSubwidgets(vbox);
95
 
    
96
 
    setTitle(PACKAGE" version "VERSION);
97
 
    
98
 
    WMRealizeWidget(_win);
99
 
}