remove the kpart. it's totally broken now and would require a lot of work.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1105785
This commit is contained in:
Volker Lanz 2010-03-21 11:59:58 +00:00
parent dc3c0a98cd
commit 8074a1e702
15 changed files with 0 additions and 584 deletions

3
TODO
View File

@ -6,9 +6,6 @@ Plans and ideas for 1.1:
* Check if no of sectors fits in an unsigned 32 bit int for msdos partition
tables.
* The KPart works but has problems: The context menus don't show up, the status
bar is missing, maybe more.
* save msdos mbr?
* let the user specify extern command locations and options in the settings;

View File

@ -62,32 +62,5 @@ install(FILES partitionmanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
############################################
option(PARTMAN_KPART "Build a kpart for KDE Partition Manager" OFF)
if(PARTMAN_KPART)
file(GLOB partitionmanagerpart_SRCS kpart/partitionmanagerpart.cpp)
kde4_add_plugin(partitionmanagerpart ${partitionmanagerpart_SRCS})
target_link_libraries(partitionmanagerpart
${KDE4_KPARTS_LIBS}
${KDE4_KDECORE_LIBS}
partitionmanagerprivate
)
install(TARGETS partitionmanagerpart DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kpart/partitionmanagerpart.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES kpart/partitionmanagerpart.rc DESTINATION ${DATA_INSTALL_DIR}/partitionmanagerpart)
option(PARTMAN_KPART_TEST "Build a kpart test application for KDE Partition Manager" OFF)
if(PARTMAN_KPART_TEST)
add_subdirectory(kpart/test)
endif(PARTMAN_KPART_TEST)
endif(PARTMAN_KPART)
############################################
add_subdirectory(plugins)

View File

@ -1,49 +0,0 @@
/***************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kpart/partitionmanagerpart.h"
#include "gui/mainwindow.h"
#include "util/helpers.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY(PartitionManagerPartFactory, registerPlugin<PartitionManagerPart>("PartitionManagerPart");)
K_EXPORT_PLUGIN(PartitionManagerPartFactory("partitionmanagerpart", "partitionmanager"))
PartitionManagerPart::PartitionManagerPart(QWidget*, QObject* parent, const QVariantList&) :
KParts::ReadOnlyPart(parent)
{
setComponentData(PartitionManagerPartFactory::componentData(), false);
// workaround for https://bugs.launchpad.net/kdesudo/+bug/272427
unblockSigChild();
registerMetaTypes();
setWidget(new MainWindow(NULL, actionCollection()));
setXMLFile("partitionmanagerpart.rc");
}
KAboutData* PartitionManagerPart::createAboutData()
{
return createPartitionManagerAboutData();
}

View File

@ -1,48 +0,0 @@
[Desktop Entry]
Type=Service
Name=KDE Partition Manager
Name[bg]=Управление на дялове за KDE
Name[ca]=Gestor de particions del KDE
Name[ca@valencia]=Gestor de particions del KDE
Name[cs]=Správce diskových oddílů pro KDE
Name[da]=KDE Partitionshåndtering
Name[de]=KDE-Partitionsmanager
Name[el]=Διαχειριστής κατατμήσεων του KDE
Name[en_GB]=KDE Partition Manager
Name[es]=Gestor de particiones de KDE
Name[et]=KDE partitsioonide haldur
Name[fr]=Gestionnaire de partitions de KDE
Name[ga]=Bainisteoir Deighiltí KDE
Name[gl]=Xestor de particións de KDE
Name[hu]=KDE Partíció Menedzser
Name[it]=Gestore delle partizioni di KDE
Name[ja]=KDE パーティションマネージャ
Name[km]=កម្មវិធី​គ្រប់គ្រង​ការ​ចែកភាគ​ថាស​របស់ KDE
Name[lt]=KDE skaidinių tvarkyklė
Name[lv]=KDE partīciju pārvaldnieks
Name[ms]=Pengurus Partisyen KDE
Name[nb]=KDE partisjonshåndtering
Name[nds]=KDE-Partitschonenpleger
Name[nl]=KDE Partitiebeheer
Name[nn]=KDE-partisjonshandtering
Name[pa]=ਕੇਡੀਈ ਪਾਰਟੀਸ਼ਨ ਮੈਨੇਜਰ
Name[pt]=Gestor de Partições do KDE
Name[pt_BR]=Gerenciador de partições do KDE
Name[ro]=Gestionarul de partiții KDE
Name[ru]=Диспетчер разделов для KDE
Name[sk]=KDE Správca partícií
Name[sr]=КДЕ‑ов менаџер партиција
Name[sr@ijekavian]=КДЕ‑ов менаџер партиција
Name[sr@ijekavianlatin]=KDEov menadžer particija
Name[sr@latin]=KDEov menadžer particija
Name[sv]=KDE:s partitionshanterare
Name[th]=เครื่องมือจัดการพาร์ทิชันของ KDE
Name[tr]=KDE Partition Manager
Name[uk]=Керування розділами диска KDE
Name[x-test]=xxKDE Partition Managerxx
Name[zh_CN]=KDE 分区管理器
Name[zh_TW]=KDE 磁碟分割區管理員
Icon=
X-KDE-ServiceTypes=KParts/ReadOnlyPart
X-KDE-Library=partitionmanagerpart

View File

@ -1,42 +0,0 @@
/***************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#if !defined(PARTITIONMANAGERPART__H)
#define PARTITIONMANAGERPART__H
#include <kparts/part.h>
class KAboutData;
class PartitionManagerPart : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
PartitionManagerPart(QWidget* parentWidget, QObject* parent, const QVariantList& args);
public:
static KAboutData* createAboutData();
protected:
virtual bool openFile() { return false; }
};
#endif

View File

@ -1,73 +0,0 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="partitionmanagerpart" version="9">
<ToolBar name="editToolBar">
<text context="@title:menu turn on and off edit toolbar">Edit Toolbar</text>
<Action name="applyAllOperations"/>
<Action name="undoOperation"/>
<Action name="clearAllOperations"/>
</ToolBar>
<ToolBar name="partitionToolBar">
<text context="@title:menu">Partition Toolbar</text>
<Action name="newPartition"/>
<Action name="resizePartition"/>
<Action name="copyPartition"/>
<Action name="pastePartition"/>
<Action name="deletePartition"/>
<Action name="checkPartition"/>
<Action name="propertiesPartition"/>
</ToolBar>
<ToolBar name="deviceToolBar">
<text context="@title:menu">Device Toolbar</text>
<Action name="createNewPartitionTable"/>
<Action name="propertiesDevice"/>
</ToolBar>
<MenuBar>
<Menu name="edit">
<text context="@title:menu">Edit</text>
<Action name="undoOperation"/>
<Action name="clearAllOperations"/>
<Action name="applyAllOperations"/>
</Menu>
<Menu name="view">
<text context="@title:menu">View</text>
<Action name="toggleDockDevices"/>
<Action name="toggleDockOperations"/>
<Action name="toggleDockInformation"/>
<Action name="toggleDockLog"/>
<separator name="separator"/>
<Action name="fileSystemSupport"/>
<Action name="refreshDevices"/>
</Menu>
<Menu name="device">
<text context="@title:menu">Device</text>
<Action name="createNewPartitionTable"/>
<Action name="propertiesDevice"/>
</Menu>
<Menu name="partition">
<text context="@title:menu">Partition</text>
<Action name="newPartition"/>
<Action name="resizePartition"/>
<Action name="deletePartition"/>
<Action name="shredPartition"/>
<separator name="separator"/>
<Action name="copyPartition"/>
<Action name="pastePartition"/>
<separator name="separator"/>
<Action name="editMountPoint"/>
<Action name="mountPartition"/>
<separator name="separator"/>
<Action name="checkPartition"/>
<separator name="separator"/>
<Action name="backupPartition"/>
<Action name="restorePartition"/>
<separator name="separator"/>
<Action name="propertiesPartition"/>
</Menu>
</MenuBar>
</kpartgui>

View File

@ -1,34 +0,0 @@
# Copyright (C) 2008 by Volker Lanz <vl@fidra.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
find_package(KDE4 REQUIRED)
include_directories(${KDE4_INCLUDES} .)
set(kparttest_SRCS
main.cpp
kparttest.cpp
)
add_subdirectory(po)
kde4_add_executable(kparttest ${kparttest_SRCS})
target_link_libraries(kparttest ${KDE4_KDEUI_LIBS} ${KDE4_KPARTS_LIBS})
install(TARGETS kparttest ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES kparttestui.rc DESTINATION ${DATA_INSTALL_DIR}/kparttest)

View File

@ -1,57 +0,0 @@
/***************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "kparttest.h"
#include <kaction.h>
#include <kactioncollection.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kmessagebox.h>
#include <kstandardaction.h>
#include <kdebug.h>
#include <QApplication>
KPartTest::KPartTest() :
KParts::MainWindow(),
m_Part(NULL)
{
setupActions();
KPluginFactory* factory = KPluginLoader("partitionmanagerpart").factory();
m_Part = factory ? factory->create<KParts::ReadOnlyPart>("PartitionManagerPart", this) : NULL;
if (m_Part == NULL)
{
KMessageBox::error(this, "Could not load Partition Manager's KPart");
qApp->quit();
return;
}
setCentralWidget(m_Part->widget());
setupGUI(ToolBar | Keys | StatusBar | Save);
createGUI(m_Part);
}
void KPartTest::setupActions()
{
KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());
}

View File

@ -1,40 +0,0 @@
/***************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#if !defined(KPARTTEST__H)
#define KPARTTEST__H
#include <kparts/mainwindow.h>
class KPartTest : public KParts::MainWindow
{
Q_OBJECT
public:
KPartTest();
private:
void setupActions();
private:
KParts::ReadOnlyPart* m_Part;
};
#endif

View File

@ -1,15 +0,0 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kparttest" version="3">
<MenuBar>
<Menu name="file">
<Merge/>
<Separator/>
</Menu>
<Merge/>
<Menu name="settings"/>
<Menu name="help"/>
</MenuBar>
</kpartgui>

View File

@ -1,45 +0,0 @@
/***************************************************************************
* Copyright (C) 2008 by Volker Lanz <vl@fidra.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "kparttest.h"
#include <KApplication>
#include <KAboutData>
#include <KCmdLineArgs>
int main(int argc, char* argv[])
{
KAboutData aboutData(
"kparttest",
NULL,
ki18n("KDE Partition Manager KPart"), "0.1",
ki18n("A test application for KDE Partition Manager's KPart."),
KAboutData::License_GPL,
ki18n("Copyright (c) 2008 Volker Lanz")
);
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app;
KPartTest* widget = new KPartTest();
widget->show();
return app.exec();
}

View File

@ -1,21 +0,0 @@
# Copyright (C) 2008 by Volker Lanz <vl@fidra.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
FILE(GLOB PO_FILES *.po)
ADD_TRANSLATIONS(kparttest ${PO_FILES})

View File

@ -1,40 +0,0 @@
# Copyright (C) 2009
# This file is distributed under the same license as the kparttest package.
#
# Volker Lanz <vl@fidra.de>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: kparttest_de\n"
"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?group_id=50231&atid=459007\n"
"POT-Creation-Date: 2009-04-23 09:37+0200\n"
"PO-Revision-Date: 2009-04-23 09:38+0200\n"
"Last-Translator: Volker Lanz <vl@fidra.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Lokalize 0.3\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: main.cpp:31
msgid "KDE Partition Manager KPart"
msgstr ""
#: main.cpp:32
msgid "A test application for KDE Partition Manager's KPart."
msgstr "Eine Testanwendung für den KPart vom KDE Partitionsmanager."
#: main.cpp:34
msgid "Copyright (c) 2008 Volker Lanz"
msgstr ""
#: rc.cpp:1
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr "Volker Lanz"
#: rc.cpp:2
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr "vl@fidra.de"

View File

@ -1,40 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?"
"group_id=50231&atid=459007\n"
"POT-Creation-Date: 2009-04-23 09:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: main.cpp:31
msgid "KDE Partition Manager KPart"
msgstr ""
#: main.cpp:32
msgid "A test application for KDE Partition Manager's KPart."
msgstr ""
#: main.cpp:34
msgid "Copyright (c) 2008 Volker Lanz"
msgstr ""
#: rc.cpp:1
msgctxt "NAME OF TRANSLATORS"
msgid "Your names"
msgstr ""
#: rc.cpp:2
msgctxt "EMAIL OF TRANSLATORS"
msgid "Your emails"
msgstr ""

View File

@ -1,50 +0,0 @@
#!/bin/sh
BASEDIR=".." # root of translatable sources
PROJECT="kparttest" # project name
BUGADDR="http://sourceforge.net/tracker/?group_id=50231&atid=459007" # MSGID-Bugs
WDIR=`pwd` # working dir
EXTRACTRC="/usr/lib/kde4/bin/extractrc" # path to KDE4 extractrc (the KDE3 version silently fails)
echo "Preparing rc files"
cd ${BASEDIR}
# we use simple sorting to make sure the lines do not jump around too much from system to system
find . -name '*.rc' -o -name '*.ui' -o -name '*.kcfg' | sort > ${WDIR}/rcfiles.list
xargs --arg-file=${WDIR}/rcfiles.list ${EXTRACTRC} > ${WDIR}/rc.cpp
# additional string for KAboutData
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> ${WDIR}/rc.cpp
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> ${WDIR}/rc.cpp
cd ${WDIR}
echo "Done preparing rc files"
echo "Extracting messages"
cd ${BASEDIR}
# see above on sorting
find . -name '*.cpp' -o -name '*.h' -o -name '*.c' | sort > ${WDIR}/infiles.list
echo "rc.cpp" >> ${WDIR}/infiles.list
cd ${WDIR}
xgettext --from-code=UTF-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
-kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
--msgid-bugs-address="${BUGADDR}" \
--files-from=infiles.list -D ${BASEDIR} -D ${WDIR} -o ${PROJECT}.pot || { echo "error while calling xgettext. aborting."; exit 1; }
echo "Done extracting messages"
echo "Merging translations"
catalogs=`find . -name '*.po'`
for cat in $catalogs; do
echo $cat
msgmerge -o $cat.new $cat ${PROJECT}.pot
mv $cat.new $cat
done
echo "Done merging translations"
echo "Cleaning up"
cd ${WDIR}
rm rcfiles.list
rm infiles.list
rm rc.cpp
echo "Done"