From b43d4dddebb79512006c4bb6363aedcf22888915 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 15 Feb 2009 22:28:04 +0100 Subject: throw away unneeded code --- src/global.h | 62 +++++---------------------------------------------------- src/menu.h | 4 ---- src/ncmpcpp.cpp | 14 +++++-------- src/song.cpp | 22 -------------------- src/song.h | 3 --- 5 files changed, 10 insertions(+), 95 deletions(-) (limited to 'src') diff --git a/src/global.h b/src/global.h index ebeeddf7..93d6886c 100644 --- a/src/global.h +++ b/src/global.h @@ -21,7 +21,6 @@ #ifndef _GLOBAL_H #define _GLOBAL_H -#include "settings.h" #include "ncmpcpp.h" #include "mpdpp.h" #include "screen.h" @@ -33,85 +32,34 @@ namespace Global extern BasicScreen *myScreen; extern BasicScreen *myOldScreen; -// extern Menu *myPlaylist->Main(); -// extern Menu *myBrowser->Main(); -// extern Menu< std::pair > *mSearcher; - -// extern Window *wLibActiveCol; -// extern Menu *myLibrary->Artists; -// extern Menu *myLibrary->Albums; -// extern Menu *myLibrary->Songs; - -# ifdef HAVE_TAGLIB_H -// extern Window *wTagEditorActiveCol; -// extern Menu *mTagEditor; -// extern Menu *mEditorAlbums; -// extern Menu *myTagEditor->Dirs; -// extern Menu *mEditorLeftCol; -// extern Menu *myTagEditor->TagTypes; -// extern Menu *myTagEditor->Tags; -# endif // HAVE_TAGLIB_H - -// extern Window *wPlaylistEditorActiveCol; -// extern Menu *mPlaylistList; -// extern Menu *myPlaylistEditor->Content; - -// extern Scrollpad *sHelp; -// extern Scrollpad *sLyrics; -// extern Scrollpad *sInfo; - extern Window *wHeader; extern Window *wFooter; -//# ifdef ENABLE_CLOCK -// extern Scrollpad *wClock; -//# endif extern MPD::Connection *Mpd; -// extern int now_playing; -// extern int lock_statusbar_delay; - -// extern size_t browsed_dir_scroll_begin; extern size_t main_start_y; extern size_t main_height; -// extern size_t lyrics_scroll_begin; - + extern time_t timer; - -// extern std::string browsed_dir; -// extern std::string editor_browsed_dir; -// extern std::string editor_highlighted_dir; -// extern std::string info_title; - -// extern BasicScreen myScreen; -// extern NcmpcppScreen myOldScreen; - + # ifdef HAVE_CURL_CURL_H extern pthread_mutex_t curl; # endif - + extern bool dont_change_now_playing; extern bool block_progressbar_update; extern bool block_playlist_update; extern bool block_item_list_update; - + extern bool messages_allowed; extern bool redraw_header; -// extern bool reload_lyrics; extern std::string volume_state; - + extern bool header_update_status; -// extern bool search_case_sensitive; -// extern bool search_match_to_pattern; - -// extern const char *search_mode_normal; -// extern const char *search_mode_strict; extern std::vector vFoundPositions; extern int found_pos; - -// extern MPD::Song lyrics_song; } #endif diff --git a/src/menu.h b/src/menu.h index 3bab615f..64c999e7 100644 --- a/src/menu.h +++ b/src/menu.h @@ -119,8 +119,6 @@ template class Menu : public Window, public List virtual Menu *Clone() const { return new Menu(*this); } virtual Menu *EmptyClone() const; - //virtual string GetOption(int i = -1) const; - protected: ItemDisplayer itsItemDisplayer; void *itsItemDisplayerUserdata; @@ -196,8 +194,6 @@ template void Menu::AddOption(const T &item, bool is_bold, bool is_ itsOptions.push_back(o); } -//template <> void Menu::AddOption(const Buffer &buf, bool is_bold, bool is_static, bool have_separator); - template void Menu::AddSeparator() { Option o; diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 10c070d9..bec59ab8 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -73,9 +73,6 @@ size_t Global::main_height; time_t Global::timer; -//string Global::myTagEditor->CurrentDir() = "/"; -//string Global::editor_highlighted_dir; - bool Global::dont_change_now_playing = 0; bool Global::block_progressbar_update = 0; bool Global::block_playlist_update = 0; @@ -993,7 +990,11 @@ int main(int argc, char *argv[]) { CHECK_MPD_MUSIC_DIR; # ifdef HAVE_TAGLIB_H - if (myScreen->Cmp() == myLibrary->Artists) + if (myTinyTagEditor->SetEdited(myScreen->CurrentSong())) + { + myTinyTagEditor->SwitchTo(); + } + else if (myScreen->Cmp() == myLibrary->Artists) { LockStatusbar(); Statusbar() << fmtBold << IntoStr(Config.media_lib_primary_tag) << fmtBoldEnd << ": "; @@ -1068,10 +1069,6 @@ int main(int argc, char *argv[]) } } } - else if (myTinyTagEditor->SetEdited(myScreen->CurrentSong())) - { - myTinyTagEditor->SwitchTo(); - } else if (myScreen->Cmp() == myTagEditor->Dirs) { string old_dir = myTagEditor->Dirs->Current().first; @@ -1203,7 +1200,6 @@ int main(int argc, char *argv[]) # endif // HAVE_TAGLIB_H ) { - List *mList = reinterpret_cast *>(myWindow->Main()); for (size_t i = 0; i < mList->Size(); i++) mList->Select(i, !mList->isSelected(i) && !mList->isStatic(i)); diff --git a/src/song.cpp b/src/song.cpp index 447a3fd3..6d6206eb 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -103,28 +103,6 @@ void Song::Localize() # endif // SUPPORTED_LOCALES && HAVE_ICONV_H } -/*void Song::Delocalize() -{ -# if !defined(_UTF8) && defined(HAVE_ICONV_H) - if (!isLocalised) - return; - str_pool_locale_to_utf(itsSong->file); - __Count_Last_Slash_Position(); - str_pool_locale_to_utf(itsSong->artist); - str_pool_locale_to_utf(itsSong->title); - str_pool_locale_to_utf(itsSong->album); - str_pool_locale_to_utf(itsSong->track); - str_pool_locale_to_utf(itsSong->name); - str_pool_locale_to_utf(itsSong->date); - str_pool_locale_to_utf(itsSong->genre); - str_pool_locale_to_utf(itsSong->composer); - str_pool_locale_to_utf(itsSong->performer); - str_pool_locale_to_utf(itsSong->disc); - str_pool_locale_to_utf(itsSong->comment); - isLocalised = 0; -# endif // !_UTF8 && HAVE_ICONV_H -}*/ - void Song::Clear() { if (itsSong) diff --git a/src/song.h b/src/song.h index 0c65243e..81bc1424 100644 --- a/src/song.h +++ b/src/song.h @@ -78,9 +78,7 @@ namespace MPD void NullMe() { itsSong = 0; } void CopyPtr(bool copy) { copyPtr = copy; } - //void GetEmptyFields(bool get) { itsGetEmptyFields = get; } void Localize(); - //void Delocalize(); void Clear(); bool Empty() const; bool IsFromDB() const; @@ -103,7 +101,6 @@ namespace MPD bool copyPtr; bool isStream; bool isLocalised; - //bool itsGetEmptyFields; }; } -- cgit v1.2.3