comparison gui/ui/main.c @ 34610:4ff933a89818

Cosmetic: Rename functions in list.c. Additionally, change a parameter name of new listMgr() and add some doxygen comments to list.h.
author ib
date Sun, 12 Feb 2012 18:44:19 +0000
parents 980e3cb2a5a8
children 73a5ecb53ee2
comparison
equal deleted inserted replaced
34609:a8497c26c9f1 34610:4ff933a89818
109 if (what & CLEAR_FILE) 109 if (what & CLEAR_FILE)
110 { 110 {
111 nfree(guiInfo.Filename); 111 nfree(guiInfo.Filename);
112 nfree(guiInfo.SubtitleFilename); 112 nfree(guiInfo.SubtitleFilename);
113 nfree(guiInfo.AudioFilename); 113 nfree(guiInfo.AudioFilename);
114 listSet(gtkDelPl, NULL); 114 listMgr(gtkDelPl, NULL);
115 } 115 }
116 116
117 if (what & CLEAR_VCD) guiInfo.Tracks = 0; 117 if (what & CLEAR_VCD) guiInfo.Tracks = 0;
118 118
119 if (what & CLEAR_DVD) 119 if (what & CLEAR_DVD)
206 case evPlaySwitchToPause: 206 case evPlaySwitchToPause:
207 play: 207 play:
208 208
209 if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause; 209 if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause;
210 210
211 if ( listSet( gtkGetCurrPlItem,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) 211 if ( listMgr( gtkGetCurrPlItem,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) )
212 { 212 {
213 plItem * next = listSet( gtkGetCurrPlItem,NULL ); 213 plItem * next = listMgr( gtkGetCurrPlItem,NULL );
214 plLastPlayed=next; 214 plLastPlayed=next;
215 uiSetFileName( next->path,next->name,SAME_STREAMTYPE ); 215 uiSetFileName( next->path,next->name,SAME_STREAMTYPE );
216 } 216 }
217 217
218 switch ( guiInfo.StreamType ) 218 switch ( guiInfo.StreamType )
269 269
270 case evLoadPlay: 270 case evLoadPlay:
271 uiMainAutoPlay=1; 271 uiMainAutoPlay=1;
272 // guiInfo.StreamType=STREAMTYPE_FILE; 272 // guiInfo.StreamType=STREAMTYPE_FILE;
273 case evLoad: 273 case evLoad:
274 listSet( gtkDelPl,NULL ); 274 listMgr( gtkDelPl,NULL );
275 gtkShow( evLoad,NULL ); 275 gtkShow( evLoad,NULL );
276 break; 276 break;
277 case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break; 277 case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break;
278 case evDropSubtitle: 278 case evDropSubtitle:
279 nfree( guiInfo.SubtitleFilename ); 279 nfree( guiInfo.SubtitleFilename );
641 } 641 }
642 642
643 /* clear playlist */ 643 /* clear playlist */
644 if (filename == NULL) { 644 if (filename == NULL) {
645 filename = files[f]; 645 filename = files[f];
646 listSet(gtkDelPl,NULL); 646 listMgr(gtkDelPl,NULL);
647 } 647 }
648 648
649 item = calloc(1,sizeof(plItem)); 649 item = calloc(1,sizeof(plItem));
650 650
651 /* FIXME: decompose file name ? */ 651 /* FIXME: decompose file name ? */
656 item->path = gstrdup( str ); 656 item->path = gstrdup( str );
657 } else { 657 } else {
658 item->name = strdup(str); 658 item->name = strdup(str);
659 item->path = strdup(""); 659 item->path = strdup("");
660 } 660 }
661 listSet(gtkAddPlItem,item); 661 listMgr(gtkAddPlItem,item);
662 } else { 662 } else {
663 mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str ); 663 mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str );
664 } 664 }
665 free( str ); 665 free( str );
666 } 666 }