Commit 59a684a1 authored by Scott Wheeler's avatar Scott Wheeler
Browse files

Removed more autogenerated files. I also added the feature that double

clicking on a playlist starts playing the first item in the list.

svn path=/trunk/kdemultimedia/juk/; revision=180393
parent 6b4b559b
# KDE tags expanded automatically by am_edit - $Revision$
# Makefile.in generated automatically by automake 1.5 from Makefile.am.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
####### kdevelop will overwrite this part!!! (begin)##########
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AMTAR = @AMTAR@
ARTSCCONFIG = @ARTSCCONFIG@
AS = @AS@
AUTODIRS = @AUTODIRS@
AWK = @AWK@
CC = @CC@
CONF_FILES = @CONF_FILES@
CPP = @CPP@
CXX = @CXX@
CXXCPP = @CXXCPP@
DCOPIDL = @DCOPIDL@
DCOPIDL2CPP = @DCOPIDL2CPP@
DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DPMSINC = @DPMSINC@
DPMSLIB = @DPMSLIB@
ECHO = @ECHO@
EXEEXT = @EXEEXT@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLINC = @GLINC@
GLLIB = @GLLIB@
GMSGFMT = @GMSGFMT@
IDL = @IDL@
IDL_DEPENDENCIES = @IDL_DEPENDENCIES@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVAC = @JAVAC@
JAVAH = @JAVAH@
JVMLIBS = @JVMLIBS@
KDECONFIG = @KDECONFIG@
KDE_CXXFLAGS = @KDE_CXXFLAGS@
KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@
KDE_INCLUDES = @KDE_INCLUDES@
KDE_LDFLAGS = @KDE_LDFLAGS@
KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@
KDE_MT_LIBS = @KDE_MT_LIBS@
KDE_PLUGIN = @KDE_PLUGIN@
KDE_RPATH = @KDE_RPATH@
KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@
KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@
KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@
KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@
KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@
LEX = @LEX@
LEXLIB = @LEXLIB@
LIBCOMPAT = @LIBCOMPAT@
LIBCRYPT = @LIBCRYPT@
LIBDL = @LIBDL@
LIBGEN = @LIBGEN@
LIBJPEG = @LIBJPEG@
LIBMICO = @LIBMICO@
LIBOBJS = @LIBOBJS@
LIBPNG = @LIBPNG@
LIBPTHREAD = @LIBPTHREAD@
LIBPYTHON = @LIBPYTHON@
LIBQIMGIO = @LIBQIMGIO@
LIBRESOLV = @LIBRESOLV@
LIBSHADOW = @LIBSHADOW@
LIBSM = @LIBSM@
LIBSOCKET = @LIBSOCKET@
LIBTIFF = @LIBTIFF@
LIBTOOL = @LIBTOOL@
LIBUCB = @LIBUCB@
LIBUTIL = @LIBUTIL@
LIBXINERAMA = @LIBXINERAMA@
LIBZ = @LIBZ@
LIB_KAB = @LIB_KAB@
LIB_KDECORE = @LIB_KDECORE@
LIB_KDEPRINT = @LIB_KDEPRINT@
LIB_KDEUI = @LIB_KDEUI@
LIB_KFILE = @LIB_KFILE@
LIB_KFM = @LIB_KFM@
LIB_KHTML = @LIB_KHTML@
LIB_KIMGIO = @LIB_KIMGIO@
LIB_KIO = @LIB_KIO@
LIB_KPARTS = @LIB_KPARTS@
LIB_KSPELL = @LIB_KSPELL@
LIB_KSYCOCA = @LIB_KSYCOCA@
LIB_QPE = @LIB_QPE@
LIB_QT = @LIB_QT@
LIB_QTOPIA = @LIB_QTOPIA@
LIB_SMB = @LIB_SMB@
LIB_X11 = @LIB_X11@
LIB_XEXT = @LIB_XEXT@
LN_S = @LN_S@
MCOPIDL = @MCOPIDL@
MEINPROC = @MEINPROC@
MICO_INCLUDES = @MICO_INCLUDES@
MICO_LDFLAGS = @MICO_LDFLAGS@
MOC = @MOC@
MSGFMT = @MSGFMT@
NOOPT_CFLAGS = @NOOPT_CFLAGS@
NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@
NOREPO = @NOREPO@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PAMLIBS = @PAMLIBS@
PASSWDLIBS = @PASSWDLIBS@
PYTHONINC = @PYTHONINC@
PYTHONLIB = @PYTHONLIB@
PYTHONMODDIR = @PYTHONMODDIR@
QTE_NORTTI = @QTE_NORTTI@
QTOPIA_INCLUDES = @QTOPIA_INCLUDES@
QT_INCLUDES = @QT_INCLUDES@
QT_LDFLAGS = @QT_LDFLAGS@
RANLIB = @RANLIB@
RC = @RC@
REPO = @REPO@
SETUIDFLAGS = @SETUIDFLAGS@
STRIP = @STRIP@
TOPSUBDIRS = @TOPSUBDIRS@
UIC = @UIC@
UIC_TR = @UIC_TR@
USER_INCLUDES = @USER_INCLUDES@
USER_LDFLAGS = @USER_LDFLAGS@
USE_EXCEPTIONS = @USE_EXCEPTIONS@
USE_RTTI = @USE_RTTI@
USE_THREADS = @USE_THREADS@
VERSION = @VERSION@
WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@
XGETTEXT = @XGETTEXT@
XPMINC = @XPMINC@
XPMLIB = @XPMLIB@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_INCLUDES = @X_INCLUDES@
X_LDFLAGS = @X_LDFLAGS@
X_PRE_LIBS = @X_PRE_LIBS@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__include = @am__include@
am__quote = @am__quote@
idldir = @idldir@
install_sh = @install_sh@
jni_includes = @jni_includes@
kde_appsdir = @kde_appsdir@
kde_bindir = @kde_bindir@
kde_confdir = @kde_confdir@
kde_datadir = @kde_datadir@
kde_htmldir = @kde_htmldir@
kde_icondir = @kde_icondir@
kde_includes = @kde_includes@
kde_libraries = @kde_libraries@
kde_libs_htmldir = @kde_libs_htmldir@
kde_libs_prefix = @kde_libs_prefix@
kde_locale = @kde_locale@
kde_mimedir = @kde_mimedir@
kde_moduledir = @kde_moduledir@
kde_qtver = @kde_qtver@
kde_servicesdir = @kde_servicesdir@
kde_servicetypesdir = @kde_servicetypesdir@
kde_sounddir = @kde_sounddir@
kde_styledir = @kde_styledir@
kde_templatesdir = @kde_templatesdir@
kde_wallpaperdir = @kde_wallpaperdir@
kde_widgetdir = @kde_widgetdir@
micodir = @micodir@
qt_includes = @qt_includes@
qt_libraries = @qt_libraries@
x_includes = @x_includes@
x_libraries = @x_libraries@
####### kdevelop will overwrite this part!!! (end)############
datadir = $(kde_datadir)/juk
EXTRA_DIST = id3v1.genreml
data_DATA = id3v1.genreml
subdir = juk/data
mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DATA = $(data_DATA)
DIST_COMMON = Makefile.am Makefile.in
#>- all: all-am
#>+ 1
all: docs-am all-am
.SUFFIXES:
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
#>- cd $(top_srcdir) && \
#>- $(AUTOMAKE) --gnu juk/data/Makefile
#>+ 3
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu juk/data/Makefile
cd $(top_srcdir) && perl admin/am_edit juk/data/Makefile.in
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
uninstall-info-am:
install-dataDATA: $(data_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(datadir)
@list='$(data_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$f; \
done
uninstall-dataDATA:
@$(NORMAL_UNINSTALL)
@list='$(data_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(datadir)/$$f"; \
rm -f $(DESTDIR)$(datadir)/$$f; \
done
tags: TAGS
TAGS:
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = ../..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \
fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
$(mkinstalldirs) $(DESTDIR)$(datadir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
#>- clean: clean-am
#>+ 1
clean: kde-rpo-clean clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-dataDATA
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
uninstall-am: uninstall-dataDATA uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am info info-am install install-am install-data \
install-data-am install-dataDATA install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool uninstall uninstall-am uninstall-dataDATA \
uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
#>+ 2
docs-am:
#>+ 6
force-reedit:
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu juk/data/Makefile
cd $(top_srcdir) && perl admin/am_edit juk/data/Makefile.in
#>+ 2
final:
$(MAKE) all-am
#>+ 2
final-install:
$(MAKE) install-am
#>+ 2
no-final:
$(MAKE) all-am
#>+ 2
no-final-install:
$(MAKE) install-am
#>+ 3
cvs-clean:
$(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean
#>+ 3
kde-rpo-clean:
-rm -f *.rpo
......@@ -76,7 +76,7 @@ private:
bool trackPositionDragging;
bool noSeek;
const static int pollInterval = 800;
static const int pollInterval = 800;
private slots:
void playlistChanged(Playlist *list);
......
......@@ -42,13 +42,18 @@
Playlist::Playlist(QWidget *parent, const char *name) : KListView(parent, name)
{
setup();
internalFile = true;
fileName = QString::null;
}
Playlist::Playlist(const QFileInfo &playlistFile, QWidget *parent, const char *name) : KListView(parent, name)
{
setup();
QFile file(playlistFile.absFilePath());
internalFile = false;
fileName = playlistFile.absFilePath();
QFile file(fileName);
file.open(IO_ReadOnly);
QTextStream stream(&file);
......@@ -180,6 +185,16 @@ PlaylistItem *Playlist::nextItem(PlaylistItem *current, bool random)
return(i);
}
bool Playlist::isInternalFile() const
{
return(internalFile);
}
QString Playlist::file() const
{
return(fileName);
}
////////////////////////////////////////////////////////////////////////////////
// protected members
////////////////////////////////////////////////////////////////////////////////
......
......@@ -33,6 +33,8 @@ public:
Playlist(const QFileInfo &playlistFile, QWidget *parent = 0, const char *name = 0);
virtual ~Playlist();
// "File Menu" like operations. "Open" is the constructor above.
virtual void save();
virtual void saveAs();
......@@ -59,6 +61,9 @@ public:
of PlaylistItems virtual. */
virtual PlaylistItem *createItem(const QFileInfo &file);
bool isInternalFile() const;
QString file() const;
protected:
virtual QDragObject *dragObject();
virtual void contentsDropEvent(QDropEvent *e);
......@@ -71,6 +76,14 @@ private:
int processed;
bool allowDuplicates;
// If a file is "internal" it is not one that the user has yet chosen to
// save. However for the purposes of being able to restore a user's
// loaded playlists it will be saved "internally" in:
// $KDEHOME/share/apps/juk/playlists.
bool internalFile;
QString fileName;
private slots:
void emitSelected();
......
......@@ -17,9 +17,11 @@
#include <kiconloader.h>
#include <kurldrag.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kdebug.h>
#include <qfile.h>
#include <qdrawutil.h>
#include <qinputdialog.h>
......@@ -49,7 +51,10 @@ PlaylistBox::PlaylistBox(PlaylistSplitter *parent, const char *name) : KListBox(
setAcceptDrops(true);
connect(this, SIGNAL(currentChanged(QListBoxItem *)),
this, SLOT(currentItemChanged(QListBoxItem *)));
this, SLOT(playlistChanged(QListBoxItem *)));
connect(this, SIGNAL(doubleClicked(QListBoxItem *)),
this, SLOT(playlistDoubleClicked(QListBoxItem *)));
}
PlaylistBox::~PlaylistBox()
......@@ -137,7 +142,28 @@ void PlaylistBox::deleteItem()
void PlaylistBox::deleteItem(PlaylistBoxItem *item)
{
if(item) {
if(item && item->playlist()) {
// If the file is "internal" (not loaded from a file and not yet saved),
// or the file name is null, or the user specifically chooses to delete
// the file then delete it. Otherwise, just remove the file from the
// PlaylistBox.
if(item->playlist()->file() != QString::null) {
if(item->playlist()->isInternalFile())
QFile::remove(item->playlist()->file());
else {
int remove = KMessageBox::warningYesNoCancel(this, i18n("Do you want to delete this file from the disk as well?"));
if(remove == KMessageBox::Yes) {
if(!QFile::remove(item->playlist()->file()))
KMessageBox::sorry(this, i18n("Could not delete the specified file."));
}
else if(remove == KMessageBox::Cancel)
return;
}
}
nameList.remove(item->text());
delete(item->playlist());
delete(item);
......@@ -233,13 +259,20 @@ void PlaylistBox::addName(const QString &name)
// PlaylistBox private slots
////////////////////////////////////////////////////////////////////////////////
void PlaylistBox::currentItemChanged(QListBoxItem *item)
void PlaylistBox::playlistChanged(QListBoxItem *item)
{
PlaylistBoxItem *i = dynamic_cast<PlaylistBoxItem *>(item);
if(i)
emit(currentChanged(i));
}
void PlaylistBox::playlistDoubleClicked(QListBoxItem *item)
{
PlaylistBoxItem *i = dynamic_cast<PlaylistBoxItem *>(item);
if(i)
emit(doubleClicked(i));
}
void PlaylistBox::drawContextMenu(QListBoxItem *item, const QPoint &point)
{
PlaylistBoxItem *i = static_cast<PlaylistBoxItem *>(item);
......
......@@ -76,7 +76,8 @@ private:
private slots:
/** Catches QListBox::currentChanged(QListBoxItem *), does a cast and then re-emits
the signal as currentChanged(PlaylistBoxItem *). */
void currentItemChanged(QListBoxItem *item);
void playlistChanged(QListBoxItem *item);
void playlistDoubleClicked(QListBoxItem *item);
void drawContextMenu(QListBoxItem *item, const QPoint &point);
// context menu entries
void contextSave();
......@@ -88,6 +89,7 @@ private slots:
signals:
void currentChanged(PlaylistBoxItem *);
void doubleClicked(PlaylistBoxItem *);
#if QT_VERSION < 0x031000
......
......@@ -36,7 +36,7 @@ void processEvents()
static int processed = 0;
if(processed == 0)
kapp->processEvents();
processed = ( processed + 1 ) % 10;
processed = (processed + 1) % 10;
}
////////////////////////////////////////////////////////////////////////////////
......@@ -259,6 +259,7 @@ PlaylistSplitter::~PlaylistSplitter()
{
}
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////
......@@ -283,7 +284,11 @@ void PlaylistSplitter::setupLayout()
// Make the connection that will update the selected playlist when a
// selection is made in the playlist box.
connect(playlistBox, SIGNAL(currentChanged(PlaylistBoxItem *)), this, SLOT(changePlaylist(PlaylistBoxItem *)));
connect(playlistBox, SIGNAL(currentChanged(PlaylistBoxItem *)),
this, SLOT(changePlaylist(PlaylistBoxItem *)));
connect(playlistBox, SIGNAL(doubleClicked(PlaylistBoxItem *)),
this, SLOT(playlistBoxDoubleClicked(PlaylistBoxItem *)));
// Create the collection list; this should always exist. This has a
// slightly different creation process than normal playlists (since it in
......@@ -345,4 +350,10 @@ void PlaylistSplitter::changePlaylist(PlaylistBoxItem *item)
}
}
void PlaylistSplitter::playlistBoxDoubleClicked(PlaylistBoxItem *item)
{
if(item && item->playlist() && item->playlist()->firstChild())
emit(playlistDoubleClicked(item->playlist()->firstChild()));
}
#include "playlistsplitter.moc"
......@@ -105,6 +105,7 @@ private:
private slots:
// playlist box slots