[MPlayer-cvslog] r36143 - in trunk/gui: dialog/dialog.c dialog/url.c interface.c
ib
subversion at mplayerhq.hu
Thu Apr 4 11:39:03 CEST 2013
Author: ib
Date: Thu Apr 4 11:39:03 2013
New Revision: 36143
Log:
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.
Modified:
trunk/gui/dialog/dialog.c
trunk/gui/dialog/url.c
trunk/gui/interface.c
Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c Wed Apr 3 18:43:24 2013 (r36142)
+++ trunk/gui/dialog/dialog.c Thu Apr 4 11:39:03 2013 (r36143)
@@ -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 @@ static int gtkLoadIcon(GtkIconTheme *the
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 @@ static int gtkLoadIcon(GtkIconTheme *the
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);
Modified: trunk/gui/dialog/url.c
==============================================================================
--- trunk/gui/dialog/url.c Wed Apr 3 18:43:24 2013 (r36142)
+++ trunk/gui/dialog/url.c Thu Apr 4 11:39:03 2013 (r36143)
@@ -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 @@ static void on_Button_pressed(GtkButton
(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 @@ static void on_Button_pressed(GtkButton
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 @@ static GtkWidget *CreateURLDialog(void)
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 @@ static GtkWidget *CreateURLDialog(void)
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 @@ void ShowURLDialog(void)
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);
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Apr 3 18:43:24 2013 (r36142)
+++ trunk/gui/interface.c Thu Apr 4 11:39:03 2013 (r36143)
@@ -68,7 +68,7 @@ guiInterface_t guiInfo = {
.PlaylistNext = True
};
-static int initialized;
+static int guiInitialized;
/* MPlayer -> GUI */
@@ -208,7 +208,7 @@ void guiInit(void)
mplayerLoadFont();
- initialized = True;
+ guiInitialized = True;
}
/**
@@ -216,7 +216,7 @@ void guiInit(void)
*/
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;
More information about the MPlayer-cvslog
mailing list