Mercurial > audlegacy
changeset 4414:2592487d149c
Automated merge with ssh://hg.atheme.org//hg/audacious
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 31 Mar 2008 09:21:02 +0300 |
parents | de33c83aa06f (diff) 98c45d6b0b7f (current diff) |
children | 2c3390afe10e |
files | src/audacious/main.h src/audacious/plugin.h |
diffstat | 44 files changed, 460 insertions(+), 443 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/audconfig.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/audconfig.c Mon Mar 31 09:21:02 2008 +0300 @@ -45,7 +45,7 @@ #include "audconfig.h" -BmpConfig bmp_default_config = { +AudConfig aud_default_config = { MAINWIN_DEFAULT_POS_X, /* mainwin x position */ MAINWIN_DEFAULT_POS_Y, /* mainwin y position */ EQUALIZER_DEFAULT_POS_X, /* equalizer x position */ @@ -181,23 +181,23 @@ FALSE, /* bypass dsp */ }; -typedef struct bmp_cfg_boolent_t { +typedef struct aud_cfg_boolent_t { char const *be_vname; gboolean *be_vloc; gboolean be_wrt; -} bmp_cfg_boolent; +} aud_cfg_boolent; -typedef struct bmp_cfg_nument_t { +typedef struct aud_cfg_nument_t { char const *ie_vname; gint *ie_vloc; gboolean ie_wrt; -} bmp_cfg_nument; +} aud_cfg_nument; -typedef struct bmp_cfg_strent_t { +typedef struct aud_cfg_strent_t { char const *se_vname; char **se_vloc; gboolean se_wrt; -} bmp_cfg_strent; +} aud_cfg_strent; /* XXX: case-sensitivity is bad for lazy nenolods. :( -nenolod */ @@ -213,7 +213,7 @@ }; -static bmp_cfg_boolent bmp_boolents[] = { +static aud_cfg_boolent aud_boolents[] = { {"allow_multiple_instances", &cfg.allow_multiple_instances, TRUE}, {"use_realtime", &cfg.use_realtime, TRUE}, {"always_show_cb", &cfg.always_show_cb, TRUE}, @@ -286,9 +286,9 @@ {"bypass_dsp", &cfg.bypass_dsp, TRUE}, }; -static gint ncfgbent = G_N_ELEMENTS(bmp_boolents); +static gint ncfgbent = G_N_ELEMENTS(aud_boolents); -static bmp_cfg_nument bmp_numents[] = { +static aud_cfg_nument aud_numents[] = { {"player_x", &cfg.player_x, TRUE}, {"player_y", &cfg.player_y, TRUE}, {"timer_mode", &cfg.timer_mode, TRUE}, @@ -329,9 +329,9 @@ #endif }; -static gint ncfgient = G_N_ELEMENTS(bmp_numents); +static gint ncfgient = G_N_ELEMENTS(aud_numents); -static bmp_cfg_strent bmp_strents[] = { +static aud_cfg_strent aud_strents[] = { {"playlist_font", &cfg.playlist_font, TRUE}, {"mainwin_font", &cfg.mainwin_font, TRUE}, {"eqpreset_default_file", &cfg.eqpreset_default_file, TRUE}, @@ -352,7 +352,7 @@ {"session_uri_base", &cfg.session_uri_base, TRUE} }; -static gint ncfgsent = G_N_ELEMENTS(bmp_strents); +static gint ncfgsent = G_N_ELEMENTS(aud_strents); static gboolean @@ -458,7 +458,7 @@ goto cleanup; } } - filename = g_build_filename(bmp_paths[BMP_PATH_PLAYLISTS_DIR], + filename = g_build_filename(aud_paths[BMP_PATH_PLAYLISTS_DIR], newbasename, NULL); g_free(newbasename); } while (g_file_test(filename, G_FILE_TEST_EXISTS)); @@ -472,43 +472,43 @@ void -bmp_config_free(void) +aud_config_free(void) { gint i; for (i = 0; i < ncfgsent; ++i) { - if ( *(bmp_strents[i].se_vloc) != NULL ) + if ( *(aud_strents[i].se_vloc) != NULL ) { - g_free( *(bmp_strents[i].se_vloc) ); - *(bmp_strents[i].se_vloc) = NULL; + g_free( *(aud_strents[i].se_vloc) ); + *(aud_strents[i].se_vloc) = NULL; } } } void -bmp_config_load(void) +aud_config_load(void) { ConfigDb *db; gint i, length; - memcpy(&cfg, &bmp_default_config, sizeof(BmpConfig)); + memcpy(&cfg, &aud_default_config, sizeof(AudConfig)); db = cfg_db_open(); for (i = 0; i < ncfgbent; ++i) { cfg_db_get_bool(db, NULL, - bmp_boolents[i].be_vname, - bmp_boolents[i].be_vloc); + aud_boolents[i].be_vname, + aud_boolents[i].be_vloc); } for (i = 0; i < ncfgient; ++i) { cfg_db_get_int(db, NULL, - bmp_numents[i].ie_vname, - bmp_numents[i].ie_vloc); + aud_numents[i].ie_vname, + aud_numents[i].ie_vloc); } for (i = 0; i < ncfgsent; ++i) { cfg_db_get_string(db, NULL, - bmp_strents[i].se_vname, - bmp_strents[i].se_vloc); + aud_strents[i].se_vname, + aud_strents[i].se_vloc); } /* Preset */ @@ -605,7 +605,7 @@ } void -bmp_config_save(void) +aud_config_save(void) { GList *node; gchar *str; @@ -620,16 +620,16 @@ db = cfg_db_open(); for (i = 0; i < ncfgbent; ++i) - if (bmp_boolents[i].be_wrt) + if (aud_boolents[i].be_wrt) cfg_db_set_bool(db, NULL, - bmp_boolents[i].be_vname, - *bmp_boolents[i].be_vloc); + aud_boolents[i].be_vname, + *aud_boolents[i].be_vloc); for (i = 0; i < ncfgient; ++i) - if (bmp_numents[i].ie_wrt) + if (aud_numents[i].ie_wrt) cfg_db_set_int(db, NULL, - bmp_numents[i].ie_vname, - *bmp_numents[i].ie_vloc); + aud_numents[i].ie_vname, + *aud_numents[i].ie_vloc); /* This is a bit lame .. it'll end up being written twice, * could do with being done a bit neater. -larne */ @@ -673,10 +673,10 @@ cfg.mainwin_use_bitmapfont); for (i = 0; i < ncfgsent; ++i) { - if (bmp_strents[i].se_wrt) + if (aud_strents[i].se_wrt) cfg_db_set_string(db, NULL, - bmp_strents[i].se_vname, - *bmp_strents[i].se_vloc); + aud_strents[i].se_vname, + *aud_strents[i].se_vloc); } cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); @@ -693,10 +693,10 @@ cfg_db_set_float(db, NULL, "scale_factor", cfg.scale_factor); - if (bmp_active_skin != NULL) + if (aud_active_skin != NULL) { - if (bmp_active_skin->path) - cfg_db_set_string(db, NULL, "skin", bmp_active_skin->path); + if (aud_active_skin->path) + cfg_db_set_string(db, NULL, "skin", aud_active_skin->path); else cfg_db_unset_key(db, NULL, "skin"); } @@ -759,12 +759,12 @@ cfg_db_close(db); - playlist_save(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); + playlist_save(playlist, aud_paths[BMP_PATH_PLAYLIST_FILE]); /* Save extra playlists that were loaded from PLAYLISTS_DIR */ saved = NULL; saved = g_list_prepend(saved, playlist); /* don't save default again */ - if(!dir_foreach(bmp_paths[BMP_PATH_PLAYLISTS_DIR], save_extra_playlist, + if(!dir_foreach(aud_paths[BMP_PATH_PLAYLISTS_DIR], save_extra_playlist, &saved, NULL)) { g_warning("Could not save extra playlists\n"); }
--- a/src/audacious/audconfig.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/audconfig.h Mon Mar 31 09:21:02 2008 +0300 @@ -26,7 +26,7 @@ #ifndef BMPCONFIG_H #define BMPCONFIG_H -struct _BmpConfig { +struct _AudConfig { gint player_x, player_y; gint equalizer_x, equalizer_y; gint playlist_x, playlist_y; @@ -135,13 +135,13 @@ gboolean bypass_dsp; }; -typedef struct _BmpConfig BmpConfig; +typedef struct _AudConfig AudConfig; -extern BmpConfig cfg; -extern BmpConfig bmp_default_config; +extern AudConfig cfg; +extern AudConfig aud_default_config; -void bmp_config_free(void); -void bmp_config_load(void); -void bmp_config_save(void); +void aud_config_free(void); +void aud_config_load(void); +void aud_config_save(void); #endif
--- a/src/audacious/auddrct.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/auddrct.c Mon Mar 31 09:21:02 2008 +0300 @@ -107,7 +107,7 @@ void drct_set_skin(gchar *skinfile) { if (has_x11_connection) - bmp_active_skin_load(skinfile); + aud_active_skin_load(skinfile); } void drct_activate(void)
--- a/src/audacious/dbus.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/dbus.c Mon Mar 31 09:21:02 2008 +0300 @@ -874,13 +874,13 @@ } gboolean audacious_rc_get_skin(RemoteObject *obj, gchar **skin, GError **error) { - *skin = g_strdup(bmp_active_skin->path); + *skin = g_strdup(aud_active_skin->path); return TRUE; } gboolean audacious_rc_set_skin(RemoteObject *obj, gchar *skin, GError **error) { if (has_x11_connection == TRUE) - bmp_active_skin_load(skin); + aud_active_skin_load(skin); return TRUE; }
--- a/src/audacious/dnd.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/dnd.c Mon Mar 31 09:21:02 2008 +0300 @@ -26,9 +26,9 @@ #include "dnd.h" void -bmp_drag_dest_set(GtkWidget *widget) +aud_drag_dest_set(GtkWidget *widget) { gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, - bmp_drop_types, 5, + aud_drop_types, 5, GDK_ACTION_COPY | GDK_ACTION_MOVE); }
--- a/src/audacious/dnd.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/dnd.h Mon Mar 31 09:21:02 2008 +0300 @@ -38,7 +38,7 @@ }; /* Drag data format listing for gtk_drag_dest_set() */ -static const GtkTargetEntry bmp_drop_types[] = { +static const GtkTargetEntry aud_drop_types[] = { {"text/plain", 0, BMP_DROP_PLAINTEXT}, {"text/uri-list", 0, BMP_DROP_URLENCODED}, {"STRING", 0, BMP_DROP_STRING}, @@ -46,6 +46,6 @@ {"application/x-font-ttf", 0, BMP_DROP_FONT}, }; -void bmp_drag_dest_set(GtkWidget*); +void aud_drag_dest_set(GtkWidget*); #endif
--- a/src/audacious/fft.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/fft.h Mon Mar 31 09:21:02 2008 +0300 @@ -21,11 +21,13 @@ /* fft.h: header for iterative implementation of a FFT */ -#ifndef FFT_H -#define FFT_H +#ifndef __AUDACIOUS_FFT_H__ +#define __AUDACIOUS_FFT_H__ #include <glib.h> +G_BEGIN_DECLS + #define FFT_BUFFER_SIZE_LOG 9 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) @@ -37,4 +39,6 @@ void fft_perform(const sound_sample * input, float *output, fft_state * state); void fft_close(fft_state * state); -#endif +G_END_DECLS + +#endif /* __AUDACIOUS_FFT_H__ */
--- a/src/audacious/images/audacious_eq.xpm Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/images/audacious_eq.xpm Mon Mar 31 09:21:02 2008 +0300 @@ -1,5 +1,5 @@ /* XPM */ -static char *bmp_eq_icon[] = { +static char *audacious_eq_icon[] = { /* columns rows colors chars-per-pixel */ "48 48 39 1", " c #e36d45",
--- a/src/audacious/images/audacious_playlist.xpm Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/images/audacious_playlist.xpm Mon Mar 31 09:21:02 2008 +0300 @@ -1,5 +1,5 @@ /* XPM */ -static char *bmp_playlist_icon[] = { +static char *audacious_playlist_icon[] = { /* columns rows colors chars-per-pixel */ "48 48 43 1", " c #e36e45",
--- a/src/audacious/logger.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/logger.c Mon Mar 31 09:21:02 2008 +0300 @@ -50,9 +50,9 @@ typedef struct _LogHandler LogHandler; -static FILE *bmp_log_file = NULL; +static FILE *aud_log_file = NULL; -G_LOCK_DEFINE_STATIC(bmp_log_file); +G_LOCK_DEFINE_STATIC(aud_log_file); static LogHandler log_handlers[] = { {NULL, LOG_ALL_LEVELS, 0}, @@ -93,7 +93,7 @@ return; } - G_LOCK(bmp_log_file); + G_LOCK(aud_log_file); if (domain) g_fprintf(file, "(%s) ", domain); @@ -105,11 +105,11 @@ fflush(file); - G_UNLOCK(bmp_log_file); + G_UNLOCK(aud_log_file); } gboolean -bmp_logger_start(const gchar * filename) +aud_logger_start(const gchar * filename) { guint i; @@ -117,11 +117,11 @@ /* truncate file when size limit is reached */ if (get_filesize(filename) < BMP_LOGGER_FILE_MAX_SIZE) - bmp_log_file = fopen(filename, "at"); + aud_log_file = fopen(filename, "at"); else - bmp_log_file = fopen(filename, "w+t"); + aud_log_file = fopen(filename, "w+t"); - if (!bmp_log_file) { + if (!aud_log_file) { g_printerr(_("Unable to create log file (%s)!\n"), filename); return FALSE; } @@ -129,7 +129,7 @@ for (i = 0; i < log_handler_count; i++) { log_handlers[i].id = g_log_set_handler(log_handlers[i].domain, log_handlers[i].level, - log_to_file, bmp_log_file); + log_to_file, aud_log_file); } g_message("\n** LOGGING STARTED AT %s", get_timestamp_str()); @@ -138,11 +138,11 @@ } void -bmp_logger_stop(void) +aud_logger_stop(void) { guint i; - if (!bmp_log_file) + if (!aud_log_file) return; g_message("\n** LOGGING STOPPED AT %s", get_timestamp_str()); @@ -150,6 +150,6 @@ for (i = 0; i < log_handler_count; i++) g_log_remove_handler(log_handlers[i].domain, log_handlers[i].id); - fclose(bmp_log_file); - bmp_log_file = NULL; + fclose(aud_log_file); + aud_log_file = NULL; }
--- a/src/audacious/logger.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/logger.h Mon Mar 31 09:21:02 2008 +0300 @@ -20,11 +20,12 @@ * Audacious or using our public API to be a derived work. */ -#ifndef LOGGER_H -#define LOGGER_H +#ifndef __AUDACIOUS_LOGGER_H__ +#define __AUDACIOUS_LOGGER_H__ #include <glib.h> +G_BEGIN_DECLS #define BMP_LOGGER_DEFAULT_LOG_LEVEL G_LOG_LEVEL_MESSAGE @@ -32,7 +33,9 @@ #define BMP_LOGGER_FILE_MAX_SIZE ((size_t)1 << 19) -gboolean bmp_logger_start(const gchar * filename); -void bmp_logger_stop(void); +gboolean aud_logger_start(const gchar * filename); +void aud_logger_stop(void); -#endif +G_END_DECLS + +#endif /* __AUDACIOUS_LOGGER_H__ */
--- a/src/audacious/main.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/main.c Mon Mar 31 09:21:02 2008 +0300 @@ -108,9 +108,9 @@ AudCmdLineOpt options; -BmpConfig cfg; +AudConfig cfg; -const gchar *bmp_titlestring_presets[] = { +const gchar *aud_titlestring_presets[] = { "${title}", "${?artist:${artist} - }${title}", "${?artist:${artist} - }${?album:${album} - }${title}", @@ -119,7 +119,7 @@ "${?album:${album} - }${title}" }; -const guint n_titlestring_presets = G_N_ELEMENTS(bmp_titlestring_presets); +const guint n_titlestring_presets = G_N_ELEMENTS(aud_titlestring_presets); const gchar *chardet_detector_presets[] = { N_("None"), @@ -138,7 +138,7 @@ }; const guint n_chardet_detector_presets = G_N_ELEMENTS(chardet_detector_presets); -gchar *bmp_paths[BMP_PATH_COUNT] = {}; +gchar *aud_paths[BMP_PATH_COUNT] = {}; GList *dock_window_list = NULL; @@ -192,37 +192,37 @@ guint titlestring_preset = cfg.titlestring_preset; if (titlestring_preset < n_titlestring_presets) - return bmp_titlestring_presets[titlestring_preset]; + return aud_titlestring_presets[titlestring_preset]; return cfg.gentitle_format; } static void -bmp_make_user_dir(void) +aud_make_user_dir(void) { const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; - make_directory(bmp_paths[BMP_PATH_USER_DIR], mode755); - make_directory(bmp_paths[BMP_PATH_USER_PLUGIN_DIR], mode755); - make_directory(bmp_paths[BMP_PATH_USER_SKIN_DIR], mode755); - make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); - make_directory(bmp_paths[BMP_PATH_PLAYLISTS_DIR], mode755); + make_directory(aud_paths[BMP_PATH_USER_DIR], mode755); + make_directory(aud_paths[BMP_PATH_USER_PLUGIN_DIR], mode755); + make_directory(aud_paths[BMP_PATH_USER_SKIN_DIR], mode755); + make_directory(aud_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); + make_directory(aud_paths[BMP_PATH_PLAYLISTS_DIR], mode755); } static void -bmp_free_paths(void) +aud_free_paths(void) { int i; for (i = 0; i < BMP_PATH_COUNT; i++) { - g_free(bmp_paths[i]); - bmp_paths[i] = 0; + g_free(aud_paths[i]); + aud_paths[i] = 0; } } static void -bmp_init_paths() +aud_init_paths() { char *xdg_config_home; char *xdg_data_home; @@ -238,48 +238,48 @@ ? g_build_filename(g_get_home_dir(), ".cache", NULL) : g_strdup(getenv("XDG_CACHE_HOME"))); - bmp_paths[BMP_PATH_USER_DIR] = + aud_paths[BMP_PATH_USER_DIR] = g_build_filename(xdg_config_home, "audacious", NULL); - bmp_paths[BMP_PATH_USER_SKIN_DIR] = + aud_paths[BMP_PATH_USER_SKIN_DIR] = g_build_filename(xdg_data_home, "audacious", "Skins", NULL); - bmp_paths[BMP_PATH_USER_PLUGIN_DIR] = + aud_paths[BMP_PATH_USER_PLUGIN_DIR] = g_build_filename(xdg_data_home, "audacious", "Plugins", NULL); - bmp_paths[BMP_PATH_SKIN_THUMB_DIR] = + aud_paths[BMP_PATH_SKIN_THUMB_DIR] = g_build_filename(xdg_cache_home, "audacious", "thumbs", NULL); - bmp_paths[BMP_PATH_PLAYLISTS_DIR] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "playlists", NULL); + aud_paths[BMP_PATH_PLAYLISTS_DIR] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "playlists", NULL); - bmp_paths[BMP_PATH_CONFIG_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "config", NULL); + aud_paths[BMP_PATH_CONFIG_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "config", NULL); #ifdef HAVE_XSPF_PLAYLIST - bmp_paths[BMP_PATH_PLAYLIST_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], + aud_paths[BMP_PATH_PLAYLIST_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "playlist.xspf", NULL); #else - bmp_paths[BMP_PATH_PLAYLIST_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], + aud_paths[BMP_PATH_PLAYLIST_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "playlist.m3u", NULL); #endif - bmp_paths[BMP_PATH_ACCEL_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "accels", NULL); - bmp_paths[BMP_PATH_LOG_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "log", NULL); + aud_paths[BMP_PATH_ACCEL_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "accels", NULL); + aud_paths[BMP_PATH_LOG_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "log", NULL); - bmp_paths[BMP_PATH_GTKRC_FILE] = - g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "gtkrc", NULL); + aud_paths[BMP_PATH_GTKRC_FILE] = + g_build_filename(aud_paths[BMP_PATH_USER_DIR], "gtkrc", NULL); g_free(xdg_config_home); g_free(xdg_data_home); g_free(xdg_cache_home); - g_atexit(bmp_free_paths); + g_atexit(aud_free_paths); } static void -bmp_set_default_icon(void) +aud_set_default_icon(void) { GdkPixbuf *icon; @@ -599,12 +599,12 @@ } static void -bmp_setup_logger(void) +aud_setup_logger(void) { - if (!bmp_logger_start(bmp_paths[BMP_PATH_LOG_FILE])) + if (!aud_logger_start(aud_paths[BMP_PATH_LOG_FILE])) return; - g_atexit(bmp_logger_stop); + g_atexit(aud_logger_stop); } static void @@ -713,17 +713,17 @@ #ifndef _WIN32 egg_set_desktop_file(AUDACIOUS_DESKTOP_FILE); #endif - bmp_init_paths(); - bmp_make_user_dir(); + aud_init_paths(); + aud_make_user_dir(); cond_scan = g_cond_new(); mutex_scan = g_mutex_new(); - gtk_rc_add_default_file(bmp_paths[BMP_PATH_GTKRC_FILE]); + gtk_rc_add_default_file(aud_paths[BMP_PATH_GTKRC_FILE]); parse_cmd_line_options(&argc, &argv); if (options.no_log == FALSE) - bmp_setup_logger(); + aud_setup_logger(); if (!gtk_init_check(&argc, &argv) && options.headless == FALSE) { /* GTK check failed, and no arguments passed to indicate @@ -736,7 +736,7 @@ g_random_set_seed(time(NULL)); SAD_dither_init_rand((gint32)time(NULL)); - bmp_config_load(); + aud_config_load(); signal_handlers_init(); mowgli_init(); @@ -761,11 +761,11 @@ /* Initialize the playlist system. */ playlist_init(); playlist = playlist_get_active(); - playlist_load(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); + playlist_load(playlist, aud_paths[BMP_PATH_PLAYLIST_FILE]); playlist_set_position(playlist, cfg.playlist_position); /* Load extra playlists */ - if (!dir_foreach(bmp_paths[BMP_PATH_PLAYLISTS_DIR], load_extra_playlist, + if (!dir_foreach(aud_paths[BMP_PATH_PLAYLISTS_DIR], load_extra_playlist, playlist, NULL)) g_warning("Could not load extra playlists\n"); @@ -779,12 +779,12 @@ if (options.headless == FALSE) { - bmp_set_default_icon(); + aud_set_default_icon(); #ifdef GDK_WINDOWING_QUARTZ set_dock_icon(); #endif - gtk_accel_map_load(bmp_paths[BMP_PATH_ACCEL_FILE]); + gtk_accel_map_load(aud_paths[BMP_PATH_ACCEL_FILE]); if (!init_skins(cfg.skin)) { run_load_skin_error_dialog(cfg.skin);
--- a/src/audacious/main.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/main.h Mon Mar 31 09:21:02 2008 +0300 @@ -23,8 +23,8 @@ * Audacious or using our public API to be a derived work. */ -#ifndef AUD_MAIN_H -#define AUD_MAIN_H +#ifndef __AUDACIOUS_MAIN_H__ +#define __AUDACIOUS_MAIN_H__ #ifdef _AUDACIOUS_CORE # include "ui_main.h" @@ -74,9 +74,9 @@ BMP_PATH_COUNT }; -extern gchar *bmp_paths[]; +extern gchar *aud_paths[]; -extern const gchar *bmp_titlestring_presets[]; +extern const gchar *aud_titlestring_presets[]; extern const guint n_titlestring_presets; extern const gchar *chardet_detector_presets[]; @@ -94,4 +94,4 @@ G_END_DECLS -#endif +#endif /* __AUDACIOUS_MAIN_H__ */
--- a/src/audacious/playlist.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/playlist.c Mon Mar 31 09:21:02 2008 +0300 @@ -2649,7 +2649,7 @@ } else /* not on_demand and not on_load... - NOTE: this shouldn't happen anymore, sanity check in bmp_config_load now */ + NOTE: this shouldn't happen anymore, sanity check in aud_config_load now */ { g_mutex_lock(mutex_scan); playlist_get_info_scan_active = FALSE;
--- a/src/audacious/plugin.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/plugin.h Mon Mar 31 09:21:02 2008 +0300 @@ -32,8 +32,8 @@ * SUCH DAMAGE. */ -#ifndef AUD_PLUGIN_H -#define AUD_PLUGIN_H +#ifndef __AUDACIOUS_PLUGIN_H__ +#define __AUDACIOUS_PLUGIN_H__ #include <glib.h> #include <gtk/gtk.h> @@ -513,7 +513,7 @@ /* state vars */ InputPluginData *ip_state; - BmpConfig *_cfg; + AudConfig *_cfg; /* hook API */ void (*hook_register)(const gchar *name); @@ -691,19 +691,19 @@ #define aud_vfs_fget_be64 _audvt->vfs_fget_be64 /* XXX: deprecation warnings */ -#define bmp_cfg_db_open _audvt->cfg_db_open -#define bmp_cfg_db_close _audvt->cfg_db_close -#define bmp_cfg_db_set_string _audvt->cfg_db_set_string -#define bmp_cfg_db_set_int _audvt->cfg_db_set_int -#define bmp_cfg_db_set_bool _audvt->cfg_db_set_bool -#define bmp_cfg_db_set_float _audvt->cfg_db_set_float -#define bmp_cfg_db_set_double _audvt->cfg_db_set_double -#define bmp_cfg_db_get_string _audvt->cfg_db_get_string -#define bmp_cfg_db_get_int _audvt->cfg_db_get_int -#define bmp_cfg_db_get_bool _audvt->cfg_db_get_bool -#define bmp_cfg_db_get_float _audvt->cfg_db_get_float -#define bmp_cfg_db_get_double _audvt->cfg_db_get_double -#define bmp_cfg_db_unset_key _audvt->cfg_db_unset_key +#define aud_cfg_db_open _audvt->cfg_db_open +#define aud_cfg_db_close _audvt->cfg_db_close +#define aud_cfg_db_set_string _audvt->cfg_db_set_string +#define aud_cfg_db_set_int _audvt->cfg_db_set_int +#define aud_cfg_db_set_bool _audvt->cfg_db_set_bool +#define aud_cfg_db_set_float _audvt->cfg_db_set_float +#define aud_cfg_db_set_double _audvt->cfg_db_set_double +#define aud_cfg_db_get_string _audvt->cfg_db_get_string +#define aud_cfg_db_get_int _audvt->cfg_db_get_int +#define aud_cfg_db_get_bool _audvt->cfg_db_get_bool +#define aud_cfg_db_get_float _audvt->cfg_db_get_float +#define aud_cfg_db_get_double _audvt->cfg_db_get_double +#define aud_cfg_db_unset_key _audvt->cfg_db_unset_key #define aud_cfg_db_open _audvt->cfg_db_open #define aud_cfg_db_close _audvt->cfg_db_close @@ -1205,4 +1205,4 @@ /* undefine the macro -- struct Plugin should be used instead. */ #undef PLUGIN_COMMON_FIELDS -#endif +#endif /* __AUDACIOUS_PLUGIN_H__ */
--- a/src/audacious/pluginenum.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/pluginenum.c Mon Mar 31 09:21:02 2008 +0300 @@ -832,7 +832,7 @@ ext_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); #ifndef DISABLE_USER_PLUGIN_DIR - scan_plugins(bmp_paths[BMP_PATH_USER_PLUGIN_DIR]); + scan_plugins(aud_paths[BMP_PATH_USER_PLUGIN_DIR]); /* * This is in a separate lo * DiscoveryPlugin *dpop so if the user puts them in the @@ -840,7 +840,7 @@ * first) - Zinx */ while (plugin_dir_list[dirsel]) { - dir = g_build_filename(bmp_paths[BMP_PATH_USER_PLUGIN_DIR], + dir = g_build_filename(aud_paths[BMP_PATH_USER_PLUGIN_DIR], plugin_dir_list[dirsel++], NULL); scan_plugins(dir); g_free(dir);
--- a/src/audacious/signals.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/signals.c Mon Mar 31 09:21:02 2008 +0300 @@ -77,7 +77,7 @@ g_critical("Received SIGSEGV -- Audacious has crashed."); - bmp_config_save(); + aud_config_save(); abort(); } @@ -260,7 +260,7 @@ signal_session_save_cb(EggSMClient *client, const char *state_dir, gpointer user_data) { g_print("Session save requested. Saving state.\n"); - bmp_config_save(); + aud_config_save(); } void
--- a/src/audacious/skin.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/skin.c Mon Mar 31 09:21:02 2008 +0300 @@ -75,7 +75,7 @@ typedef struct _SkinMaskInfo SkinMaskInfo; -Skin *bmp_active_skin = NULL; +Skin *aud_active_skin = NULL; static gint skin_current_num; @@ -155,19 +155,19 @@ } gboolean -bmp_active_skin_reload(void) +aud_active_skin_reload(void) { AUDDBG("\n"); - return bmp_active_skin_load(bmp_active_skin->path); + return aud_active_skin_load(aud_active_skin->path); } gboolean -bmp_active_skin_load(const gchar * path) +aud_active_skin_load(const gchar * path) { AUDDBG("%s\n", path); - g_return_val_if_fail(bmp_active_skin != NULL, FALSE); + g_return_val_if_fail(aud_active_skin != NULL, FALSE); - if (!skin_load(bmp_active_skin, path)) { + if (!skin_load(aud_active_skin, path)) { AUDDBG("loading failed\n"); return FALSE; } @@ -179,7 +179,7 @@ playlistwin_update_list(playlist_get_active()); SkinPixmap *pixmap; - pixmap = &bmp_active_skin->pixmaps[SKIN_POSBAR]; + pixmap = &aud_active_skin->pixmaps[SKIN_POSBAR]; /* last 59 pixels of SKIN_POSBAR are knobs (normal and selected) */ gtk_widget_set_size_request(mainwin_position, pixmap->width - 59, pixmap->height); @@ -516,9 +516,9 @@ gboolean init_skins(const gchar * path) { - bmp_active_skin = skin_new(); + aud_active_skin = skin_new(); - skin_parse_hints(bmp_active_skin, NULL); + skin_parse_hints(aud_active_skin, NULL); /* create the windows if they haven't been created yet, needed for bootstrapping */ if (mainwin == NULL) @@ -528,14 +528,14 @@ playlistwin_create(); } - if (!bmp_active_skin_load(path)) { + if (!aud_active_skin_load(path)) { if (path != NULL) AUDDBG("Unable to load skin (%s), trying default...\n", path); else AUDDBG("Skin not defined: trying default...\n"); /* can't load configured skin, retry with default */ - if (!bmp_active_skin_load(BMP_DEFAULT_SKIN_PATH)) { + if (!aud_active_skin_load(BMP_DEFAULT_SKIN_PATH)) { AUDDBG("Unable to load default skin (%s)! Giving up.\n", BMP_DEFAULT_SKIN_PATH); return FALSE; @@ -550,7 +550,7 @@ void cleanup_skins() { - skin_destroy(bmp_active_skin); + skin_destroy(aud_active_skin); } @@ -1600,8 +1600,8 @@ if(archive) del_directory(skin_path); g_free(skin_path); - gtk_widget_shape_combine_mask(mainwin, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); - gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); + gtk_widget_shape_combine_mask(mainwin, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); + gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); return TRUE; } @@ -1614,10 +1614,10 @@ g_return_if_fail(path != NULL); command = g_strdup_printf("cp %s %s", - path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); + path, aud_paths[BMP_PATH_USER_SKIN_DIR]); if (system(command)) { AUDDBG("Unable to install skin (%s) into user directory (%s)\n", - path, bmp_paths[BMP_PATH_USER_SKIN_DIR]); + path, aud_paths[BMP_PATH_USER_SKIN_DIR]); } g_free(command); } @@ -1681,9 +1681,9 @@ gboolean error; AUDDBG("\n"); - skin_lock(bmp_active_skin); - error = skin_load_nolock(bmp_active_skin, bmp_active_skin->path, TRUE); - skin_unlock(bmp_active_skin); + skin_lock(aud_active_skin); + error = skin_load_nolock(aud_active_skin, aud_active_skin->path, TRUE); + skin_unlock(aud_active_skin); return error; } @@ -1801,7 +1801,7 @@ return; } /* let's copy what's under widget */ - gdk_pixbuf_copy_area(skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixbuf, + gdk_pixbuf_copy_area(skin_get_pixmap(aud_active_skin, SKIN_MAIN)->pixbuf, x, y, width, height, pix, xdest, ydest); /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */ @@ -2052,7 +2052,7 @@ } skin_draw_pixbuf(NULL, skin, pix, SKIN_TITLEBAR, 27, y_offset, - 0, 0, bmp_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT); + 0, 0, aud_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT); } @@ -2065,5 +2065,5 @@ /* Get a random value to select the skin to use */ randval = g_random_int_range(0, g_list_length(skinlist)); node = g_list_nth(skinlist, randval)->data; - bmp_active_skin_load(node->path); + aud_active_skin_load(node->path); }
--- a/src/audacious/skin.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/skin.h Mon Mar 31 09:21:02 2008 +0300 @@ -199,13 +199,13 @@ SkinProperties properties; } Skin; -extern Skin *bmp_active_skin; +extern Skin *aud_active_skin; gboolean init_skins(const gchar * path); void cleanup_skins(void); -gboolean bmp_active_skin_load(const gchar * path); -gboolean bmp_active_skin_reload(void); +gboolean aud_active_skin_load(const gchar * path); +gboolean aud_active_skin_reload(void); Skin *skin_new(void); gboolean skin_load(Skin * skin, const gchar * path);
--- a/src/audacious/strings.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/strings.h Mon Mar 31 09:21:02 2008 +0300 @@ -23,11 +23,13 @@ * Audacious or using our public API to be a derived work. */ -#ifndef AUD_STRINGS_H -#define AUD_STRINGS_H +#ifndef __AUDACIOUS_STRINGS_H__ +#define __AUDACIOUS_STRINGS_H__ #include <glib.h> +G_BEGIN_DECLS + gchar *escape_shell_chars(const gchar * string); gchar *str_append(gchar * str, const gchar * add_str); @@ -54,4 +56,6 @@ gsize *arg_bytes_read, gsize *arg_bytes_write, GError **arg_error); -#endif +G_END_DECLS + +#endif /* __AUDACIOUS_STRINGS_H__ */
--- a/src/audacious/tuple.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/tuple.h Mon Mar 31 09:21:02 2008 +0300 @@ -24,6 +24,7 @@ #include <glib.h> #include <mowgli.h> +G_BEGIN_DECLS enum { FIELD_ARTIST = 0, @@ -100,4 +101,6 @@ gint tuple_get_int(Tuple *tuple, const gint nfield, const gchar *field); #define tuple_free(x) mowgli_object_unref(x); -#endif +G_END_DECLS + +#endif /* __AUDACIOUS_TUPLE_H__ */
--- a/src/audacious/tuple_compiler.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/tuple_compiler.h Mon Mar 31 09:21:02 2008 +0300 @@ -108,4 +108,4 @@ TupleEvalNode *tuple_formatter_compile(TupleEvalContext *ctx, gchar *expr); gchar *tuple_formatter_eval(TupleEvalContext *ctx, TupleEvalNode *expr, Tuple *tuple); -#endif +#endif /* __AUDACIOUS_TUPLE_COMPILER_H__ */
--- a/src/audacious/ui_equalizer.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_equalizer.c Mon Mar 31 09:21:02 2008 +0300 @@ -137,7 +137,7 @@ GtkWidget *child = child_data->widget; g_signal_emit_by_name(child, "toggle-scaled"); } - gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); + gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); } void @@ -166,7 +166,7 @@ gtk_widget_hide(equalizerwin_balance); } - gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); + gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); } static void @@ -323,7 +323,7 @@ /* START mod: add check for the default presets locate in system path ({prefix}/share/audacious) by Massimo Cavalleri (submax) */ - filename = g_build_filename(bmp_paths[BMP_PATH_USER_DIR], basename, NULL); + filename = g_build_filename(aud_paths[BMP_PATH_USER_DIR], basename, NULL); if ((rcfile = aud_rcfile_open(filename)) == NULL) { g_free(filename); @@ -531,7 +531,7 @@ GTK_WINDOW(mainwin)); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(equalizerwin), TRUE); - icon = gdk_pixbuf_new_from_xpm_data((const gchar **) bmp_eq_icon); + icon = gdk_pixbuf_new_from_xpm_data((const gchar **) audacious_eq_icon); gtk_window_set_icon(GTK_WINDOW(equalizerwin), icon); g_object_unref(icon); @@ -660,7 +660,7 @@ } } - filename = g_build_filename(bmp_paths[BMP_PATH_USER_DIR], basename, NULL); + filename = g_build_filename(aud_paths[BMP_PATH_USER_DIR], basename, NULL); aud_rcfile_write(rcfile, filename); aud_rcfile_free(rcfile); g_free(filename); @@ -853,7 +853,7 @@ } static void -equalizerwin_read_bmp_preset(RcFile * rcfile) +equalizerwin_read_aud_preset(RcFile * rcfile) { gfloat val; gint i; @@ -1019,7 +1019,7 @@ RcFile *rcfile; if ((rcfile = aud_rcfile_open(filename)) != NULL) { - equalizerwin_read_bmp_preset(rcfile); + equalizerwin_read_aud_preset(rcfile); aud_rcfile_free(rcfile); } } @@ -1246,7 +1246,7 @@ if (strlen(cfg.eqpreset_extension) > 0 && (rcfile = aud_rcfile_open(presetfilename)) != NULL) { g_free(presetfilename); - equalizerwin_read_bmp_preset(rcfile); + equalizerwin_read_aud_preset(rcfile); aud_rcfile_free(rcfile); return; } @@ -1261,7 +1261,7 @@ /* Try to find a per directory preset file */ if (strlen(cfg.eqpreset_default_file) > 0 && (rcfile = aud_rcfile_open(presetfilename)) != NULL) { - equalizerwin_read_bmp_preset(rcfile); + equalizerwin_read_aud_preset(rcfile); aud_rcfile_free(rcfile); } else if (!equalizerwin_load_preset
--- a/src/audacious/ui_main.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_main.c Mon Mar 31 09:21:02 2008 +0300 @@ -240,15 +240,15 @@ dock_shade(dock_window_list, GTK_WINDOW(mainwin), MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR); } else { - gint height = !bmp_active_skin->properties.mainwin_height ? MAINWIN_HEIGHT : - bmp_active_skin->properties.mainwin_height; + gint height = !aud_active_skin->properties.mainwin_height ? MAINWIN_HEIGHT : + aud_active_skin->properties.mainwin_height; dock_shade(dock_window_list, GTK_WINDOW(mainwin), height * MAINWIN_SCALE_FACTOR); } mainwin_refresh_hints(); ui_skinned_set_push_button_data(mainwin_shade, 0, cfg.player_shaded ? 27 : 18, 9, cfg.player_shaded ? 27 : 18); - gtk_widget_shape_combine_mask(mainwin, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); + gtk_widget_shape_combine_mask(mainwin, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); } static void @@ -379,8 +379,8 @@ if (mainwin_timeout_id) g_source_remove(mainwin_timeout_id); - bmp_config_save(); - gtk_accel_map_save(bmp_paths[BMP_PATH_ACCEL_FILE]); + aud_config_save(); + gtk_accel_map_save(aud_paths[BMP_PATH_ACCEL_FILE]); plugin_system_cleanup(); @@ -433,11 +433,11 @@ mainwin_lock_info_text(const gchar * text) { if (mainwin_info_text_locked != TRUE) - mainwin_tb_old_text = g_strdup(bmp_active_skin->properties.mainwin_othertext_is_status ? + mainwin_tb_old_text = g_strdup(aud_active_skin->properties.mainwin_othertext_is_status ? UI_SKINNED_TEXTBOX(mainwin_othertext)->text : UI_SKINNED_TEXTBOX(mainwin_info)->text); mainwin_info_text_locked = TRUE; - if (bmp_active_skin->properties.mainwin_othertext_is_status) + if (aud_active_skin->properties.mainwin_othertext_is_status) ui_skinned_textbox_set_text(mainwin_othertext, text); else ui_skinned_textbox_set_text(mainwin_info, text); @@ -450,7 +450,7 @@ if (mainwin_tb_old_text != NULL) { - if (bmp_active_skin->properties.mainwin_othertext_is_status) + if (aud_active_skin->properties.mainwin_othertext_is_status) ui_skinned_textbox_set_text(mainwin_othertext, mainwin_tb_old_text); else ui_skinned_textbox_set_text(mainwin_info, mainwin_tb_old_text); @@ -480,32 +480,32 @@ static void mainwin_refresh_visible(void) { - if (!bmp_active_skin || !cfg.player_visible) + if (!aud_active_skin || !cfg.player_visible) return; gtk_widget_show_all(mainwin); - if (!bmp_active_skin->properties.mainwin_text_visible) + if (!aud_active_skin->properties.mainwin_text_visible) gtk_widget_hide(mainwin_info); - if (!bmp_active_skin->properties.mainwin_vis_visible) + if (!aud_active_skin->properties.mainwin_vis_visible) gtk_widget_hide(mainwin_vis); - if (!bmp_active_skin->properties.mainwin_menurow_visible) + if (!aud_active_skin->properties.mainwin_menurow_visible) gtk_widget_hide(mainwin_menurow); - if (bmp_active_skin->properties.mainwin_othertext) { + if (aud_active_skin->properties.mainwin_othertext) { gtk_widget_hide(mainwin_rate_text); gtk_widget_hide(mainwin_freq_text); gtk_widget_hide(mainwin_monostereo); - if (!bmp_active_skin->properties.mainwin_othertext_visible) + if (!aud_active_skin->properties.mainwin_othertext_visible) gtk_widget_hide(mainwin_othertext); } else { gtk_widget_hide(mainwin_othertext); } - if (!bmp_active_skin->properties.mainwin_vis_visible) + if (!aud_active_skin->properties.mainwin_vis_visible) gtk_widget_hide(mainwin_vis); if (!playback_get_playing()) { @@ -560,129 +560,129 @@ mainwin_refresh_hints(void) { /* positioning and size attributes */ - if (bmp_active_skin->properties.mainwin_vis_x && bmp_active_skin->properties.mainwin_vis_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_vis), bmp_active_skin->properties.mainwin_vis_x, - bmp_active_skin->properties.mainwin_vis_y); - - if (bmp_active_skin->properties.mainwin_vis_width) - gtk_widget_set_size_request(mainwin_vis, bmp_active_skin->properties.mainwin_vis_width * MAINWIN_SCALE_FACTOR, + if (aud_active_skin->properties.mainwin_vis_x && aud_active_skin->properties.mainwin_vis_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_vis), aud_active_skin->properties.mainwin_vis_x, + aud_active_skin->properties.mainwin_vis_y); + + if (aud_active_skin->properties.mainwin_vis_width) + gtk_widget_set_size_request(mainwin_vis, aud_active_skin->properties.mainwin_vis_width * MAINWIN_SCALE_FACTOR, UI_VIS(mainwin_vis)->height* MAINWIN_SCALE_FACTOR); - if (bmp_active_skin->properties.mainwin_text_x && bmp_active_skin->properties.mainwin_text_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_info), bmp_active_skin->properties.mainwin_text_x, - bmp_active_skin->properties.mainwin_text_y); - - if (bmp_active_skin->properties.mainwin_text_width) { - UI_SKINNED_TEXTBOX(mainwin_info)->width = bmp_active_skin->properties.mainwin_text_width; - gtk_widget_set_size_request(mainwin_info, bmp_active_skin->properties.mainwin_text_width * MAINWIN_SCALE_FACTOR, + if (aud_active_skin->properties.mainwin_text_x && aud_active_skin->properties.mainwin_text_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_info), aud_active_skin->properties.mainwin_text_x, + aud_active_skin->properties.mainwin_text_y); + + if (aud_active_skin->properties.mainwin_text_width) { + UI_SKINNED_TEXTBOX(mainwin_info)->width = aud_active_skin->properties.mainwin_text_width; + gtk_widget_set_size_request(mainwin_info, aud_active_skin->properties.mainwin_text_width * MAINWIN_SCALE_FACTOR, UI_SKINNED_TEXTBOX(mainwin_info)->height * MAINWIN_SCALE_FACTOR ); } - if (bmp_active_skin->properties.mainwin_infobar_x && bmp_active_skin->properties.mainwin_infobar_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_othertext), bmp_active_skin->properties.mainwin_infobar_x, - bmp_active_skin->properties.mainwin_infobar_y); - - if (bmp_active_skin->properties.mainwin_number_0_x && bmp_active_skin->properties.mainwin_number_0_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_minus_num), bmp_active_skin->properties.mainwin_number_0_x, - bmp_active_skin->properties.mainwin_number_0_y); - - if (bmp_active_skin->properties.mainwin_number_1_x && bmp_active_skin->properties.mainwin_number_1_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_10min_num), bmp_active_skin->properties.mainwin_number_1_x, - bmp_active_skin->properties.mainwin_number_1_y); - - if (bmp_active_skin->properties.mainwin_number_2_x && bmp_active_skin->properties.mainwin_number_2_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_min_num), bmp_active_skin->properties.mainwin_number_2_x, - bmp_active_skin->properties.mainwin_number_2_y); - - if (bmp_active_skin->properties.mainwin_number_3_x && bmp_active_skin->properties.mainwin_number_3_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_10sec_num), bmp_active_skin->properties.mainwin_number_3_x, - bmp_active_skin->properties.mainwin_number_3_y); - - if (bmp_active_skin->properties.mainwin_number_4_x && bmp_active_skin->properties.mainwin_number_4_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_sec_num), bmp_active_skin->properties.mainwin_number_4_x, - bmp_active_skin->properties.mainwin_number_4_y); - - if (bmp_active_skin->properties.mainwin_playstatus_x && bmp_active_skin->properties.mainwin_playstatus_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), mainwin_playstatus, bmp_active_skin->properties.mainwin_playstatus_x, - bmp_active_skin->properties.mainwin_playstatus_y); - - if (bmp_active_skin->properties.mainwin_volume_x && bmp_active_skin->properties.mainwin_volume_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_volume), bmp_active_skin->properties.mainwin_volume_x, - bmp_active_skin->properties.mainwin_volume_y); - - if (bmp_active_skin->properties.mainwin_balance_x && bmp_active_skin->properties.mainwin_balance_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_balance), bmp_active_skin->properties.mainwin_balance_x, - bmp_active_skin->properties.mainwin_balance_y); - - if (bmp_active_skin->properties.mainwin_position_x && bmp_active_skin->properties.mainwin_position_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_position), bmp_active_skin->properties.mainwin_position_x, - bmp_active_skin->properties.mainwin_position_y); - - if (bmp_active_skin->properties.mainwin_previous_x && bmp_active_skin->properties.mainwin_previous_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), mainwin_rew, bmp_active_skin->properties.mainwin_previous_x, - bmp_active_skin->properties.mainwin_previous_y); - - if (bmp_active_skin->properties.mainwin_play_x && bmp_active_skin->properties.mainwin_play_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_play), bmp_active_skin->properties.mainwin_play_x, - bmp_active_skin->properties.mainwin_play_y); - - if (bmp_active_skin->properties.mainwin_pause_x && bmp_active_skin->properties.mainwin_pause_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_pause), bmp_active_skin->properties.mainwin_pause_x, - bmp_active_skin->properties.mainwin_pause_y); - - if (bmp_active_skin->properties.mainwin_stop_x && bmp_active_skin->properties.mainwin_stop_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_stop), bmp_active_skin->properties.mainwin_stop_x, - bmp_active_skin->properties.mainwin_stop_y); - - if (bmp_active_skin->properties.mainwin_next_x && bmp_active_skin->properties.mainwin_next_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_fwd), bmp_active_skin->properties.mainwin_next_x, - bmp_active_skin->properties.mainwin_next_y); - - if (bmp_active_skin->properties.mainwin_eject_x && bmp_active_skin->properties.mainwin_eject_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_eject), bmp_active_skin->properties.mainwin_eject_x, - bmp_active_skin->properties.mainwin_eject_y); - - if (bmp_active_skin->properties.mainwin_eqbutton_x && bmp_active_skin->properties.mainwin_eqbutton_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_eq), bmp_active_skin->properties.mainwin_eqbutton_x, - bmp_active_skin->properties.mainwin_eqbutton_y); - - if (bmp_active_skin->properties.mainwin_plbutton_x && bmp_active_skin->properties.mainwin_plbutton_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_pl), bmp_active_skin->properties.mainwin_plbutton_x, - bmp_active_skin->properties.mainwin_plbutton_y); - - if (bmp_active_skin->properties.mainwin_shuffle_x && bmp_active_skin->properties.mainwin_shuffle_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_shuffle), bmp_active_skin->properties.mainwin_shuffle_x, - bmp_active_skin->properties.mainwin_shuffle_y); - - if (bmp_active_skin->properties.mainwin_repeat_x && bmp_active_skin->properties.mainwin_repeat_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_repeat), bmp_active_skin->properties.mainwin_repeat_x, - bmp_active_skin->properties.mainwin_repeat_y); - - if (bmp_active_skin->properties.mainwin_about_x && bmp_active_skin->properties.mainwin_about_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_about), bmp_active_skin->properties.mainwin_about_x, - bmp_active_skin->properties.mainwin_about_y); - - if (bmp_active_skin->properties.mainwin_minimize_x && bmp_active_skin->properties.mainwin_minimize_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_minimize), cfg.player_shaded ? 244 : bmp_active_skin->properties.mainwin_minimize_x, - cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_minimize_y); - - if (bmp_active_skin->properties.mainwin_shade_x && bmp_active_skin->properties.mainwin_shade_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_shade), cfg.player_shaded ? 254 : bmp_active_skin->properties.mainwin_shade_x, - cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_shade_y); - - if (bmp_active_skin->properties.mainwin_close_x && bmp_active_skin->properties.mainwin_close_y) - gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_close), cfg.player_shaded ? 264 : bmp_active_skin->properties.mainwin_close_x, - cfg.player_shaded ? 3 : bmp_active_skin->properties.mainwin_close_y); + if (aud_active_skin->properties.mainwin_infobar_x && aud_active_skin->properties.mainwin_infobar_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_othertext), aud_active_skin->properties.mainwin_infobar_x, + aud_active_skin->properties.mainwin_infobar_y); + + if (aud_active_skin->properties.mainwin_number_0_x && aud_active_skin->properties.mainwin_number_0_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_minus_num), aud_active_skin->properties.mainwin_number_0_x, + aud_active_skin->properties.mainwin_number_0_y); + + if (aud_active_skin->properties.mainwin_number_1_x && aud_active_skin->properties.mainwin_number_1_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_10min_num), aud_active_skin->properties.mainwin_number_1_x, + aud_active_skin->properties.mainwin_number_1_y); + + if (aud_active_skin->properties.mainwin_number_2_x && aud_active_skin->properties.mainwin_number_2_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_min_num), aud_active_skin->properties.mainwin_number_2_x, + aud_active_skin->properties.mainwin_number_2_y); + + if (aud_active_skin->properties.mainwin_number_3_x && aud_active_skin->properties.mainwin_number_3_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_10sec_num), aud_active_skin->properties.mainwin_number_3_x, + aud_active_skin->properties.mainwin_number_3_y); + + if (aud_active_skin->properties.mainwin_number_4_x && aud_active_skin->properties.mainwin_number_4_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_sec_num), aud_active_skin->properties.mainwin_number_4_x, + aud_active_skin->properties.mainwin_number_4_y); + + if (aud_active_skin->properties.mainwin_playstatus_x && aud_active_skin->properties.mainwin_playstatus_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), mainwin_playstatus, aud_active_skin->properties.mainwin_playstatus_x, + aud_active_skin->properties.mainwin_playstatus_y); + + if (aud_active_skin->properties.mainwin_volume_x && aud_active_skin->properties.mainwin_volume_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_volume), aud_active_skin->properties.mainwin_volume_x, + aud_active_skin->properties.mainwin_volume_y); + + if (aud_active_skin->properties.mainwin_balance_x && aud_active_skin->properties.mainwin_balance_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_balance), aud_active_skin->properties.mainwin_balance_x, + aud_active_skin->properties.mainwin_balance_y); + + if (aud_active_skin->properties.mainwin_position_x && aud_active_skin->properties.mainwin_position_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_position), aud_active_skin->properties.mainwin_position_x, + aud_active_skin->properties.mainwin_position_y); + + if (aud_active_skin->properties.mainwin_previous_x && aud_active_skin->properties.mainwin_previous_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), mainwin_rew, aud_active_skin->properties.mainwin_previous_x, + aud_active_skin->properties.mainwin_previous_y); + + if (aud_active_skin->properties.mainwin_play_x && aud_active_skin->properties.mainwin_play_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_play), aud_active_skin->properties.mainwin_play_x, + aud_active_skin->properties.mainwin_play_y); + + if (aud_active_skin->properties.mainwin_pause_x && aud_active_skin->properties.mainwin_pause_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_pause), aud_active_skin->properties.mainwin_pause_x, + aud_active_skin->properties.mainwin_pause_y); + + if (aud_active_skin->properties.mainwin_stop_x && aud_active_skin->properties.mainwin_stop_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_stop), aud_active_skin->properties.mainwin_stop_x, + aud_active_skin->properties.mainwin_stop_y); + + if (aud_active_skin->properties.mainwin_next_x && aud_active_skin->properties.mainwin_next_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_fwd), aud_active_skin->properties.mainwin_next_x, + aud_active_skin->properties.mainwin_next_y); + + if (aud_active_skin->properties.mainwin_eject_x && aud_active_skin->properties.mainwin_eject_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_eject), aud_active_skin->properties.mainwin_eject_x, + aud_active_skin->properties.mainwin_eject_y); + + if (aud_active_skin->properties.mainwin_eqbutton_x && aud_active_skin->properties.mainwin_eqbutton_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_eq), aud_active_skin->properties.mainwin_eqbutton_x, + aud_active_skin->properties.mainwin_eqbutton_y); + + if (aud_active_skin->properties.mainwin_plbutton_x && aud_active_skin->properties.mainwin_plbutton_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_pl), aud_active_skin->properties.mainwin_plbutton_x, + aud_active_skin->properties.mainwin_plbutton_y); + + if (aud_active_skin->properties.mainwin_shuffle_x && aud_active_skin->properties.mainwin_shuffle_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_shuffle), aud_active_skin->properties.mainwin_shuffle_x, + aud_active_skin->properties.mainwin_shuffle_y); + + if (aud_active_skin->properties.mainwin_repeat_x && aud_active_skin->properties.mainwin_repeat_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_repeat), aud_active_skin->properties.mainwin_repeat_x, + aud_active_skin->properties.mainwin_repeat_y); + + if (aud_active_skin->properties.mainwin_about_x && aud_active_skin->properties.mainwin_about_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_about), aud_active_skin->properties.mainwin_about_x, + aud_active_skin->properties.mainwin_about_y); + + if (aud_active_skin->properties.mainwin_minimize_x && aud_active_skin->properties.mainwin_minimize_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_minimize), cfg.player_shaded ? 244 : aud_active_skin->properties.mainwin_minimize_x, + cfg.player_shaded ? 3 : aud_active_skin->properties.mainwin_minimize_y); + + if (aud_active_skin->properties.mainwin_shade_x && aud_active_skin->properties.mainwin_shade_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_shade), cfg.player_shaded ? 254 : aud_active_skin->properties.mainwin_shade_x, + cfg.player_shaded ? 3 : aud_active_skin->properties.mainwin_shade_y); + + if (aud_active_skin->properties.mainwin_close_x && aud_active_skin->properties.mainwin_close_y) + gtk_fixed_move(GTK_FIXED(SKINNED_WINDOW(mainwin)->fixed), GTK_WIDGET(mainwin_close), cfg.player_shaded ? 264 : aud_active_skin->properties.mainwin_close_x, + cfg.player_shaded ? 3 : aud_active_skin->properties.mainwin_close_y); mainwin_refresh_visible(); /* window size, mainwinWidth && mainwinHeight properties */ - if (bmp_active_skin->properties.mainwin_height && bmp_active_skin->properties.mainwin_width) + if (aud_active_skin->properties.mainwin_height && aud_active_skin->properties.mainwin_width) { - dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH * MAINWIN_SCALE_FACTOR : bmp_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR, - cfg.player_shaded ? MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR : bmp_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR, - bmp_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR, - bmp_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR); + dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH * MAINWIN_SCALE_FACTOR : aud_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR, + cfg.player_shaded ? MAINWIN_SHADED_HEIGHT * MAINWIN_SCALE_FACTOR : aud_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR, + aud_active_skin->properties.mainwin_width * MAINWIN_SCALE_FACTOR, + aud_active_skin->properties.mainwin_height * MAINWIN_SCALE_FACTOR); gdk_flush(); } @@ -727,7 +727,7 @@ if (!playback_get_paused() && mainwin_playstatus != NULL) ui_skinned_playstatus_set_status(mainwin_playstatus, STATUS_PLAY); - if (bmp_active_skin && bmp_active_skin->properties.mainwin_othertext) + if (aud_active_skin && aud_active_skin->properties.mainwin_othertext) { if (bitrate != -1) text = g_strdup_printf("%d kbps, %0.1f kHz, %s", @@ -867,18 +867,18 @@ /* Pop up playback menu if right clicked over playback-control widgets, * otherwise popup general menu */ - if (mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_position_x, - bmp_active_skin->properties.mainwin_position_y, 248, 10) || - mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_previous_x, - bmp_active_skin->properties.mainwin_previous_y, 23, 18) || - mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_play_x, - bmp_active_skin->properties.mainwin_play_y, 23, 18) || - mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_pause_x, - bmp_active_skin->properties.mainwin_pause_y, 23, 18) || - mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_stop_x, - bmp_active_skin->properties.mainwin_stop_y, 23, 18) || - mainwin_widget_contained(event, bmp_active_skin->properties.mainwin_next_x, - bmp_active_skin->properties.mainwin_next_y, 23, 18)) + if (mainwin_widget_contained(event, aud_active_skin->properties.mainwin_position_x, + aud_active_skin->properties.mainwin_position_y, 248, 10) || + mainwin_widget_contained(event, aud_active_skin->properties.mainwin_previous_x, + aud_active_skin->properties.mainwin_previous_y, 23, 18) || + mainwin_widget_contained(event, aud_active_skin->properties.mainwin_play_x, + aud_active_skin->properties.mainwin_play_y, 23, 18) || + mainwin_widget_contained(event, aud_active_skin->properties.mainwin_pause_x, + aud_active_skin->properties.mainwin_pause_y, 23, 18) || + mainwin_widget_contained(event, aud_active_skin->properties.mainwin_stop_x, + aud_active_skin->properties.mainwin_stop_y, 23, 18) || + mainwin_widget_contained(event, aud_active_skin->properties.mainwin_next_x, + aud_active_skin->properties.mainwin_next_y, 23, 18)) { ui_manager_popup_menu_show(GTK_MENU(mainwin_playback_menu), @@ -1790,11 +1790,11 @@ if (cfg.player_shaded) height = MAINWIN_SHADED_HEIGHT; else - height = bmp_active_skin->properties.mainwin_height; - - dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width, - cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height, - bmp_active_skin->properties.mainwin_width * cfg.scale_factor , bmp_active_skin->properties.mainwin_height * cfg.scale_factor); + height = aud_active_skin->properties.mainwin_height; + + dock_window_resize(GTK_WINDOW(mainwin), cfg.player_shaded ? MAINWIN_SHADED_WIDTH : aud_active_skin->properties.mainwin_width, + cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : aud_active_skin->properties.mainwin_height, + aud_active_skin->properties.mainwin_width * cfg.scale_factor , aud_active_skin->properties.mainwin_height * cfg.scale_factor); GList *iter; for (iter = GTK_FIXED (SKINNED_WINDOW(mainwin)->fixed)->children; iter; iter = g_list_next (iter)) { @@ -1804,7 +1804,7 @@ } mainwin_refresh_hints(); - gtk_widget_shape_combine_mask(mainwin, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); + gtk_widget_shape_combine_mask(mainwin, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); } void @@ -2485,8 +2485,8 @@ gtk_window_set_role(GTK_WINDOW(mainwin), "player"); gtk_window_set_resizable(GTK_WINDOW(mainwin), FALSE); - width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : bmp_active_skin->properties.mainwin_width; - height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height; + width = cfg.player_shaded ? MAINWIN_SHADED_WIDTH : aud_active_skin->properties.mainwin_width; + height = cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : aud_active_skin->properties.mainwin_height; if (cfg.scaled) { width *= cfg.scale_factor; @@ -2506,7 +2506,7 @@ g_signal_connect(mainwin, "button_release_event", G_CALLBACK(mainwin_mouse_button_release), NULL); - bmp_drag_dest_set(mainwin); + aud_drag_dest_set(mainwin); g_signal_connect(mainwin, "key_press_event", G_CALLBACK(mainwin_keypress), NULL);
--- a/src/audacious/ui_manager.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_manager.h Mon Mar 31 09:21:02 2008 +0300 @@ -17,14 +17,14 @@ * Audacious or using our public API to be a derived work. */ -#ifndef AUD_UIMANAGER_H -#define AUD_UIMANAGER_H - +#ifndef __AUDACIOUS_UIMANAGER_H__ +#define __AUDACIOUS_UIMANAGER_H__ #include <glib.h> #include <glib/gi18n.h> #include <gtk/gtk.h> +G_BEGIN_DECLS GtkWidget *mainwin_songname_menu; GtkWidget *mainwin_general_menu; @@ -72,5 +72,6 @@ void ui_manager_popup_menu_show( GtkMenu * , gint , gint , guint , guint ); #define popup_menu_show(x1,x2,x3,x4,x5) ui_manager_popup_menu_show(x1,x2,x3,x4,x5) +G_END_DECLS -#endif /* AUD_UIMANAGER_H */ +#endif /* __AUDACIOUS_UIMANAGER_H__ */
--- a/src/audacious/ui_playlist.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_playlist.c Mon Mar 31 09:21:02 2008 +0300 @@ -649,7 +649,7 @@ ui_skinned_button_move_relative(playlistwin_sscroll_down, dx, dy); gtk_widget_set_size_request(playlistwin_sinfo, playlistwin_get_width() - 35, - bmp_active_skin->properties.textbox_bitmap_font_height); + aud_active_skin->properties.textbox_bitmap_font_height); GList *iter; for (iter = GTK_FIXED (SKINNED_WINDOW(playlistwin)->fixed)->children; iter; iter = g_list_next (iter)) { GtkFixedChild *child_data = (GtkFixedChild *) iter->data; @@ -1510,7 +1510,7 @@ GTK_WINDOW(mainwin)); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(playlistwin), TRUE); - icon = gdk_pixbuf_new_from_xpm_data((const gchar **) bmp_playlist_icon); + icon = gdk_pixbuf_new_from_xpm_data((const gchar **) audacious_playlist_icon); gtk_window_set_icon(GTK_WINDOW(playlistwin), icon); g_object_unref(icon); @@ -1535,7 +1535,7 @@ g_signal_connect(playlistwin, "motion_notify_event", G_CALLBACK(playlistwin_motion), NULL); - bmp_drag_dest_set(playlistwin); + aud_drag_dest_set(playlistwin); /* DnD stuff */ g_signal_connect(playlistwin, "drag-leave", @@ -1850,7 +1850,7 @@ { Playlist *playlist = playlist_get_active(); - playlist_save(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); + playlist_save(playlist, aud_paths[BMP_PATH_PLAYLIST_FILE]); } void
--- a/src/audacious/ui_plugin_menu.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_plugin_menu.h Mon Mar 31 09:21:02 2008 +0300 @@ -19,13 +19,13 @@ /* these functions are currently implemented in ui_manager.c */ -#ifndef AUD_UIPLUGINMENU_H -#define AUD_UIPLUGINMENU_H - +#ifndef __AUDACIOUS_UIPLUGINMENU_H__ +#define __AUDACIOUS_UIPLUGINMENU_H__ #include <glib.h> #include <gtk/gtk.h> +G_BEGIN_DECLS #define AUDACIOUS_MENU_MAIN 0 #define AUDACIOUS_MENU_PLAYLIST 1 @@ -38,5 +38,6 @@ gint menu_plugin_item_add( gint , GtkWidget * ); gint menu_plugin_item_remove( gint , GtkWidget * ); +G_END_DECLS -#endif /* AUD_UIPLUGINMENU_H */ +#endif /* __AUDACIOUS_UIPLUGINMENU_H__ */
--- a/src/audacious/ui_preferences.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_preferences.c Mon Mar 31 09:21:02 2008 +0300 @@ -940,8 +940,8 @@ { const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; - del_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR]); - make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); + del_directory(aud_paths[BMP_PATH_SKIN_THUMB_DIR]); + make_directory(aud_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); } @@ -1047,7 +1047,7 @@ } if (file_is_archive(path)) { - if (!bmp_active_skin_load(path)) + if (!aud_active_skin_load(path)) return; skin_install_skin(path); skin_view_update(GTK_TREE_VIEW(widget), @@ -1319,10 +1319,10 @@ * symbol sizes change. - nenolod */ - bmp_config_save(); + aud_config_save(); plugin_system_cleanup(); - bmp_config_free(); - bmp_config_load(); + aud_config_free(); + aud_config_load(); plugin_system_init(); } @@ -2012,7 +2012,7 @@ g_signal_connect(skin_view, "drag-data-received", G_CALLBACK(on_skin_view_drag_data_received), NULL); - bmp_drag_dest_set(skin_view); + aud_drag_dest_set(skin_view); g_signal_connect(mainwin, "drag-data-received", G_CALLBACK(mainwin_drag_data_received),
--- a/src/audacious/ui_skinned_button.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_button.c Mon Mar 31 09:21:02 2008 +0300 @@ -306,7 +306,7 @@ switch (button->type) { case TYPE_PUSH: - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, button->pressed ? priv->skin_index2 : priv->skin_index1, button->pressed ? priv->px : priv->nx, button->pressed ? priv->py : priv->ny, @@ -314,13 +314,13 @@ break; case TYPE_TOGGLE: if (button->inside) - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, button->pressed ? priv->skin_index2 : priv->skin_index1, button->pressed ? priv->ppx : priv->pnx, button->pressed ? priv->ppy : priv->pny, 0, 0, priv->w, priv->h); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, button->pressed ? priv->skin_index2 : priv->skin_index1, button->pressed ? priv->px : priv->nx, button->pressed ? priv->py : priv->ny,
--- a/src/audacious/ui_skinned_equalizer_graph.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_equalizer_graph.c Mon Mar 31 09:21:02 2008 +0300 @@ -245,13 +245,13 @@ */ void (*__init_spline) (gfloat *, gfloat *, gint, gfloat *) = init_spline; - skin_draw_pixbuf(widget, bmp_active_skin, obj, equalizer_graph->skin_index, 0, 294, 0, 0, + skin_draw_pixbuf(widget, aud_active_skin, obj, equalizer_graph->skin_index, 0, 294, 0, 0, equalizer_graph->width, equalizer_graph->height); - skin_draw_pixbuf(widget, bmp_active_skin, obj, equalizer_graph->skin_index, 0, 314, + skin_draw_pixbuf(widget, aud_active_skin, obj, equalizer_graph->skin_index, 0, 314, 0, 9 + ((cfg.equalizer_preamp * 9) / 20), equalizer_graph->width, 1); - skin_get_eq_spline_colors(bmp_active_skin, cols); + skin_get_eq_spline_colors(aud_active_skin, cols); __init_spline(x, cfg.equalizer_bands, 10, yf); for (i = 0; i < 109; i++) {
--- a/src/audacious/ui_skinned_equalizer_slider.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_equalizer_slider.c Mon Mar 31 09:21:02 2008 +0300 @@ -214,14 +214,14 @@ gint frame; frame = 27 - ((priv->position * 27) / 50); if (frame < 14) - skin_draw_pixbuf(widget, bmp_active_skin, obj, priv->skin_index, (frame * 15) + 13, 164, 0, 0, priv->width, priv->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, (frame * 15) + 13, 164, 0, 0, priv->width, priv->height); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, priv->skin_index, ((frame - 14) * 15) + 13, 229, 0, 0, priv->width, priv->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, ((frame - 14) * 15) + 13, 229, 0, 0, priv->width, priv->height); if (priv->pressed) - skin_draw_pixbuf(widget, bmp_active_skin, obj, priv->skin_index, 0, 176, 1, priv->position, 11, 11); + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, 0, 176, 1, priv->position, 11, 11); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, priv->skin_index, 0, 164, 1, priv->position, 11, 11); + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, 0, 164, 1, priv->position, 11, 11); ui_skinned_widget_draw(widget, obj, priv->width, priv->height, priv->scaled);
--- a/src/audacious/ui_skinned_horizontal_slider.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_horizontal_slider.c Mon Mar 31 09:21:02 2008 +0300 @@ -247,18 +247,18 @@ obj = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, priv->width, priv->height); - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, priv->frame_offset, priv->frame * priv->frame_height, 0, 0, priv->width, priv->height); if (hs->pressed) - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, hs->knob_px, hs->knob_py, priv->position, ((priv->height - priv->knob_height) / 2), priv->knob_width, priv->knob_height); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, hs->knob_nx, hs->knob_ny, priv->position, ((priv->height - priv->knob_height) / 2),
--- a/src/audacious/ui_skinned_menurow.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_menurow.c Mon Mar 31 09:21:02 2008 +0300 @@ -216,23 +216,23 @@ if (menurow->selected == MENUROW_NONE) { if (cfg.always_show_cb || menurow->pushed) - skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index, + skin_draw_pixbuf(widget, aud_active_skin, obj, menurow->skin_index, menurow->nx, menurow->ny, 0, 0, 8, 43); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index, + skin_draw_pixbuf(widget, aud_active_skin, obj, menurow->skin_index, menurow->nx + 8, menurow->ny, 0, 0, 8, 43); } else { - skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index, + skin_draw_pixbuf(widget, aud_active_skin, obj, menurow->skin_index, menurow->sx + ((menurow->selected - 1) * 8), menurow->sy, 0, 0, 8, 43); } if (cfg.always_show_cb || menurow->pushed) { if (menurow->always_selected) - skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index, + skin_draw_pixbuf(widget, aud_active_skin, obj, menurow->skin_index, menurow->sx + 8, menurow->sy + 10, 0, 10, 8, 8); if (menurow->scale_selected) - skin_draw_pixbuf(widget, bmp_active_skin, obj, menurow->skin_index, + skin_draw_pixbuf(widget, aud_active_skin, obj, menurow->skin_index, menurow->sx + 24, menurow->sy + 26, 0, 26, 8, 8); }
--- a/src/audacious/ui_skinned_monostereo.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_monostereo.c Mon Mar 31 09:21:02 2008 +0300 @@ -184,17 +184,17 @@ switch (monostereo->num_channels) { case 1: - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 29, 0, 0, 0, 27, 12); - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 0, 12, 27, 0, 29, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 29, 0, 0, 0, 27, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 0, 12, 27, 0, 29, 12); break; case 2: - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 29, 12, 0, 0, 27, 12); - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 0, 0, 27, 0, 29, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 29, 12, 0, 0, 27, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 0, 0, 27, 0, 29, 12); break; default: case 0: - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 29, 12, 0, 0, 27, 12); - skin_draw_pixbuf(widget, bmp_active_skin, obj, monostereo->skin_index, 0, 12, 27, 0, 29, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 29, 12, 0, 0, 27, 12); + skin_draw_pixbuf(widget, aud_active_skin, obj, monostereo->skin_index, 0, 12, 27, 0, 29, 12); break; }
--- a/src/audacious/ui_skinned_number.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_number.c Mon Mar 31 09:21:02 2008 +0300 @@ -191,7 +191,7 @@ if (number->num > 11 || number->num < 0) number->num = 10; - skin_draw_pixbuf(widget, bmp_active_skin, obj, + skin_draw_pixbuf(widget, aud_active_skin, obj, number->skin_index, number->num * 9, 0, 0, 0, number->width, number->height);
--- a/src/audacious/ui_skinned_playlist.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_playlist.c Mon Mar 31 09:21:02 2008 +0300 @@ -462,7 +462,7 @@ plw_w = playlistwin_get_width(); plw_h = playlistwin_get_height(); - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_NORMALBG)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_NORMALBG)); cairo_rectangle(cr, 0, 0, width, height); cairo_paint(cr); @@ -545,7 +545,7 @@ cairo_close_path (cr); - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_SELECTEDBG)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_SELECTEDBG)); cairo_fill(cr); @@ -607,9 +607,9 @@ tail_width = width; if (i == playlist_get_position_nolock(playlist)) - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_CURRENT)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_CURRENT)); else - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_NORMAL)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_NORMAL)); playlist_list_draw_string(cr, pl, playlist_list_font, i - pl->first, tail_width, title, @@ -727,7 +727,7 @@ pos = plength; } - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_CURRENT)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_CURRENT)); cairo_new_path(cr); @@ -749,7 +749,7 @@ if ((y >= 0) || (y <= (priv->height + pl->y))) { pos = plength; - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_CURRENT)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_CURRENT)); cairo_new_path(cr); @@ -763,7 +763,7 @@ } } - gdk_cairo_set_source_color(cr, skin_get_color(bmp_active_skin, SKIN_PLEDIT_NORMAL)); + gdk_cairo_set_source_color(cr, skin_get_color(aud_active_skin, SKIN_PLEDIT_NORMAL)); cairo_set_line_width(cr, 1); cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
--- a/src/audacious/ui_skinned_playlist_slider.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_playlist_slider.c Mon Mar 31 09:21:02 2008 +0300 @@ -238,16 +238,16 @@ priv->prev_y = y; - /* FIXME: uses bmp_active_skin->pixmaps directly and may need calibration */ + /* FIXME: uses aud_active_skin->pixmaps directly and may need calibration */ /* drawing background */ gint c; for (c = 0; c < priv->height / 29; c++) { - gdk_pixbuf_copy_area(bmp_active_skin->pixmaps[SKIN_PLEDIT].pixbuf, + gdk_pixbuf_copy_area(aud_active_skin->pixmaps[SKIN_PLEDIT].pixbuf, 36, 42, priv->width, 29, obj, 0, c*29); } /* drawing knob */ - skin_draw_pixbuf(widget, bmp_active_skin, obj, priv->skin_index, ps->pressed ? 61 : 52, 53, 0, y, priv->width, 18); + skin_draw_pixbuf(widget, aud_active_skin, obj, priv->skin_index, ps->pressed ? 61 : 52, 53, 0, y, priv->width, 18); ui_skinned_widget_draw(widget, obj, priv->width, priv->height, FALSE);
--- a/src/audacious/ui_skinned_playstatus.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_playstatus.c Mon Mar 31 09:21:02 2008 +0300 @@ -187,20 +187,20 @@ if (playstatus->status == STATUS_STOP && playstatus->buffering == TRUE) playstatus->buffering = FALSE; if (playstatus->status == STATUS_PLAY && playstatus->buffering == TRUE) - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 39, 0, 0, 0, 3, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 39, 0, 0, 0, 3, playstatus->height); else if (playstatus->status == STATUS_PLAY) - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 36, 0, 0, 0, 3, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 36, 0, 0, 0, 3, playstatus->height); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 27, 0, 0, 0, 2, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 27, 0, 0, 0, 2, playstatus->height); switch (playstatus->status) { case STATUS_STOP: - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 18, 0, 2, 0, 9, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 18, 0, 2, 0, 9, playstatus->height); break; case STATUS_PAUSE: - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 9, 0, 2, 0, 9, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 9, 0, 2, 0, 9, playstatus->height); break; case STATUS_PLAY: - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, playstatus->height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, playstatus->height); break; }
--- a/src/audacious/ui_skinned_textbox.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_textbox.c Mon Mar 31 09:21:02 2008 +0300 @@ -170,7 +170,7 @@ UiSkinnedTextbox *textbox = g_object_new (ui_skinned_textbox_get_type (), NULL); UiSkinnedTextboxPrivate *priv = UI_SKINNED_TEXTBOX_GET_PRIVATE(textbox); - textbox->height = bmp_active_skin->properties.textbox_bitmap_font_height; + textbox->height = aud_active_skin->properties.textbox_bitmap_font_height; textbox->x = x; textbox->y = y; textbox->text = g_strdup(""); @@ -436,7 +436,7 @@ return TRUE; } - if (g_utf8_strlen(textbox->text, -1) * bmp_active_skin->properties.textbox_bitmap_font_width > textbox->width) + if (g_utf8_strlen(textbox->text, -1) * aud_active_skin->properties.textbox_bitmap_font_width > textbox->width) return TRUE; return FALSE; @@ -527,7 +527,7 @@ textbox->height, gdk_rgb_get_visual()->depth); gc = gdk_gc_new(pixmap); - c = skin_get_color(bmp_active_skin, SKIN_TEXTBG); + c = skin_get_color(aud_active_skin, SKIN_TEXTBG); for (i = 0; i < textbox->height; i++) { gdk_gc_set_foreground(gc, &c[6 * i / textbox->height]); gdk_draw_line(pixmap, gc, 0, i, priv->pixbuf_width, i); @@ -542,7 +542,7 @@ pattern.pixel = 1; gdk_gc_set_foreground(maskgc, &pattern); - gdk_gc_set_foreground(gc, skin_get_color(bmp_active_skin, SKIN_TEXTFG)); + gdk_gc_set_foreground(gc, skin_get_color(aud_active_skin, SKIN_TEXTFG)); layout = gtk_widget_create_pango_layout(mainwin, pixmaptext); pango_layout_set_font_description(layout, priv->font); @@ -553,7 +553,7 @@ g_object_unref(maskgc); gdk_gc_set_clip_mask(gc, mask); - c = skin_get_color(bmp_active_skin, SKIN_TEXTFG); + c = skin_get_color(aud_active_skin, SKIN_TEXTFG); for (i = 0; i < textbox->height; i++) { gdk_gc_set_foreground(gc, &c[6 * i / textbox->height]); gdk_draw_line(pixmap, gc, 0, i, priv->pixbuf_width, i); @@ -675,30 +675,30 @@ return; } - priv->pixbuf_width = length * bmp_active_skin->properties.textbox_bitmap_font_width; + priv->pixbuf_width = length * aud_active_skin->properties.textbox_bitmap_font_width; priv->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, - priv->pixbuf_width, bmp_active_skin->properties.textbox_bitmap_font_height); + priv->pixbuf_width, aud_active_skin->properties.textbox_bitmap_font_height); for (tmp = stxt = g_utf8_strup(pixmaptext, -1), i = 0; tmp != NULL && i < length; i++, tmp = g_utf8_next_char(tmp)) { gchar c = *tmp; x = y = -1; if (c >= 'A' && c <= 'Z') { - x = bmp_active_skin->properties.textbox_bitmap_font_width * (c - 'A'); + x = aud_active_skin->properties.textbox_bitmap_font_width * (c - 'A'); y = 0; } else if (c >= '0' && c <= '9') { - x = bmp_active_skin->properties.textbox_bitmap_font_width * (c - '0'); - y = bmp_active_skin->properties.textbox_bitmap_font_height; + x = aud_active_skin->properties.textbox_bitmap_font_width * (c - '0'); + y = aud_active_skin->properties.textbox_bitmap_font_height; } else textbox_handle_special_char(tmp, &x, &y); - skin_draw_pixbuf(GTK_WIDGET(textbox), bmp_active_skin, + skin_draw_pixbuf(GTK_WIDGET(textbox), aud_active_skin, priv->pixbuf, priv->skin_index, - x, y, i * bmp_active_skin->properties.textbox_bitmap_font_width, 0, - bmp_active_skin->properties.textbox_bitmap_font_width, - bmp_active_skin->properties.textbox_bitmap_font_height); + x, y, i * aud_active_skin->properties.textbox_bitmap_font_width, 0, + aud_active_skin->properties.textbox_bitmap_font_width, + aud_active_skin->properties.textbox_bitmap_font_height); } g_free(stxt); g_free(pixmaptext); @@ -858,8 +858,8 @@ ty = 2; } - *x = tx * bmp_active_skin->properties.textbox_bitmap_font_width; - *y = ty * bmp_active_skin->properties.textbox_bitmap_font_height; + *x = tx * aud_active_skin->properties.textbox_bitmap_font_width; + *y = ty * aud_active_skin->properties.textbox_bitmap_font_height; } void ui_skinned_textbox_move_relative(GtkWidget *widget, gint x, gint y) {
--- a/src/audacious/ui_skinned_window.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinned_window.c Mon Mar 31 09:21:02 2008 +0300 @@ -114,9 +114,9 @@ SkinnedWindow *window = SKINNED_WINDOW(widget); if (window->type == WINDOW_MAIN) - gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); + gtk_widget_shape_combine_mask(widget, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + cfg.player_shaded), 0, 0); else if (window->type == WINDOW_EQ) - gtk_widget_shape_combine_mask(widget, skin_get_mask(bmp_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); + gtk_widget_shape_combine_mask(widget, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + cfg.equalizer_shaded), 0, 0); } static gboolean @@ -156,8 +156,8 @@ gint width = 0, height = 0; switch (window->type) { case WINDOW_MAIN: - width = bmp_active_skin->properties.mainwin_width; - height = bmp_active_skin->properties.mainwin_height; + width = aud_active_skin->properties.mainwin_width; + height = aud_active_skin->properties.mainwin_height; break; case WINDOW_EQ: width = 275 * (cfg.scaled ? cfg.scale_factor : 1); @@ -176,29 +176,29 @@ switch (window->type) { case WINDOW_MAIN: - skin_draw_pixbuf(widget, bmp_active_skin, obj,SKIN_MAIN, 0, 0, 0, 0, width, height); - skin_draw_mainwin_titlebar(bmp_active_skin, obj, cfg.player_shaded, focus || !cfg.dim_titlebar); + skin_draw_pixbuf(widget, aud_active_skin, obj,SKIN_MAIN, 0, 0, 0, 0, width, height); + skin_draw_mainwin_titlebar(aud_active_skin, obj, cfg.player_shaded, focus || !cfg.dim_titlebar); break; case WINDOW_EQ: - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_EQMAIN, 0, 0, 0, 0, width, height); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_EQMAIN, 0, 0, 0, 0, width, height); if (focus || !cfg.dim_titlebar) { if (!cfg.equalizer_shaded) - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_EQMAIN, 0, 134, 0, 0, width, 14); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_EQMAIN, 0, 134, 0, 0, width, 14); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_EQ_EX, 0, 0, 0, 0, width, 14); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_EQ_EX, 0, 0, 0, 0, width, 14); } else { if (!cfg.equalizer_shaded) - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_EQMAIN, 0, 149, 0, 0, width, 14); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_EQMAIN, 0, 149, 0, 0, width, 14); else - skin_draw_pixbuf(widget, bmp_active_skin, obj, SKIN_EQ_EX, 0, 15, 0, 0, width, 14); + skin_draw_pixbuf(widget, aud_active_skin, obj, SKIN_EQ_EX, 0, 15, 0, 0, width, 14); } break; case WINDOW_PLAYLIST: focus |= !cfg.dim_titlebar; if (cfg.playlist_shaded) { - skin_draw_playlistwin_shaded(bmp_active_skin, obj, playlistwin_get_width(), focus); + skin_draw_playlistwin_shaded(aud_active_skin, obj, playlistwin_get_width(), focus); } else { - skin_draw_playlistwin_frame(bmp_active_skin, obj, playlistwin_get_width(), cfg.playlist_height, focus); + skin_draw_playlistwin_frame(aud_active_skin, obj, playlistwin_get_width(), cfg.playlist_height, focus); } break; }
--- a/src/audacious/ui_skinselector.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_skinselector.c Mon Mar 31 09:21:02 2008 +0300 @@ -70,7 +70,7 @@ basename = g_path_get_basename(path); pngname = g_strconcat(basename, ".png", NULL); - thumbname = g_build_filename(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], + thumbname = g_build_filename(aud_paths[BMP_PATH_SKIN_THUMB_DIR], pngname, NULL); g_free(basename); @@ -254,7 +254,7 @@ skinlist_clear(); - scan_skindir(bmp_paths[BMP_PATH_USER_SKIN_DIR]); + scan_skindir(aud_paths[BMP_PATH_USER_SKIN_DIR]); scan_skindir(DATA_DIR G_DIR_SEPARATOR_S "Skins"); skinsdir = getenv("SKINSDIR"); @@ -311,8 +311,8 @@ g_object_unref(thumbnail); g_free(formattedname); - if (g_strstr_len(bmp_active_skin->path, - strlen(bmp_active_skin->path), name) ) { + if (g_strstr_len(aud_active_skin->path, + strlen(aud_active_skin->path), name) ) { iter_current_skin = iter; have_current_skin = TRUE; } @@ -359,7 +359,7 @@ g_free(name); - bmp_active_skin_load(comp); + aud_active_skin_load(comp); }
--- a/src/audacious/ui_svis.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_svis.c Mon Mar 31 09:21:02 2008 +0300 @@ -283,7 +283,7 @@ if (!svis->visible_window) return FALSE; - skin_get_viscolor(bmp_active_skin, svis_color); + skin_get_viscolor(aud_active_skin, svis_color); for (y = 0; y < 24; y++) { colors[y] = svis_color[y][0] << 16 | svis_color[y][1] << 8 | svis_color[y][2];
--- a/src/audacious/ui_vis.c Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/ui_vis.c Mon Mar 31 09:21:02 2008 +0300 @@ -270,7 +270,7 @@ if (!vis->visible_window) return FALSE; - skin_get_viscolor(bmp_active_skin, vis_color); + skin_get_viscolor(aud_active_skin, vis_color); for (y = 0; y < 24; y++) { colors[y] = vis_color[y][0] << 16 | vis_color[y][1] << 8 | vis_color[y][2]; @@ -397,8 +397,8 @@ if(playback_get_playing()){ /*Only draw the data if we're playing*/ if(cfg.voiceprint_mode == VOICEPRINT_NORMAL){ /* Create color gradient from the skin's background- and foreground color*/ - fgc = skin_get_color(bmp_active_skin, SKIN_TEXTFG); - bgc = skin_get_color(bmp_active_skin, SKIN_TEXTBG); + fgc = skin_get_color(aud_active_skin, SKIN_TEXTFG); + bgc = skin_get_color(aud_active_skin, SKIN_TEXTBG); skin_col[0][0] = fgc->red >> 8; skin_col[0][1] = fgc->green >> 8; skin_col[0][2] = fgc->blue >> 8;
--- a/src/audacious/vfs.h Mon Mar 31 09:20:12 2008 +0300 +++ b/src/audacious/vfs.h Mon Mar 31 09:21:02 2008 +0300 @@ -18,13 +18,15 @@ * Audacious or using our public API to be a derived work. */ -#ifndef VFS_H -#define VFS_H +#ifndef __AUDACIOUS_VFS_H__ +#define __AUDACIOUS_VFS_H__ #include <glib.h> #include <stdio.h> #include <sys/types.h> +G_BEGIN_DECLS + typedef struct _VFSFile VFSFile; typedef struct _VFSConstructor VFSConstructor; @@ -83,7 +85,6 @@ gchar *(*vfs_get_metadata_impl)(VFSFile *file, const gchar * field); }; -G_BEGIN_DECLS extern VFSFile * vfs_fopen(const gchar * path, const gchar * mode); @@ -145,4 +146,4 @@ G_END_DECLS -#endif /* VFS_H */ +#endif /* __AUDACIOUS_VFS_H__ */