[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk sb.h,1.2,1.3

Zoltan Ponekker pontscho at mplayer.dev.hu
Fri Aug 31 14:58:45 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mplayer:/var/tmp.root/cvs-serv10791

Modified Files:
	sb.h 
Log Message:
fix cancel

Index: sb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sb.h	26 Aug 2001 21:04:40 -0000	1.2
+++ sb.h	31 Aug 2001 12:58:43 -0000	1.3
@@ -27,8 +27,11 @@
  gtkVisibleSkinBrowser=0;
  gtkShMem->vs.window=evSkinBrowser;
  gtkSendMessage( evHideWindow );
+ gtkSendMessage( evSkinBrowser );
 }
 
+char gtkOldSkin[128];
+
 int gtkFillSkinList( gchar * mdir )
 {
  gchar         * str[2];
@@ -37,6 +40,7 @@
  glob_t          gg;
  struct stat     fs;
 
+ strcpy( gtkOldSkin,gtkShMem->sb.name );
  if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
   {
    gtkMessageBox( sbNotEnoughMemory );
@@ -69,6 +73,12 @@
 void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
 { 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 )
 {
  gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
@@ -85,6 +95,8 @@
  switch ( event->keyval )
   {
    case GDK_Escape:
+        if ( !sbShift ) on_SkinBrowser_Cancel( NULL,0 );
+        break;
    case GDK_Return:
         if ( !sbShift ) HideSkinBrowser();
         break;
@@ -293,7 +305,7 @@
                      GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
                      NULL );
  gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
-                     GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
+                     GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),
                      NULL );
 
  if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
@@ -310,4 +322,4 @@
  return SkinBrowser;
 }
 
-#endif
\ No newline at end of file
+#endif




More information about the MPlayer-cvslog mailing list