Mercurial > audlegacy
changeset 3351:7a4fcf84a34f trunk
Removed the hardcoded Add/Play CD menu entry
author | Calin Crisan ccrisan@gmail.com |
---|---|
date | Mon, 13 Aug 2007 23:24:50 +0300 |
parents | 1292e4ca0f08 |
children | b35d905d1a83 1cd5fb04e05b d538aabf6df5 |
files | config.guess config.rpath config.sub contrib/g15_audacious.py contrib/lap.py install-sh mkinstalldirs src/audacious/actions-mainwin.h src/audacious/actions-playlist.h src/audacious/intl/config.charset src/audacious/main.c src/audacious/ui/mainwin.ui src/audacious/ui/playlist.ui src/audacious/ui_main.c src/audacious/ui_main.h src/audacious/ui_manager.c src/audacious/ui_playlist.c |
diffstat | 9 files changed, 3 insertions(+), 141 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/actions-mainwin.h Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/actions-mainwin.h Mon Aug 13 23:24:50 2007 +0300 @@ -68,7 +68,6 @@ void action_playback_next(void); void action_playback_pause(void); void action_playback_play(void); -void action_playback_playcd(void); void action_playback_previous(void); void action_playback_stop(void); void action_preferences(void);
--- a/src/audacious/actions-playlist.h Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/actions-playlist.h Mon Aug 13 23:24:50 2007 +0300 @@ -45,7 +45,7 @@ void action_playlist_remove_selected(void); void action_playlist_remove_unselected(void); -void action_playlist_add_cd(void); +/* void action_playlist_add_cd(void); - this is no longer needed, as the respective menu entry is added from within the cdaudio plugin */ void action_playlist_add_url(void); void action_playlist_add_files(void);
--- a/src/audacious/main.c Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/main.c Mon Aug 13 23:24:50 2007 +0300 @@ -95,7 +95,7 @@ struct _BmpCmdLineOpt { gchar **filenames; gint session; - gboolean play, stop, pause, fwd, rew, play_pause, playcd, show_jump_box; + gboolean play, stop, pause, fwd, rew, play_pause, show_jump_box; gboolean enqueue, mainwin, remote, activate; gboolean load_skins; gboolean headless; @@ -1004,9 +1004,6 @@ if (options->activate) audacious_remote_activate(session); - - if (options->playcd) - play_medium(); } else { if (options->rew) audacious_drct_playlist_prev(); @@ -1038,9 +1035,6 @@ if (options->activate) audacious_drct_activate(); - - if (options->playcd) - play_medium(); } if(remote) {
--- a/src/audacious/ui/mainwin.ui Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/ui/mainwin.ui Mon Aug 13 23:24:50 2007 +0300 @@ -14,7 +14,6 @@ <separator /> <menuitem action="play file" /> <menuitem action="play location" /> - <menuitem action="playback play cd" /> <menuitem action="lastfm" /> <separator /> <menu action="visualization">
--- a/src/audacious/ui/playlist.ui Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/ui/playlist.ui Mon Aug 13 23:24:50 2007 +0300 @@ -17,7 +17,6 @@ </menu> <menu action="dummy" name="add-menu"> - <menuitem action="playlist add cd" /> <menuitem action="playlist add url" /> <menuitem action="playlist add files" /> </menu>
--- a/src/audacious/ui_main.c Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/ui_main.c Mon Aug 13 23:24:50 2007 +0300 @@ -1778,12 +1778,6 @@ case MAINWIN_GENERAL_PLAYFILE: run_filebrowser(NO_PLAY_BUTTON); break; - case MAINWIN_GENERAL_PLAYCD: - play_medium(); - break; - case MAINWIN_GENERAL_ADDCD: - add_medium(); - break; case MAINWIN_GENERAL_PLAYLOCATION: mainwin_show_add_url_window(); break; @@ -1955,23 +1949,6 @@ mainwin_release_info_text(); } -static void -run_no_audiocd_dialog(void) -{ - const gchar *markup = - N_("<b><big>No playable CD found.</big></b>\n\n" - "No CD inserted, or inserted CD is not an audio CD.\n"); - - GtkWidget *dialog = - gtk_message_dialog_new_with_markup(GTK_WINDOW(mainwin), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - _(markup)); - gtk_dialog_run(GTK_DIALOG(dialog)); - gtk_widget_destroy(dialog); -} - void run_no_output_device_dialog(gpointer hook_data, gpointer user_data) { @@ -1994,84 +1971,6 @@ GDK_THREADS_LEAVE(); } - -void -add_medium(void) -{ - GList *list, *node; - gchar *filename; - - /* - gchar *path; - ConfigDb *db; - - db = bmp_cfg_db_open(); - - if ( bmp_cfg_db_get_string(db, "CDDA", "directory", &path) != TRUE ) - { - bmp_cfg_db_close(db); - run_no_audiocd_dialog(); - return; - } - else - bmp_cfg_db_close(db); - */ - - if (!(list = input_scan_dir(CDDA_DUMMY_PATH))) { - run_no_audiocd_dialog(); - return; - } - - for (node = list; node; node = g_list_next(node)) { - filename = g_build_filename(CDDA_DUMMY_PATH, node->data, NULL); - playlist_add(playlist_get_active(), filename); - g_free(filename); - g_free(node->data); - } - - /*g_free(path);*/ - g_list_free(list); - -} - -void -play_medium(void) -{ - GList *list, *node; - gchar *filename; - /* - gchar *path; - ConfigDb *db; - */ - Playlist *playlist = playlist_get_active(); - - /* - db = bmp_cfg_db_open(); - bmp_cfg_db_get_string(db, "CDDA", "directory", &path); - bmp_cfg_db_close(db); - */ - - if (!(list = input_scan_dir(CDDA_DUMMY_PATH))) { - run_no_audiocd_dialog(); - return; - } - - playlist_clear(playlist); - - for (node = list; node; node = g_list_next(node)) { - filename = g_build_filename(CDDA_DUMMY_PATH, node->data, NULL); - playlist_add(playlist, filename); - g_free(filename); - g_free(node->data); - } - - /*g_free(path);*/ - g_list_free(list); - - playlist_set_position(playlist, 0); - playback_initiate(); -} - void read_volume(gint when) { @@ -3103,12 +3002,6 @@ } void -action_playback_playcd( void ) -{ - play_medium(); -} - -void action_playback_pause( void ) { playback_pause();
--- a/src/audacious/ui_main.h Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/ui_main.h Mon Aug 13 23:24:50 2007 +0300 @@ -42,8 +42,6 @@ #define MAINWIN_DEFAULT_FONT "Sans Bold 9" -#define CDDA_DUMMY_PATH "cdda://default" - typedef enum { TIMER_ELAPSED, @@ -67,11 +65,8 @@ MAINWIN_GENERAL_FOCUSPLWIN, MAINWIN_GENERAL_SHOWEQWIN, - MAINWIN_GENERAL_PLAYCD, MAINWIN_GENERAL_EXIT, - MAINWIN_GENERAL_ADDCD, - MAINWIN_GENERAL_PREV, MAINWIN_GENERAL_PLAY, MAINWIN_GENERAL_PAUSE, @@ -121,10 +116,6 @@ void mainwin_create(void); void read_volume(gint when); -void play_medium(void); -void add_medium(void); - -void draw_main_window(gboolean); void mainwin_quit_cb(void); void mainwin_lock_info_text(const gchar * text);
--- a/src/audacious/ui_manager.c Mon Aug 13 18:49:34 2007 +0200 +++ b/src/audacious/ui_manager.c Mon Aug 13 23:24:50 2007 +0300 @@ -238,10 +238,6 @@ }; static GtkActionEntry action_entries_playlist_add[] = { - { "playlist add cd", GTK_STOCK_CDROM, N_("Add CD..."), "<Shift>C", - N_("Adds a CD to the playlist."), - G_CALLBACK(action_playlist_add_cd) }, - { "playlist add url", GTK_STOCK_NETWORK, N_("Add Internet Address..."), "<Ctrl>H", N_("Adds a remote track to the playlist."), G_CALLBACK(action_playlist_add_url) }, @@ -394,13 +390,10 @@ { "play location", GTK_STOCK_NETWORK , N_("Play Location"), "<Ctrl>L", N_("Play media from the selected location"), G_CALLBACK(action_play_location) }, - { "playback play cd", GTK_STOCK_CDROM , N_("Play CD"), "<Alt>C", - N_("Play CD"), G_CALLBACK(action_playback_playcd) }, - { "lastfm", NULL, N_("Last.fm radio"), "<Alt>L", N_("Play Last.fm radio"), G_CALLBACK(action_lastfm) }, - { "plugins", NULL , N_("Plugins") }, + { "plugins", NULL , N_("Plugins") }, { "preferences", GTK_STOCK_PREFERENCES , N_("Preferences"), "<Ctrl>P", N_("Open preferences window"), G_CALLBACK(action_preferences) },