changeset 36049:31f6a88593b3

Cosmetic: Rename static variables. Use a prefix that differs from prefixes used for global definitions and that has a relation to the source it's used in.
author ib
date Thu, 04 Apr 2013 09:39:03 +0000
parents e3e9b31b1088
children 968e936dc898
files gui/dialog/dialog.c gui/dialog/url.c gui/interface.c
diffstat 3 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/dialog.c	Wed Apr 03 16:43:24 2013 +0000
+++ b/gui/dialog/dialog.c	Thu Apr 04 09:39:03 2013 +0000
@@ -48,7 +48,7 @@
 
 guiIcon_t guiIcon;
 
-static const char gui_icon_name[] = "mplayer";
+static const char guiIconName[] = "mplayer";
 
 static GtkWidget *PopUpMenu;
 
@@ -70,7 +70,7 @@
     guchar *data;
     int csize, i;
 
-    pixbuf = gtk_icon_theme_load_icon(theme, gui_icon_name, size, 0, NULL);
+    pixbuf = gtk_icon_theme_load_icon(theme, guiIconName, size, 0, NULL);
 
     if (pixbuf)
         gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, gdk_colormap_get_system(), gdkIcon, gdkIconMask, THRESHOLD);
@@ -96,7 +96,7 @@
 
         g_object_unref(pixbuf);
     } else
-        mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_ICONERROR, gui_icon_name, size);
+        mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_ICONERROR, guiIconName, size);
 
     /* start up GTK which realizes the pixmaps */
     gtk_main_iteration_do(FALSE);
--- a/gui/dialog/url.c	Wed Apr 03 16:43:24 2013 +0000
+++ b/gui/dialog/url.c	Thu Apr 04 09:39:03 2013 +0000
@@ -34,9 +34,9 @@
 
 GtkWidget *URLDialog;
 
-static GtkWidget *URLCombo;
-static GtkWidget *URLEntry;
-static GList *URLEntries;
+static GtkWidget *urlCombo;
+static GtkWidget *urlEntry;
+static GList *urlEntries;
 
 static void on_Button_pressed(GtkButton *button, gpointer user_data)
 {
@@ -45,7 +45,7 @@
     (void)button;
 
     if ((int)user_data) {
-        gchar *str = strdup(gtk_entry_get_text(GTK_ENTRY(URLEntry)));
+        gchar *str = strdup(gtk_entry_get_text(GTK_ENTRY(urlEntry)));
 
         if (str) {
             if (!strstr(str, "://")) {
@@ -56,7 +56,7 @@
                 str = tmp;
             }
 
-            URLEntries = g_list_prepend(URLEntries, (gchar *)str);
+            urlEntries = g_list_prepend(urlEntries, (gchar *)str);
 
             item      = calloc(1, sizeof(urlItem));
             item->url = gstrdup(str);
@@ -101,16 +101,16 @@
     hbox1 = gtkAddHBox(vbox1, 1);
     gtkAddLabel("URL: ", hbox1);
 
-    URLCombo = gtkAddCombo(hbox1);
+    urlCombo = gtkAddCombo(hbox1);
 /*
  * gtk_combo_new();
- * gtk_widget_set_name( URLCombo,"URLCombo" );
- * gtk_widget_show( URLCombo );
- * gtk_box_pack_start( GTK_BOX( hbox1 ),URLCombo,TRUE,TRUE,0 );
+ * gtk_widget_set_name( urlCombo,"urlCombo" );
+ * gtk_widget_show( urlCombo );
+ * gtk_box_pack_start( GTK_BOX( hbox1 ),urlCombo,TRUE,TRUE,0 );
  */
-    URLEntry = GTK_COMBO(URLCombo)->entry;
-    gtk_widget_set_name(URLEntry, "URLEntry");
-    gtk_widget_show(URLEntry);
+    urlEntry = GTK_COMBO(urlCombo)->entry;
+    gtk_widget_set_name(urlEntry, "URLEntry");
+    gtk_widget_show(urlEntry);
 
     gtkAddHSeparator(vbox1);
 
@@ -128,7 +128,7 @@
     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_widget_grab_focus(urlEntry);
     gtk_window_add_accel_group(GTK_WINDOW(URLDialog), accel_group);
 
     return URLDialog;
@@ -146,18 +146,18 @@
     item = listMgr(URLLIST_GET, 0);
 
     if (item) {
-        g_list_free(URLEntries);
-        URLEntries = NULL;
+        g_list_free(urlEntries);
+        urlEntries = NULL;
 
         while (item) {
-            URLEntries = g_list_append(URLEntries, (gchar *)item->url);
+            urlEntries = g_list_append(urlEntries, (gchar *)item->url);
             item       = item->next;
         }
     }
 
-    if (URLEntries) {
-        gtk_entry_set_text(GTK_ENTRY(URLEntry), URLEntries->data);
-        gtk_combo_set_popdown_strings(GTK_COMBO(URLCombo), URLEntries);
+    if (urlEntries) {
+        gtk_entry_set_text(GTK_ENTRY(urlEntry), urlEntries->data);
+        gtk_combo_set_popdown_strings(GTK_COMBO(urlCombo), urlEntries);
     }
 
     gtk_widget_show(URLDialog);
--- a/gui/interface.c	Wed Apr 03 16:43:24 2013 +0000
+++ b/gui/interface.c	Thu Apr 04 09:39:03 2013 +0000
@@ -68,7 +68,7 @@
     .PlaylistNext = True
 };
 
-static int initialized;
+static int guiInitialized;
 
 /* MPlayer -> GUI */
 
@@ -208,7 +208,7 @@
 
     mplayerLoadFont();
 
-    initialized = True;
+    guiInitialized = True;
 }
 
 /**
@@ -216,7 +216,7 @@
  */
 void guiDone(void)
 {
-    if (initialized) {
+    if (guiInitialized) {
         if (gui_save_pos) {
             gui_main_pos_x  = guiApp.mainWindow.X;
             gui_main_pos_y  = guiApp.mainWindow.Y;