annotate gui/mplayer/gtk/sb.c @ 27298:0de5b595d2ae

Remove "en" from list of all man page languages when generating man page installation rules from a pattern. There is a separate rule for English above.
author diego
date Sat, 19 Jul 2008 11:32:33 +0000
parents b0a7b35b78d2
children 0f1b5b68af32
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
2 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
5 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
7 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
8 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
12 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
13 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
14 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
17 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
19 #include <sys/stat.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20 #include <glob.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21 #include <unistd.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 #include <string.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 #include <stdlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 #include <stdio.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25
26203
0d255d03016f #include config.h before all other headers.
diego
parents: 25601
diff changeset
26 #include "config.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #include "sb.h"
25601
8a0adeba5910 Rename common.[ch] to gtk_common.[ch], there are too many files by that name.
diego
parents: 23077
diff changeset
28 #include "gtk_common.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29
26365
10dfbc523184 Add gui/ prefix to some #include paths so that compilation from the
diego
parents: 26362
diff changeset
30 #include "gui/app.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #include "help_mp.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32
26382
b2f4abcf20ed Make include paths consistent; do not use ../ in them.
diego
parents: 26365
diff changeset
33 #include "gui/mplayer/widgets.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 GtkWidget * SkinList = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 char * sbSelectedSkin=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 /* FIXME: Eventually remove the obsolete directory names. */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 char * sbMPlayerDirInHome=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 char * sbMPlayerDirInHome_obsolete=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 char * sbMPlayerPrefixDir=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 char * sbMPlayerPrefixDir_obsolete=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 char * gtkOldSkin=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 static char * prev=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 GtkWidget * SkinBrowser = NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 void ShowSkinBrowser( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 if ( SkinBrowser ) gtkActive( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 else SkinBrowser=create_SkinBrowser();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 void HideSkinBrowser( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 if ( !SkinBrowser ) return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 gtk_widget_hide( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 gtk_widget_destroy( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 SkinBrowser=NULL;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 int gtkFillSkinList( gchar * mdir )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 gchar * str[2];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 gchar * tmp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 int i;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 glob_t gg;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 struct stat fs;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 gtkOldSkin=strdup( skinName );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 prev=gtkOldSkin;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 str[0]="default";
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 str[1]="";
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 glob( mdir,GLOB_NOSORT,NULL,&gg );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 for( i=0;i<(int)gg.gl_pathc;i++ )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 stat( gg.gl_pathv[i],&fs );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 if ( S_ISDIR( fs.st_mode ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 if ( !strcmp( tmp,"default" ) ) continue;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 str[0]=tmp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 globfree( &gg );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 return 1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 static void prButton( GtkObject * object,gpointer user_data )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 if ( sbSelectedSkin )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 switch ( (int)user_data )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 case 0: // cancel
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 case 1: // ok
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 ChangeSkin( sbSelectedSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 if ( skinName ) free( skinName );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 skinName=strdup( sbSelectedSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 break;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 HideSkinBrowser();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 if ( strcmp( prev,sbSelectedSkin ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 prev=sbSelectedSkin;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 ChangeSkin( sbSelectedSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 gtkActive( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 if( !bevent ) return;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 if( bevent->type == GDK_2BUTTON_PRESS )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 if ( skinName ) free( skinName );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 skinName=strdup( sbSelectedSkin );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 HideSkinBrowser();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 GtkWidget * create_SkinBrowser( void )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 GtkWidget * vbox5;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 GtkWidget * scrolledwindow1;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 GtkWidget * hbuttonbox4;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 GtkWidget * Cancel;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 GtkWidget * Ok;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 GtkAccelGroup * accel_group;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 accel_group = gtk_accel_group_new ();
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 SkinBrowser=gtk_window_new( GTK_WINDOW_TOPLEVEL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 gtk_widget_set_usize( SkinBrowser,256,320 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 gtk_widget_set_events( SkinBrowser,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 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser","MPlayer" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 gtk_widget_realize( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 gtkAddIcon( SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 vbox5=AddVBox( AddDialogFrame( SkinBrowser ),0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 AddLabel( MSGTR_SKIN_LABEL,vbox5 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 AddHSeparator( vbox5 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 gtk_widget_ref( scrolledwindow1 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 gtk_widget_show( scrolledwindow1 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 SkinList=gtk_clist_new( 1 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 gtk_widget_set_name( SkinList,"SkinList" );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 gtk_widget_ref( SkinList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174 gtk_widget_show( SkinList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 gtk_clist_column_titles_hide( GTK_CLIST( SkinList ) );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 AddHSeparator( vbox5 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 hbuttonbox4=AddHButtonBox( vbox5 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_SPREAD );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),10 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 Ok=AddButton( MSGTR_Ok,hbuttonbox4 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 Cancel=AddButton( MSGTR_Cancel,hbuttonbox4 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SkinBrowser );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)1 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)0 );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 if ( ( sbMPlayerDirInHome_obsolete=calloc( 1,strlen( skinDirInHome_obsolete ) + 4 ) ) != NULL )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 { strcpy( sbMPlayerDirInHome_obsolete,skinDirInHome_obsolete ); strcat( sbMPlayerDirInHome_obsolete,"/*" ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 if ( ( sbMPlayerDirInHome=calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 if ( ( sbMPlayerPrefixDir_obsolete=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 { strcpy( sbMPlayerPrefixDir_obsolete,skinMPlayerDir ); strcat( sbMPlayerPrefixDir_obsolete,"/*" ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 if ( ( sbMPlayerPrefixDir=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205 { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 gtk_widget_grab_focus( SkinList );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 return SkinBrowser;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 }