diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-05-11 11:32:20 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-05-11 11:32:20 +0000 |
| commit | f12c647031485d06eb2eb46b74a10f097f141fca (patch) | |
| tree | 88deff28de85f80c6ec34fc27b16cffcba739a49 /src/plugins/General | |
| parent | 08de867fc96c121b518523fb2e832f9c80539f01 (diff) | |
| download | qmmp-f12c647031485d06eb2eb46b74a10f097f141fca.tar.gz qmmp-f12c647031485d06eb2eb46b74a10f097f141fca.tar.bz2 qmmp-f12c647031485d06eb2eb46b74a10f097f141fca.zip | |
lyrics plugin: added hotkey
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@935 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
9 files changed, 50 insertions, 260 deletions
diff --git a/src/plugins/General/fileops/Makefile b/src/plugins/General/fileops/Makefile deleted file mode 100644 index e2b8004e0..000000000 --- a/src/plugins/General/fileops/Makefile +++ /dev/null @@ -1,247 +0,0 @@ -############################################################################# -# Makefile for building: libfileops.so -# Generated by qmake (2.01a) (Qt 4.5.1) on: ?? ??? 1 19:19:09 2009 -# Project: fileops.pro -# Template: lib -# Command: /usr/bin/qmake -unix -o Makefile fileops.pro -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -CFLAGS = -pipe -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -fPIC $(DEFINES) -CXXFLAGS = -pipe -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -fPIC $(DEFINES) -INCPATH = -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include -I../../../../src -I.build/moc -I.build/ui -LINK = g++ -LFLAGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -LIBS = $(SUBLIBS) -L../../../../lib -L/usr/lib -lqmmpui -lqmmp -lQtGui -L/usr/lib -lpng -lfreetype -lSM -lICE -lXrender -lfontconfig -lXext -lX11 -lQtCore -lz -lm -lrt -ldl -lpthread -AR = ar cqs -RANLIB = -QMAKE = /usr/bin/qmake -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -sf -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = .build/obj/ - -####### Files - -SOURCES = fileopsfactory.cpp \ - fileops.cpp \ - settingsdialog.cpp .build/moc/moc_fileopsfactory.cpp \ - .build/moc/moc_fileops.cpp \ - .build/moc/moc_settingsdialog.cpp -OBJECTS = .build/obj/fileopsfactory.o \ - .build/obj/fileops.o \ - .build/obj/settingsdialog.o \ - .build/obj/moc_fileopsfactory.o \ - .build/obj/moc_fileops.o \ - .build/obj/moc_settingsdialog.o -DIST = /usr/lib/qt4/mkspecs/common/g++.conf \ - /usr/lib/qt4/mkspecs/common/unix.conf \ - /usr/lib/qt4/mkspecs/common/linux.conf \ - /usr/lib/qt4/mkspecs/qconfig.pri \ - /usr/lib/qt4/mkspecs/features/qt_functions.prf \ - /usr/lib/qt4/mkspecs/features/qt_config.prf \ - /usr/lib/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/lib/qt4/mkspecs/features/default_pre.prf \ - ../../../../qmmp.pri \ - ../../plugins.pri \ - /usr/lib/qt4/mkspecs/features/release.prf \ - /usr/lib/qt4/mkspecs/features/default_post.prf \ - /usr/lib/qt4/mkspecs/features/warn_on.prf \ - /usr/lib/qt4/mkspecs/features/qt.prf \ - /usr/lib/qt4/mkspecs/features/unix/thread.prf \ - /usr/lib/qt4/mkspecs/features/moc.prf \ - /usr/lib/qt4/mkspecs/features/resources.prf \ - /usr/lib/qt4/mkspecs/features/uic.prf \ - /usr/lib/qt4/mkspecs/features/yacc.prf \ - /usr/lib/qt4/mkspecs/features/lex.prf \ - fileops.pro -QMAKE_TARGET = fileops -DESTDIR = ../../../../lib/qmmp/General/ -TARGET = libfileops.so -TARGETD = libfileops.so - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile ../../../../lib/qmmp/General/$(TARGET) - -../../../../lib/qmmp/General/$(TARGET): .build/ui/ui_settingsdialog.h $(OBJECTS) $(SUBLIBS) $(OBJCOMP) - @$(CHK_DIR_EXISTS) ../../../../lib/qmmp/General/ || $(MKDIR) ../../../../lib/qmmp/General/ - -$(DEL_FILE) $(TARGET) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) - -$(MOVE) $(TARGET) ../../../../lib/qmmp/General/ - - - -Makefile: fileops.pro /usr/lib/qt4/mkspecs/linux-g++/qmake.conf /usr/lib/qt4/mkspecs/common/g++.conf \ - /usr/lib/qt4/mkspecs/common/unix.conf \ - /usr/lib/qt4/mkspecs/common/linux.conf \ - /usr/lib/qt4/mkspecs/qconfig.pri \ - /usr/lib/qt4/mkspecs/features/qt_functions.prf \ - /usr/lib/qt4/mkspecs/features/qt_config.prf \ - /usr/lib/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/lib/qt4/mkspecs/features/default_pre.prf \ - ../../../../qmmp.pri \ - ../../plugins.pri \ - /usr/lib/qt4/mkspecs/features/release.prf \ - /usr/lib/qt4/mkspecs/features/default_post.prf \ - /usr/lib/qt4/mkspecs/features/warn_on.prf \ - /usr/lib/qt4/mkspecs/features/qt.prf \ - /usr/lib/qt4/mkspecs/features/unix/thread.prf \ - /usr/lib/qt4/mkspecs/features/moc.prf \ - /usr/lib/qt4/mkspecs/features/resources.prf \ - /usr/lib/qt4/mkspecs/features/uic.prf \ - /usr/lib/qt4/mkspecs/features/yacc.prf \ - /usr/lib/qt4/mkspecs/features/lex.prf \ - /usr/lib/libQtGui.prl \ - /usr/lib/libQtCore.prl - $(QMAKE) -unix -o Makefile fileops.pro -/usr/lib/qt4/mkspecs/common/g++.conf: -/usr/lib/qt4/mkspecs/common/unix.conf: -/usr/lib/qt4/mkspecs/common/linux.conf: -/usr/lib/qt4/mkspecs/qconfig.pri: -/usr/lib/qt4/mkspecs/features/qt_functions.prf: -/usr/lib/qt4/mkspecs/features/qt_config.prf: -/usr/lib/qt4/mkspecs/features/exclusive_builds.prf: -/usr/lib/qt4/mkspecs/features/default_pre.prf: -../../../../qmmp.pri: -../../plugins.pri: -/usr/lib/qt4/mkspecs/features/release.prf: -/usr/lib/qt4/mkspecs/features/default_post.prf: -/usr/lib/qt4/mkspecs/features/warn_on.prf: -/usr/lib/qt4/mkspecs/features/qt.prf: -/usr/lib/qt4/mkspecs/features/unix/thread.prf: -/usr/lib/qt4/mkspecs/features/moc.prf: -/usr/lib/qt4/mkspecs/features/resources.prf: -/usr/lib/qt4/mkspecs/features/uic.prf: -/usr/lib/qt4/mkspecs/features/yacc.prf: -/usr/lib/qt4/mkspecs/features/lex.prf: -/usr/lib/libQtGui.prl: -/usr/lib/libQtCore.prl: -qmake: FORCE - @$(QMAKE) -unix -o Makefile fileops.pro - -dist: - @$(CHK_DIR_EXISTS) .build/obj/fileops1.0.0 || $(MKDIR) .build/obj/fileops1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) .build/obj/fileops1.0.0/ && $(COPY_FILE) --parents fileopsfactory.h fileops.h settingsdialog.h .build/obj/fileops1.0.0/ && $(COPY_FILE) --parents fileopsfactory.cpp fileops.cpp settingsdialog.cpp .build/obj/fileops1.0.0/ && $(COPY_FILE) --parents settingsdialog.ui .build/obj/fileops1.0.0/ && (cd `dirname .build/obj/fileops1.0.0` && $(TAR) fileops1.0.0.tar fileops1.0.0 && $(COMPRESS) fileops1.0.0.tar) && $(MOVE) `dirname .build/obj/fileops1.0.0`/fileops1.0.0.tar.gz . && $(DEL_FILE) -r .build/obj/fileops1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) ../../../../lib/qmmp/General/libfileops.so - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: .build/moc/moc_fileopsfactory.cpp .build/moc/moc_fileops.cpp .build/moc/moc_settingsdialog.cpp -compiler_moc_header_clean: - -$(DEL_FILE) .build/moc/moc_fileopsfactory.cpp .build/moc/moc_fileops.cpp .build/moc/moc_settingsdialog.cpp -.build/moc/moc_fileopsfactory.cpp: fileopsfactory.h - /usr/lib/qt4/bin/moc $(DEFINES) $(INCPATH) fileopsfactory.h -o .build/moc/moc_fileopsfactory.cpp - -.build/moc/moc_fileops.cpp: fileops.h - /usr/lib/qt4/bin/moc $(DEFINES) $(INCPATH) fileops.h -o .build/moc/moc_fileops.cpp - -.build/moc/moc_settingsdialog.cpp: .build/ui/ui_settingsdialog.h \ - settingsdialog.h - /usr/lib/qt4/bin/moc $(DEFINES) $(INCPATH) settingsdialog.h -o .build/moc/moc_settingsdialog.cpp - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: .build/ui/ui_settingsdialog.h -compiler_uic_clean: - -$(DEL_FILE) .build/ui/ui_settingsdialog.h -.build/ui/ui_settingsdialog.h: settingsdialog.ui - /usr/lib/qt4/bin/uic settingsdialog.ui -o .build/ui/ui_settingsdialog.h - -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean compiler_uic_clean - -####### Compile - -.build/obj/fileopsfactory.o: fileopsfactory.cpp fileops.h \ - fileopsfactory.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/fileopsfactory.o fileopsfactory.cpp - -.build/obj/fileops.o: fileops.cpp fileops.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/fileops.o fileops.cpp - -.build/obj/settingsdialog.o: settingsdialog.cpp settingsdialog.h \ - .build/ui/ui_settingsdialog.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/settingsdialog.o settingsdialog.cpp - -.build/obj/moc_fileopsfactory.o: .build/moc/moc_fileopsfactory.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_fileopsfactory.o .build/moc/moc_fileopsfactory.cpp - -.build/obj/moc_fileops.o: .build/moc/moc_fileops.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_fileops.o .build/moc/moc_fileops.cpp - -.build/obj/moc_settingsdialog.o: .build/moc/moc_settingsdialog.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_settingsdialog.o .build/moc/moc_settingsdialog.cpp - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: - diff --git a/src/plugins/General/lyrics/lyrics.cpp b/src/plugins/General/lyrics/lyrics.cpp index fc5589165..e0492cbf5 100644 --- a/src/plugins/General/lyrics/lyrics.cpp +++ b/src/plugins/General/lyrics/lyrics.cpp @@ -33,6 +33,7 @@ Lyrics::Lyrics(QObject *parent) : General(parent) { m_action = new QAction(tr("View Lyrics"), this); + m_action->setShortcut(tr("Ctrl+L")); GeneralHandler::instance()->addAction(m_action, GeneralHandler::PLAYLIST_MENU); connect (m_action, SIGNAL(triggered ()), SLOT(showLyrics())); } @@ -42,15 +43,12 @@ Lyrics::~Lyrics() void Lyrics::showLyrics() { - foreach (PlayListItem *item, MediaPlayer::instance()->playListModel()->items()) + QList <PlayListItem *> items = MediaPlayer::instance()->playListModel()->getSelectedItems(); + if (!items.isEmpty()) { - if (item->isSelected()) - { - if (item->artist().isEmpty() || item->title().isEmpty()) - break; - LyricsWindow *w = new LyricsWindow(item->artist(), item->title(), qApp->activeWindow ()); + if (items.at(0)->artist().isEmpty() || items.at(0)->title().isEmpty()) + return; + LyricsWindow *w = new LyricsWindow(items.at(0)->artist(), items.at(0)->title(), qApp->activeWindow ()); w->show(); - break; - } } } diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts index da7019497..6b65ef153 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_cs.ts @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="pl"> +<!DOCTYPE TS> +<TS version="2.0" language="pl"> <context> <name>Lyrics</name> <message> @@ -7,6 +8,11 @@ <source>View Lyrics</source> <translation>Zobrazit text</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -44,6 +50,7 @@ <translation>Text: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Nespojeno</translation> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts index 77e4eebae..f3b221c54 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_de.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="de"> -<defaultcodec></defaultcodec> +<!DOCTYPE TS> +<TS version="2.0" language="de"> <context> <name>Lyrics</name> <message> @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Liedtext anzeigen</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -45,6 +50,7 @@ <translation>Liedtext: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Keine Verbindung</translation> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts index d8e6f7c1b..cda6aefed 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_pl.ts @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Pokaż tekst piosenki</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts index 7046debfc..6ad177916 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_ru.ts @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Показать текст</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts index be6c469e5..ccd0d9f49 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_uk_UA.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE TS><TS version="1.1" language="uk"> -<defaultcodec></defaultcodec> +<!DOCTYPE TS> +<TS version="2.0" language="uk"> <context> <name>Lyrics</name> <message> @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation>Огляд текстів</translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> @@ -45,6 +50,7 @@ <translation>Тексти: %1 - %2</translation> </message> <message> + <location filename="../lyricswindow.cpp" line="66"/> <location filename="../lyricswindow.ui" line="67"/> <source>No connection</source> <translation>Немає з'єднання</translation> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts index 91c5cdd1e..2b5b84c07 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_CN.ts @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> diff --git a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts index 91c5cdd1e..2b5b84c07 100644 --- a/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts +++ b/src/plugins/General/lyrics/translations/lyrics_plugin_zh_TW.ts @@ -8,6 +8,11 @@ <source>View Lyrics</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../lyrics.cpp" line="36"/> + <source>Ctrl+L</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>LyricsFactory</name> |
