changeset 35988:ad1a5580c91d

Make create_URL() static. It only has file scope. In order to do so, relocate some other static functions. Additionally, rename it create_URLDialog().
author ib
date Fri, 29 Mar 2013 01:11:48 +0000
parents d2f24ce5c0ba
children 188b782b013f
files gui/dialog/url.c gui/dialog/url.h
diffstat 2 files changed, 30 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- 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 );
+}
--- 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 */