mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 22:01:10 +00:00
fix cancel
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1800 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5ce26b0a96
commit
1fd27ecdea
@ -27,8 +27,11 @@ void HideSkinBrowser( void )
|
|||||||
gtkVisibleSkinBrowser=0;
|
gtkVisibleSkinBrowser=0;
|
||||||
gtkShMem->vs.window=evSkinBrowser;
|
gtkShMem->vs.window=evSkinBrowser;
|
||||||
gtkSendMessage( evHideWindow );
|
gtkSendMessage( evHideWindow );
|
||||||
|
gtkSendMessage( evSkinBrowser );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char gtkOldSkin[128];
|
||||||
|
|
||||||
int gtkFillSkinList( gchar * mdir )
|
int gtkFillSkinList( gchar * mdir )
|
||||||
{
|
{
|
||||||
gchar * str[2];
|
gchar * str[2];
|
||||||
@ -37,6 +40,7 @@ int gtkFillSkinList( gchar * mdir )
|
|||||||
glob_t gg;
|
glob_t gg;
|
||||||
struct stat fs;
|
struct stat fs;
|
||||||
|
|
||||||
|
strcpy( gtkOldSkin,gtkShMem->sb.name );
|
||||||
if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
|
if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
|
||||||
{
|
{
|
||||||
gtkMessageBox( sbNotEnoughMemory );
|
gtkMessageBox( sbNotEnoughMemory );
|
||||||
@ -69,6 +73,12 @@ int gtkFillSkinList( gchar * mdir )
|
|||||||
void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
|
void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
|
||||||
{ HideSkinBrowser(); }
|
{ HideSkinBrowser(); }
|
||||||
|
|
||||||
|
void on_SkinBrowser_Cancel( GtkObject * object,gpointer user_data )
|
||||||
|
{
|
||||||
|
strcpy( gtkShMem->sb.name,gtkOldSkin );
|
||||||
|
HideSkinBrowser();
|
||||||
|
}
|
||||||
|
|
||||||
void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
|
void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
|
||||||
{
|
{
|
||||||
gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
|
gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
|
||||||
@ -85,6 +95,8 @@ gboolean on_SkinBrowser_key_release_event( GtkWidget * widget,GdkEventKey * even
|
|||||||
switch ( event->keyval )
|
switch ( event->keyval )
|
||||||
{
|
{
|
||||||
case GDK_Escape:
|
case GDK_Escape:
|
||||||
|
if ( !sbShift ) on_SkinBrowser_Cancel( NULL,0 );
|
||||||
|
break;
|
||||||
case GDK_Return:
|
case GDK_Return:
|
||||||
if ( !sbShift ) HideSkinBrowser();
|
if ( !sbShift ) HideSkinBrowser();
|
||||||
break;
|
break;
|
||||||
@ -293,7 +305,7 @@ GtkWidget * create_SkinBrowser( void )
|
|||||||
GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
|
GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
|
||||||
NULL );
|
NULL );
|
||||||
gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
|
gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
|
||||||
GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
|
GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
|
if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
|
||||||
@ -310,4 +322,4 @@ GtkWidget * create_SkinBrowser( void )
|
|||||||
return SkinBrowser;
|
return SkinBrowser;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user