Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 53acb618 authored by Kacper Kasper's avatar Kacper Kasper

Very dirty port to KF5. Builds and runs.

parent 5b6357f4
project(juk)
set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
find_package( KDE4 REQUIRED )
include( KDE4Defaults )
include( MacroLibrary )
include( CheckIncludeFileCXX )
cmake_minimum_required(VERSION 3.0)
find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(CMakePushCheckState)
include(CheckIncludeFileCXX)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(FeatureSummary)
include(ECMInstallIcons)
include(ECMAddAppIcon)
find_package(Qt5 5.2 REQUIRED COMPONENTS Gui Svg Network Test Widgets)
find_package(KF5 REQUIRED COMPONENTS CoreAddons Completion I18n IconThemes DocTools TextWidgets XmlGui Wallet WindowSystem KDELibs4Support KDE4Support)
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
find_package( Taglib 1.6 )
include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} )
include_directories( ${PHONON_INCLUDES} ${KDE4_INCLUDES} ${QT_INCLUDES} )
add_subdirectory( doc )
add_subdirectory( tests )
add_subdirectory( pics )
macro_optional_find_package(TunePimp)
macro_log_feature(TUNEPIMP_FOUND "TunePimp" "A library for developing MusicBrainz enabled tagging applications" "http://www.musicbrainz.org/products/tunepimp" FALSE "" "Provides MusicBrainz tagging in Juk.")
find_package(TunePimp)
set_package_properties(FEATURE PROPERTIES DESCRIPTION "A library for developing MusicBrainz enabled tagging applications" URL "http://www.musicbrainz.org/products/tunepimp" TYPE OPTIONAL PURPOSE "Provides MusicBrainz tagging in Juk.")
if(TUNEPIMP_FOUND)
set(HAVE_TUNEPIMP 1)
if(TUNEPIMP_FOUND_VERSION_4)
......@@ -27,18 +40,18 @@ else(TUNEPIMP_FOUND)
set(HAVE_TUNEPIMP 0)
endif(TUNEPIMP_FOUND)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -fPIC")
########### next target ###############
include_directories( ${TAGLIB_INCLUDES} )
add_definitions(-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS -DQT_STL)
add_definitions(-DQT_STL)
# Look for Ogg Opus support in taglib (not released yet)
macro_push_required_vars()
cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${TAGLIB_INCLUDES})
check_include_file_cxx(opusfile.h TAGLIB_HAS_OPUSFILE)
macro_pop_required_vars()
cmake_pop_check_state()
configure_file (config-juk.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-juk.h )
......@@ -117,13 +130,13 @@ set(juk_SRCS ${tunepimp_SRCS}
ktrm.cpp
viewmode.cpp )
qt4_add_dbus_adaptor( juk_SRCS org.kde.juk.collection.xml
qt5_add_dbus_adaptor( juk_SRCS org.kde.juk.collection.xml
dbuscollectionproxy.h DBusCollectionProxy )
qt4_add_dbus_adaptor( juk_SRCS org.kde.juk.player.xml playermanager.h PlayerManager)
qt4_add_dbus_adaptor( juk_SRCS org.kde.juk.search.xml searchwidget.h SearchWidget)
qt5_add_dbus_adaptor( juk_SRCS org.kde.juk.player.xml playermanager.h PlayerManager)
qt5_add_dbus_adaptor( juk_SRCS org.kde.juk.search.xml searchwidget.h SearchWidget)
kde4_add_ui_files(juk_SRCS
qt5_wrap_ui(juk_SRCS
filerenamerbase.ui
filerenameroptionsbase.ui
directorylistbase.ui
......@@ -135,14 +148,15 @@ kde4_add_ui_files(juk_SRCS
tageditor.ui
)
kde4_add_app_icon(juk_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-juk.png")
kde4_add_executable(juk ${juk_SRCS})
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-juk.png")
ecm_add_app_icon(juk_SRCS ICONS ${ICONS_SRCS})
add_executable(juk ${juk_SRCS})
if(NOT MSVC AND NOT ( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" ) )
set( LIBMATH m )
endif(NOT MSVC AND NOT ( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" ) )
endif()
target_link_libraries(juk ${LIBMATH} ${KDE4_KHTML_LIBS} ${TAGLIB_LIBRARIES} ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_PHONON_LIBS})
target_link_libraries(juk ${LIBMATH} Qt5::Gui Qt5::Svg Qt5::Widgets Qt5::Network KF5::CoreAddons KF5::Completion KF5::I18n KF5::IconThemes KF5::TextWidgets KF5::XmlGui KF5::WindowSystem KF5::Wallet KF5::KDELibs4Support KF5::KDE4Support ${PHONON_LIBRARY} ${KDE4_KHTML_LIBS} ${TAGLIB_LIBRARIES})
if(TUNEPIMP_FOUND)
target_link_libraries(juk ${TUNEPIMP_LIBRARIES})
endif(TUNEPIMP_FOUND)
......@@ -154,10 +168,10 @@ install(TARGETS juk ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( PROGRAMS org.kde.juk.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES juk.notifyrc jukui.rc jukui-rtl.rc DESTINATION ${DATA_INSTALL_DIR}/juk )
install( FILES juk.notifyrc jukui.rc jukui-rtl.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/juk )
install( FILES org.kde.juk.appdata.xml DESTINATION ${SHARE_INSTALL_PREFIX}/metainfo )
install( FILES jukservicemenu.desktop DESTINATION
${SERVICES_INSTALL_DIR}/ServiceMenus )
install( FILES org.kde.juk.collection.xml org.kde.juk.player.xml org.kde.juk.search.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
kde4_install_icons( ${ICON_INSTALL_DIR} )
ecm_install_icons( ${ICON_INSTALL_DIR} )
......@@ -135,13 +135,15 @@ AdvancedSearchDialog::~AdvancedSearchDialog()
// public slots
////////////////////////////////////////////////////////////////////////////////
AdvancedSearchDialog::Result AdvancedSearchDialog::exec()
//AdvancedSearchDialog::Result AdvancedSearchDialog::exec()
int AdvancedSearchDialog::exec()
{
return 0; // FIXME
Result r;
r.result = DialogCode(KDialog::exec());
r.search = m_search;
r.playlistName = m_playlistName;
return r;
//return r;
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -48,7 +48,8 @@ public:
virtual ~AdvancedSearchDialog();
public slots:
Result exec();
//Result exec();
int exec();
protected slots:
virtual void accept();
......
......@@ -25,6 +25,7 @@
#include <klocale.h>
#include <kdebug.h>
#include <ktoggleaction.h>
#include <kglobal.h>
#include <QDir>
#include <QBuffer>
......@@ -172,7 +173,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
qint32 sortColumn;
s >> sortColumn;
if(playlist)
playlist->setSorting(sortColumn);
playlist->model()->sort(sortColumn);
}
} // while !s.atEnd()
......@@ -269,7 +270,8 @@ void Cache::savePlaylists(const PlaylistList &playlists)
s << qint32(Normal)
<< *(*it);
}
s << qint32((*it)->sortColumn());
//s << qint32((*it)->sortColumn());
s << 0;
}
}
......
......@@ -121,10 +121,11 @@ void CollectionList::completedLoadingCachedItems()
if(config.readEntry("CollectionListSortAscending", true))
order = Qt::AscendingOrder;
m_list->setSortOrder(order);
m_list->setSortColumn(config.readEntry("CollectionListSortColumn", 1));
// FIXME
//m_list->setSortOrder(order);
//m_list->setSortColumn(config.readEntry("CollectionListSortColumn", 1));
m_list->sort();
//m_list->sort();
SplashScreen::finishedLoading();
......@@ -153,7 +154,7 @@ void CollectionList::initialize(PlaylistCollection *collection)
// public methods
////////////////////////////////////////////////////////////////////////////////
CollectionListItem *CollectionList::createItem(const FileHandle &file, Q3ListViewItem *, bool)
CollectionListItem *CollectionList::createItem(const FileHandle &file, QTreeWidgetItem *, bool)
{
// It's probably possible to optimize the line below away, but, well, right
// now it's more important to not load duplicate items.
......@@ -345,7 +346,8 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
this, SLOT(slotPopulateBackMenu()));
connect(action<KToolBarPopupAction>("back")->menu(), SIGNAL(triggered(QAction*)),
this, SLOT(slotPlayFromBackMenu(QAction*)));
setSorting(-1); // Temporarily disable sorting to add items faster.
//FIXME
//setSorting(-1); // Temporarily disable sorting to add items faster.
m_columnTags[PlaylistItem::ArtistColumn] = new TagCountDict;
m_columnTags[PlaylistItem::AlbumColumn] = new TagCountDict;
......@@ -358,8 +360,9 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
CollectionList::~CollectionList()
{
KConfigGroup config(KGlobal::config(), "Playlists");
config.writeEntry("CollectionListSortColumn", sortColumn());
config.writeEntry("CollectionListSortAscending", sortOrder() == Qt::AscendingOrder);
//FIXME
//config.writeEntry("CollectionListSortColumn", sortColumn());
//config.writeEntry("CollectionListSortAscending", sortOrder() == Qt::AscendingOrder);
// In some situations the dataChanged signal from clearItems will cause observers to
// subsequently try to access a deleted item. Since we're going away just remove all
......@@ -387,9 +390,9 @@ void CollectionList::contentsDropEvent(QDropEvent *e)
void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
{
if(e->source() != this)
/*if(e->source() != this)
Playlist::contentsDragMoveEvent(e);
else
else*/
e->setAccepted(false);
}
......@@ -474,6 +477,7 @@ void CollectionListItem::refresh()
data()->cachedWidths.resize(columns);
for(int i = offset; i < columns; i++) {
setData(i, Qt::DisplayRole, text(i));
int id = i - offset;
if(id != TrackNumberColumn && id != LengthColumn) {
// All columns other than track num and length need local-encoded data for sorting
......@@ -497,21 +501,21 @@ void CollectionListItem::refresh()
data()->metadata[id] = toLower;
}
int newWidth = width(listView()->fontMetrics(), listView(), i);
/*int newWidth = width(listView()->fontMetrics(), listView(), i);
if(newWidth != data()->cachedWidths[i])
playlist()->slotWeightDirty(i);
data()->cachedWidths[i] = newWidth;
data()->cachedWidths[i] = newWidth;*/
}
if(listView()->isVisible())
repaint();
/*if(listView()->isVisible())
repaint();*/
for(PlaylistItemList::Iterator it = m_children.begin(); it != m_children.end(); ++it) {
(*it)->playlist()->update();
(*it)->playlist()->dataChanged();
if((*it)->listView()->isVisible())
(*it)->repaint();
/*if((*it)->treeWidget()->isVisible())
(*it)->repaint();*/
}
CollectionList::instance()->dataChanged();
......@@ -543,9 +547,9 @@ void CollectionListItem::updateCollectionDict(const QString &oldPath, const QStr
void CollectionListItem::repaint() const
{
Q3ListViewItem::repaint();
/*QItemDelegate::repaint();
for(PlaylistItemList::ConstIterator it = m_children.constBegin(); it != m_children.constEnd(); ++it)
(*it)->repaint();
(*it)->repaint();*/
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -113,7 +113,7 @@ public:
CollectionListItem *lookup(const QString &file) const;
virtual CollectionListItem *createItem(const FileHandle &file,
Q3ListViewItem * = 0,
QTreeWidgetItem * = 0,
bool = false);
void emitVisibleColumnsChanged() { emit signalVisibleColumnsChanged(); }
......
......@@ -60,7 +60,7 @@ public:
};
CoverDialog::CoverDialog(QWidget *parent) :
QWidget(parent, Qt::WType_Dialog)
QWidget(parent, Qt::Dialog)
{
setupUi(this);
......
......@@ -107,7 +107,6 @@
</customwidget>
</customwidgets>
<includes>
<include location="local" >k3listview.h</include>
<include location="local" >klineedit.h</include>
<include location="local" >covericonview.h</include>
</includes>
......
......@@ -57,7 +57,7 @@
struct CoverPopup : public QWidget
{
CoverPopup(const QPixmap &image, const QPoint &p) :
QWidget(0, Qt::WDestructiveClose | Qt::WX11BypassWM)
QWidget(0, Qt::WindowFlags(Qt::WA_DeleteOnClose | Qt::X11BypassWindowManagerHint))
{
QHBoxLayout *layout = new QHBoxLayout(this);
QLabel *label = new QLabel(this);
......
......@@ -23,6 +23,7 @@
#include <kiconloader.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <QStringList>
#include <QCheckBox>
......@@ -80,7 +81,7 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete)
//////////////////////////////////////////////////////////////////////////////
DeleteDialog::DeleteDialog(QWidget *parent) :
KDialog(parent, Qt::WStyle_DialogBorder),
KDialog(parent, Qt::MSWindowsFixedSizeDialogHint),
m_trashGuiItem(i18n("&Send to Trash"), "user-trash-full")
{
setObjectName( QLatin1String("delete_dialog" ));
......
......@@ -79,11 +79,12 @@ DirectoryList::~DirectoryList()
// public slots
////////////////////////////////////////////////////////////////////////////////
DirectoryList::Result DirectoryList::exec()
int DirectoryList::exec()
{
m_result.status = static_cast<DialogCode>(KDialog::exec());
m_result.addPlaylists = m_base->importPlaylistsCheckBox->isChecked();
return m_result;
//return m_result;
return 0;
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -50,7 +50,7 @@ public:
virtual ~DirectoryList();
public slots:
Result exec();
int exec();
signals:
void signalDirectoryAdded(const QString &directory);
......
########### install files ###############
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR juk)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR juk)
......@@ -57,7 +57,7 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists,
setName(name);
setAllowDuplicates(false);
setSorting(columns() + 1);
sortItems(columnCount() + 1, Qt::AscendingOrder);
for(PlaylistList::ConstIterator it = playlists.constBegin(); it != playlists.constEnd(); ++it)
m_observers.append(new PlaylistDirtyObserver(this, *it));
......
......@@ -17,6 +17,8 @@
#ifndef EXAMPLEOPTIONS_H
#define EXAMPLEOPTIONS_H
#include <KUrl>
#include <qdialog.h>
#include <QHideEvent>
......
......@@ -47,6 +47,7 @@
#include <QPixmap>
#include <QFrame>
#include <QTreeWidget>
#include <QScrollBar>
#include "tag.h"
#include "filerenameroptions.h"
......@@ -899,7 +900,7 @@ void FileRenamer::rename(const PlaylistItemList &items)
if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != QDialog::Accepted)
return;
KApplication::setOverrideCursor(Qt::waitCursor);
KApplication::setOverrideCursor(Qt::WaitCursor);
for(QMap<QString, QString>::ConstIterator it = map.constBegin();
it != map.constEnd(); ++it)
{
......
......@@ -22,6 +22,8 @@
#include <QVector>
#include <QMap>
#include <KUrl>
#include "ui_filerenamerbase.h"
#include "categoryreaderinterface.h"
#include "tagrenameroptions.h"
......
......@@ -38,8 +38,8 @@ HistoryPlaylist::HistoryPlaylist(PlaylistCollection *collection) :
m_timer->setSingleShot(true);
connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCreateNewItem()));
setSorting(-1);
setColumnText(0, i18n("Time"));
sortItems(-1, Qt::AscendingOrder);
headerItem()->setText(0, i18n("Time"));
}
HistoryPlaylist::~HistoryPlaylist()
......@@ -48,10 +48,10 @@ HistoryPlaylist::~HistoryPlaylist()
}
HistoryPlaylistItem *HistoryPlaylist::createItem(const FileHandle &file,
Q3ListViewItem *after, bool emitChanged)
QTreeWidgetItem *after, bool emitChanged)
{
if(!after)
after = lastItem();
after = topLevelItem(topLevelItemCount() - 1);
return Playlist::createItem<HistoryPlaylistItem>(file, after, emitChanged);
}
......@@ -84,7 +84,7 @@ void HistoryPlaylist::slotCreateNewItem()
// HistoryPlaylistItem public members
////////////////////////////////////////////////////////////////////////////////
HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListViewItem *after) :
HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QTreeWidgetItem *after) :
PlaylistItem(item, parent, after),
m_dateTime(QDateTime::currentDateTime())
{
......
......@@ -25,7 +25,7 @@
class HistoryPlaylistItem : public PlaylistItem
{
public:
HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, Q3ListViewItem *after);
HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QTreeWidgetItem *after);
HistoryPlaylistItem(CollectionListItem *item, Playlist *parent);
virtual ~HistoryPlaylistItem();
......@@ -44,7 +44,7 @@ public:
HistoryPlaylist(PlaylistCollection *collection);
virtual ~HistoryPlaylist();
virtual HistoryPlaylistItem *createItem(const FileHandle &file, Q3ListViewItem *after = 0,
virtual HistoryPlaylistItem *createItem(const FileHandle &file, QTreeWidgetItem *after = 0,
bool emitChanged = true);
virtual void createItems(const PlaylistItemList &siblings);
virtual int columnOffset() const { return 1; }
......
......@@ -30,6 +30,7 @@
#include <kaction.h>
#include <kconfiggroup.h>
#include <kapplication.h>
#include <kglobal.h>
#include <kglobalaccel.h>
#include <ktoolbarpopupaction.h>
#include <knotification.h>
......@@ -74,7 +75,7 @@ void deleteAndClear(T *&ptr)
////////////////////////////////////////////////////////////////////////////////
JuK::JuK(QWidget *parent) :
KXmlGuiWindow(parent, Qt::WDestructiveClose),
KXmlGuiWindow(parent, Qt::WindowFlags(Qt::WA_DeleteOnClose)),
m_splitter(0),
m_statusLabel(0),
m_systemTray(0),
......@@ -91,7 +92,7 @@ JuK::JuK(QWidget *parent) :
if(m_showSplash && !m_startDocked && Cache::cacheFileExists()) {
if(SplashScreen* splash = SplashScreen::instance()) {
splash->show();
kapp->processEvents();
qApp->processEvents();
}
}
......@@ -201,7 +202,7 @@ void JuK::setupActions()
KStandardAction::cut(collection);
KStandardAction::copy(collection);
KStandardAction::paste(collection);
KAction *clear = KStandardAction::clear(collection);
QAction *clear = KStandardAction::clear(collection);
KStandardAction::selectAll(collection);
KStandardAction::keyBindings(this, SLOT(slotEditKeys()), collection);
......@@ -377,13 +378,13 @@ void JuK::setupGlobalAccels()
void JuK::slotProcessArgs()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
/*KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QStringList files;
for(int i = 0; i < args->count(); i++)
files.append(args->arg(i));
files.append(args->arg(i));*/
CollectionList::instance()->addFiles(files);
//CollectionList::instance()->addFiles(files);
}
void JuK::slotClearOldCovers()
......@@ -510,7 +511,7 @@ void JuK::saveConfig()
bool JuK::queryClose()
{
if(!m_shuttingDown &&
!kapp->sessionSaving() &&
!qApp->isSavingSession() &&
m_systemTray &&
m_toggleDockOnCloseAction->isChecked())
{
......
......@@ -18,6 +18,7 @@
#define K3BEXPORTER_H
#include <kaction.h>
#include <kshortcut.h>
#include "playlistexporter.h"
#include "playlistitem.h"
......
......@@ -28,6 +28,8 @@
#include <QObject>
#if 0
template<class T>
class QList;
......@@ -216,4 +218,6 @@ double stringSimilarity(const QStringList &l, const QString &s);
#endif
#endif
// vim: set et sw=4 tw=0 sta:
......@@ -24,6 +24,8 @@
#include <KToggleAction>
#include <KConfigGroup>
#include <KDebug>
#include <KIcon>
#include <kglobal.h>
#include "lyricswidget.h"
#include "tag.h"
......@@ -42,7 +44,7 @@ LyricsWidget::LyricsWidget(QWidget* parent): QTextBrowser(parent),
KToggleAction *show = new KToggleAction(KIcon(QLatin1String("view-media-lyrics")),
i18n("Show &Lyrics"), this);
ActionCollection::actions()->addAction("showLyrics", show);
connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
//connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
KConfigGroup config(KGlobal::config(), "LyricsWidget");
bool shown = config.readEntry("Show", true);
......
......@@ -50,65 +50,68 @@ static const char sho[] = I18N_NOOP("MPRIS2 Interface implementation.");
int main(int argc, char *argv[])
{
KAboutData aboutData("juk", 0, ki18n("JuK"),
"3.14", ki18n(description), KAboutData::License_GPL,
ki18n("© 2002–2016, Scott Wheeler, Michael Pyne, and others"),
KLocalizedString(),
"http://www.kde.org/applications/multimedia/juk/");
aboutData.addAuthor(ki18n("Scott Wheeler"), ki18n(scott), "wheeler@kde.org");
aboutData.addAuthor(ki18n("Michael Pyne"), ki18n(michael), "mpyne@kde.org");
aboutData.addCredit(ki18n("Γιώργος Κυλάφας (Giorgos Kylafas)"), ki18n(giorgos), "gekylafas@gmail.com");
aboutData.addCredit(ki18n("Daniel Molkentin"), ki18n(daniel), "molkentin@kde.org");
aboutData.addCredit(ki18n("Tim Jansen"), ki18n(tim), "tim@tjansen.de");
aboutData.addCredit(ki18n("Stefan Asserhäll"), ki18n(stefan), "stefan.asserhall@telia.com");
aboutData.addCredit(ki18n("Stephen Douglas"), ki18n(stephen), "stephen_douglas@yahoo.com");
aboutData.addCredit(ki18n("Frerich Raabe"), ki18n(frerich), "raabe@kde.org");
aboutData.addCredit(ki18n("Zack Rusin"), ki18n(zack), "zack@kde.org");
aboutData.addCredit(ki18n("Adam Treat"), ki18n(adam), "manyoso@yahoo.com");
aboutData.addCredit(ki18n("Matthias Kretz"), ki18n(matthias), "kretz@kde.org");
aboutData.addCredit(ki18n("Maks Orlovich"), ki18n(maks), "maksim@kde.org");
aboutData.addCredit(ki18n("Antonio Larrosa Jimenez"), ki18n(antonio), "larrosa@kde.org");
aboutData.addCredit(ki18n("Allan Sandfeld Jensen"), ki18n(allan), "kde@carewolf.com");
aboutData.addCredit(ki18n("Nathan Toone"), ki18n(nathan), "nathan@toonetown.com");
aboutData.addCredit(ki18n("Pascal Klein"), ki18n(pascal), "4pascal@tpg.com.au");
aboutData.addCredit(ki18n("Laurent Montel"), ki18n(laurent), "montel@kde.org");
aboutData.addCredit(ki18n("Georg Grabler"), ki18n(georg), "georg@grabler.net");
aboutData.addCredit(ki18n("Martin Sandsmark"), ki18n(sandsmark), "martin.sandsmark@kde.org");
aboutData.addCredit(ki18n("Eike Hein"), ki18n(sho), "hein@kde.org");
KCmdLineArgs::init(argc, argv, &aboutData);
QApplication app(argc, argv);
KLocalizedString::setApplicationDomain("juk");
KAboutData aboutData(QStringLiteral("juk"), i18n("JuK"),
QStringLiteral("3.14"), i18n(description), KAboutLicense::GPL,
i18n("© 2002–2016, Scott Wheeler, Michael Pyne, and others"),
QStringLiteral(""),
QStringLiteral("http://www.kde.org/applications/multimedia/juk/"));
aboutData.addAuthor(i18n("Scott Wheeler"), i18n(scott), "wheeler@kde.org");
aboutData.addAuthor(i18n("Michael Pyne"), i18n(michael), "mpyne@kde.org");
aboutData.addCredit(i18n("Γιώργος Κυλάφας (Giorgos Kylafas)"), i18n(giorgos), "gekylafas@gmail.com");
aboutData.addCredit(i18n("Daniel Molkentin"), i18n(daniel), "molkentin@kde.org");
aboutData.addCredit(i18n("Tim Jansen"), i18n(tim), "tim@tjansen.de");
aboutData.addCredit(i18n("Stefan Asserhäll"), i18n(stefan), "stefan.asserhall@telia.com");
aboutData.addCredit(i18n("Stephen Douglas"), i18n(stephen), "stephen_douglas@yahoo.com");
aboutData.addCredit(i18n("Frerich Raabe"), i18n(frerich), "raabe@kde.org");
aboutData.addCredit(i18n("Zack Rusin"), i18n(zack), "zack@kde.org");
aboutData.addCredit(i18n("Adam Treat"), i18n(adam), "manyoso@yahoo.com");
aboutData.addCredit(i18n("Matthias Kretz"), i18n(matthias), "kretz@kde.org");
aboutData.addCredit(i18n("Maks Orlovich"), i18n(maks), "maksim@kde.org");
aboutData.addCredit(i18n("Antonio Larrosa Jimenez"), i18n(antonio), "larrosa@kde.org");
aboutData.addCredit(i18n("Allan Sandfeld Jensen"), i18n(allan), "kde@carewolf.com");
aboutData.addCredit(i18n("Nathan Toone"), i18n(nathan), "nathan@toonetown.com");
aboutData.addCredit(i18n("Pascal Klein"), i18n(pascal), "4pascal@tpg.com.au");
aboutData.addCredit(i18n("Laurent Montel"), i18n(laurent), "montel@kde.org");
aboutData.addCredit(i18n("Georg Grabler"), i18n(georg), "georg@grabler.net");
aboutData.addCredit(i18n("Martin Sandsmark"), i18n(sandsmark), "martin.sandsmark@kde.org");
aboutData.addCredit(i18n("Eike Hein"), i18n(sho), "hein@kde.org");
KAboutData::setApplicationData(aboutData);
/*KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineOptions options;
options.add("+[file(s)]", ki18n("File(s) to open"));
KCmdLineArgs::addCmdLineOptions(options);
KUniqueApplication::addCmdLineOptions();
KUniqueApplication::addCmdLineOptions();*/
KUniqueApplication a;
// If this flag gets set then JuK will quit if you click the cover on the track
// announcement popup when JuK is only in the system tray (the systray has no widget).
a.setQuitOnLastWindowClosed(false);
app.setQuitOnLastWindowClosed(false);
// Create the main window and such
JuK *juk = new JuK;
if(a.isSessionRestored() && KMainWindow::canBeRestored(1))
if(app.isSessionRestored() && KMainWindow::canBeRestored(1))
juk->restore(1, false /* don't show */);
KConfigGroup config(KGlobal::config(), "Settings");
if(!config.readEntry("StartDocked", false)) {
juk->show();
}
else if(!a.isSessionRestored()) {
else if(!app.isSessionRestored()) {
QString message = i18n("JuK running in docked mode\nUse context menu in system tray to restore.");
KNotification::event("dock_mode",i18n("JuK Docked"), message);
}
return a.exec();
return app.exec();
}
// vim: set et sw=4 tw=0 sta fileencoding=utf8:
......@@ -21,6 +21,7 @@
#include <klocale.h>
#include <kurl.h>
#include <kio/netaccess.h>
#include <kmimetype.h>
#include <QtGui/QWidget>
#include <QtCore/QFile>
......@@ -98,7 +99,7 @@ QStringList MediaFiles::openDialog(QWidget *parent)
dialog->setOperationMode(KFileDialog::Opening);
dialog->setCaption(i18nc("open audio file", "Open"));
//dialog->setCaption(i18nc("open audio file", "Open")); FIXME