initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / aboutprefs.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #include "aboutprefs.h"
23 #include "bcsignals.h"
24 #include "language.h"
25 #include "libzmpeg3.h"
26 #include "mwindow.h"
27 #include "quicktime.h"
28 #include "theme.h"
29 #include "vframe.h"
30
31
32
33 AboutPrefs::AboutPrefs(MWindow *mwindow, PreferencesWindow *pwindow)
34  : PreferencesDialog(mwindow, pwindow)
35 {
36 }
37
38 AboutPrefs::~AboutPrefs()
39 {
40         credits.remove_all_objects();
41 }
42
43 void AboutPrefs::create_objects()
44 {
45         int x, y;
46
47
48         BC_Resources *resources = BC_WindowBase::get_resources();
49
50 //      add_subwindow(new BC_Title(mwindow->theme->preferencestitle_x, 
51 //              mwindow->theme->preferencestitle_y, 
52 //              _("About"), 
53 //              LARGEFONT, 
54 //              resources->text_default));
55         
56         x = mwindow->theme->preferencesoptions_x;
57         y = mwindow->theme->preferencesoptions_y +
58                 get_text_height(LARGEFONT);
59
60         char license1[BCTEXTLEN];
61         sprintf(license1, "%s %s", PROGRAM_NAME, CINELERRA_VERSION);
62
63         set_font(LARGEFONT);
64         set_color(resources->text_default);
65         draw_text(x, y, license1);
66
67         y += get_text_height(LARGEFONT);
68         char license2[BCTEXTLEN];
69         sprintf(license2, 
70                 _("(C) %d Adam Williams\n\nheroinewarrior.com"), 
71                 COPYRIGHT_DATE);
72         set_font(MEDIUMFONT);
73         draw_text(x, y, license2);
74
75
76
77         y += get_text_height(MEDIUMFONT) * 3;
78
79 //      char versions[BCTEXTLEN];
80 //      sprintf(versions, 
81 // _("Quicktime version %d.%d.%d\n"
82 // "Libmpeg3 version %d.%d.%d\n"),
83 // quicktime_major(),
84 // quicktime_minor(),
85 // quicktime_release(),
86 // mpeg3_major(),
87 // mpeg3_minor(),
88 // mpeg3_release());
89 //      draw_text(x, y, versions);
90
91
92
93 //      y += get_text_height(MEDIUMFONT) * 3;
94         set_font(LARGEFONT);
95         draw_text(x, y, "Contributors:");
96         y += get_text_height(LARGEFONT);
97
98         credits.append(new BC_ListBoxItem("Richard Baverstock"));
99         credits.append(new BC_ListBoxItem("Karl Bielefeldt"));
100         credits.append(new BC_ListBoxItem("Kevin Brosius"));
101         credits.append(new BC_ListBoxItem("Jean-Luc Coulon"));
102         credits.append(new BC_ListBoxItem("Jean-Michel Poure"));
103         credits.append(new BC_ListBoxItem("Jerome Cornet"));
104         credits.append(new BC_ListBoxItem("Pierre Marc Dumuid"));
105         credits.append(new BC_ListBoxItem("Alex Ferrer"));
106         credits.append(new BC_ListBoxItem("Gustavo Iñiguez"));
107         credits.append(new BC_ListBoxItem("Tefan de Konink"));
108         credits.append(new BC_ListBoxItem("Nathan Kurz"));
109         credits.append(new BC_ListBoxItem("Greg Mekkes"));
110         credits.append(new BC_ListBoxItem("Eric Seigne"));
111         credits.append(new BC_ListBoxItem("Johannes Sixt"));
112         credits.append(new BC_ListBoxItem("Joe Stewart"));
113         credits.append(new BC_ListBoxItem("Dan Streetman"));
114         credits.append(new BC_ListBoxItem("Johannes Sixt"));
115         credits.append(new BC_ListBoxItem("Mark Taraba"));
116         credits.append(new BC_ListBoxItem("Andraz Tori"));
117         credits.append(new BC_ListBoxItem("Jonas Wulff"));
118 #ifdef X_HAVE_UTF8_STRING
119         credits.append(new BC_ListBoxItem("Einar Rünkaru"));
120 #else
121         credits.append(new BC_ListBoxItem("Einar R\374nkaru"));
122 #endif
123         credits.append(new BC_ListBoxItem("Monty Montgomery"));
124         credits.append(new BC_ListBoxItem("Paolo Rampino"));
125         credits.append(new BC_ListBoxItem("Petter Reinholdtsen"));
126         credits.append(new BC_ListBoxItem("Nicola Ferralis"));
127         credits.append(new BC_ListBoxItem("Michael Collins"));
128
129         BC_ListBox *listbox;
130         add_subwindow(listbox = new BC_ListBox(x, 
131                 y,
132                 200,
133                 300,
134                 LISTBOX_TEXT,
135                 &credits,
136                 0,
137                 0,
138                 1));
139         y += listbox->get_h() + get_text_height(LARGEFONT) + 10;
140
141         set_font(LARGEFONT);
142         set_color(resources->text_default);
143         draw_text(x, y, "License:");
144         y += get_text_height(LARGEFONT);
145
146         set_font(MEDIUMFONT);
147
148         char license3[BCTEXTLEN];
149         sprintf(license3, _(
150 "This program is free software; you can redistribute it and/or modify it under the terms\n"
151 "of the GNU General Public License as published by the Free Software Foundation; either version\n"
152 "2 of the License, or (at your option) any later version.\n"
153 "\n"
154 "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;\n"
155 "without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n"
156 "PURPOSE.  See the GNU General Public License for more details.\n"
157 "\n"));
158         draw_text(x, y, license3);
159
160         x = get_w() - mwindow->theme->about_bg->get_w() - 10;
161         y = mwindow->theme->preferencesoptions_y;
162         BC_Pixmap *temp_pixmap = new BC_Pixmap(this, 
163                 mwindow->theme->about_bg,
164                 PIXMAP_ALPHA);
165         draw_pixmap(temp_pixmap, 
166                 x, 
167                 y);
168
169         delete temp_pixmap;
170
171
172         x += mwindow->theme->about_bg->get_w() + 10;
173         y += get_text_height(LARGEFONT) * 2;
174
175
176         flash();
177         flush();
178 }
179
180