Mercurial > mplayer.hg
annotate gui/dialog/about.c @ 35989:188b782b013f
Make create_About() static.
It only has file scope.
In order to do so, relocate some other static functions.
author | ib |
---|---|
date | Fri, 29 Mar 2013 01:14:44 +0000 |
parents | 3734172b4af6 |
children | 6c891a0e3fea |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
26203 | 19 #include "config.h" |
35525 | 20 #include "gui/app/app.h" |
23077 | 21 #include "help_mp.h" |
33963 | 22 #include "version.h" |
23077 | 23 |
35526 | 24 #include "pixmaps/emblem.xpm" |
35529 | 25 #include "dialog.h" |
23077 | 26 #include "about.h" |
33572 | 27 #include "tools.h" |
23077 | 28 |
29 GtkWidget * About = NULL; | |
30 | |
34466
a650895d50a5
Use correct data types and common variable names in GTK callback functions.
ib
parents:
33963
diff
changeset
|
31 static void abWidgetDestroy( GtkButton * button, gpointer user_data ) |
23077 | 32 { WidgetDestroy( NULL,&About ); } |
33 | |
35989 | 34 static GtkWidget * create_About( void ) |
23077 | 35 { |
36 GtkWidget * vbox; | |
37 GtkWidget * pixmap1; | |
38 GtkWidget * scrolledwindow1; | |
39 GtkWidget * AboutText; | |
40 GtkWidget * Ok; | |
41 | |
27343 | 42 #ifdef CONFIG_GTK2 |
23077 | 43 GtkTextBuffer * AboutTextBuffer; |
44 GtkTextIter iter; | |
27343 | 45 #endif /* CONFIG_GTK2 */ |
23077 | 46 |
47 GtkStyle * pixmapstyle; | |
48 GdkPixmap * pixmapwid; | |
49 GdkBitmap * mask; | |
50 | |
51 GtkAccelGroup * accel_group; | |
52 | |
33963 | 53 char title[128]; |
54 | |
23077 | 55 accel_group=gtk_accel_group_new(); |
56 | |
57 About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
58 gtk_widget_set_name( About,MSGTR_About ); | |
59 gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About ); | |
60 gtk_widget_set_usize( About,340,415 ); | |
61 gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About ); | |
62 gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER ); | |
63 gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE ); | |
64 gtk_window_set_wmclass( GTK_WINDOW( About ),"About","MPlayer" ); | |
65 | |
66 gtk_widget_realize( About ); | |
67 gtkAddIcon( About ); | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
68 |
23077 | 69 vbox=AddVBox( AddDialogFrame( About ),0 ); |
70 | |
71 pixmapstyle=gtk_widget_get_style( About ); | |
33570 | 72 pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar **) emblem_xpm ); |
23077 | 73 pixmap1=gtk_pixmap_new( pixmapwid,mask ); |
74 | |
75 gtk_widget_set_name( pixmap1,"pixmap1" ); | |
76 gtk_widget_show( pixmap1 ); | |
77 gtk_box_pack_start( GTK_BOX( vbox ),pixmap1,FALSE,FALSE,0 ); | |
78 gtk_widget_set_usize( pixmap1,-2,174 ); | |
79 | |
80 AddHSeparator( vbox ); | |
81 | |
82 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); | |
83 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); | |
84 gtk_widget_show( scrolledwindow1 ); | |
85 gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 ); | |
86 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); | |
87 | |
27343 | 88 #ifdef CONFIG_GTK2 |
23077 | 89 AboutText = gtk_text_view_new(); |
90 gtk_text_view_set_editable(GTK_TEXT_VIEW(AboutText), FALSE); | |
91 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(AboutText), FALSE); | |
92 AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText)); | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
93 gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
94 #else |
23077 | 95 AboutText=gtk_text_new( NULL,NULL ); |
96 gtk_text_set_editable(GTK_TEXT(AboutText), FALSE); | |
97 #endif | |
98 gtk_widget_set_name( AboutText,"AboutText" ); | |
99 gtk_widget_show( AboutText ); | |
100 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); | |
33963 | 101 snprintf(title, sizeof(title), MP_TITLE, "MPlayer"); |
27343 | 102 #ifdef CONFIG_GTK2 |
33963 | 103 gtk_text_buffer_insert (AboutTextBuffer, &iter, title, -1); |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
104 gtk_text_buffer_insert (AboutTextBuffer, &iter, |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
105 #else |
33963 | 106 gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, title, -1 ); |
23077 | 107 gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, |
108 #endif | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
109 "\n" |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
110 MSGTR_ABOUT_UHU |
33963 | 111 " (http://www.uhulinux.hu/)\n" |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
112 "\n" |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
113 MSGTR_ABOUT_Contributors |
23077 | 114 "\n" |
33963 | 115 " * Andreas Ackermann\n" |
23077 | 116 " * adland\n" |
33963 | 117 " * Eric Anholt\n" |
118 " * Folke Ashberg\n" | |
119 " * Dénes Balatoni\n" | |
120 " * Zsolt Barat\n" | |
121 " * Luca Barbato\n" | |
122 " * Dmitry Baryshkov\n" | |
123 " * Bertrand Baudet\n" | |
124 " * Alban Bedel\n" | |
125 " * Michael Behrisch\n" | |
126 " * Luchezar Belev\n" | |
127 " * Gábor Bérczi\n" | |
128 " * Szabolcs Berecz\n" | |
129 " * Alex Beregszászi\n" | |
130 " * Tilmann Bitterberg\n" | |
131 " * Diego Biurrun\n" | |
132 " * Marcsu Blomenkamp\n" | |
133 " * Ingo Brückl\n" | |
134 " * Andrew Buehler\n" | |
135 " * Eviv Bulgroz\n" | |
136 " * Felix Bünemann\n" | |
137 " * Moritz Bunkus\n" | |
138 " * Dan Villiom Podlaski Christiansen\n" | |
139 " * Jeff Clagg\n" | |
140 " * compn\n" | |
141 " * Marcus Comstedt\n" | |
142 " * Kees Cook\n" | |
143 " * Stephen Davies\n" | |
144 " * Piero Di Vita\n" | |
145 " * Tobias Diedrich\n" | |
146 " * Florian Dietrich\n" | |
147 " * Jeroen Dobbelaere\n" | |
148 " * Reimar Döffinger\n" | |
149 " * Romain Dolbeau\n" | |
150 " * Ismail Dönmez\n" | |
151 " * Robert Edele\n" | |
152 " * Christoph Egger\n" | |
153 " * Paul Wilhelm Elsinghorst\n" | |
154 " * Bernd Ernesti\n" | |
155 " * Salvatore Falco\n" | |
156 " * Johannes Feigl\n" | |
157 " * D Richard III Felker\n" | |
158 " * Tim Ferguson\n" | |
159 " * Ross Finlayson\n" | |
160 " * Daniele Forghieri\n" | |
161 " * Kilian A. Foth\n" | |
162 " * Fabian Franz\n" | |
163 " * Martin Gansser\n" | |
164 " * Árpád Gereöffy\n" | |
165 " * Matteo Giani\n" | |
166 " * Sven Goethel\n" | |
167 " * German Gomez Garcia\n" | |
168 " * Alexander Gottwald\n" | |
169 " * Michael Graffam\n" | |
170 " * Andriy N. Gritsenko\n" | |
171 " * Rémi Guyomarch\n" | |
172 " * Jürgen Hammelmann\n" | |
173 " * Christopher R. Hertel\n" | |
174 " * Andreas Hess\n" | |
175 " * Corey Hickey\n" | |
176 " * Zoltán Hidvégi\n" | |
177 " * Jens Hoffmann\n" | |
178 " * David Holm\n" | |
179 " * Bohdan Horst\n" | |
180 " * Hampa Hug\n" | |
181 " * Tomas Hurka\n" | |
182 " * Sidik Isani\n" | |
183 " * Panagiotis Issaris\n" | |
184 " * Aurelien Jacobs\n" | |
185 " * Reza Jelveh\n" | |
186 " * Jonas Jermann\n" | |
187 " * Anders Johansson\n" | |
188 " * Nicholas Kain\n" | |
189 " * Filip Kalinski\n" | |
190 " * Ivan Kalvachev\n" | |
191 " * Wojtek Kaniewski\n" | |
192 " * Kim Minh Kaplan\n" | |
193 " * Samuli Kärkkäinen\n" | |
194 " * Jürgen Keil\n" | |
195 " * Robert Kesterson\n" | |
196 " * Attila Kinali\n" | |
197 " * Gregory Kovriga\n" | |
198 " * David Kühling\n" | |
199 " * Fredrik Kuivinen\n" | |
200 " * Nick Kurshev\n" | |
201 " * Brian Kuschak\n" | |
202 " * Vladimir Kushnir\n" | |
203 " * Dave Lambley\n" | |
204 " * Gyula László\n" | |
205 " * Nicolas Le Gaillart\n" | |
206 " * Gábor Lénárt\n" | |
207 " * Colin Leroy\n" | |
208 " * Oskar Liljeblad\n" | |
209 " * Sam Lin\n" | |
210 " * Pierre Lombard\n" | |
211 " * Puk Madick\n" | |
212 " * Jindrich Makovicka\n" | |
213 " * Rudolf Marek\n" | |
214 " * László Megyer\n" | |
215 " * Mike Melanson\n" | |
216 " * Arwed von Merkatz\n" | |
217 " * Loren Merritt\n" | |
218 " * Dominik Mierzejewski\n" | |
219 " * Mihail Milushev\n" | |
220 " * Nehal Mistry\n" | |
221 " * András Mohari\n" | |
222 " * Steven Mueller\n" | |
223 " * Alexander Neundorf\n" | |
224 " * Michael Niedermayer\n" | |
225 " * Fredrik Noring\n" | |
226 " * Christian Ohm\n" | |
227 " * Joey Parrish\n" | |
228 " * Dariusz Pietrzak\n" | |
229 " * Nicolas Plourde\n" | |
230 " * Lennart Poettering\n" | |
231 " * Guillaume Poirier\n" | |
232 " * Zoltán Ponekker\n" | |
233 " * Ivo van Poorten\n" | |
234 " * Lu Ran\n" | |
235 " * Uwe Reder\n" | |
23077 | 236 " * rgselk\n" |
237 " * Rune Petersen\n" | |
33963 | 238 " * Ville Saari\n" |
239 " * Nico Sabbi\n" | |
240 " * Björn Sandell\n" | |
241 " * Tilman Sauerbeck\n" | |
242 " * Frank Scherthan\n" | |
243 " * Florian Schneider\n" | |
244 " * Oliver Schoenbrunner\n" | |
245 " * Oded Shimon\n" | |
246 " * Peter Simon\n" | |
247 " * Rik Snel\n" | |
248 " * Sascha Sommer\n" | |
249 " * Alexander Strasser\n" | |
250 " * Kamil Strzelecki\n" | |
251 " * Jiri Svoboda\n" | |
252 " * Robert Swain\n" | |
253 " * Ville Syrjälä\n" | |
254 " * Gabor Szecsi\n" | |
255 " * Jason Tackaberry\n" | |
256 " * Howell Tam\n" | |
257 " * Adam Tlalka\n" | |
258 " * Gianluigi Tiesi\n" | |
259 " * Roberto Togni\n" | |
260 " * Salvador Eduardo Tropea\n" | |
261 " * Miklós Vajna\n" | |
262 " * Reynaldo H. Verdejo Pinochet\n" | |
263 " * Per Wigren\n" | |
264 " * Derek J Witt\n" | |
265 " * Alan Young\n" | |
266 " * Artur Zaprzala\n" | |
267 " * Mark Zealey\n" | |
268 " * Matan Ziv-Av\n" | |
269 " * Márk Vicián Zoltán\n" | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
270 "\n" |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
271 MSGTR_ABOUT_Codecs_libs_contributions |
23077 | 272 "\n" |
33963 | 273 " * Fabrice Bellard\n" |
274 " * Vivien Chappelier\n" | |
275 " * Michael Hipp\n" | |
276 " * Aaron Holtzman\n" | |
277 " * Jake Janovetz\n" | |
278 " * Zdenek Kabelac\n" | |
279 " * Eugene Kuznetsov\n" | |
280 " * Michel Lespinasse\n" | |
281 " * Mark Podlipec\n" | |
282 " * Damien Vincent\n" | |
23077 | 283 "\n" |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
284 MSGTR_ABOUT_Translations |
23077 | 285 "\n" |
33963 | 286 " * Marcin Biernat\n" |
287 " * Marc Fargas\n" | |
288 " * Jiri Heryan\n" | |
289 " * Marek Jarycki\n" | |
290 " * Leszek Kaplita\n" | |
291 " * Sebastian Krämer\n" | |
292 " * Juan Martin López\n" | |
293 " * Piotr Michniewski\n" | |
294 " * Jakub Misiorny\n" | |
295 " * Gábor Mizda\n" | |
296 " * Maciej Paszta\n" | |
297 " * Łukasz Proszek\n" | |
298 " * Wacław Schiller\n" | |
299 " * Andoni Zubimendi\n" | |
23077 | 300 "\n" |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
301 MSGTR_ABOUT_Skins |
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27343
diff
changeset
|
302 "\n" |
23077 | 303 " * Azrael\n" |
33963 | 304 " * Viktor Bekesi\n" |
305 " * Ingo Brückl\n" | |
306 " * Andrew Carpenter\n" | |
307 " * Charles Foucault\n" | |
308 " * Attila Gyimesi\n" | |
309 " * Alban Hertroys\n" | |
310 " * Balint Kiss\n" | |
311 " * Andre Kuehne\n" | |
312 " * Rüdiger Kuhlmann\n" | |
313 " * Dan Naumov\n" | |
314 " * Ryan Northam\n" | |
315 " * Juan Pablo Oyarzun Arroyo\n" | |
316 " * DongCheon Park\n" | |
317 " * Jurgen Pehrson\n" | |
318 " * Nikola Pizurica\n" | |
319 " * Oliwier Ptak\n" | |
320 " * Pasquale Riccio\n" | |
23077 | 321 " * Burt.S.\n" |
33963 | 322 " * Jesper Schultz\n" |
323 " * Marcin Szumiela\n" | |
324 " * Massimo Tisi\n" | |
325 " * Jiri jun. Tyr\n" | |
326 " * Ognian Vasilev\n" | |
327 " * Imre Veres\n" | |
328 " * Radic Vesko\n" | |
329 " * Balasz Vigvary\n" | |
330 " * Andrew Weber\n" | |
331 " * Gary Jr. Whitmore\n" | |
332 " * Franciszek Wilamowski\n" | |
333 " * Michael Zeising", -1 ); | |
23077 | 334 |
335 AddHSeparator( vbox ); | |
336 Ok=AddButton( MSGTR_Ok,AddHButtonBox( vbox ) ); | |
337 | |
338 gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&About ); | |
339 gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL ); | |
340 | |
341 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); | |
342 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
343 gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group ); | |
344 | |
345 return About; | |
346 } | |
35989 | 347 |
348 void ShowAbout( void ) | |
349 { | |
350 if ( About ) gtkActive( About ); | |
351 else About=create_About(); | |
352 gtk_widget_show( About ); | |
353 } |