# HG changeset patch # User ib # Date 1364519508 0 # Node ID ad1a5580c91d8639b8104f60ca5064bd6571b0be # Parent d2f24ce5c0bacfe61eaae07e425089fb38ec4470 Make create_URL() static. It only has file scope. In order to do so, relocate some other static functions. Additionally, rename it create_URLDialog(). diff -r d2f24ce5c0ba -r ad1a5580c91d gui/dialog/url.c --- a/gui/dialog/url.c Fri Mar 29 01:07:42 2013 +0000 +++ b/gui/dialog/url.c Fri Mar 29 01:11:48 2013 +0000 @@ -42,35 +42,6 @@ static GtkWidget * URLEntry; static GList * URLComboEntrys = NULL; -void ShowURLDialog( void ) -{ - urlItem * item; - - if ( URLDialog ) gtkActive( URLDialog ); - else URLDialog=create_URL(); - - item = listMgr( URLLIST_GET,0 ); - - if ( item ) - { - 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 ); - gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys ); - } - - gtk_widget_show( URLDialog ); -} - static void HideURLDialog( void ) { if ( !URLDialog ) return; @@ -111,7 +82,7 @@ HideURLDialog(); } -GtkWidget * create_URL( void ) +static GtkWidget * create_URLDialog( void ) { GtkWidget * vbox1; GtkWidget * hbox1; @@ -171,3 +142,32 @@ return URLDialog; } + +void ShowURLDialog( void ) +{ + urlItem * item; + + if ( URLDialog ) gtkActive( URLDialog ); + else URLDialog=create_URLDialog(); + + item = listMgr( URLLIST_GET,0 ); + + if ( item ) + { + 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 ); + gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys ); + } + + gtk_widget_show( URLDialog ); +} diff -r d2f24ce5c0ba -r ad1a5580c91d gui/dialog/url.h --- a/gui/dialog/url.h Fri Mar 29 01:07:42 2013 +0000 +++ b/gui/dialog/url.h Fri Mar 29 01:11:48 2013 +0000 @@ -24,6 +24,5 @@ extern GtkWidget * URLDialog; void ShowURLDialog( void ); -GtkWidget * create_URL( void ); #endif /* MPLAYER_GUI_URL_H */