Mercurial > mplayer.hg
annotate Gui/mplayer/gtk/about.c @ 7527:20d408e7e346
added uhulinux url
author | alex |
---|---|
date | Sat, 28 Sep 2002 18:26:50 +0000 |
parents | b82a3eb66d60 |
children | e5dda05f9aab |
rev | line source |
---|---|
2901 | 1 |
2 #include "../../events.h" | |
3 #include "../../../config.h" | |
4 #include "../../../help_mp.h" | |
5 | |
6625 | 6 #include "mplayer/pixmaps/about.xpm" |
2901 | 7 #include "../widgets.h" |
8 #include "about.h" | |
9 | |
6146 | 10 int gtkVAboutBox = 0; |
11 GtkWidget * AboutBox; | |
12 | |
13 void ShowAboutBox( void ) | |
14 { | |
15 if ( gtkVAboutBox ) gtkActive( AboutBox ); | |
16 else AboutBox=create_About(); | |
17 gtk_widget_show( AboutBox ); | |
18 } | |
19 | |
20 void ab_AboutBox_show( GtkButton * button,gpointer user_data ) | |
21 { gtkVAboutBox=(int)user_data; } | |
22 | |
2901 | 23 void ab_Ok_released( GtkButton * button,gpointer user_data ) |
6146 | 24 { |
25 gtkVAboutBox=(int)user_data; | |
26 gtk_widget_destroy( AboutBox ); | |
27 } | |
2901 | 28 |
29 GtkWidget * create_About( void ) | |
30 { | |
31 GtkWidget * About; | |
32 GtkWidget * frame1; | |
33 GtkWidget * frame2; | |
34 GtkWidget * frame3; | |
35 GtkWidget * frame4; | |
36 GtkWidget * vbox1; | |
37 GtkWidget * pixmap1; | |
38 GtkWidget * hseparator2; | |
39 GtkWidget * scrolledwindow1; | |
40 GtkWidget * AboutText; | |
41 GtkWidget * hseparator1; | |
42 GtkWidget * hbuttonbox1; | |
43 GtkWidget * Ok; | |
44 | |
45 GtkStyle * pixmapstyle; | |
3616 | 46 GdkPixmap * pixmapwid; |
2901 | 47 GdkBitmap * mask; |
48 | |
49 GtkAccelGroup * accel_group; | |
50 | |
6146 | 51 accel_group=gtk_accel_group_new(); |
2901 | 52 |
53 About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
54 gtk_widget_set_name( About,MSGTR_About ); | |
55 gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About ); | |
56 gtk_widget_set_usize( About,340,415 ); | |
57 gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About ); | |
58 gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER ); | |
59 gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE ); | |
6651 | 60 gtk_window_set_wmclass( GTK_WINDOW( About ),MSGTR_About,"MPlayer" ); |
61 | |
62 gtk_widget_realize( About ); | |
63 gtkAddIcon( About ); | |
2901 | 64 |
65 frame1=gtk_frame_new( NULL ); | |
66 gtk_widget_set_name( frame1,"frame1" ); | |
67 gtk_widget_ref( frame1 ); | |
6146 | 68 gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 69 gtk_widget_show( frame1 ); |
70 gtk_container_add( GTK_CONTAINER( About ),frame1 ); | |
71 gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN ); | |
72 | |
73 frame2=gtk_frame_new( NULL ); | |
74 gtk_widget_set_name( frame2,"frame2" ); | |
75 gtk_widget_ref( frame2 ); | |
6146 | 76 gtk_object_set_data_full( GTK_OBJECT( About ),"frame2",frame2,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 77 gtk_widget_show( frame2 ); |
78 gtk_container_add( GTK_CONTAINER( frame1 ),frame2 ); | |
79 gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE ); | |
80 | |
81 frame3=gtk_frame_new( NULL ); | |
82 gtk_widget_set_name( frame3,"frame3" ); | |
83 gtk_widget_ref( frame3 ); | |
6146 | 84 gtk_object_set_data_full( GTK_OBJECT( About ),"frame3",frame3,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 85 gtk_widget_show( frame3 ); |
86 gtk_container_add( GTK_CONTAINER( frame2 ),frame3 ); | |
87 gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT ); | |
88 | |
89 frame4=gtk_frame_new( NULL ); | |
90 gtk_widget_set_name( frame4,"frame4" ); | |
91 gtk_widget_ref( frame4 ); | |
6146 | 92 gtk_object_set_data_full( GTK_OBJECT( About ),"frame4",frame4,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 93 gtk_widget_show( frame4 ); |
94 gtk_container_add( GTK_CONTAINER( frame3 ),frame4 ); | |
95 gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE ); | |
96 | |
97 vbox1=gtk_vbox_new( FALSE,0 ); | |
98 gtk_widget_set_name( vbox1,"vbox1" ); | |
99 gtk_widget_ref( vbox1 ); | |
6146 | 100 gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 101 gtk_widget_show( vbox1 ); |
102 gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 ); | |
103 | |
104 pixmapstyle=gtk_widget_get_style( About ); | |
3616 | 105 pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],about_xpm ); |
2901 | 106 pixmap1=gtk_pixmap_new( pixmapwid,mask ); |
107 | |
108 gtk_widget_set_name( pixmap1,"pixmap1" ); | |
109 gtk_widget_ref( pixmap1 ); | |
6146 | 110 gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 111 gtk_widget_show( pixmap1 ); |
112 gtk_box_pack_start( GTK_BOX( vbox1 ),pixmap1,FALSE,FALSE,0 ); | |
113 gtk_widget_set_usize( pixmap1,-2,174 ); | |
114 | |
115 hseparator2=gtk_hseparator_new( ); | |
116 gtk_widget_set_name( hseparator2,"hseparator2" ); | |
117 gtk_widget_ref( hseparator2 ); | |
6146 | 118 gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 119 gtk_widget_show( hseparator2 ); |
120 gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator2,FALSE,FALSE,0 ); | |
121 gtk_widget_set_usize( hseparator2,-2,7 ); | |
122 | |
123 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); | |
124 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); | |
125 gtk_widget_ref( scrolledwindow1 ); | |
6146 | 126 gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 127 gtk_widget_show( scrolledwindow1 ); |
128 gtk_box_pack_start( GTK_BOX( vbox1 ),scrolledwindow1,TRUE,TRUE,0 ); | |
129 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); | |
130 | |
131 AboutText=gtk_text_new( NULL,NULL ); | |
132 gtk_widget_set_name( AboutText,"AboutText" ); | |
133 gtk_widget_ref( AboutText ); | |
6146 | 134 gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 135 gtk_widget_show( AboutText ); |
136 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); | |
137 gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, | |
7395 | 138 "\n" \ |
7527 | 139 "GUI development sponsored by UHU Linux\n" \ |
140 " (http://www.uhulinux.hu/)\n" \ | |
6146 | 141 "\n" \ |
142 " MPlayer core team:\n" \ | |
143 "\n" \ | |
144 " * Arpad Gereoffy (A'rpi/ESP-team)\n" \ | |
145 " * Zoltan Ponekker (Pontscho/Fresh!mindworkz)\n" \ | |
146 " * Gabor Berczi (Gabucino)\n" \ | |
147 " * Alex Beregszaszi (al3x)\n" \ | |
148 " * Gabor Lenart (LGB)\n" \ | |
7080
bab8be262e97
Fix small typo noticed by Francisco Javier Cabello <fjcabello@visual-tools.com>
atmos4
parents:
6903
diff
changeset
|
149 " * Felix Buenemann (Atmos)\n" \ |
6146 | 150 " * Alban Bedel (Albeu)\n" \ |
151 " * pl\n" \ | |
152 " * Michael Niedermayer\n" \ | |
153 "\n" \ | |
154 " Additional codes:\n" \ | |
155 "\n" \ | |
156 " * Szabolcs Berecz (Szabi)\n" \ | |
157 " * Laszlo Megyer (Lez, Laaz)\n" \ | |
158 " * Gyula Laszlo (Chass, Tegla)\n" \ | |
159 " * Zoltan Mark Vician (Se7en)\n" \ | |
160 " * Andreas Ackermann (Acki)\n" \ | |
161 " * TeLeNiEkO\n" \ | |
162 " * Michael Graffam\n" \ | |
163 " * Jens Hoffmann\n" \ | |
164 " * German Gomez Garcia\n" \ | |
165 " * Dariusz Pietrzak (Eyck)\n" \ | |
166 " * Marcus Comstedt\n" \ | |
167 " * Jurgen Keil\n" \ | |
168 " * Vladimir Kushnir\n" \ | |
169 " * Bertrand BAUDET\n" \ | |
170 " * Derek J Witt\n" \ | |
171 " * Artur Zaprzala\n" \ | |
172 " * lanzz@lanzz.org\n" \ | |
173 " * Adam Tla/lka\n" \ | |
174 " * Folke Ashberg\n" \ | |
175 " * Kamil Toman\n" \ | |
176 " * Ivan Kalvatchev\n" \ | |
177 " * Sven Goethel\n" \ | |
178 " * joy_ping\n" \ | |
179 " * Eric Anholt\n" \ | |
180 " * Jiri Svoboda\n" \ | |
181 " * Oliver Schoenbrunner\n" \ | |
182 " * Jeroen Dobbelaere\n" \ | |
183 " * David Holm\n" \ | |
184 " * Panagiotis Issaris\n" \ | |
185 " * Mike Melanson\n" \ | |
186 " * Tobias Diedrich\n" \ | |
187 " * Kilian A. Foth\n" \ | |
188 " * Tim Ferguson\n" \ | |
189 " * Sam Lin\n" \ | |
190 " * Johannes Feigl\n" \ | |
191 " * Kim Minh Kaplan\n" \ | |
192 " * Brian Kuschak\n" \ | |
193 " * Stephen Davies\n" \ | |
194 " * Rik Snel\n" \ | |
195 " * Anders Johansson\n" \ | |
196 " * Roberto Togni\n" \ | |
197 " * Wojtek Kaniewski\n" \ | |
198 " * Fredrik Kuivinen\n" \ | |
199 "\n" \ | |
200 " Main testers:\n" \ | |
201 "\n" \ | |
202 " * Tibor Balazs (Tibcu)\n" \ | |
203 " * Peter Sasi (SaPe)\n" \ | |
204 " * Christoph H. Lampert\n" \ | |
205 " * Attila Kinali\n" \ | |
206 " * Dirk Vornheder\n" \ | |
207 " * Bohdan Horst (Nexus)\n" \ | |
208 "\n",1481 ); | |
2901 | 209 |
6146 | 210 hseparator1=gtk_hseparator_new(); |
2901 | 211 gtk_widget_set_name( hseparator1,"hseparator1" ); |
212 gtk_widget_ref( hseparator1 ); | |
6146 | 213 gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator1",hseparator1,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 214 gtk_widget_show( hseparator1 ); |
215 gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 ); | |
216 gtk_widget_set_usize( hseparator1,-2,10 ); | |
217 | |
218 hbuttonbox1=gtk_hbutton_box_new( ); | |
219 gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" ); | |
220 gtk_widget_ref( hbuttonbox1 ); | |
6146 | 221 gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref ); |
3616 | 222 gtk_widget_set_usize( hbuttonbox1,-2,25 ); |
223 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 ); | |
2901 | 224 gtk_widget_show( hbuttonbox1 ); |
225 gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 ); | |
226 | |
227 Ok=gtk_button_new_with_label( MSGTR_Ok ); | |
228 gtk_widget_set_name( Ok,MSGTR_Ok ); | |
229 gtk_widget_ref( Ok ); | |
6146 | 230 gtk_object_set_data_full( GTK_OBJECT( About ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 231 gtk_widget_show( Ok ); |
232 gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok ); | |
233 | |
6146 | 234 gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),0 ); |
6794 | 235 gtk_signal_connect( GTK_OBJECT( About ),"show",GTK_SIGNAL_FUNC( ab_AboutBox_show ),(void *)1 ); |
6146 | 236 gtk_signal_connect( GTK_OBJECT( About ),"hide",GTK_SIGNAL_FUNC( ab_AboutBox_show ),0 ); |
237 gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),0 ); | |
2901 | 238 |
239 gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); | |
240 gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
241 gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group ); | |
242 | |
243 return About; | |
244 } |