Mercurial > mplayer.hg
diff Gui/mplayer/gtk/url.c @ 7092:8e9607c5897e
- warning fixes from Dominik Mierzejewski <dominik@rangers.eu.org>
- wsXDNDProcessSelection return Truae fix
- add url list saving support from Morten Volden <mvolden@tdcadsl.dk>
- fix bug's in this patches
- fix some memleak and bug
author | pontscho |
---|---|
date | Mon, 26 Aug 2002 22:20:58 +0000 |
parents | c2d4100c964e |
children | acf33c922840 |
line wrap: on
line diff
--- a/Gui/mplayer/gtk/url.c Mon Aug 26 17:20:17 2002 +0000 +++ b/Gui/mplayer/gtk/url.c Mon Aug 26 22:20:58 2002 +0000 @@ -27,6 +27,18 @@ 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 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 @@ 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 );