From 452e7bdc03546c71d2d9ebffbcd254b5842e052d Mon Sep 17 00:00:00 2001 From: pontscho Date: Mon, 26 Aug 2002 22:20:58 +0000 Subject: - warning fixes from Dominik Mierzejewski - wsXDNDProcessSelection return Truae fix - add url list saving support from Morten Volden - fix bug's in this patches - fix some memleak and bug git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7093 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/mplayer/gtk/eq.c | 1 - Gui/mplayer/gtk/eq.h | 2 +- Gui/mplayer/gtk/menu.h | 2 +- Gui/mplayer/gtk/opts.h | 2 +- Gui/mplayer/gtk/pl.c | 2 +- Gui/mplayer/gtk/pl.h | 2 +- Gui/mplayer/gtk/url.c | 18 ++++++++++++++++++ Gui/mplayer/mw.h | 2 +- Gui/mplayer/play.c | 5 +++-- 9 files changed, 27 insertions(+), 9 deletions(-) (limited to 'Gui/mplayer') diff --git a/Gui/mplayer/gtk/eq.c b/Gui/mplayer/gtk/eq.c index b87cb2aba8..aa69309ba2 100644 --- a/Gui/mplayer/gtk/eq.c +++ b/Gui/mplayer/gtk/eq.c @@ -233,7 +233,6 @@ static void eqShow( GtkWidget * widget,gpointer user_data ) static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data ) { - char * tmp; Channel=row - 1; eqSetBands( Channel ); if ( Channel == -1 ) diff --git a/Gui/mplayer/gtk/eq.h b/Gui/mplayer/gtk/eq.h index 883c4f8135..99941a0509 100644 --- a/Gui/mplayer/gtk/eq.h +++ b/Gui/mplayer/gtk/eq.h @@ -9,4 +9,4 @@ extern GtkWidget * Equalizer; extern GtkWidget * create_Equalizer( void ); extern void ShowEqualizer( void ); -#endif \ No newline at end of file +#endif diff --git a/Gui/mplayer/gtk/menu.h b/Gui/mplayer/gtk/menu.h index 546158ed02..ffaa9665f0 100644 --- a/Gui/mplayer/gtk/menu.h +++ b/Gui/mplayer/gtk/menu.h @@ -10,4 +10,4 @@ extern GtkWidget * AddSubMenu( GtkWidget * Menu,char * label ); extern GtkWidget * AddSeparator( GtkWidget * Menu ); extern GtkWidget * create_PopUpMenu( void ); -#endif \ No newline at end of file +#endif diff --git a/Gui/mplayer/gtk/opts.h b/Gui/mplayer/gtk/opts.h index d4cc88ba00..13367545c9 100644 --- a/Gui/mplayer/gtk/opts.h +++ b/Gui/mplayer/gtk/opts.h @@ -14,4 +14,4 @@ extern GtkWidget * create_OSSConfig( void ); extern void ShowPreferences( void ); -#endif \ No newline at end of file +#endif diff --git a/Gui/mplayer/gtk/pl.c b/Gui/mplayer/gtk/pl.c index f171ba8c12..4471251bd6 100644 --- a/Gui/mplayer/gtk/pl.c +++ b/Gui/mplayer/gtk/pl.c @@ -266,7 +266,7 @@ static void plButtonReleased( GtkButton * button,gpointer user_data ) { if ( CLFileSelected[i] ) { - gtk_clist_get_text( GTK_CLIST( CLFiles ),i,0,&itext ); + gtk_clist_get_text( GTK_CLIST( CLFiles ),i,0,(char **)&itext ); text[0][0]=itext[0][0]; text[0][1]=current_path; gtk_clist_append( GTK_CLIST( CLSelected ),text[0] ); NrOfSelected++; diff --git a/Gui/mplayer/gtk/pl.h b/Gui/mplayer/gtk/pl.h index 34c00c2d2e..d5e1ebe8b4 100644 --- a/Gui/mplayer/gtk/pl.h +++ b/Gui/mplayer/gtk/pl.h @@ -11,4 +11,4 @@ extern void HidePlayList( void ); extern GtkWidget * create_PlayList (void); -#endif \ No newline at end of file +#endif diff --git a/Gui/mplayer/gtk/url.c b/Gui/mplayer/gtk/url.c index 7b35e4d893..4a433a45a0 100644 --- a/Gui/mplayer/gtk/url.c +++ b/Gui/mplayer/gtk/url.c @@ -27,6 +27,18 @@ void ShowURLDialogBox( void ) if ( gtkVURLDialogBox ) gtkActive( URL ); else URL=create_URL(); + if ( URLList ) + { + URLItem * item = URLList; + g_list_free( URLComboEntrys ); + URLComboEntrys=NULL; + while( item ) + { + URLComboEntrys=g_list_append( URLComboEntrys,(gchar *)item->url ); + item=item->next; + } + } + if ( URLComboEntrys ) { gtk_entry_set_text( GTK_ENTRY( URLEntry ),URLComboEntrys->data ); @@ -53,6 +65,8 @@ static gboolean on_URL_destroy_event( GtkWidget * widget,GdkEvent * event,gpoint static void on_Button_pressed( GtkButton * button,gpointer user_data ) { + URLItem * item; + if ( (int)user_data ) { gchar * str= strdup( gtk_entry_get_text( GTK_ENTRY( URLEntry ) ) ); @@ -67,6 +81,10 @@ static void on_Button_pressed( GtkButton * button,gpointer user_data ) free( str ); str=tmp; } URLComboEntrys=g_list_prepend( URLComboEntrys,(gchar *)str ); + + item=calloc( 1,sizeof( URLItem ) ); + item->url=gstrdup( str ); + gtkSet( gtkAddURLItem,0,(void *)item ); guiSetFilename( guiIntfStruct.Filename,str ); guiIntfStruct.FilenameChanged=1; mplEventHandling( evPlayNetwork,0 ); diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h index c02f337e54..e1df60bad0 100644 --- a/Gui/mplayer/mw.h +++ b/Gui/mplayer/mw.h @@ -646,7 +646,7 @@ void mplMainKeyHandle( int KeyCode,int Type,int Key ) } /* this will be used to handle Drag&Drop files */ -void mplDandDHandler(int num,const char** files) +void mplDandDHandler(int num,char** files) { struct stat buf; int f = 0; diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index 0e6df5fd55..794173586b 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -1,6 +1,8 @@ + #include #include #include +#include #include #include @@ -33,9 +35,8 @@ static int mplGotoTheNext = 1; void mplFullScreen( void ) { - static int sx,sy; - #if 0 + static int sx,sy; // if ( !guiIntfStruct.Playing ) { wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); -- cgit v1.2.3