Mercurial > mplayer.hg
annotate Gui/mplayer/gtk/about.c @ 16469:8c1c8d10c163
cycle through tv channels (patch by Andrew Calkin < calkina at geexbox.org >)
author | aurel |
---|---|
date | Mon, 12 Sep 2005 22:48:14 +0000 |
parents | 683d7592d9dc |
children | c8bad98f63b5 |
rev | line source |
---|---|
2901 | 1 |
8043 | 2 #include "../../app.h" |
2901 | 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" | |
8299 | 9 #include "common.h" |
2901 | 10 |
8299 | 11 GtkWidget * About = NULL; |
6146 | 12 |
13 void ShowAboutBox( void ) | |
14 { | |
8299 | 15 if ( About ) gtkActive( About ); |
16 else About=create_About(); | |
17 gtk_widget_show( About ); | |
6146 | 18 } |
2901 | 19 |
8719
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8299
diff
changeset
|
20 void abWidgetDestroy( GtkWidget * widget,GtkWidget ** widget_pointer ) |
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8299
diff
changeset
|
21 { WidgetDestroy( NULL,&About ); } |
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8299
diff
changeset
|
22 |
2901 | 23 GtkWidget * create_About( void ) |
24 { | |
8299 | 25 GtkWidget * vbox; |
2901 | 26 GtkWidget * pixmap1; |
27 GtkWidget * scrolledwindow1; | |
28 GtkWidget * AboutText; | |
29 GtkWidget * Ok; | |
30 | |
16246 | 31 #ifdef HAVE_GTK2_GUI |
32 GtkTextBuffer * AboutTextBuffer; | |
33 GtkTextIter iter; | |
34 #endif //HAVE_GTK2_GUI | |
35 | |
2901 | 36 GtkStyle * pixmapstyle; |
3616 | 37 GdkPixmap * pixmapwid; |
2901 | 38 GdkBitmap * mask; |
39 | |
40 GtkAccelGroup * accel_group; | |
41 | |
6146 | 42 accel_group=gtk_accel_group_new(); |
2901 | 43 |
44 About=gtk_window_new( GTK_WINDOW_TOPLEVEL ); | |
45 gtk_widget_set_name( About,MSGTR_About ); | |
46 gtk_object_set_data( GTK_OBJECT( About ),MSGTR_About,About ); | |
47 gtk_widget_set_usize( About,340,415 ); | |
48 gtk_window_set_title( GTK_WINDOW( About ),MSGTR_About ); | |
49 gtk_window_set_position( GTK_WINDOW( About ),GTK_WIN_POS_CENTER ); | |
50 gtk_window_set_policy( GTK_WINDOW( About ),TRUE,FALSE,FALSE ); | |
8299 | 51 gtk_window_set_wmclass( GTK_WINDOW( About ),"About","MPlayer" ); |
6651 | 52 |
53 gtk_widget_realize( About ); | |
54 gtkAddIcon( About ); | |
8299 | 55 |
56 vbox=AddVBox( AddDialogFrame( About ),0 ); | |
2901 | 57 |
58 pixmapstyle=gtk_widget_get_style( About ); | |
3616 | 59 pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( About->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],about_xpm ); |
2901 | 60 pixmap1=gtk_pixmap_new( pixmapwid,mask ); |
61 | |
62 gtk_widget_set_name( pixmap1,"pixmap1" ); | |
63 gtk_widget_show( pixmap1 ); | |
8299 | 64 gtk_box_pack_start( GTK_BOX( vbox ),pixmap1,FALSE,FALSE,0 ); |
2901 | 65 gtk_widget_set_usize( pixmap1,-2,174 ); |
66 | |
8299 | 67 AddHSeparator( vbox ); |
2901 | 68 |
69 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL ); | |
70 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" ); | |
71 gtk_widget_show( scrolledwindow1 ); | |
8299 | 72 gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 ); |
2901 | 73 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); |
74 | |
16246 | 75 #ifdef HAVE_GTK2_GUI |
76 AboutText = gtk_text_view_new(); | |
77 AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText)); | |
78 gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); | |
79 #else | |
2901 | 80 AboutText=gtk_text_new( NULL,NULL ); |
16246 | 81 #endif |
2901 | 82 gtk_widget_set_name( AboutText,"AboutText" ); |
83 gtk_widget_show( AboutText ); | |
84 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); | |
16246 | 85 #ifdef HAVE_GTK2_GUI |
86 gtk_text_buffer_insert (AboutTextBuffer, &iter, | |
87 #else | |
2901 | 88 gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, |
16246 | 89 #endif |
9189 | 90 "\n" |
91 MSGTR_ABOUT_UHU | |
92 " (http://www.uhulinux.hu/)\n" | |
93 "\n" | |
94 MSGTR_ABOUT_CoreTeam | |
95 "\n" | |
96 " * Arpad Gereoffy (A'rpi/ESP-team)\n" | |
97 " * Zoltan Ponekker (Pontscho/fresh!mindworkz)\n" | |
98 " * Gabor Berczi (Gabucino)\n" | |
99 " * Alex Beregszaszi (al3x)\n" | |
100 " * Gabor Lenart (LGB)\n" | |
101 " * Felix Buenemann (Atmos)\n" | |
102 " * Alban Bedel (Albeu)\n" | |
9612 | 103 " * Pierre Lombard (pl)\n" |
9189 | 104 " * Michael Niedermayer\n" |
105 "\n" | |
106 MSGTR_ABOUT_AdditionalCoders | |
107 "\n" | |
108 " * Szabolcs Berecz (Szabi)\n" | |
109 " * Laszlo Megyer (Lez, Laaz)\n" | |
110 " * Gyula Laszlo (Chass, Tegla)\n" | |
111 " * Zoltan Mark Vician (Se7en)\n" | |
112 " * Andreas Ackermann (Acki)\n" | |
113 " * Michael Graffam\n" | |
114 " * Jens Hoffmann\n" | |
115 " * German Gomez Garcia\n" | |
116 " * Dariusz Pietrzak (Eyck)\n" | |
117 " * Marcus Comstedt\n" | |
118 " * Juergen Keil\n" | |
119 " * Vladimir Kushnir\n" | |
120 " * Bertrand Baudet\n" | |
121 " * Derek J Witt\n" | |
122 " * Artur Zaprzala\n" | |
123 " * Adam Tla/lka\n" | |
124 " * Folke Ashberg\n" | |
125 " * Kamil Toman\n" | |
126 " * Ivan Kalvatchev\n" | |
127 " * Sven Goethel\n" | |
9612 | 128 " * Joy Winter\n" |
9189 | 129 " * Eric Anholt\n" |
130 " * Jiri Svoboda\n" | |
131 " * Oliver Schoenbrunner\n" | |
132 " * Jeroen Dobbelaere\n" | |
133 " * David Holm\n" | |
134 " * Panagiotis Issaris\n" | |
135 " * Mike Melanson\n" | |
136 " * Tobias Diedrich\n" | |
137 " * Kilian A. Foth\n" | |
138 " * Tim Ferguson\n" | |
139 " * Sam Lin\n" | |
140 " * Johannes Feigl\n" | |
141 " * Kim Minh Kaplan\n" | |
142 " * Brian Kuschak\n" | |
143 " * Stephen Davies\n" | |
144 " * Rik Snel\n" | |
145 " * Anders Johansson\n" | |
146 " * Roberto Togni\n" | |
147 " * Wojtek Kaniewski\n" | |
148 " * Fredrik Kuivinen\n" | |
149 " * Diego Biurrun\n" | |
150 " * Sascha Sommer\n" | |
151 " * Jindrich Makovicka\n" | |
152 " * D Richard Felker III\n" | |
153 " * Moritz Bunkus\n" | |
154 " * Colin Leroy\n" | |
155 " * Joey Parrish\n" | |
156 " * Dominik Mierzejewski\n" | |
157 " * Florian Schneider\n" | |
9612 | 158 " * Sidik Isani\n" |
159 " * Fredrik Noring\n" | |
160 " * Kees Cook\n" | |
161 " * Hampa Hug\n" | |
162 " * Uwe Reder\n" | |
163 " * Andriy N. Gritsenko\n" | |
164 " * Juergen Hammelmann\n" | |
165 " * Martin Gansser\n" | |
166 " * Matteo Giani\n" | |
167 " * Rudolf Marek\n" | |
168 " * Tilman Sauerbeck\n" | |
169 " * Mark Zealey\n" | |
170 " * Gregory Kovriga\n" | |
171 " * Remi Guyomarch\n" | |
172 " * Salvatore Falco\n" | |
173 " * Ville Syrjala\n" | |
174 " * Bjorn Sandell\n" | |
175 " * Per Wigren\n" | |
176 " * Nicolas Le Gaillart\n" | |
177 " * Lu Ran\n" | |
178 " * Andras Mohari\n" | |
179 " * Denes Balatoni\n" | |
180 " * Oskar Liljeblad\n" | |
181 " * Bernd Ernesti\n" | |
9189 | 182 "\n" |
183 MSGTR_ABOUT_MainTesters | |
184 "\n" | |
185 " * Tibor Balazs (Tibcu)\n" | |
186 " * Peter Sasi (SaPe)\n" | |
9612 | 187 " * Christoph H. Lampert (Gruel)\n" |
188 " * Attila Kinali (KotH)\n" | |
9189 | 189 " * Bohdan Horst (Nexus)\n" |
190 "\n",-1 ); | |
2901 | 191 |
8299 | 192 AddHSeparator( vbox ); |
193 Ok=AddButton( MSGTR_Ok,AddHButtonBox( vbox ) ); | |
2901 | 194 |
8719
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8299
diff
changeset
|
195 gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&About ); |
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8299
diff
changeset
|
196 gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL ); |
2901 | 197 |
8299 | 198 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE ); |
199 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE ); | |
2901 | 200 gtk_window_add_accel_group( GTK_WINDOW( About ),accel_group ); |
201 | |
202 return About; | |
203 } |