annotate Gui/mplayer/gtk/fs.h @ 1887:986de19221c9

fix tab bug
author pontscho
date Wed, 12 Sep 2001 18:53:42 +0000
parents d21f8afc7680
children ec11652458ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 #ifndef __MY_fsFileSelector
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #define __MY_fsFileSelector
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 #include <stdlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6 #include <stdio.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 #include <string.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 #include <sys/stat.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9 #include <glob.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
10 #include <unistd.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
11
1850
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1823
diff changeset
12 #ifdef __SVR4
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1823
diff changeset
13 #define get_current_dir_name() getcwd(NULL, PATH_MAX)
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1823
diff changeset
14 #endif
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1823
diff changeset
15
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16 #ifndef get_current_dir_name
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
17 extern char * get_current_dir_name( void );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18 #endif
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 gchar * fsSelectedFile = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21 gchar * fsSelectedDirectory = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 unsigned char * fsThatDir = ".";
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
23 gchar * fsFilter = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25 int fsPressed = 0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26 int fsLastFilterNames = 2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27 unsigned char * fsFilterNames[3][2] = { { "MPEG files( *.mpg )", "*.mpg" },
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
28 { "AVI files( *.avi )", "*.avi" },
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 { "All files( *)", "*" } };
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
30
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
31 GtkWidget * fsFileNamesList;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32 GtkWidget * fsFNameList;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33 GtkWidget * fsFileSelect;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34 GdkColormap * fsColorMap;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
35 GtkWidget * fsOk;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36 GtkWidget * fsUp;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
37 GtkWidget * fsCancel;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 GtkWidget * fsCombo4;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39 GtkWidget * fsComboEntry2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40 GList * fsList_items = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 GList * fsTopList_items = NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
42
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
43 void CheckDir( GtkWidget * list,unsigned char * directory )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
44 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
45 struct stat fs;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 int i,c=2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47 gchar * str[1][2];
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 GdkPixmap * dpixmap,*fpixmap,*pixmap;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 GdkBitmap * dmask,*fmask,*mask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 GtkStyle * style;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 glob_t gg;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 gtk_widget_hide( list );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 str[0][0]=NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 style=gtk_widget_get_style( fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 dpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57 fpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 pixmap=dpixmap; mask=dmask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59 str[0][0]=NULL; str[0][1]=(gchar *)malloc( 3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 strcpy( str[0][1],"." );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),0,0,pixmap,mask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 strcpy( str[0][1],".." );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 gtk_clist_append( GTK_CLIST( list ),str[0] ); gtk_clist_set_pixmap( GTK_CLIST( list ),1,0,pixmap,mask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 free( str[0][0] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
66 glob( "*",GLOB_NOSORT,NULL,&gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
67 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
68 for( i=0;i<gg.gl_pathc;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
69 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70 if( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 stat( gg.gl_pathv[i],&fs );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 if( S_ISDIR( fs.st_mode ) )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
73 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74 str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 strcpy( str[0][1],"" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76 strcat( str[0][1],gg.gl_pathv[i] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 pixmap=dpixmap; mask=dmask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 gtk_clist_append( GTK_CLIST( list ),str[0] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 gtk_clist_set_pixmap( GTK_CLIST( list ),c,0,pixmap,mask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 free( str[0][1] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 c++;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
84 globfree( &gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
85 glob( fsFilter,GLOB_NOSORT,NULL,&gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 // glob( ".*",GLOB_NOSORT | GLOB_APPEND,NULL,&gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 pixmap=fpixmap; mask=fmask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 for( i=0;i<gg.gl_pathc;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
90 if( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91 stat( gg.gl_pathv[i],&fs );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 if( S_ISDIR( fs.st_mode ) ) continue;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93 str[0][1]=(gchar *)malloc( strlen( gg.gl_pathv[i] ) + 2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
94 strcpy( str[0][1],"" ); strcat( str[0][1],gg.gl_pathv[i] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
95 gtk_clist_append( GTK_CLIST( list ),str[0] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
96 gtk_clist_set_pixmap( GTK_CLIST( list ),c,0,pixmap,mask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97 free( str[0][1] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
98 c++;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
99 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
100 globfree( &gg );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
101
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
102 gtk_clist_set_sort_type( GTK_CLIST( list ),GTK_SORT_ASCENDING );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
103 gtk_clist_set_compare_func( GTK_CLIST( list ),NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
104 gtk_clist_set_sort_column( GTK_CLIST( list ),1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
105 gtk_clist_sort( GTK_CLIST( list ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
106 gtk_clist_set_column_width( GTK_CLIST( list ),0,17 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
107 gtk_clist_select_row( GTK_CLIST( list ),0,1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
108 gtk_widget_show( list );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
109 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
110
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
111 void HideFileSelect( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
112 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
113 gtk_widget_hide( fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
114 gtkVisibleFileSelect=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
115 gtkShMem->vs.window=evLoad;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
116 gtkSendMessage( evHideWindow );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
117 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
118
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
119 void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
120 { HideFileSelect(); }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
121
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
122 void fs_combo_entry1_activate( GtkEditable * editable,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
123 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
124 unsigned char * str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
125
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
126 str=gtk_entry_get_text( GTK_ENTRY(user_data ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
127 gtk_clist_clear( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128 if( fsFilter ) free( fsFilter );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
129 if( ( fsFilter=(unsigned char *)malloc( strlen( str ) + 1 ) ) == NULL )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
130 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
131 dbprintf( 0,"[gtk] not enough memory.\n" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132 exit( 0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
133 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
134 strcpy( fsFilter,str );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
136 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
137
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138 void fs_combo_entry1_changed( GtkEditable * editable,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
140 unsigned char * str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
141 int i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
142
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
143 str=gtk_entry_get_text( GTK_ENTRY(user_data ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
144
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
145 for( i=0;i<fsLastFilterNames+1;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
146 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
147 if( !strcmp( str,fsFilterNames[i][0] ) )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
148 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
149 if( fsFilter ) free( fsFilter );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
150 if( ( fsFilter=(unsigned char *)malloc( 6 ) ) == NULL )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
151 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
152 dbprintf( 0,"[gtk] not enough memory.\n" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
153 exit( 0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
154 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
155 strcpy( fsFilter,fsFilterNames[i][1] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
156 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
157 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
158 gtk_clist_clear( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
159 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
160 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
161
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
162 void fs_fsComboEntry2_activate( GtkEditable * editable,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
163 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
164 unsigned char * str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
165
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
166 str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
167 if ( chdir( str ) != -1 )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
168 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
169 gtk_clist_clear( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
170 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
171 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
172 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
173
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
174 void fs_fsComboEntry2_changed( GtkEditable * editable,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
175 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
176 unsigned char * str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
177
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
178 str=gtk_entry_get_text( GTK_ENTRY( user_data ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
179 fsPressed=2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
180 // if (
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
181 // tmp=(unsigned char *)malloc( strlen( fsSelectedDirectory ) + 5 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
182 // strcpy( tmp,fsSelectedDirectory ); strcat( tmp,"/*" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
183 // fprintf( stderr,"str: %s\n",tmp );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
184 // free( tmp );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
185 if ( chdir( str ) != -1 )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
186 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
187 gtk_clist_clear( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
188 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
189 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
190 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
191
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
192 void fs_Up_released( GtkButton * button,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
193 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
194 chdir( ".." );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
195 fsSelectedFile=fsThatDir;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
196 gtk_clist_clear( GTK_CLIST( user_data ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
197 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
198 gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
199 return;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
200 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
201
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
202 int fsFileExist( unsigned char * fname )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
203 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
204 FILE * f = fopen( fname,"r" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
205 if ( f == NULL ) return 0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
206 fclose( f );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
207 return 1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
208 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
209
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
210 void fs_Ok_released( GtkButton * button,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
211 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
212 unsigned char * str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
213 GList * item;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
214 int size,j,i = 1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
215 struct stat fs;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
216
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
217 stat( fsSelectedFile,&fs );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
218 if( S_ISDIR(fs.st_mode ) )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
219 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
220 chdir( fsSelectedFile );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
221 fsSelectedFile=fsThatDir;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
222 if( fsFNameList != NULL ) gtk_clist_clear( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
223 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
224 gtk_entry_set_text( GTK_ENTRY( fsComboEntry2 ),(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
225 return;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
226 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
227
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
228 HideFileSelect();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
229
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
230 switch( fsPressed )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
231 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
232 case 1:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
233 fsSelectedDirectory=(unsigned char *)get_current_dir_name();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
234 #ifdef DEBUG
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
235 dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
236 #endif
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
237 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
238 case 2:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
239 str=gtk_entry_get_text( GTK_ENTRY( fsComboEntry2 ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
240 fsSelectedFile=str;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
241 #ifdef DEBUG
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
242 dbprintf( 1,"[gtk-fs] fsSelectedFile: %s\n",fsSelectedFile );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
243 #endif
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
244 if ( !fsFileExist( fsSelectedFile ) ) return;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
245 fsSelectedDirectory=fsSelectedFile;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
246 size=strlen( fsSelectedDirectory );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
247 for ( j=0;j<size;j++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
248 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
249 if ( fsSelectedDirectory[ size - j ] == '/' )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
250 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
251 fsSelectedFile+=size - j + 1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
252 fsSelectedDirectory[ size - j ]=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
253 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
254 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
255 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
256 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
257 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
258 strcpy( gtkShMem->fs.dir,fsSelectedDirectory );
1823
a6c67352ccac fix some bug.
pontscho
parents: 1693
diff changeset
259 printf( "----gtk---> filname: %s\n",fsSelectedFile );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
260 strcpy( gtkShMem->fs.filename,fsSelectedFile );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
261 item=fsTopList_items;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
262 while( item )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
263 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
264 if ( !strcmp( item->data,fsSelectedDirectory ) ) i=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
265 item=item->next;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
266 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
267 if ( i )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
268 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
269 fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
270 gtk_combo_set_popdown_strings( GTK_COMBO( user_data ),fsTopList_items );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
271 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
272 gtkSendMessage( evFileLoaded );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
273 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
274
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
275 void fs_Cancel_released( GtkButton * button,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
276 { HideFileSelect(); }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
277
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
278 void fs_fsFNameList_select_row( GtkWidget * widget,gint row,gint column,GdkEventButton *bevent,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
279 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
280 gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); fsSelectedFile++;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
281 fsPressed=1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
282 if( !bevent ) return;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
283 if( bevent->type == GDK_2BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
284 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
285
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
286 gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
287 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
288 switch ( event->keyval )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
289 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
290 case GDK_Escape:
1887
986de19221c9 fix tab bug
pontscho
parents: 1884
diff changeset
291 gtk_button_released( GTK_BUTTON( fsCancel ) );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
292 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
293 case GDK_Return:
1887
986de19221c9 fix tab bug
pontscho
parents: 1884
diff changeset
294 gtk_button_released( GTK_BUTTON( fsOk ) );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
295 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
296 case GDK_BackSpace:
1887
986de19221c9 fix tab bug
pontscho
parents: 1884
diff changeset
297 gtk_button_released( GTK_BUTTON( fsUp ) );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
298 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
299 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
300 return FALSE;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
301 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
302
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
303 GtkWidget * create_FileSelect( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
304 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
305 GtkWidget * FSFrame;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
306 GtkWidget * frame2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
307 GtkWidget * frame3;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
308 GtkWidget * frame4;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
309 GtkWidget * vbox4;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
310 GtkWidget * hbox4;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
311 GtkWidget * vseparator1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
312 GtkWidget * hseparator1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
313 GtkWidget * hbox6;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
314 GtkWidget * fsFNameListWindow;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
315 GtkWidget * label1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
316 GtkWidget * hseparator2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
317 GtkWidget * List;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
318 GtkWidget * combo_entry1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
319 GtkWidget * hseparator3;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
320 GtkWidget * hbuttonbox3;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
321 int i;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
322
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
323 // GtkWidget * okpixmapwid,*uppixmapwid,*cancelpixmapwid;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
324 // GdkPixmap * okpixmap,*uppixmap,*cancelpixmap;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
325 // GdkBitmap * okmask,*upmask,*cancelmask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
326 // GtkStyle * okstyle,*upstyle,*cancelstyle;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
327
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
328 GtkWidget * uppixmapwid;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
329 GdkPixmap * uppixmap;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
330 GdkBitmap * upmask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
331 GtkStyle * upstyle;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
332
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
333 if( ( fsFilter=(unsigned char *)malloc( 3 ) ) == NULL )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
334 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
335 dbprintf( 0,"[gtk] not enough memory.\n" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
336 exit( 0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
337 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
338 strcpy( fsFilter,"*" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
339
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
340 fsFileSelect=gtk_window_new( GTK_WINDOW_DIALOG );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
341 gtk_widget_set_name( fsFileSelect,"fsFileSelect" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
342 gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
343 gtk_widget_set_usize( fsFileSelect,416,256 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
344 GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
345 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 );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
346 gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
347 gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
348 gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),FALSE,FALSE,TRUE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
349 fsColorMap=gdk_colormap_get_system();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
350
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
351 FSFrame=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
352 gtk_widget_set_name( FSFrame,"FSFrame" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
353 gtk_widget_ref( FSFrame );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
354 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"FSFrame",FSFrame,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
355 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
356 gtk_widget_show( FSFrame );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
357 gtk_container_add( GTK_CONTAINER( fsFileSelect ),FSFrame );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
358 gtk_container_set_border_width( GTK_CONTAINER( FSFrame ),1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
359 gtk_frame_set_shadow_type( GTK_FRAME( FSFrame ),GTK_SHADOW_IN );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
360
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
361 frame2=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
362 gtk_widget_set_name( frame2,"frame2" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
363 gtk_widget_ref( frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
364 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame2",frame2,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
365 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
366 gtk_widget_show( frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
367 gtk_container_add( GTK_CONTAINER( FSFrame ),frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
368 gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
369
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
370 frame3=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
371 gtk_widget_set_name( frame3,"frame3" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
372 gtk_widget_ref( frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
373 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame3",frame3,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
374 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
375 gtk_widget_show( frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
376 gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
377 gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
378
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
379 frame4=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
380 gtk_widget_set_name( frame4,"frame4" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
381 gtk_widget_ref( frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
382 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame4",frame4,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
383 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
384 gtk_widget_show( frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
385 gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
386 gtk_container_set_border_width( GTK_CONTAINER( frame4 ),1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
387 gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
388
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
389 vbox4=gtk_vbox_new( FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
390 gtk_widget_set_name( vbox4,"vbox4" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
391 gtk_widget_ref( vbox4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
392 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vbox4",vbox4,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
393 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
394 gtk_widget_show( vbox4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
395 gtk_container_add( GTK_CONTAINER( frame4 ),vbox4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
396
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
397 hbox4=gtk_hbox_new( FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
398 gtk_widget_set_name( hbox4,"hbox4" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
399 gtk_widget_ref( hbox4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
400 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox4",hbox4,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
401 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
402 gtk_widget_show( hbox4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
403 gtk_box_pack_start( GTK_BOX( vbox4 ),hbox4,TRUE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
404
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
405 fsCombo4=gtk_combo_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
406 gtk_widget_set_name( fsCombo4,"fsCombo4" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
407 gtk_widget_ref( fsCombo4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
408 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsCombo4",fsCombo4,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
409 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
410 gtk_widget_show( fsCombo4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
411 gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
412 gtk_widget_set_usize( fsCombo4,-2,20 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
413
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
414 fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
415 if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
416 fsTopList_items=g_list_append( fsTopList_items,"/home" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
417 fsTopList_items=g_list_append( fsTopList_items,"/mnt" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
418 fsTopList_items=g_list_append( fsTopList_items,"/" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
419 gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
420
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
421 fsComboEntry2=GTK_COMBO( fsCombo4 )->entry;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
422 gtk_widget_set_name( fsComboEntry2,"fsComboEntry2" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
423 gtk_widget_ref( fsComboEntry2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
424 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsComboEntry2",fsComboEntry2,( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
425 gtk_widget_show( fsComboEntry2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
426 gtk_widget_set_usize( fsComboEntry2,-2,20 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
427
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
428 vseparator1=gtk_vseparator_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
429 gtk_widget_set_name( vseparator1,"vseparator1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
430 gtk_widget_ref( vseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
431 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vseparator1",vseparator1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
432 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
433 gtk_widget_show( vseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
434 gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
435 gtk_widget_set_usize( vseparator1,7,20 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
436
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
437 upstyle=gtk_widget_get_style( fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
438 uppixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
439 uppixmapwid=gtk_pixmap_new( uppixmap,upmask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
440 gtk_widget_show( uppixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
441
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
442 fsUp=gtk_button_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
443 gtk_container_add( GTK_CONTAINER(fsUp ),uppixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
444 gtk_widget_show( fsUp );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
445 gtk_box_pack_start( GTK_BOX( hbox4 ),fsUp,FALSE,FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
446 gtk_widget_set_usize( fsUp,65,15 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
447
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
448 hseparator1=gtk_hseparator_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
449 gtk_widget_set_name( hseparator1,"hseparator1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
450 gtk_widget_ref( hseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
451 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator1",hseparator1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
452 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
453 gtk_widget_show( hseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
454 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator1,FALSE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
455 gtk_widget_set_usize( hseparator1,-2,8 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
456
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
457 hbox6=gtk_hbox_new( FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
458 gtk_widget_set_name( hbox6,"hbox6" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
459 gtk_widget_ref( hbox6 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
460 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox6",hbox6,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
461 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
462 gtk_widget_show( hbox6 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
463 gtk_box_pack_start( GTK_BOX( vbox4 ),hbox6,TRUE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
464
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
465 fsFNameListWindow=gtk_scrolled_window_new( NULL,NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
466 gtk_widget_set_name( fsFNameListWindow,"fsFNameListWindow" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
467 gtk_widget_ref( fsFNameListWindow );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
468 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameListWindow",fsFNameListWindow,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
469 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
470 gtk_widget_show( fsFNameListWindow );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
471 gtk_box_pack_start( GTK_BOX( hbox6 ),fsFNameListWindow,TRUE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
472 gtk_widget_set_usize( fsFNameListWindow,-2,145 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
473 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( fsFNameListWindow ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
474
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
475 fsFNameList=gtk_clist_new( 2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
476 gtk_widget_set_name( fsFNameList,"fsFNameList" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
477 gtk_widget_ref( fsFNameList );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
478 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameList",fsFNameList,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
479 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
480 gtk_container_add( GTK_CONTAINER( fsFNameListWindow ),fsFNameList );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
481 gtk_clist_set_column_width( GTK_CLIST( fsFNameList ),0,80 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
482 gtk_clist_set_selection_mode( GTK_CLIST( fsFNameList ),GTK_SELECTION_BROWSE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
483 gtk_clist_column_titles_hide( GTK_CLIST( fsFNameList ) );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
484 gtk_clist_set_shadow_type( GTK_CLIST( fsFNameList ),GTK_SHADOW_ETCHED_OUT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
485 CheckDir( fsFNameList,(unsigned char *)get_current_dir_name() );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
486
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
487 label1=gtk_label_new( "label1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
488 gtk_widget_set_name( label1,"label1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
489 gtk_widget_ref( label1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
490 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"label1",label1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
491 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
492 gtk_widget_show( label1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
493 gtk_clist_set_column_widget( GTK_CLIST( fsFNameList ),0,label1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
494
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
495 hseparator2=gtk_hseparator_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
496 gtk_widget_set_name( hseparator2,"hseparator2" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
497 gtk_widget_ref( hseparator2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
498 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator2",hseparator2,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
499 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
500 gtk_widget_show( hseparator2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
501 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator2,FALSE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
502 gtk_widget_set_usize( hseparator2,-2,9 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
503
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
504 List=gtk_combo_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
505 gtk_widget_set_name( List,"List" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
506 gtk_widget_ref( List );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
507 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
508 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
509 gtk_widget_show( List );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
510 gtk_box_pack_start( GTK_BOX( vbox4 ),List,FALSE,FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
511 gtk_widget_set_usize( List,-2,20 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
512 fsList_items=NULL;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
513 for( i=0;i<fsLastFilterNames + 1;i++ )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
514 fsList_items=g_list_append( fsList_items,fsFilterNames[i][0] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
515 gtk_combo_set_popdown_strings( GTK_COMBO( List ),fsList_items );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
516 g_list_free( fsList_items );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
517
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
518 combo_entry1=GTK_COMBO( List )->entry;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
519 gtk_widget_set_name( combo_entry1,"combo_entry1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
520 gtk_widget_ref( combo_entry1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
521 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"combo_entry1",combo_entry1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
522 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
523 gtk_widget_show( combo_entry1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
524 gtk_entry_set_text( GTK_ENTRY( combo_entry1 ),fsFilterNames[fsLastFilterNames][0] );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
525
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
526 hseparator3=gtk_hseparator_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
527 gtk_widget_set_name( hseparator3,"hseparator3" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
528 gtk_widget_ref( hseparator3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
529 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator3",hseparator3,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
530 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
531 gtk_widget_show( hseparator3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
532 gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator3,FALSE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
533 gtk_widget_set_usize( hseparator3,-2,7 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
534
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
535 hbuttonbox3=gtk_hbutton_box_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
536 gtk_widget_set_name( hbuttonbox3,"hbuttonbox3" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
537 gtk_widget_ref( hbuttonbox3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
538 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbuttonbox3",hbuttonbox3,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
539 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
540 gtk_widget_show( hbuttonbox3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
541 gtk_box_pack_start( GTK_BOX( vbox4 ),hbuttonbox3,FALSE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
542 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
543 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox3 ),10 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
544 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox3 ),85,20 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
545 gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox3 ),0,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
546
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
547 // okstyle=gtk_widget_get_style( fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
548 // okpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&okmask,&okstyle->bg[GTK_STATE_NORMAL],(gchar **)ok_xpm );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
549 // okpixmapwid=gtk_pixmap_new( okpixmap,okmask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
550 // gtk_widget_show( okpixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
551 // fsOk=gtk_button_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
552 // gtk_container_add( GTK_CONTAINER(fsOk ),okpixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
553 // gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
554 // gtk_widget_show( fsOk );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
555
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
556 fsOk=gtk_button_new_with_label( MSGTR_Ok );
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
557 gtk_widget_set_name( fsOk,MSGTR_Ok );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
558 gtk_widget_ref( fsOk );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
559 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),MSGTR_Ok,fsOk,( GtkDestroyNotify )gtk_widget_unref );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
560 gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsOk );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
561 gtk_widget_show( fsOk );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
562
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
563 // cancelstyle=gtk_widget_get_style( fsFileSelect );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
564 // cancelpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&cancelmask,&cancelstyle->bg[GTK_STATE_NORMAL],(gchar **)cancel_xpm );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
565 // cancelpixmapwid=gtk_pixmap_new( cancelpixmap,cancelmask );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
566 // gtk_widget_show( cancelpixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
567 // fsCancel=gtk_button_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
568 // gtk_widget_show( fsCancel );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
569 // gtk_container_add( GTK_CONTAINER( fsCancel ),cancelpixmapwid );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
570 // gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
571 // gtk_widget_show( fsCancel );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
572
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
573 fsCancel=gtk_button_new_with_label( MSGTR_Cancel );
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
574 gtk_widget_set_name( fsCancel,MSGTR_Cancel );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
575 gtk_widget_ref( fsCancel );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1850
diff changeset
576 gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),MSGTR_Cancel,fsCancel,( GtkDestroyNotify )gtk_widget_unref );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
577 gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
578 gtk_widget_show( fsCancel );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
579
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
580 gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
581 GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
582 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
583 gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
584 GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
585 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
586 gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"changed",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
587 GTK_SIGNAL_FUNC( fs_combo_entry1_changed ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
588 combo_entry1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
589 gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"activate",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
590 GTK_SIGNAL_FUNC( fs_combo_entry1_activate ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
591 combo_entry1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
592 gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"changed",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
593 GTK_SIGNAL_FUNC( fs_fsComboEntry2_changed ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
594 fsComboEntry2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
595 gtk_signal_connect( GTK_OBJECT( fsComboEntry2 ),"activate",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
596 GTK_SIGNAL_FUNC( fs_fsComboEntry2_activate ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
597 fsComboEntry2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
598 gtk_signal_connect( GTK_OBJECT( fsUp ),"released",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
599 GTK_SIGNAL_FUNC( fs_Up_released ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
600 fsFNameList );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
601 gtk_signal_connect( GTK_OBJECT( fsOk ),"released",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
602 GTK_SIGNAL_FUNC( fs_Ok_released ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
603 fsCombo4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
604 gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
605 GTK_SIGNAL_FUNC( fs_Cancel_released ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
606 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
607
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
608 gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
609 ( GtkSignalFunc ) fs_fsFNameList_select_row,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
610 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
611
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
612 gtk_widget_grab_focus( fsFNameList );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
613
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
614 return fsFileSelect;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
615 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
616
1850
62b8e85865a2 Some changes to compile the GUI on solaris
jkeil
parents: 1823
diff changeset
617 #endif