Mercurial > mplayer.hg
annotate Gui/mplayer/gtk/fs.c @ 18034:1dcf0ea2f7ba
reverse previous patch which caused sig11.
1000000000000000l: broken codecs.conf code modifies every page of a
huge object -> tons of page faults and cannot be const. this needs to
be fixed! do we have a volunteer to remove the whole codecs.conf shit?
author | rfelker |
---|---|
date | Mon, 03 Apr 2006 07:11:29 +0000 |
parents | 0e1471d9da74 |
children | 6a08d0dabca8 |
rev | line source |
---|---|
2901 | 1 |
2 #include <stdlib.h> | |
3 #include <stdio.h> | |
4 #include <string.h> | |
5 #include <sys/stat.h> | |
6 #include <glob.h> | |
7 #include <unistd.h> | |
8 | |
6625 | 9 #include "../mplayer.h" |
2901 | 10 |
6625 | 11 #include "mplayer/pixmaps/up.xpm" |
12 #include "mplayer/pixmaps/dir.xpm" | |
13 #include "mplayer/pixmaps/file.xpm" | |
2901 | 14 |
17144 | 15 #include "../app.h" |
16 #include "../interface.h" | |
17 #include "../../config.h" | |
18 #include "../../help_mp.h" | |
19 #include "../../libmpdemux/stream.h" | |
2901 | 20 |
21 #include "../widgets.h" | |
22 #include "fs.h" | |
6794 | 23 #include "opts.h" |
8299 | 24 #include "common.h" |
2901 | 25 |
26 #ifndef __linux__ | |
27 #define get_current_dir_name() getcwd(NULL, PATH_MAX) | |
28 #endif | |
29 | |
30 #ifndef get_current_dir_name | |
31 extern char * get_current_dir_name( void ); | |
32 #endif | |
33 | |
34 gchar * fsSelectedFile = NULL; | |
35 gchar * fsSelectedDirectory = NULL; | |
36 unsigned char * fsThatDir = "."; | |
7540 | 37 gchar * fsFilter = "*"; |
2901 | 38 |
39 int fsPressed = 0; | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
40 int fsType = 0; |
3054 | 41 |
7203 | 42 char * fsVideoFilterNames[][2] = |
7531 | 43 { { "MPEG files (*.mpg,*.mpeg,*.m1v)", "*.mpg,*.mpeg,*.m1v" }, |
11569
403ddb6b24f6
VCD/SVCD Images (*.bin) option in file selector by Spammail <spammail01@gmx.net>
alex
parents:
10879
diff
changeset
|
44 { "VCD/SVCD Images (*.bin)", "*.bin" }, |
5786 | 45 { "VOB files (*.vob)", "*.vob" }, |
46 { "AVI files (*.avi)", "*.avi" }, | |
7203 | 47 { "DiVX files (*.divx)", "*.divx" }, |
7531 | 48 { "QuickTime files (*.mov,*.qt)", "*.mov,*.qt" }, |
5786 | 49 { "ASF files (*.asf)", "*.asf" }, |
50 { "VIVO files (*.viv)", "*.viv" }, | |
7217 | 51 { "RealVideo files (*.rm)", "*.rm" }, |
5786 | 52 { "Windows Media Video (*.wmv)", "*.wmv" }, |
7531 | 53 { "OGG Media files (*.ogm)", "*.ogm" }, |
10879
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
54 { "Matroska Media files (*.mkv)", "*.mkv" }, |
7531 | 55 { "Autodesk animations (*.fli,*.flc)", "*.fli,*.flc" }, |
56 { "NuppelVideo files (*.nuv)", "*.nuv" }, | |
10879
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
57 { "MP3 files (*.mp3,*.mp2)", "*.mp3,*.mp2" }, |
7203 | 58 { "Wave files (*.wav)", "*.wav" }, |
59 { "WMA files (*.wma)", "*.wma" }, | |
10879
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
60 { "Matroska Audio files (*.mka)", "*.mka" }, |
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
61 { "Audio files", "*.wav,*.ogg,*.mp2,*.mp3,*.wma,*.mka" }, |
11569
403ddb6b24f6
VCD/SVCD Images (*.bin) option in file selector by Spammail <spammail01@gmx.net>
alex
parents:
10879
diff
changeset
|
62 { "Video files", "*.asf,*.avi,*.divx,*.fli,*.flc,*.ogm,*.mpg,*.mpeg,*.m1v,*.mov,*.nuv,*.qt,*.rm,*.vob,*.viv,*.wmv,*.mkv,*.bin" }, |
8299 | 63 { "All files", "*" }, |
7203 | 64 { NULL,NULL } |
65 }; | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
66 int fsLastVideoFilterSelected = -1; |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
67 |
7203 | 68 char * fsSubtitleFilterNames[][2] = |
5786 | 69 { { "UTF (*.utf)", "*.utf" }, |
70 { "SUB (*.sub)", "*.sub" }, | |
71 { "SRT (*.srt)", "*.str" }, | |
72 { "SMI (*.smi)", "*.smi" }, | |
73 { "RT (*.rt) ", "*.rt" }, | |
74 { "TXT (*.txt)", "*.txt" }, | |
75 { "SSA (*.ssa)", "*.ssa" }, | |
76 { "AQT (*.aqt)", "*.aqt" }, | |
8299 | 77 { "Subtitles", "*.utf,*.sub,*.srt,*.smi,*.rt,*.txt,*.ssa,*.aqt" }, |
78 { "All files", "*" }, | |
7203 | 79 { NULL,NULL } |
80 }; | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
81 int fsLastSubtitleFilterSelected = -1; |
3499 | 82 |
7203 | 83 char * fsOtherFilterNames[][2] = |
84 { | |
8299 | 85 { "All files", "*" }, |
7203 | 86 { NULL,NULL } |
87 }; | |
6623 | 88 |
7203 | 89 char * fsAudioFileNames[][2] = |
90 { | |
91 { "WAV files (*.wav)", "*.wav" }, | |
6623 | 92 { "MP3 files (*.mp2, *.mp3)", "*.mp2,*.mp3" }, |
7531 | 93 { "OGG Vorbis files (*.ogg)", "*.ogg" }, |
10879
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
94 { "WMA files (*.wma)", "*.wma" }, |
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
95 { "Matroska Audio files (*.mka)", "*.mka" }, |
27f8546f53c4
Added Matroska file extensions to the GUI. Patch by t0nik@yandex.ru.
mosu
parents:
9202
diff
changeset
|
96 { "Audio files", "*.ogg,*.mp2,*.mp3,*.wav,*.wma,*.mka" }, |
8299 | 97 { "All files", "*" }, |
7203 | 98 { NULL, NULL } |
99 }; | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
100 int fsLastAudioFilterSelected = -1; |
2901 | 101 |
7203 | 102 char * fsFontFileNames[][2] = |
103 { | |
7139 | 104 #ifdef HAVE_FREETYPE |
9195 | 105 { "True Type fonts (*.ttf)", "*.ttf" }, |
106 { "Type1 fonts (*.pfb)", "*.pfb" }, | |
107 { "All fonts", "*.ttf,*.pfb" }, | |
7139 | 108 #else |
7203 | 109 { "font files (*.desc)", "*.desc" }, |
7139 | 110 #endif |
8299 | 111 { "All files", "*" }, |
7203 | 112 { NULL,NULL } |
113 }; | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
114 int fsLastFontFilterSelected = -1; |
6794 | 115 |
2901 | 116 GtkWidget * fsFileNamesList; |
117 GtkWidget * fsFNameList; | |
8299 | 118 GtkWidget * fsFileSelect = NULL; |
2901 | 119 GdkColormap * fsColorMap; |
120 GtkWidget * fsOk; | |
121 GtkWidget * fsUp; | |
122 GtkWidget * fsCancel; | |
123 GtkWidget * fsCombo4; | |
3499 | 124 GtkWidget * fsPathCombo; |
2901 | 125 GList * fsList_items = NULL; |
126 GList * fsTopList_items = NULL; | |
3499 | 127 GtkWidget * List; |
128 GtkWidget * fsFilterCombo; | |
2901 | 129 |
3499 | 130 GtkStyle * style; |
131 GdkPixmap * dpixmap; | |
132 GdkPixmap * fpixmap; | |
133 GdkBitmap * dmask; | |
134 GdkBitmap * fmask; | |
135 | |
7203 | 136 static char * Filter( char * name ) |
137 { | |
7387
072a85aa31c6
Can't return pointer to automatic C array, gmplayer file selector box does
jkeil
parents:
7237
diff
changeset
|
138 static char tmp[32]; |
7203 | 139 int i,c; |
140 for ( i=0,c=0;i < strlen( name );i++ ) | |
141 { | |
142 if ( ( name[i] >='a' )&&( name[i] <= 'z' ) ) { tmp[c++]='['; tmp[c++]=name[i]; tmp[c++]=name[i] - 32; tmp[c++]=']'; } | |
143 else tmp[c++]=name[i]; | |
144 } | |
145 tmp[c]=0; | |
146 return tmp; | |
147 } | |
148 | |
3499 | 149 void CheckDir( GtkWidget * list,char * directory ) |
2901 | 150 { |
151 struct stat fs; | |
152 int i,c=2; | |
153 gchar * str[1][2]; | |
3499 | 154 GdkPixmap * pixmap; |
155 GdkBitmap * mask; | |
2901 | 156 glob_t gg; |
157 | |
3499 | 158 if ( !fsFilter[0] ) return; |
159 | |
2901 | 160 gtk_widget_hide( list ); |
3499 | 161 gtk_clist_clear( GTK_CLIST( list ) ); |
2901 | 162 str[0][0]=NULL; |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
163 |
2901 | 164 pixmap=dpixmap; mask=dmask; |
8980 | 165 str[0][0]=NULL; |
166 str[0][1]="."; gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),0,0,pixmap,mask ); | |
167 str[0][1]=".."; gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),1,0,pixmap,mask ); | |
2901 | 168 |
3499 | 169 glob( "*",0,NULL,&gg ); |
2901 | 170 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg ); |
6794 | 171 for( i=0;(unsigned)i<gg.gl_pathc;i++ ) |
2901 | 172 { |
173 stat( gg.gl_pathv[i],&fs ); | |
3499 | 174 if( !S_ISDIR( fs.st_mode ) ) continue; |
175 | |
8980 | 176 str[0][1]=gg.gl_pathv[i]; |
3499 | 177 pixmap=dpixmap; mask=dmask; |
178 gtk_clist_append( GTK_CLIST( list ),str[0] ); | |
179 gtk_clist_set_pixmap( GTK_CLIST( list ),c++,0,pixmap,mask ); | |
2901 | 180 } |
181 globfree( &gg ); | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
182 |
5786 | 183 if ( strchr( fsFilter,',' ) ) |
184 { | |
185 char tmp[8]; | |
186 int i,c,glob_param = 0; | |
187 //printf( "sub item detected.\n" ); | |
188 for ( i=0,c=0;i<(int)strlen( fsFilter ) + 1;i++,c++ ) | |
189 { | |
190 tmp[c]=fsFilter[i]; | |
191 if ( ( tmp[c] == ',' )||( tmp[c] == '\0' ) ) | |
192 { | |
193 tmp[c]=0; c=-1; | |
194 // printf( "substr: %s\n",tmp ); | |
7203 | 195 glob( Filter( tmp ),glob_param,NULL,&gg ); |
5786 | 196 glob_param=GLOB_APPEND; |
197 } | |
198 } | |
7203 | 199 } else glob( Filter( fsFilter ),0,NULL,&gg ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
200 |
3499 | 201 #if 0 |
202 if ( !strcmp( fsFilter,"*" ) ) | |
203 { | |
204 char * f = strdup( fsFilter ); | |
205 int i; | |
206 for( i=0;i<strlen( f );i++ ) | |
207 if ( ( f[i] >= 'A' )&&( f[i] <= 'Z' ) ) f[i]+=32; | |
208 glob( f,GLOB_APPEND,NULL,&gg ); | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
209 |
3499 | 210 for( i=0;i<strlen( f );i++ ) |
211 if ( ( f[i] >= 'a' )&&( f[i] <= 'z' ) ) f[i]-=32; | |
212 glob( f,GLOB_APPEND,NULL,&gg ); | |
213 free( f ); | |
214 } | |
215 #endif | |
216 | |
2901 | 217 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg ); |
218 pixmap=fpixmap; mask=fmask; | |
6794 | 219 for( i=0;(unsigned)i<gg.gl_pathc;i++ ) |
2901 | 220 { |
221 stat( gg.gl_pathv[i],&fs ); | |
222 if( S_ISDIR( fs.st_mode ) ) continue; | |
3499 | 223 |
8980 | 224 str[0][1]=gg.gl_pathv[i]; |
2901 | 225 gtk_clist_append( GTK_CLIST( list ),str[0] ); |
3499 | 226 gtk_clist_set_pixmap( GTK_CLIST( list ),c++,0,pixmap,mask ); |
2901 | 227 } |
228 globfree( &gg ); | |
229 | |
230 gtk_clist_set_column_width( GTK_CLIST( list ),0,17 ); | |
231 gtk_clist_select_row( GTK_CLIST( list ),0,1 ); | |
232 gtk_widget_show( list ); | |
233 } | |
234 | |
9192 | 235 void fs_PersistantHistory( char *subject ); /* forward declaration */ |
9190 | 236 |
6622
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6146
diff
changeset
|
237 void ShowFileSelect( int type,int modal ) |
3499 | 238 { |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
239 int i, k; |
6794 | 240 char * tmp = NULL; |
6146 | 241 |
8299 | 242 if ( fsFileSelect ) gtkActive( fsFileSelect ); |
6146 | 243 else fsFileSelect=create_FileSelect(); |
6044 | 244 |
3499 | 245 fsType=type; |
246 switch ( type ) | |
247 { | |
248 case fsVideoSelector: | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
249 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); |
3499 | 250 fsList_items=NULL; |
7203 | 251 for( i=0;fsVideoFilterNames[i][0];i++ ) |
3499 | 252 fsList_items=g_list_append( fsList_items,fsVideoFilterNames[i][0] ); |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
253 k = fsLastVideoFilterSelected; |
3499 | 254 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); |
255 g_list_free( fsList_items ); | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
256 gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[k >= 0 ? k : i-2][0] ); |
6794 | 257 tmp=guiIntfStruct.Filename; |
3499 | 258 break; |
259 case fsSubtitleSelector: | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
260 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect ); |
3499 | 261 fsList_items=NULL; |
7203 | 262 for( i=0;fsSubtitleFilterNames[i][0];i++ ) |
3499 | 263 fsList_items=g_list_append( fsList_items,fsSubtitleFilterNames[i][0] ); |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
264 k = fsLastSubtitleFilterSelected; |
3499 | 265 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); |
266 g_list_free( fsList_items ); | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
267 gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsSubtitleFilterNames[k >= 0 ? k : i-2][0] ); |
6794 | 268 tmp=guiIntfStruct.Subtitlename; |
3499 | 269 break; |
270 case fsOtherSelector: | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
271 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect ); |
3499 | 272 fsList_items=NULL; |
7203 | 273 for( i=0;fsOtherFilterNames[i][0];i++ ) |
3499 | 274 fsList_items=g_list_append( fsList_items,fsOtherFilterNames[i][0] ); |
275 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); | |
276 g_list_free( fsList_items ); | |
7203 | 277 gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[0][0] ); |
6794 | 278 tmp=guiIntfStruct.Othername; |
3499 | 279 break; |
6623 | 280 case fsAudioSelector: |
281 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect ); | |
282 fsList_items=NULL; | |
7203 | 283 for( i=0;fsAudioFileNames[i][0];i++ ) |
6623 | 284 fsList_items=g_list_append( fsList_items,fsAudioFileNames[i][0] ); |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
285 k = fsLastAudioFilterSelected; |
6623 | 286 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); |
287 g_list_free( fsList_items ); | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
288 gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsAudioFileNames[k >= 0 ? k : i-2][0] ); |
6794 | 289 tmp=guiIntfStruct.AudioFile; |
290 break; | |
291 case fsFontSelector: | |
292 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect ); | |
293 fsList_items=NULL; | |
7203 | 294 for( i=0;fsFontFileNames[i][0];i++ ) |
6794 | 295 fsList_items=g_list_append( fsList_items,fsFontFileNames[i][0] ); |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
296 k = fsLastFontFilterSelected; |
6794 | 297 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items ); |
298 g_list_free( fsList_items ); | |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
299 gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsFontFileNames[k >= 0 ? k : i-2][0] ); |
7019 | 300 tmp=font_name; |
6623 | 301 break; |
3499 | 302 } |
6794 | 303 |
304 if ( tmp && tmp[0] ) | |
305 { | |
306 struct stat f; | |
307 char * dir = strdup( tmp ); | |
308 | |
309 do | |
310 { | |
311 char * c = strrchr( dir,'/' ); | |
312 stat( dir,&f ); | |
313 if ( S_ISDIR( f.st_mode ) ) break; | |
314 if ( c ) *c=0; | |
315 } while ( strrchr( dir,'/' ) ); | |
316 | |
317 if ( dir[0] ) chdir( dir ); | |
318 | |
319 free( dir ); | |
320 } | |
6622
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6146
diff
changeset
|
321 |
6794 | 322 if ( fsTopList_items ) g_list_free( fsTopList_items ); fsTopList_items=NULL; |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
323 { |
9055 | 324 char * hist; |
325 int i, c = 1; | |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
326 |
9195 | 327 if ( fsType == fsVideoSelector ) |
328 { | |
329 for ( i=0;i < fsPersistant_MaxPos;i++ ) | |
330 if ( fsHistory[i] ) { fsTopList_items=g_list_append( fsTopList_items,fsHistory[i] ); c=0; } | |
331 } | |
9055 | 332 if ( c ) fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() ); |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
333 } |
6794 | 334 if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) ); |
335 fsTopList_items=g_list_append( fsTopList_items,"/home" ); | |
336 fsTopList_items=g_list_append( fsTopList_items,"/mnt" ); | |
337 fsTopList_items=g_list_append( fsTopList_items,"/" ); | |
338 gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items ); | |
339 | |
6622
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6146
diff
changeset
|
340 gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal ); |
da08877b9512
fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents:
6146
diff
changeset
|
341 |
6903 | 342 gtk_widget_show( fsFileSelect ); |
3499 | 343 } |
344 | |
2901 | 345 void HideFileSelect( void ) |
6146 | 346 { |
8299 | 347 if ( !fsFileSelect ) return; |
6146 | 348 gtk_widget_hide( fsFileSelect ); |
349 gtk_widget_destroy( fsFileSelect ); | |
8299 | 350 fsFileSelect=NULL; |
6146 | 351 } |
2901 | 352 |
9192 | 353 void fs_PersistantHistory( char * subject ) |
9055 | 354 { |
355 int i; | |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
356 |
9192 | 357 if ( fsType != fsVideoSelector ) return; |
358 | |
9056 | 359 for ( i=0;i < fsPersistant_MaxPos;i++ ) |
360 if ( fsHistory[i] && !strcmp( fsHistory[i],subject ) ) | |
361 { | |
362 char * tmp = fsHistory[i]; fsHistory[i]=fsHistory[0]; fsHistory[0]=tmp; | |
9192 | 363 return; |
9056 | 364 } |
9055 | 365 gfree( (void **)&fsHistory[fsPersistant_MaxPos - 1] ); |
366 for ( i=fsPersistant_MaxPos - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; | |
367 fsHistory[0]=gstrdup( subject ); | |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
368 } |
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
369 //----------------------------------------------- |
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
370 |
3499 | 371 void fs_fsFilterCombo_activate( GtkEditable * editable,gpointer user_data ) |
2901 | 372 { |
7540 | 373 fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) ); |
3499 | 374 CheckDir( fsFNameList,get_current_dir_name() ); |
2901 | 375 } |
376 | |
3499 | 377 void fs_fsFilterCombo_changed( GtkEditable * editable,gpointer user_data ) |
2901 | 378 { |
3499 | 379 char * str; |
380 int i; | |
2901 | 381 |
382 str=gtk_entry_get_text( GTK_ENTRY(user_data ) ); | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
383 |
3499 | 384 switch ( fsType ) |
2901 | 385 { |
3499 | 386 case fsVideoSelector: |
7203 | 387 for( i=0;fsVideoFilterNames[i][0];i++ ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
388 if( !strcmp( str,fsVideoFilterNames[i][0] ) ) |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
389 { fsFilter=fsVideoFilterNames[i][1]; fsLastVideoFilterSelected = i; break; } |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
390 break; |
3499 | 391 case fsSubtitleSelector: |
7203 | 392 for( i=0;fsSubtitleFilterNames[i][0];i++ ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
393 if( !strcmp( str,fsSubtitleFilterNames[i][0] ) ) |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
394 { fsFilter=fsSubtitleFilterNames[i][1]; fsLastSubtitleFilterSelected = i; break; } |
3499 | 395 break; |
396 case fsOtherSelector: | |
7203 | 397 for( i=0;fsOtherFilterNames[i][0];i++ ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
398 if( !strcmp( str,fsOtherFilterNames[i][0] ) ) |
7540 | 399 { fsFilter=fsOtherFilterNames[i][1]; break; } |
3499 | 400 break; |
6623 | 401 case fsAudioSelector: |
7203 | 402 for( i=0;fsAudioFileNames[i][0];i++ ) |
6623 | 403 if( !strcmp( str,fsAudioFileNames[i][0] ) ) |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
404 { fsFilter=fsAudioFileNames[i][1]; fsLastAudioFilterSelected = i; break; } |
6623 | 405 break; |
6794 | 406 case fsFontSelector: |
7203 | 407 for( i=0;fsFontFileNames[i][0];i++ ) |
6794 | 408 if( !strcmp( str,fsFontFileNames[i][0] ) ) |
13570
a3c3b27d3fb2
File filter dropdown box value is now preserved between dialog invocations.
diego
parents:
11569
diff
changeset
|
409 { fsFilter=fsFontFileNames[i][1]; fsLastFontFilterSelected = i; break; } |
6794 | 410 break; |
6623 | 411 default: return; |
2901 | 412 } |
6623 | 413 CheckDir( fsFNameList,get_current_dir_name() ); |
2901 | 414 } |
415 | |
3499 | 416 void fs_fsPathCombo_activate( GtkEditable * editable,gpointer user_data ) |
2901 | 417 { |
418 unsigned char * str; | |
419 | |
420 str=gtk_entry_get_text( GTK_ENTRY( user_data ) ); | |
3499 | 421 if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); |
2901 | 422 } |
423 | |
3499 | 424 void fs_fsPathCombo_changed( GtkEditable * editable,gpointer user_data ) |
2901 | 425 { |
426 unsigned char * str; | |
427 | |
428 str=gtk_entry_get_text( GTK_ENTRY( user_data ) ); | |
429 fsPressed=2; | |
3499 | 430 if ( chdir( str ) != -1 ) CheckDir( fsFNameList,get_current_dir_name() ); |
2901 | 431 } |
432 | |
433 void fs_Up_released( GtkButton * button,gpointer user_data ) | |
434 { | |
435 chdir( ".." ); | |
436 fsSelectedFile=fsThatDir; | |
3499 | 437 CheckDir( fsFNameList,get_current_dir_name() ); |
438 gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name() ); | |
2901 | 439 return; |
440 } | |
441 | |
442 int fsFileExist( unsigned char * fname ) | |
443 { | |
444 FILE * f = fopen( fname,"r" ); | |
445 if ( f == NULL ) return 0; | |
446 fclose( f ); | |
447 return 1; | |
448 } | |
449 | |
450 void fs_Ok_released( GtkButton * button,gpointer user_data ) | |
451 { | |
452 unsigned char * str; | |
453 GList * item; | |
454 int size,j,i = 1; | |
455 struct stat fs; | |
456 | |
457 stat( fsSelectedFile,&fs ); | |
458 if( S_ISDIR(fs.st_mode ) ) | |
459 { | |
460 chdir( fsSelectedFile ); | |
461 fsSelectedFile=fsThatDir; | |
3499 | 462 CheckDir( fsFNameList,get_current_dir_name() ); |
463 gtk_entry_set_text( GTK_ENTRY( fsPathCombo ),(unsigned char *)get_current_dir_name() ); | |
2901 | 464 return; |
465 } | |
466 | |
467 switch( fsPressed ) | |
468 { | |
469 case 1: | |
470 fsSelectedDirectory=(unsigned char *)get_current_dir_name(); | |
471 break; | |
472 case 2: | |
3499 | 473 str=gtk_entry_get_text( GTK_ENTRY( fsPathCombo ) ); |
2901 | 474 fsSelectedFile=str; |
6146 | 475 if ( !fsFileExist( fsSelectedFile ) ) { HideFileSelect(); return; } |
2901 | 476 fsSelectedDirectory=fsSelectedFile; |
477 size=strlen( fsSelectedDirectory ); | |
478 for ( j=0;j<size;j++ ) | |
479 { | |
480 if ( fsSelectedDirectory[ size - j ] == '/' ) | |
481 { | |
482 fsSelectedFile+=size - j + 1; | |
483 fsSelectedDirectory[ size - j ]=0; | |
484 break; | |
485 } | |
486 } | |
487 break; | |
488 } | |
3499 | 489 switch ( fsType ) |
490 { | |
491 case fsVideoSelector: | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
492 guiSetDF( guiIntfStruct.Filename,fsSelectedDirectory,fsSelectedFile ); |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
493 guiIntfStruct.StreamType=STREAMTYPE_FILE; |
9088 | 494 guiIntfStruct.FilenameChanged=1; sub_fps=0; |
6840 | 495 gfree( (void **)&guiIntfStruct.AudioFile ); |
496 gfree( (void **)&guiIntfStruct.Subtitlename ); | |
9055 | 497 fs_PersistantHistory( fsSelectedDirectory ); //totem, write into history |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
498 break; |
7150 | 499 #ifdef USE_SUB |
3499 | 500 case fsSubtitleSelector: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
501 guiSetDF( guiIntfStruct.Subtitlename,fsSelectedDirectory,fsSelectedFile ); |
7150 | 502 guiLoadSubtitle( guiIntfStruct.Subtitlename ); |
3499 | 503 break; |
7150 | 504 #endif |
3499 | 505 case fsOtherSelector: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
506 guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile ); |
3499 | 507 break; |
6623 | 508 case fsAudioSelector: |
509 guiSetDF( guiIntfStruct.AudioFile,fsSelectedDirectory,fsSelectedFile ); | |
510 break; | |
6794 | 511 case fsFontSelector: |
7019 | 512 guiSetDF( font_name,fsSelectedDirectory,fsSelectedFile ); |
6794 | 513 #if defined( USE_OSD ) || defined( USE_SUB ) |
514 guiLoadFont(); | |
515 #endif | |
8299 | 516 if ( Preferences ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name ); |
6794 | 517 break; |
3499 | 518 } |
6146 | 519 |
520 HideFileSelect(); | |
521 | |
2901 | 522 item=fsTopList_items; |
523 while( item ) | |
524 { | |
525 if ( !strcmp( item->data,fsSelectedDirectory ) ) i=0; | |
526 item=item->next; | |
527 } | |
6044 | 528 if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() ); |
6912 | 529 if ( mplMainAutoPlay ) { mplMainAutoPlay=0; mplEventHandling( evPlay,0 ); } |
9202 | 530 else guiGetEvent( guiCEvent,guiSetStop ); |
2901 | 531 } |
532 | |
533 void fs_Cancel_released( GtkButton * button,gpointer user_data ) | |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
534 { |
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
535 HideFileSelect(); |
9055 | 536 fs_PersistantHistory( get_current_dir_name() ); //totem, write into history file |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
537 } |
2901 | 538 |
539 void fs_fsFNameList_select_row( GtkWidget * widget,gint row,gint column,GdkEventButton *bevent,gpointer user_data ) | |
540 { | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4779
diff
changeset
|
541 gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); |
2901 | 542 fsPressed=1; |
8299 | 543 if( bevent && bevent->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); |
2901 | 544 } |
545 | |
546 gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data ) | |
547 { | |
548 switch ( event->keyval ) | |
549 { | |
550 case GDK_Escape: | |
551 gtk_button_released( GTK_BUTTON( fsCancel ) ); | |
552 break; | |
553 case GDK_Return: | |
554 gtk_button_released( GTK_BUTTON( fsOk ) ); | |
555 break; | |
556 case GDK_BackSpace: | |
557 gtk_button_released( GTK_BUTTON( fsUp ) ); | |
558 break; | |
559 } | |
560 return FALSE; | |
561 } | |
562 | |
563 GtkWidget * create_FileSelect( void ) | |
564 { | |
565 GtkWidget * FSFrame; | |
566 GtkWidget * frame2; | |
567 GtkWidget * frame3; | |
568 GtkWidget * frame4; | |
569 GtkWidget * vbox4; | |
570 GtkWidget * hbox4; | |
571 GtkWidget * vseparator1; | |
572 GtkWidget * hseparator1; | |
573 GtkWidget * hbox6; | |
574 GtkWidget * fsFNameListWindow; | |
575 GtkWidget * label1; | |
576 GtkWidget * hseparator2; | |
577 GtkWidget * hseparator3; | |
578 GtkWidget * hbuttonbox3; | |
579 | |
580 GtkWidget * uppixmapwid; | |
581 GdkPixmap * uppixmap; | |
582 GdkBitmap * upmask; | |
583 GtkStyle * upstyle; | |
584 | |
8713
d9639f835ecf
persistant history path from Pavel Rousar <p.rousar@sh.cvut.cz>
pontscho
parents:
8299
diff
changeset
|
585 |
4779 | 586 fsFileSelect=gtk_window_new( GTK_WINDOW_TOPLEVEL ); |
2901 | 587 gtk_widget_set_name( fsFileSelect,"fsFileSelect" ); |
588 gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect ); | |
4779 | 589 gtk_widget_set_usize( fsFileSelect,512,300 ); |
2901 | 590 GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT ); |
591 gtk_widget_set_events( fsFileSelect,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK ); | |
592 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect ); | |
593 gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER ); | |
4779 | 594 gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),TRUE,TRUE,TRUE ); |
8299 | 595 gtk_window_set_wmclass( GTK_WINDOW( fsFileSelect ),"FileSelect","MPlayer" ); |
2901 | 596 fsColorMap=gdk_colormap_get_system(); |
6651 | 597 |
598 gtk_widget_realize( fsFileSelect ); | |
599 gtkAddIcon( fsFileSelect ); | |
2901 | 600 |
3499 | 601 style=gtk_widget_get_style( fsFileSelect ); |
602 dpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm ); | |
603 fpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm ); | |
604 | |
8299 | 605 vbox4=AddVBox( AddDialogFrame( fsFileSelect ),0 ); |
606 hbox4=AddHBox( vbox4,1 ); | |
2901 | 607 |
608 fsCombo4=gtk_combo_new(); | |
609 gtk_widget_set_name( fsCombo4,"fsCombo4" ); | |
610 gtk_widget_show( fsCombo4 ); | |
611 gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 ); | |
612 gtk_widget_set_usize( fsCombo4,-2,20 ); | |
613 | |
3499 | 614 fsPathCombo=GTK_COMBO( fsCombo4 )->entry; |
615 gtk_widget_set_name( fsPathCombo,"fsPathCombo" ); | |
616 gtk_widget_show( fsPathCombo ); | |
617 gtk_widget_set_usize( fsPathCombo,-2,20 ); | |
2901 | 618 |
619 vseparator1=gtk_vseparator_new(); | |
620 gtk_widget_set_name( vseparator1,"vseparator1" ); | |
621 gtk_widget_show( vseparator1 ); | |
622 gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 ); | |
623 gtk_widget_set_usize( vseparator1,7,20 ); | |
624 | |
625 upstyle=gtk_widget_get_style( fsFileSelect ); | |
626 uppixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm ); | |
627 uppixmapwid=gtk_pixmap_new( uppixmap,upmask ); | |
628 gtk_widget_show( uppixmapwid ); | |
629 | |
630 fsUp=gtk_button_new(); | |
631 gtk_container_add( GTK_CONTAINER(fsUp ),uppixmapwid ); | |
632 gtk_widget_show( fsUp ); | |
633 gtk_box_pack_start( GTK_BOX( hbox4 ),fsUp,FALSE,FALSE,0 ); | |
634 gtk_widget_set_usize( fsUp,65,15 ); | |
635 | |
8299 | 636 AddHSeparator( vbox4 ); |
2901 | 637 |
8299 | 638 hbox6=AddHBox( NULL,0 ); |
639 gtk_box_pack_start( GTK_BOX( vbox4 ),hbox6,TRUE,TRUE,0 ); | |
2901 | 640 |
641 fsFNameListWindow=gtk_scrolled_window_new( NULL,NULL ); | |
642 gtk_widget_set_name( fsFNameListWindow,"fsFNameListWindow" ); | |
643 gtk_widget_show( fsFNameListWindow ); | |
644 gtk_box_pack_start( GTK_BOX( hbox6 ),fsFNameListWindow,TRUE,TRUE,0 ); | |
645 gtk_widget_set_usize( fsFNameListWindow,-2,145 ); | |
646 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( fsFNameListWindow ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC ); | |
647 | |
648 fsFNameList=gtk_clist_new( 2 ); | |
649 gtk_widget_set_name( fsFNameList,"fsFNameList" ); | |
650 gtk_container_add( GTK_CONTAINER( fsFNameListWindow ),fsFNameList ); | |
651 gtk_clist_set_column_width( GTK_CLIST( fsFNameList ),0,80 ); | |
652 gtk_clist_set_selection_mode( GTK_CLIST( fsFNameList ),GTK_SELECTION_BROWSE ); | |
653 gtk_clist_column_titles_hide( GTK_CLIST( fsFNameList ) ); | |
654 gtk_clist_set_shadow_type( GTK_CLIST( fsFNameList ),GTK_SHADOW_ETCHED_OUT ); | |
655 | |
8299 | 656 AddHSeparator( vbox4 ); |
2901 | 657 |
658 List=gtk_combo_new(); | |
659 gtk_widget_set_name( List,"List" ); | |
660 gtk_widget_ref( List ); | |
6044 | 661 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,(GtkDestroyNotify)gtk_widget_unref ); |
2901 | 662 gtk_widget_show( List ); |
663 gtk_box_pack_start( GTK_BOX( vbox4 ),List,FALSE,FALSE,0 ); | |
664 gtk_widget_set_usize( List,-2,20 ); | |
665 | |
3499 | 666 fsFilterCombo=GTK_COMBO( List )->entry; |
667 gtk_widget_set_name( fsFilterCombo,"fsFilterCombo" ); | |
668 gtk_widget_show( fsFilterCombo ); | |
669 gtk_entry_set_editable (GTK_ENTRY( fsFilterCombo ),FALSE ); | |
2901 | 670 |
8299 | 671 AddHSeparator( vbox4 ); |
2901 | 672 |
8299 | 673 hbuttonbox3=AddHButtonBox( vbox4 ); |
674 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END ); | |
675 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox3 ),10 ); | |
2901 | 676 |
8299 | 677 fsOk=AddButton( MSGTR_Ok,hbuttonbox3 ); |
678 fsCancel=AddButton( MSGTR_Cancel,hbuttonbox3 ); | |
2901 | 679 |
8719
dc27303ae528
correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents:
8713
diff
changeset
|
680 gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&fsFileSelect ); |
6044 | 681 gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL ); |
6146 | 682 |
6044 | 683 gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo ); |
684 gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),fsFilterCombo ); | |
685 gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo ); | |
686 gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsPathCombo_activate ),fsPathCombo ); | |
687 gtk_signal_connect( GTK_OBJECT( fsUp ),"released",GTK_SIGNAL_FUNC( fs_Up_released ),fsFNameList ); | |
688 gtk_signal_connect( GTK_OBJECT( fsOk ),"released",GTK_SIGNAL_FUNC( fs_Ok_released ),fsCombo4 ); | |
689 gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",GTK_SIGNAL_FUNC( fs_Cancel_released ),NULL ); | |
690 gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",(GtkSignalFunc)fs_fsFNameList_select_row,NULL ); | |
2901 | 691 |
692 gtk_widget_grab_focus( fsFNameList ); | |
693 | |
694 return fsFileSelect; | |
695 } | |
696 |