[MPlayer-cvslog] r36082 - in trunk/gui/dialog: url.c url.h

ib subversion at mplayerhq.hu
Fri Mar 29 02:11:48 CET 2013


Author: ib
Date: Fri Mar 29 02:11:48 2013
New Revision: 36082

Log:
Make create_URL() static.

It only has file scope.

In order to do so, relocate some other static functions.

Additionally, rename it create_URLDialog().

Modified:
   trunk/gui/dialog/url.c
   trunk/gui/dialog/url.h

Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c	Fri Mar 29 02:07:42 2013	(r36081)
+++ trunk/gui/dialog/url.c	Fri Mar 29 02:11:48 2013	(r36082)
@@ -42,35 +42,6 @@ static GtkWidget * URLCombo;
 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 @@ static void on_Button_pressed( GtkButton
  HideURLDialog();
 }
 
-GtkWidget * create_URL( void )
+static GtkWidget * create_URLDialog( void )
 {
  GtkWidget * vbox1;
  GtkWidget * hbox1;
@@ -171,3 +142,32 @@ GtkWidget * create_URL( void )
 
  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 );
+}

Modified: trunk/gui/dialog/url.h
==============================================================================
--- trunk/gui/dialog/url.h	Fri Mar 29 02:07:42 2013	(r36081)
+++ trunk/gui/dialog/url.h	Fri Mar 29 02:11:48 2013	(r36082)
@@ -24,6 +24,5 @@
 extern GtkWidget * URLDialog;
 
 void ShowURLDialog( void );
-GtkWidget * create_URL( void );
 
 #endif /* MPLAYER_GUI_URL_H */


More information about the MPlayer-cvslog mailing list