Commit d9703c1c authored by Bhushan Shah's avatar Bhushan Shah 📱
Browse files

Port app

parent 4fdffe35
......@@ -39,6 +39,6 @@ include_directories(
#add_subdirectory(plugins)
add_subdirectory(kerfuffle)
#add_subdirectory(part)
#add_subdirectory(app)
add_subdirectory(app)
#add_subdirectory(doc)
......@@ -35,16 +35,16 @@ install( FILES ${CMAKE_CURRENT_SOURCE_DIR}/ark.appdata.xml DESTINATION share/app
install( FILES arkui.rc DESTINATION ${DATA_INSTALL_DIR}/ark )
########### konqueror ark_extract_here plugin ###############
macro_optional_find_package( LibKonq )
macro_log_feature( LIBKONQ_FOUND "LIBKONQ" "libkonq library" "kdebase" FALSE "" "Need to integrate in konqueror" )
if (LIBKONQ_FOUND)
set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
kde4_add_plugin(extracthere WITH_PREFIX ${extracthere_SRCS})
target_link_libraries(extracthere kerfuffle ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS} ${LIBKONQ_LIBRARY} )
include_directories(${LIBKONQ_INCLUDE_DIR})
install( TARGETS extracthere DESTINATION ${PLUGIN_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
endif (LIBKONQ_FOUND)
#macro_optional_find_package( LibKonq )
#macro_log_feature( LIBKONQ_FOUND "LIBKONQ" "libkonq library" "kdebase" FALSE "" "Need to integrate in konqueror" )
#if (LIBKONQ_FOUND)
# set(extracthere_SRCS batchextract.cpp extractHereDndPlugin.cpp)
# kde4_add_plugin(extracthere WITH_PREFIX ${extracthere_SRCS})
# target_link_libraries(extracthere kerfuffle ${KDE4_KDECORE_LIBS} ${KDE4_KPARTS_LIBS} ${KDE4_KFILE_LIBS} ${LIBKONQ_LIBRARY} )
# include_directories(${LIBKONQ_INCLUDE_DIR})
# install( TARGETS extracthere DESTINATION ${PLUGIN_INSTALL_DIR} )
# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ark_dndextract.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
#endif (LIBKONQ_FOUND)
......@@ -206,9 +206,9 @@ void BatchExtract::forwardProgress(KJob *job, unsigned long percent)
bool BatchExtract::addInput(const KUrl& url)
{
Kerfuffle::Archive *archive = Kerfuffle::Archive::create(url.pathOrUrl(), this);
Kerfuffle::Archive *archive = Kerfuffle::Archive::create(url.toDisplayString(QUrl::PreferLocalFile), this);
if ((archive == NULL) || (!QFileInfo(url.pathOrUrl()).exists())) {
if ((archive == NULL) || (!QFileInfo(url.toDisplayString(QUrl::PreferLocalFile)).exists())) {
m_failedFiles.append(url.fileName());
return false;
}
......@@ -280,7 +280,7 @@ bool BatchExtract::showExtractDialog()
}
setAutoSubfolder(dialog.data()->autoSubfolders());
setDestinationFolder(dialog.data()->destinationDirectory().pathOrUrl());
setDestinationFolder(dialog.data()->destinationDirectory().toDisplayString(QUrl::PreferLocalFile));
setOpenDestinationAfterExtraction(dialog.data()->openDestinationAfterExtraction());
setPreservePaths(dialog.data()->preservePaths());
......
......@@ -24,7 +24,7 @@
#include "batchextract.h"
#include "kerfuffle/addtoarchive.h"
#include <KAboutData>
#include <K4AboutData>
#include <KApplication>
#include <KCmdLineArgs>
#include <KDebug>
......@@ -37,9 +37,9 @@ using Kerfuffle::AddToArchive;
int main(int argc, char **argv)
{
KAboutData aboutData("ark", 0, ki18n("Ark"),
K4AboutData aboutData("ark", 0, ki18n("Ark"),
"2.19", ki18n("KDE Archiving tool"),
KAboutData::License_GPL,
K4AboutData::License_GPL,
ki18n("(c) 1997-2011, The Various Ark Developers"),
KLocalizedString(),
"http://utils.kde.org/projects/ark"
......
......@@ -38,6 +38,7 @@
#include <KDebug>
#include <KEditToolBar>
#include <KShortcutsDialog>
#include <KConfigGroup>
#include <QDragEnterEvent>
#include <QDragMoveEvent>
......@@ -188,14 +189,15 @@ void MainWindow::editKeyBindings()
void MainWindow::editToolbars()
{
saveMainWindowSettings(KGlobal::config()->group(QLatin1String("MainWindow")));
KConfigGroup cfg(KSharedConfig::openConfig(), "MainWindow");
saveMainWindowSettings(cfg);
QWeakPointer<KEditToolBar> dlg = new KEditToolBar(factory(), this);
dlg.data()->exec();
createGUI(m_part);
applyMainWindowSettings(KGlobal::config()->group(QLatin1String("MainWindow")));
applyMainWindowSettings(KSharedConfig::openConfig()->group(QLatin1String("MainWindow")));
delete dlg.data();
}
......
......@@ -23,6 +23,7 @@
#define MAINWINDOW_H
#include <KParts/MainWindow>
#include <KParts/OpenUrlArguments>
#include <KParts/ReadWritePart>
#include <KUrl>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment