Mercurial > mplayer.hg
comparison Gui/mplayer/gtk/about.c @ 2901:f77f8379f28f
rewrite ...
author | pontscho |
---|---|
date | Wed, 14 Nov 2001 16:04:25 +0000 |
parents | |
children | 6a4155dce92c |
comparison
equal
deleted
inserted
replaced
2900:7345a10e6012 | 2901:f77f8379f28f |
---|---|
1 | |
2 #include "../../events.h" | |
3 #include "../../../config.h" | |
4 #include "../../../help_mp.h" | |
5 | |
6 #include "pixmaps/about.xpm" | |
7 #include "../widgets.h" | |
8 #include "about.h" | |
9 | |
10 void ab_Ok_released( GtkButton * button,gpointer user_data ) | |
11 { | |
12 gtk_widget_hide( AboutBox ); | |
13 gtkVisibleAboutBox=0; | |
14 } | |
15 | |
16 GtkWidget * create_About( void ) | |
17 { | |
18 GtkWidget * About; | |
19 GtkWidget * frame1; | |
20 GtkWidget * frame2; | |
21 GtkWidget * frame3; | |
22 GtkWidget * frame4; | |
23 GtkWidget * vbox1; | |
24 GtkWidget * pixmap1; | |
25 GtkWidget * hseparator2; | |
26 GtkWidget * scrolledwindow1; | |
27 GtkWidget * AboutText; | |
28 GtkWidget * hseparator1; | |
29 GtkWidget * hbuttonbox1; | |
30 GtkWidget * Ok; | |
31 | |
32 GtkStyle * pixmapstyle; | |
33 GtkPixmap * pixmapwid; | |
34 GdkBitmap * mask; | |
35 | |
36 GtkAccelGroup * accel_group; | |
37 | |
38 accel_group=gtk_accel_group_new( ); | |
39 | |
40 About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
41 gtk_widget_set_name( About,MSGTR_About ); | |
42 gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About ); | |
43 gtk_widget_set_usize( About,340,415 ); | |
44 gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About ); | |
45 gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER ); | |
46 gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE ); | |
47 | |
48 frame1=gtk_frame_new( NULL ); | |
49 gtk_widget_set_name( frame1,"frame1" ); | |
50 gtk_widget_ref( frame1 ); | |
51 gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,( GtkDestroyNotify ) gtk_widget_unref ); | |
52 gtk_widget_show( frame1 ); | |
53 gtk_container_add( GTK_CONTAINER( About ),frame1 ); | |
54 gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN ); | |
55 | |
56 frame2=gtk_frame_new( NULL ); | |
57 gtk_widget_set_name( frame2,"frame2" ); | |
58 gtk_widget_ref( frame2 ); | |
59 gtk_object_set_data_full( GTK_OBJECT( About ),"frame2",frame2,( GtkDestroyNotify ) gtk_widget_unref ); | |
60 gtk_widget_show( frame2 ); | |
61 gtk_container_add( GTK_CONTAINER( frame1 ),frame2 ); | |
62 gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE ); | |
63 | |
64 frame3=gtk_frame_new( NULL ); | |
65 gtk_widget_set_name( frame3,"frame3" ); | |
66 gtk_widget_ref( frame3 ); | |
67 gtk_object_set_data_full( GTK_OBJECT( About ),"frame3",frame3,( GtkDestroyNotify ) gtk_widget_unref ); | |
68 gtk_widget_show( frame3 ); | |
69 gtk_container_add( GTK_CONTAINER( frame2 ),frame3 ); | |
70 gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT ); | |
71 | |
72 frame4=gtk_frame_new( NULL ); | |
73 gtk_widget_set_name( frame4,"frame4" ); | |
74 gtk_widget_ref( frame4 ); | |
75 gtk_object_set_data_full( GTK_OBJECT( About ),"frame4",frame4,( GtkDestroyNotify ) gtk_widget_unref ); | |
76 gtk_widget_show( frame4 ); | |
77 gtk_container_add( GTK_CONTAINER( frame3 ),frame4 ); | |
78 gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE ); | |
79 | |
80 vbox1=gtk_vbox_new( FALSE,0 ); | |
81 gtk_widget_set_name( vbox1,"vbox1" ); | |
82 gtk_widget_ref( vbox1 ); | |
83 gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,( GtkDestroyNotify ) gtk_widget_unref ); | |
84 gtk_widget_show( vbox1 ); | |
85 gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 ); | |
86 | |
87 pixmapstyle=gtk_widget_get_style( About ); | |
88 pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )about_xpm ); | |
89 pixmap1=gtk_pixmap_new( pixmapwid,mask ); | |
90 | |
91 gtk_widget_set_name( pixmap1,"pixmap1" ); | |
92 gtk_widget_ref( pixmap1 ); | |
93 gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,( GtkDestroyNotify ) gtk_widget_unref ); | |
94 gtk_widget_show( pixmap1 ); | |
95 gtk_box_pack_start( GTK_BOX( vbox1 ),pixmap1,FALSE,FALSE,0 ); | |
96 gtk_widget_set_usize( pixmap1,-2,174 ); | |
97 | |
98 hseparator2=gtk_hseparator_new( ); | |
99 gtk_widget_set_name( hseparator2,"hseparator2" ); | |
100 gtk_widget_ref( hseparator2 ); | |
101 gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,( GtkDestroyNotify ) gtk_widget_unref ); | |
102 gtk_widget_show( hseparator2 ); | |
103 gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator2,FALSE,FALSE,0 ); | |
104 gtk_widget_set_usize( hseparator2,-2,7 ); | |
105 | |
106 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); | |
107 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); | |
108 gtk_widget_ref( scrolledwindow1 ); | |
109 gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,( GtkDestroyNotify ) gtk_widget_unref ); | |
110 gtk_widget_show( scrolledwindow1 ); | |
111 gtk_box_pack_start( GTK_BOX( vbox1 ),scrolledwindow1,TRUE,TRUE,0 ); | |
112 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); | |
113 | |
114 AboutText=gtk_text_new( NULL,NULL ); | |
115 gtk_widget_set_name( AboutText,"AboutText" ); | |
116 gtk_widget_ref( AboutText ); | |
117 gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,( GtkDestroyNotify ) gtk_widget_unref ); | |
118 gtk_widget_show( AboutText ); | |
119 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); | |
120 gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, | |
121 "\nMPlayer code:\n" \ | |
122 " fileformat detection,demuxers - A'rpi\n" \ | |
123 " DVD support - ( alpha version was: LGB ) now: ?\n" \ | |
124 " network streaming - Bertrand BAUDET\n" \ | |
125 " A-V sync code - A'rpi\n" \ | |
126 " subtitles file parser/reader - Lez( most of them )\n" \ | |
127 " config files & commandline parser - Szabi\n" \ | |
128 " fastmemcpy - Nick Kurshev\n" \ | |
129 " LIRC support - Acki\n" \ | |
130 " SUB/OSD renderer - Adam Tla/lka\n" \ | |
131 " Gui - Pontscho\n\nlibvo drivers:\n" \ | |
132 " vo_aa.c - Folke Ashberg\n" \ | |
133 " vo_dga.c - Acki\n" \ | |
134 " vo_fbdev.c - Szabi\n" \ | |
135 " vo_ggi.c - al3x\n" \ | |
136 " vo_gl.c - A'rpi\n" \ | |
137 " vo_md5.c - A'rpi\n" \ | |
138 " vo_mga.c - A'rpi\n" \ | |
139 " vo_null.c - A'rpi\n" \ | |
140 " vo_odivx.c - A'rpi\n" \ | |
141 " vo_pgm.c - A'rpi\n" \ | |
142 " vo_png.c - Atmos\n" \ | |
143 " vo_sdl.c - Atmos\n" \ | |
144 " vo_svga.c - se7en\n" \ | |
145 " vo_x11.c - Pontscho\n"\ | |
146 " vo_xmga.c - Pontscho\n"\ | |
147 " vo_xv.c - Pontscho\n" \ | |
148 " vo_aa.c - Folke Ashberg\n\n" \ | |
149 "libao2 drivers:\n" \ | |
150 " ao_alsa5.c - al3x\n" \ | |
151 " ao_alsa9.c - al3x( BUGGY,use oss )\n" \ | |
152 " ao_null.c - A'rpi\n" \ | |
153 " ao_oss.c - A'rpi\n" \ | |
154 " ao_pcm.c - Atmos\n" \ | |
155 " ao_sdl.c - Atmos\n" \ | |
156 " ao_sun.c - Jürgen Keil\n\n" \ | |
157 "Homepage:\n" \ | |
158 " Design: Chass\n" \ | |
159 " Contents: Gabucino\n\n" \ | |
160 "English documentation:\n" \ | |
161 " tech-*.txt: A'rpi\n" \ | |
162 " all the others: Gabucino\n\n" \ | |
163 "Documentation translations:\n" \ | |
164 " Hungarian - Gabucino\n" \ | |
165 " Spanish - TeLeNiEkO\n" \ | |
166 " Russian - Nick Kurshev\n" \ | |
167 " Polish - Dariush Pietrzak\n" \ | |
168 " German - Atmosfear\n\n" \ | |
169 "Platforms/ports:\n" \ | |
170 " DEBIAN packaging - Dariush Pietrzak\n" \ | |
171 " FreeBSD support - Vladimir Kushnir\n" \ | |
172 " Solaris 8 support - Jürgen Keil\n",1535 ); | |
173 | |
174 hseparator1=gtk_hseparator_new( ); | |
175 gtk_widget_set_name( hseparator1,"hseparator1" ); | |
176 gtk_widget_ref( hseparator1 ); | |
177 gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator1",hseparator1, | |
178 ( GtkDestroyNotify ) gtk_widget_unref ); | |
179 gtk_widget_show( hseparator1 ); | |
180 gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 ); | |
181 gtk_widget_set_usize( hseparator1,-2,10 ); | |
182 | |
183 hbuttonbox1=gtk_hbutton_box_new( ); | |
184 gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" ); | |
185 gtk_widget_ref( hbuttonbox1 ); | |
186 gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1, | |
187 ( GtkDestroyNotify ) gtk_widget_unref ); | |
188 gtk_widget_show( hbuttonbox1 ); | |
189 gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 ); | |
190 | |
191 Ok=gtk_button_new_with_label( MSGTR_Ok ); | |
192 gtk_widget_set_name( Ok,MSGTR_Ok ); | |
193 gtk_widget_ref( Ok ); | |
194 gtk_object_set_data_full( GTK_OBJECT( About ),MSGTR_Ok,Ok,( GtkDestroyNotify ) gtk_widget_unref ); | |
195 gtk_widget_show( Ok ); | |
196 gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok ); | |
197 GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT ); | |
198 | |
199 gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL ); | |
200 gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL ); | |
201 | |
202 gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); | |
203 gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
204 gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group ); | |
205 | |
206 return About; | |
207 } |