annotate gui/ui/gtk/skinbrowser.c @ 34962:8446e92c7bc2

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