Mercurial > audlegacy
changeset 2328:d88558b0de0a trunk
[svn] - Added script for migration to XDG basedir.
- Fixed tons of warnings.
author | js |
---|---|
date | Sat, 13 Jan 2007 16:41:21 -0800 |
parents | 921b2d8d9b2e |
children | 822b766c3e5c |
files | ChangeLog migrate_config.sh src/audacious/output.c src/audacious/playlist.c src/audacious/ui_fileinfo.c src/audacious/ui_main.c src/audacious/ui_manager.h src/audacious/ui_playlist.c src/audacious/ui_playlist.h src/audacious/ui_preferences.c src/audacious/util.c src/audacious/widgets/svis.c src/audacious/widgets/vis.c |
diffstat | 13 files changed, 56 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jan 13 16:09:38 2007 -0800 +++ b/ChangeLog Sat Jan 13 16:41:21 2007 -0800 @@ -1,3 +1,10 @@ +2007-01-14 00:09:38 +0000 Jonathan Schleifer <js@h3c.de> + revision [3664] + Fixed: audtool.c:883: warning: implicit declaration of function 'strncmp' + trunk/src/audtool/audtool.c | 1 + + 1 file changed, 1 insertion(+) + + 2007-01-14 00:07:48 +0000 Jonathan Schleifer <js@h3c.de> revision [3662] Fixed: configdb_rcfile.c:57: warning: suggest parentheses around assignment used as truth value
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/migrate_config.sh Sat Jan 13 16:41:21 2007 -0800 @@ -0,0 +1,28 @@ +#!/bin/sh +# +# This script is used to convert the old $HOME/.audacious config dir +# to the new XDG basedir equivalent. +# + +BMP_RCPATH=${BMP_RCPATH:-".audacious"} +XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} +XDG_DATA_HOME=${XDG_DATA_HOME:-"$HOME/.local/share"} +XDG_CACHE_HOME=${XDG_CACHE_HOME:-"$HOME/.cache"} + +rm -fr "$XDG_CONFIG_HOME/audacious" +rm -fr "$XDG_DATA_HOME/audacious" +rm -fr "$XDG_CACHE_HOME/audacious" + +mkdir -p "$XDG_CONFIG_HOME/audacious" +mkdir -p "$XDG_CONFIG_HOME/audacious/Plugins" +mkdir -p "$XDG_DATA_HOME/audacious/Skins" +mkdir -p "$XDG_CACHE_HOME/audacious/thumbs" + +mv "$HOME/$BMP_RCPATH/config" "$XDG_CONFIG_HOME/audacious/" +mv "$HOME/$BMP_RCPATH/playlist.xspf" "$XDG_CONFIG_HOME/audacious/" +mv "$HOME/$BMP_RCPATH/Plugins" "$XDG_CONFIG_HOME/" +mv "$HOME/$BMP_RCPATH/Skins" "$XDG_DATA_HOME/" +mv "$HOME/$BMP_RCPATH/accels" "$XDG_CONFIG_HOME/" +mv "$HOME/$BMP_RCPATH/log" "$XDG_CONFIG_HOME/" + +echo "Conversion done. Please move the remaining files manually."
--- a/src/audacious/output.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/output.c Sat Jan 13 16:41:21 2007 -0800 @@ -29,6 +29,7 @@ #include "iir.h" #include "main.h" #include "input.h" +#include "playback.h" #include "playlist.h" #include "libaudacious/util.h" @@ -76,8 +77,6 @@ void set_current_output_plugin(gint i) { - gint time; - gint pos; gboolean playing; OutputPlugin *op = get_current_output_plugin(); @@ -93,7 +92,6 @@ if (playing == TRUE) { - gint i = 99; guint time, pos; PlaylistEntry *entry; @@ -126,8 +124,6 @@ if (playlist_get_current_length(playlist_get_active()) > -1 && time <= (playlist_get_current_length(playlist_get_active()))) { - gint i; - playback_seek(time / 1000); } }
--- a/src/audacious/playlist.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/playlist.c Sat Jan 13 16:41:21 2007 -0800 @@ -96,7 +96,7 @@ G_LOCK_DEFINE(playlist_get_info_going); -static gchar *playlist_current_name = NULL; +//static gchar *playlist_current_name = NULL; static gboolean playlist_get_info_scan_active = FALSE; static gboolean playlist_get_info_going = FALSE; @@ -2260,7 +2260,6 @@ GList *node; PlaylistEntry *entry = NULL; TitleInput *tuple = NULL; - gint mtime; PLAYLIST_LOCK(playlist->mutex);
--- a/src/audacious/ui_fileinfo.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_fileinfo.c Sat Jan 13 16:41:21 2007 -0800 @@ -454,7 +454,6 @@ { char *imgfile_ext, *file_name_ext; size_t imgfile_len, file_name_len; - gboolean matches; imgfile_ext = strrchr(imgfile, '.'); if (!imgfile_ext) { @@ -494,7 +493,7 @@ if (cfg.use_file_cover && file_name) { /* Look for images matching file name */ - while(f = g_dir_read_name(d)) { + while((f = g_dir_read_name(d))) { gchar *newpath = g_strconcat(path, "/", f, NULL); if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) && @@ -510,7 +509,7 @@ } /* Search for files using filter */ - while (f = g_dir_read_name(d)) { + while ((f = g_dir_read_name(d))) { gchar *newpath = g_strconcat(path, "/", f, NULL); if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) && @@ -531,7 +530,7 @@ } /* Descend into directories recursively. */ - while (f = g_dir_read_name(d)) { + while ((f = g_dir_read_name(d))) { gchar *newpath = g_strconcat(path, "/", f, NULL); if(g_file_test(newpath, G_FILE_TEST_IS_DIR)) {
--- a/src/audacious/ui_main.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_main.c Sat Jan 13 16:41:21 2007 -0800 @@ -1590,7 +1590,6 @@ static gboolean mainwin_jump_to_file_match(const gchar * song, GSList *regex_list) { - gint i = 0; gboolean rv = TRUE; if ( song == NULL ) @@ -1618,7 +1617,6 @@ guint row; GList *playlist_glist; gchar *desc_buf = NULL; - gchar *row_str; GtkTreeIter iter; GtkTreeSelection *selection; Playlist *playlist; @@ -2737,7 +2735,6 @@ mainwin_mr_release(MenuRowItem i) { GdkModifierType modmask; - GtkWidget *widget; gint x, y; switch (i) {
--- a/src/audacious/ui_manager.h Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_manager.h Sat Jan 13 16:41:21 2007 -0800 @@ -63,8 +63,8 @@ GtkActionGroup *action_group_equalizer; -void uimanager_init ( void ); -void uimanager_create_menus ( void ); +void ui_manager_init ( void ); +void ui_manager_create_menus ( void ); GtkAccelGroup * ui_manager_get_accel_group ( void ); GtkWidget * ui_manager_get_popup_menu ( GtkUIManager * , const gchar * ); void ui_manager_popup_menu_show( GtkMenu * , gint , gint , guint , guint );
--- a/src/audacious/ui_playlist.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_playlist.c Sat Jan 13 16:41:21 2007 -0800 @@ -341,8 +341,6 @@ void playlistwin_set_sinfo_scroll(gboolean scroll) { - GtkWidget *item; - if(playlistwin_is_shaded()) textbox_set_scroll(playlistwin_sinfo, cfg.autoscroll); else @@ -1039,7 +1037,6 @@ { gboolean grab = TRUE; gint xpos, ypos; - GtkWidget *_menu; GtkRequisition req; gtk_window_get_position(GTK_WINDOW(playlistwin), &xpos, &ypos); @@ -1552,7 +1549,6 @@ static void playlistwin_create_widgets(void) { - gchar *font = NULL, *tmp = NULL; /* This function creates the custom widgets used by the playlist editor */ /* text box for displaying song title in shaded mode */ @@ -1772,7 +1768,6 @@ void playlistwin_create(void) { - Playlist *playlist; playlistwin_create_window(); /* create GC and back pixmap for custom widget to draw on */
--- a/src/audacious/ui_playlist.h Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_playlist.h Sat Jan 13 16:41:21 2007 -0800 @@ -49,6 +49,8 @@ #define PLAYLISTWIN_DEFAULT_FONT "Sans Bold 8" gboolean playlistwin_is_shaded(void); +gint playlistwin_get_width(void); +gint playlistwin_get_height(void); void playlistwin_update_list(Playlist *playlist); gboolean playlistwin_item_visible(gint index); gint playlistwin_get_toprow(void);
--- a/src/audacious/ui_preferences.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/ui_preferences.c Sat Jan 13 16:41:21 2007 -0800 @@ -57,6 +57,7 @@ #include "ui_playlist.h" #include "ui_skinselector.h" #include "ui_preferences.h" +#include "ui_equalizer.h" #include "build_stamp.h" @@ -2078,8 +2079,8 @@ static void on_red_scale_value_changed(GtkHScale *scale, gpointer data) { - GladeXML *xml = prefswin_get_xml(); - GtkWidget *widget; + //GladeXML *xml = prefswin_get_xml(); + //GtkWidget *widget; gint value; value = gtk_range_get_value(GTK_RANGE(scale)); @@ -2099,8 +2100,8 @@ static void on_green_scale_value_changed(GtkHScale *scale, gpointer data) { - GladeXML *xml = prefswin_get_xml(); - GtkWidget *widget; + //GladeXML *xml = prefswin_get_xml(); + //GtkWidget *widget; gint value; value = gtk_range_get_value(GTK_RANGE(scale)); @@ -2120,8 +2121,8 @@ static void on_blue_scale_value_changed(GtkHScale *scale, gpointer data) { - GladeXML *xml = prefswin_get_xml(); - GtkWidget *widget; + //GladeXML *xml = prefswin_get_xml(); + //GtkWidget *widget; gint value; value = gtk_range_get_value(GTK_RANGE(scale));
--- a/src/audacious/util.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/util.c Sat Jan 13 16:41:21 2007 -0800 @@ -277,7 +277,9 @@ { gchar *tmpdir, *cmd, *escaped_filename; ArchiveType type; +#ifndef HAVE_MKDTEMP mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; +#endif if ((type = archive_get_type(filename)) <= ARCHIVE_DIR) return NULL;
--- a/src/audacious/widgets/svis.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/widgets/svis.c Sat Jan 13 16:41:21 2007 -0800 @@ -29,6 +29,7 @@ #include "ui_main.h" #include "plugin.h" #include "widget.h" +#include "playback.h" #include "vis.h" static gint svis_redraw_delays[] = { 1, 2, 4, 8 };
--- a/src/audacious/widgets/vis.c Sat Jan 13 16:09:38 2007 -0800 +++ b/src/audacious/widgets/vis.c Sat Jan 13 16:41:21 2007 -0800 @@ -28,6 +28,7 @@ #include "main.h" #include "skin.h" #include "widget.h" +#include "playback.h" static const gfloat vis_afalloff_speeds[] = { 0.34, 0.5, 1.0, 1.3, 1.6 }; static const gfloat vis_pfalloff_speeds[] = { 1.2, 1.3, 1.4, 1.5, 1.6 }; @@ -45,7 +46,7 @@ static GTimer *timer = NULL; gulong micros = 9999999; gboolean falloff = FALSE; - gint i, n; + gint i; if (!timer) { timer = g_timer_new();