annotate gui/ui/gtk/skinbrowser.c @ 33572:d9b805602aa1

Rename some gtk files. The new names better reflect what the files implement. List of changes: eq.* -> equalizer.* fs.* -> fileselect.* gtk_common.* -> tools.* gtk_menu.* -> menu.* gtk_url.* -> url.* mb.* -> msgbox.* opts.* -> preferences.* pl.* -> playlist.* sb.* -> skinbrowser.*
author ib
date Sun, 19 Jun 2011 15:34:08 +0000
parents
children 998f94e62a61
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"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
31 #include "help_mp.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
32
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
33 #include "gui/ui/widgets.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
34
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
35 GtkWidget * SkinList = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
36 char * sbSelectedSkin=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
37 char * sbMPlayerDirInHome=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
38 char * sbMPlayerPrefixDir=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
39
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
40 char * gtkOldSkin=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
41 static char * prev=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
42
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
43 GtkWidget * SkinBrowser = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
44
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
45 void ShowSkinBrowser( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
46 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
47 if ( SkinBrowser ) gtkActive( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
48 else SkinBrowser=create_SkinBrowser();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
49 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
50
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
51 static void HideSkinBrowser( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
52 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
53 if ( !SkinBrowser ) return;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
54 gtk_widget_hide( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
55 gtk_widget_destroy( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
56 SkinBrowser=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
57 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
58
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
59 int gtkFillSkinList( gchar * mdir )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
60 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
61 gchar * str[2];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
62 gchar * tmp;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
63 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
64 glob_t gg;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
65 struct stat fs;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
66
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
67 gtkOldSkin=strdup( skinName );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
68 prev=gtkOldSkin;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
69
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
70 str[0]="default";
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
71 str[1]="";
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
72 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
73
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
74 glob( mdir,GLOB_NOSORT,NULL,&gg );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
75 for( i=0;i<(int)gg.gl_pathc;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
76 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
77 if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
78 stat( gg.gl_pathv[i],&fs );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
79 if ( S_ISDIR( fs.st_mode ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
80 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
81 tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
82 if ( !strcmp( tmp,"default" ) ) continue;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
83 str[0]=tmp;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
84 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
85 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
86 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
87 globfree( &gg );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
88 return 1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
89 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
90
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
91 static void prButton( GtkObject * object,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
92 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
93 if ( sbSelectedSkin )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
94 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
95 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
96 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
97 case 0: // cancel
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
98 if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) uiChangeSkin( gtkOldSkin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
99 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
100 case 1: // ok
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
101 uiChangeSkin( sbSelectedSkin ); // NOTE TO MYSELF: skin already changed!
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
102 free( skinName );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
103 skinName=strdup( sbSelectedSkin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
104 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
105 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
106 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
107 HideSkinBrowser();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
108 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
109
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
110 static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
111 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
112 gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
113 if ( strcmp( prev,sbSelectedSkin ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
114 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
115 prev=sbSelectedSkin;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
116 uiChangeSkin( sbSelectedSkin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
117 gtkActive( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
118 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
119 if( !bevent ) return;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
120 if( bevent->type == GDK_2BUTTON_PRESS )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
121 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
122 free( skinName );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
123 skinName=strdup( sbSelectedSkin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
124 HideSkinBrowser();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
125 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
126 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
127
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
128 GtkWidget * create_SkinBrowser( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
129 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
130 GtkWidget * vbox5;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
131 GtkWidget * scrolledwindow1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
132 GtkWidget * hbuttonbox4;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
133 GtkWidget * Cancel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
134 GtkWidget * Ok;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
135 GtkAccelGroup * accel_group;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
136
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
137 accel_group = gtk_accel_group_new ();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
138
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
139 SkinBrowser=gtk_window_new( GTK_WINDOW_TOPLEVEL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
140 gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
141 gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
142 gtk_widget_set_usize( SkinBrowser,256,320 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
143 gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
144 GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
145 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
146 gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
147 gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
148 gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
149 gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser","MPlayer" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
150
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
151 gtk_widget_realize( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
152 gtkAddIcon( SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
153
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
154 vbox5=AddVBox( AddDialogFrame( SkinBrowser ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
155 AddLabel( MSGTR_SKIN_LABEL,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
156 AddHSeparator( vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
157
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
158 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
159 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
160 gtk_widget_ref( scrolledwindow1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
161 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
162 gtk_widget_show( scrolledwindow1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
163 gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
164 gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
165 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
166
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
167 SkinList=gtk_clist_new( 1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
168 gtk_widget_set_name( SkinList,"SkinList" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
169 gtk_widget_ref( SkinList );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
170 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
171 gtk_widget_show( SkinList );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
172 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
173 gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
174 gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
175 gtk_clist_column_titles_hide( GTK_CLIST( SkinList ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
176 gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
177
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
178 AddHSeparator( vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
179
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
180 hbuttonbox4=AddHButtonBox( vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
181 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_SPREAD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
182 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),10 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
183
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
184 Ok=AddButton( MSGTR_Ok,hbuttonbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
185 Cancel=AddButton( MSGTR_Cancel,hbuttonbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
186
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
187 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
188 gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
189
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
190 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
191 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
192 gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
193 gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
194
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
195 if ( ( sbMPlayerDirInHome=calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
196 { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
197 if ( ( sbMPlayerPrefixDir=calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
198 { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
199
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
200 gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
201 gtk_widget_grab_focus( SkinList );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
202
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
203 return SkinBrowser;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
204 }