Mercurial > mplayer.hg
comparison gui/dialog/dialog.c @ 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 | 1562f350e8d2 |
comparison
equal
deleted
inserted
replaced
36048:e3e9b31b1088 | 36049:31f6a88593b3 |
---|---|
46 #define THRESHOLD 128 // transparency values equal to or above this will become | 46 #define THRESHOLD 128 // transparency values equal to or above this will become |
47 // opaque, all values below this will become transparent | 47 // opaque, all values below this will become transparent |
48 | 48 |
49 guiIcon_t guiIcon; | 49 guiIcon_t guiIcon; |
50 | 50 |
51 static const char gui_icon_name[] = "mplayer"; | 51 static const char guiIconName[] = "mplayer"; |
52 | 52 |
53 static GtkWidget *PopUpMenu; | 53 static GtkWidget *PopUpMenu; |
54 | 54 |
55 static int gtkInitialized; | 55 static int gtkInitialized; |
56 | 56 |
68 { | 68 { |
69 GdkPixbuf *pixbuf; | 69 GdkPixbuf *pixbuf; |
70 guchar *data; | 70 guchar *data; |
71 int csize, i; | 71 int csize, i; |
72 | 72 |
73 pixbuf = gtk_icon_theme_load_icon(theme, gui_icon_name, size, 0, NULL); | 73 pixbuf = gtk_icon_theme_load_icon(theme, guiIconName, size, 0, NULL); |
74 | 74 |
75 if (pixbuf) | 75 if (pixbuf) |
76 gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, gdk_colormap_get_system(), gdkIcon, gdkIconMask, THRESHOLD); | 76 gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, gdk_colormap_get_system(), gdkIcon, gdkIconMask, THRESHOLD); |
77 | 77 |
78 if (pixbuf && | 78 if (pixbuf && |
94 guiIcon.collection[i] = (uint32_t)(data[3] << 24) | AV_RB24(data); // RGBA -> ARGB | 94 guiIcon.collection[i] = (uint32_t)(data[3] << 24) | AV_RB24(data); // RGBA -> ARGB |
95 } | 95 } |
96 | 96 |
97 g_object_unref(pixbuf); | 97 g_object_unref(pixbuf); |
98 } else | 98 } else |
99 mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_ICONERROR, gui_icon_name, size); | 99 mp_msg(MSGT_GPLAYER, MSGL_WARN, MSGTR_ICONERROR, guiIconName, size); |
100 | 100 |
101 /* start up GTK which realizes the pixmaps */ | 101 /* start up GTK which realizes the pixmaps */ |
102 gtk_main_iteration_do(FALSE); | 102 gtk_main_iteration_do(FALSE); |
103 | 103 |
104 return (pixbuf != NULL); | 104 return (pixbuf != NULL); |