changeset 35978:6dfdebfa72b7

Cosmetic: Rename ShowURLDialogBox() ShowURLDialog(). Additionally, rename GTK widget URL URLDialog.
author ib
date Thu, 28 Mar 2013 17:10:57 +0000
parents 3734172b4af6
children c21fe9fcb752
files gui/dialog/dialog.c gui/dialog/url.c gui/dialog/url.h
diffstat 3 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/dialog.c	Thu Mar 28 17:02:47 2013 +0000
+++ b/gui/dialog/dialog.c	Thu Mar 28 17:10:57 2013 +0000
@@ -368,8 +368,8 @@
         break;
 
     case evLoadURL:
-        ShowURLDialogBox();
-        gtkSetLayer(URL);
+        ShowURLDialog();
+        gtkSetLayer(URLDialog);
         break;
     }
 }
--- a/gui/dialog/url.c	Thu Mar 28 17:02:47 2013 +0000
+++ b/gui/dialog/url.c	Thu Mar 28 17:10:57 2013 +0000
@@ -36,18 +36,18 @@
 #include "gui/util/string.h"
 #include "help_mp.h"
 
-GtkWidget * URL = NULL;
+GtkWidget * URLDialog = NULL;
 
 static GtkWidget * URLCombo;
 static GtkWidget * URLEntry;
 static GList     * URLComboEntrys = NULL;
 
-void ShowURLDialogBox( void )
+void ShowURLDialog( void )
 {
  urlItem * item;
 
- if ( URL ) gtkActive( URL );
-   else URL=create_URL();
+ if ( URLDialog ) gtkActive( URLDialog );
+   else URLDialog=create_URL();
 
  item = listMgr( URLLIST_GET,0 );
 
@@ -68,15 +68,15 @@
    gtk_combo_set_popdown_strings( GTK_COMBO( URLCombo ),URLComboEntrys );
   }
 
- gtk_widget_show( URL );
+ gtk_widget_show( URLDialog );
 }
 
 static void HideURLDialogBox( void )
 {
- if ( !URL ) return;
- gtk_widget_hide( URL );
- gtk_widget_destroy( URL );
- URL=0;
+ if ( !URLDialog ) return;
+ gtk_widget_hide( URLDialog );
+ gtk_widget_destroy( URLDialog );
+ URLDialog=0;
 }
 
 static void on_Button_pressed( GtkButton * button,gpointer user_data )
@@ -122,20 +122,20 @@
 
  accel_group=gtk_accel_group_new();
 
- URL=gtk_window_new( GTK_WINDOW_TOPLEVEL );
- gtk_widget_set_name( URL,"URL" );
- gtk_object_set_data( GTK_OBJECT( URL ),"URL",URL );
- gtk_widget_set_usize( URL,384,70 );
- GTK_WIDGET_SET_FLAGS( URL,GTK_CAN_DEFAULT );
- gtk_window_set_title( GTK_WINDOW( URL ),MSGTR_Network );
- gtk_window_set_position( GTK_WINDOW( URL ),GTK_WIN_POS_CENTER );
- gtk_window_set_policy( GTK_WINDOW( URL ),TRUE,TRUE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( URL ),"Network","MPlayer" );
+ URLDialog=gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ gtk_widget_set_name( URLDialog,"URL" );
+ gtk_object_set_data( GTK_OBJECT( URLDialog ),"URL",URLDialog );
+ gtk_widget_set_usize( URLDialog,384,70 );
+ GTK_WIDGET_SET_FLAGS( URLDialog,GTK_CAN_DEFAULT );
+ gtk_window_set_title( GTK_WINDOW( URLDialog ),MSGTR_Network );
+ gtk_window_set_position( GTK_WINDOW( URLDialog ),GTK_WIN_POS_CENTER );
+ gtk_window_set_policy( GTK_WINDOW( URLDialog ),TRUE,TRUE,FALSE );
+ gtk_window_set_wmclass( GTK_WINDOW( URLDialog ),"Network","MPlayer" );
 
- gtk_widget_realize( URL );
- gtkAddIcon( URL );
+ gtk_widget_realize( URLDialog );
+ gtkAddIcon( URLDialog );
 
- vbox1=AddVBox( AddDialogFrame( URL ),0 );
+ vbox1=AddVBox( AddDialogFrame( URLDialog ),0 );
  hbox1=AddHBox( vbox1,1 );
  AddLabel( "URL: ",hbox1 );
 
@@ -162,12 +162,12 @@
  gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
  gtk_widget_add_accelerator( Cancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
- gtk_signal_connect( GTK_OBJECT( URL ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&URL );
+ gtk_signal_connect( GTK_OBJECT( URLDialog ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&URLDialog );
  gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),(void *)1 );
  gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( on_Button_pressed ),NULL );
 
  gtk_widget_grab_focus( URLEntry );
- gtk_window_add_accel_group( GTK_WINDOW( URL ),accel_group );
+ gtk_window_add_accel_group( GTK_WINDOW( URLDialog ),accel_group );
 
- return URL;
+ return URLDialog;
 }
--- a/gui/dialog/url.h	Thu Mar 28 17:02:47 2013 +0000
+++ b/gui/dialog/url.h	Thu Mar 28 17:10:57 2013 +0000
@@ -21,10 +21,10 @@
 
 #include <gtk/gtk.h>
 
-extern GtkWidget * URL;
+extern GtkWidget * URLDialog;
 extern int         gtkVURLDialogBox;
 
-void ShowURLDialogBox( void );
+void ShowURLDialog( void );
 GtkWidget * create_URL( void );
 
 #endif /* MPLAYER_GUI_URL_H */