diff Gui/interface.c @ 9056:3086611e8213

- add subcp - fix some 10l in gui - fix one 10l bug in subreader
author pontscho
date Tue, 21 Jan 2003 19:12:46 +0000
parents 4a42c0604ce1
children 731e5dc57436
line wrap: on
line diff
--- a/Gui/interface.c	Tue Jan 21 13:33:40 2003 +0000
+++ b/Gui/interface.c	Tue Jan 21 19:12:46 2003 +0000
@@ -386,6 +386,7 @@
    mp_msg( MSGT_GPLAYER,MSGL_INFO,"[gui] Delete Load subtitle: %s\n",name );
    sub_name=gstrdup( name );
    subtitles=sub_read_file( sub_name,guiIntfStruct.FPS );
+   if ( !subtitles ) mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_CantLoadSub,name );
   }
 }
 #endif
@@ -862,7 +863,6 @@
          } else { url_item->next=NULL; URLList=url_item; }
         return NULL;
 // --- subtitle
-#if defined( USE_OSD ) || defined( USE_SUB )
 #ifndef HAVE_FREETYPE
    case gtkSetFontFactor:
         font_factor=fparam;
@@ -886,7 +886,7 @@
 	guiLoadFont();
 	return NULL;
    case gtkSetFontEncoding:
-        if ( subtitle_font_encoding ) free( subtitle_font_encoding );
+	gfree( (void **)&subtitle_font_encoding );
 	subtitle_font_encoding=gstrdup( (char *)vparam );
 	guiLoadFont();
 	return NULL;
@@ -895,6 +895,11 @@
 	guiLoadFont();
 	return NULL;
 #endif
+#ifdef USE_ICONV
+   case gtkSetSubEncoding:
+	gfree( (void **)&sub_cp );
+	sub_cp=gstrdup( (char *)vparam );
+	break;
 #endif
 // --- misc
    case gtkClearStruct: