annotate Gui/mplayer/gtk/sb.c @ 15660:62149f352939

Remove long obsolete -fb option. patch by Oded Shimon <ods15 - at - ods15 - dot - dyndns - dot - org>
author diego
date Mon, 06 Jun 2005 14:59:26 +0000
parents 5c7d92600018
children 0e1471d9da74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
1
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
2 #include <sys/stat.h>
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
3 #include <glob.h>
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
4 #include <unistd.h>
2985
44e4572d5673 missing #include's
pl
parents: 2901
diff changeset
5 #include <string.h>
44e4572d5673 missing #include's
pl
parents: 2901
diff changeset
6 #include <stdlib.h>
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 3587
diff changeset
7 #include <stdio.h>
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
8
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
9 #include "sb.h"
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
10 #include "common.h"
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
11
8043
e5dda05f9aab cleanup
pontscho
parents: 6903
diff changeset
12 #include "../../app.h"
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
13 #include "../../../config.h"
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
14 #include "../../../help_mp.h"
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
15
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
16 #include "../widgets.h"
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
17 #include "../app.h"
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
18
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
19 GtkWidget * SkinList = NULL;
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
20 char * sbSelectedSkin=NULL;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
21 char * sbMPlayerDirInHome=NULL;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
22 char * sbMPlayerPrefixDir=NULL;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
23
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 3587
diff changeset
24 char * gtkOldSkin;
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
25 static char * prev;
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
26
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
27 GtkWidget * SkinBrowser = NULL;
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
28
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
29 void ShowSkinBrowser( void )
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
30 {
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
31 if ( SkinBrowser ) gtkActive( SkinBrowser );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
32 else SkinBrowser=create_SkinBrowser();
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
33 }
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
34
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
35 void HideSkinBrowser( void )
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
36 {
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
37 if ( !SkinBrowser ) return;
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
38 gtk_widget_hide( SkinBrowser );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
39 gtk_widget_destroy( SkinBrowser );
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
40 SkinBrowser=NULL;
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
41 }
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
42
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
43 int gtkFillSkinList( gchar * mdir )
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
44 {
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
45 gchar * str[2];
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
46 gchar * tmp;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
47 int i;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
48 glob_t gg;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
49 struct stat fs;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
50
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 3587
diff changeset
51 gtkOldSkin=strdup( skinName );
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
52 prev=gtkOldSkin;
8977
5c7d92600018 10l found by Arpi (njamd)
pontscho
parents: 8719
diff changeset
53
5c7d92600018 10l found by Arpi (njamd)
pontscho
parents: 8719
diff changeset
54 str[0]="default";
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
55 str[1]="";
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
56 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
57
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
58 glob( mdir,GLOB_NOSORT,NULL,&gg );
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
59 for( i=0;i<(int)gg.gl_pathc;i++ )
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
60 {
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
61 if ( !strcmp( gg.gl_pathv[i],"." ) || !strcmp( gg.gl_pathv[i],".." ) ) continue;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
62 stat( gg.gl_pathv[i],&fs );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
63 if ( S_ISDIR( fs.st_mode ) )
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
64 {
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
65 tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
66 if ( !strcmp( tmp,"default" ) ) continue;
8977
5c7d92600018 10l found by Arpi (njamd)
pontscho
parents: 8719
diff changeset
67 str[0]=tmp;
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
68 if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
69 }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
70 }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
71 globfree( &gg );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
72 return 1;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
73 }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
74
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
75 static void prButton( GtkObject * object,gpointer user_data )
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
76 {
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
77 switch ( (int)user_data )
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
78 {
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
79 case 0: // cancel
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
80 if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
81 break;
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
82 case 1: // ok
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
83 ChangeSkin( sbSelectedSkin );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
84 if ( skinName ) free( skinName );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
85 skinName=strdup( sbSelectedSkin );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
86 break;
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
87 }
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
88 HideSkinBrowser();
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 3587
diff changeset
89 }
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 3587
diff changeset
90
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
91 static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
92 {
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
93 gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
94 if ( strcmp( prev,sbSelectedSkin ) )
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
95 {
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
96 prev=sbSelectedSkin;
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
97 ChangeSkin( sbSelectedSkin );
6222
1a83bd7ff76e small changes in skin selection
pontscho
parents: 6146
diff changeset
98 gtkActive( SkinBrowser );
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
99 }
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
100 if( !bevent ) return;
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
101 if( bevent->type == GDK_2BUTTON_PRESS )
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
102 {
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
103 if ( skinName ) free( skinName );
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
104 skinName=strdup( sbSelectedSkin );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
105 HideSkinBrowser();
5690
436cf6ef67fd fix skin loading bug
pontscho
parents: 4818
diff changeset
106 }
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
107 }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
108
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
109 GtkWidget * create_SkinBrowser( void )
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
110 {
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
111 GtkWidget * vbox5;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
112 GtkWidget * scrolledwindow1;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
113 GtkWidget * hbuttonbox4;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
114 GtkWidget * Cancel;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
115 GtkWidget * Ok;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
116 GtkAccelGroup * accel_group;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
117
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
118 accel_group = gtk_accel_group_new ();
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
119
8043
e5dda05f9aab cleanup
pontscho
parents: 6903
diff changeset
120 SkinBrowser=gtk_window_new( GTK_WINDOW_TOPLEVEL );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
121 gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
122 gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
123 gtk_widget_set_usize( SkinBrowser,256,320 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
124 gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
125 GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
126 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 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
127 gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
128 gtk_window_set_position( GTK_WINDOW( SkinBrowser ),GTK_WIN_POS_CENTER );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
129 gtk_window_set_policy( GTK_WINDOW( SkinBrowser ),FALSE,FALSE,TRUE );
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
130 gtk_window_set_wmclass( GTK_WINDOW( SkinBrowser ),"SkinBrowser","MPlayer" );
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6222
diff changeset
131
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6222
diff changeset
132 gtk_widget_realize( SkinBrowser );
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6222
diff changeset
133 gtkAddIcon( SkinBrowser );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
134
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
135 vbox5=AddVBox( AddDialogFrame( SkinBrowser ),0 );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
136 AddLabel( MSGTR_SKIN_LABEL,vbox5 );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
137 AddHSeparator( vbox5 );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
138
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
139 scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
140 gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
141 gtk_widget_ref( scrolledwindow1 );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
142 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
143 gtk_widget_show( scrolledwindow1 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
144 gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
145 gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
146 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
147
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
148 SkinList=gtk_clist_new( 1 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
149 gtk_widget_set_name( SkinList,"SkinList" );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
150 gtk_widget_ref( SkinList );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6044
diff changeset
151 gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
152 gtk_widget_show( SkinList );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
153 gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
154 gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
155 gtk_clist_set_selection_mode( GTK_CLIST( SkinList ),GTK_SELECTION_SINGLE );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
156 gtk_clist_column_titles_hide( GTK_CLIST( SkinList ) );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
157 gtk_clist_set_shadow_type( GTK_CLIST( SkinList ),GTK_SHADOW_ETCHED_OUT );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
158
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
159 AddHSeparator( vbox5 );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
160
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
161 hbuttonbox4=AddHButtonBox( vbox5 );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
162 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_SPREAD );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
163 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),10 );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
164
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
165 Ok=AddButton( MSGTR_Ok,hbuttonbox4 );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
166 Cancel=AddButton( MSGTR_Cancel,hbuttonbox4 );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
167
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
168 gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
169 gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
170
8719
dc27303ae528 correct widget destroy event handler (thank for D J Hawkey Jr <hawkeyd@visi.com>)
pontscho
parents: 8299
diff changeset
171 gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&SkinBrowser );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
172 gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL );
8299
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
173 gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)1 );
5b67aed0fc28 - remove some unused/nonusable variables
pontscho
parents: 8043
diff changeset
174 gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void *)0 );
2901
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
175
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
176 if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
177 { strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
178 if ( ( sbMPlayerPrefixDir=(char *)calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL )
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
179 { strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
180
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
181 gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
182 gtk_widget_grab_focus( SkinList );
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
183
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
184 return SkinBrowser;
f77f8379f28f rewrite ...
pontscho
parents:
diff changeset
185 }