mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 05:44:35 +08:00
* big change: fix desktop repo
This commit is contained in:
parent
f8de46238d
commit
9074a4554d
2
build.sh
2
build.sh
@ -124,7 +124,7 @@ build_it()
|
||||
# done
|
||||
# sudo pacman -Uf $_packages_to_install || exit 1
|
||||
|
||||
sudo pacman -U ../_repo/local/`echo ${module} | sed 's/supportpkg-//g'`-*.pkg.*
|
||||
sudo pacman -U ../_repo/local/`echo ${module} | sed 's/support-pkg-//g' | sed 's/tools-pkg-//g'`-*.pkg.*
|
||||
fi
|
||||
|
||||
popd &>/dev/null
|
||||
|
@ -1,29 +0,0 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=colibri
|
||||
pkgver=0.1.1
|
||||
pkgrel=1
|
||||
pkgdesc="Colibri provides an alternative to KDE4 Plasma notifications."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://kde-apps.org/content/show.php/Colibri?content=117147"
|
||||
license=('GPL')
|
||||
depends=('kdebase-workspace>=4.4')
|
||||
makedepends=('gcc' 'cmake' 'automoc4')
|
||||
install=colibri.install
|
||||
source=(http://kde-apps.org/CONTENT/content-files/117147-${pkgname}-${pkgver}.tar.bz2)
|
||||
md5sums=('a34e9d65984b90cd5597ab95532f2c4e')
|
||||
|
||||
build() {
|
||||
cd $srcdir/${pkgname}-${pkgver}
|
||||
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../ || return 1
|
||||
make DESTDIR="$pkgdir/" install || return 1
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
post_install() {
|
||||
echo ""
|
||||
echo "Colibri notifications works ONLY with 4.4"
|
||||
echo ""
|
||||
echo "Enabling Colibri notifications can be a bit tricky:
|
||||
- Right-click on the systemtray applet
|
||||
- Select \"System Tray Settings\"
|
||||
- Uncheck the \"Application notifications\" box"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
#
|
||||
# KDE SC Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
|
||||
# original name (used for the source and pkgnames)
|
||||
_origname=libindicate-qt
|
||||
|
||||
pkgname=${_origname}
|
||||
pkgbranch=0.2
|
||||
pkgver=0.2.2
|
||||
pkgrel=1
|
||||
pkgdesc='A small library for applications to raise "flags" on DBus for other components of the desktop to pick up and visualize. (Canonical Ayatana Project)'
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://launchpad.net/libindicate"
|
||||
license=('GPL')
|
||||
depends=('libindicate>=0.2.3')
|
||||
makedepends=()
|
||||
groups=("kde-uninstall" "kde-support")
|
||||
options=('!splitdbg' '!splithdr')
|
||||
|
||||
source=(http://launchpadlibrarian.net/32429490/libindicate-qt-0.2.2.tar.bz2)
|
||||
md5sums=('edc09ce095e7aab01b85291ce9e5f78c') # libindicate-qt-0.2.2.tar.bz2
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/${_origname}-$pkgver
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
|
||||
make || return 1
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
#
|
||||
# KDE SC Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
|
||||
|
||||
# original name (used for the source and pkgnames)
|
||||
_origname=meanwhile
|
||||
|
||||
|
||||
|
||||
pkgname=${_origname}
|
||||
pkgver=1.0.2
|
||||
pkgrel=11
|
||||
arch=('i686' 'x86_64')
|
||||
pkgdesc="Meanwhile Libraries"
|
||||
url="http://meanwhile.sourceforge.net/"
|
||||
license="GPL"
|
||||
depends=('glib2')
|
||||
makedepends=('doxygen')
|
||||
options=('!splitdbg' '!splithdr')
|
||||
source=(http://downloads.sourceforge.net/project/meanwhile/meanwhile/$pkgver/meanwhile-$pkgver.tar.gz)
|
||||
md5sums=('bf4ced109a367b4c5d71fe63c043270e') # meanwhile-1.0.2.tar.gz
|
||||
groups=("kde-uninstall" "kde-support")
|
||||
|
||||
build()
|
||||
{
|
||||
cd $startdir/src/$_origname-$pkgver
|
||||
./configure --prefix=${_installprefix}
|
||||
make || return 1
|
||||
make DESTDIR=$startdir/pkg install
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
#
|
||||
# KDE SC Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
|
||||
|
||||
# original name (used for the source and pkgnames)
|
||||
_origname=x-kit
|
||||
|
||||
|
||||
|
||||
#
|
||||
# package info
|
||||
#
|
||||
pkgname=xkit
|
||||
pkgver=0.4.2
|
||||
pkgrel=7
|
||||
pkgdesc="A kit to manipulate, parse and validate the X.org configuration file (/etc/X11/xorg.conf)"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://launchpad.net/x-kit"
|
||||
license=('GPL')
|
||||
groups=('kde' 'kde-complete' 'kde-uninstall' 'kde-tools' 'kde-support')
|
||||
depends=('python' 'xorg-server')
|
||||
options=('!splithdr' '!splitdbg')
|
||||
source=(http://launchpad.net/xorgparser/trunk/0.4.2/+download/$_origname-$pkgver.tar.gz
|
||||
https://launchpad.net/ubuntu/jaunty/+source/dontzap/0.1.2/+files/dontzap_0.1.2.tar.gz)
|
||||
md5sums=('024176dda624f011daba53c2796b2845' # x-kit-0.4.2.tar.gz
|
||||
'231847eedf4e68ae36cddc0ec745216a') # dontzap_0.1.2.tar.gz
|
||||
|
||||
|
||||
|
||||
build() {
|
||||
# install xkit lib
|
||||
cd "$srcdir/$_origname-$pkgver"
|
||||
python setup.py install --root=$startdir/pkg
|
||||
|
||||
# install dontzap
|
||||
cd "$srcdir/main"
|
||||
python setup.py install --root=$startdir/pkg
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
Binary file not shown.
@ -1,102 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXINABSTRACTSECTION_H_
|
||||
#define ARXINABSTRACTSECTION_H_
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVariantList>
|
||||
#include <KIcon>
|
||||
|
||||
#include "ArxinParser"
|
||||
#include "arxin_macros.h"
|
||||
|
||||
/**
|
||||
* \class ArxinAbstractSection ArxinAbstractSection.h
|
||||
*
|
||||
* \brief The base class for Arxin Plugins
|
||||
*
|
||||
* Abstract Section is the class each plugin has to inherit from. It defines
|
||||
* some basic methods all plugins should re-implement and it also provides a
|
||||
* way to feed Arxin with some information about the plugin.
|
||||
*
|
||||
* Arxin also reimplements some macros to make it easier to export plugins.
|
||||
* To see how to use ARXIN_PLUGIN_EXPORT refer to ArxinMacros documentation, where you can also
|
||||
* see an example of an Export file.
|
||||
*
|
||||
* Let's say you're creating a plugin named Foo. Here is how your class declaration should
|
||||
* look like:
|
||||
*
|
||||
* \code
|
||||
* class ArxinFoo : public ArxinAbstractSection
|
||||
* {
|
||||
* Q_OBJECT
|
||||
*
|
||||
* public:
|
||||
* ArxinFoo(QObject *parent, const QVariantList &args);
|
||||
* ~ArxinFoo();
|
||||
*
|
||||
* ArxinModule::moduleData getPluginData();
|
||||
*
|
||||
* public slots:
|
||||
* void save();
|
||||
*
|
||||
* private:
|
||||
* void parse();
|
||||
* };
|
||||
* \endcode
|
||||
*
|
||||
* Obviously, you can declare in this class almost anything you want: have a look at the Mkinitcpio
|
||||
* plugin to have an idea of an "extended" plugin. What was shown above was the things you need absolutely
|
||||
* to build a plugin. Watch out for the constructor arguments!
|
||||
*
|
||||
* So, suming up, creating a plugin is pretty easy, you just need to reimplement all virtual methods
|
||||
* and declare a pair of macros. It is a good pratice to declare the ARXIN_PLUGIN_EXPORT macro
|
||||
* inside a different file, such as *Export.cpp, so that the plugin may also be exported through
|
||||
* KDE4 systemsettings. Refer to an example plugin for more details.
|
||||
*/
|
||||
|
||||
class ARXIN_EXPORT ArxinAbstractSection : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
ArxinAbstractSection(QObject *parent, const QVariantList &args);
|
||||
virtual ~ArxinAbstractSection();
|
||||
|
||||
virtual void loadScript(const QString &script);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Calling this function tells the plugin to save to file the current fields.
|
||||
* So this slot is triggered whenever the Main Window or Systemsettings requires
|
||||
* to save.
|
||||
*/
|
||||
virtual void save() = 0;
|
||||
|
||||
/**
|
||||
* This function is called upon module loading. So it basically needs to parse the
|
||||
* file, and populate the fields with values from the file.
|
||||
*/
|
||||
virtual void parse() = 0;
|
||||
};
|
||||
|
||||
#endif /*ARXINABSTRACTSECTION_H_*/
|
@ -1,137 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXINDIRECTORYPARSER_H_
|
||||
#define ARXINDIRECTORYPARSER_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <QStringList>
|
||||
#include "arxin_macros.h"
|
||||
|
||||
/** \class ArxinDirectoryParser ArxinDirectoryParser.h
|
||||
* \brief General directory entries parser.
|
||||
*
|
||||
* This class lets you scan directories in a fast, intuitive and easy
|
||||
* way. You can use it barely for getting all directory entries or for
|
||||
* making a filtered search.
|
||||
*
|
||||
* Usage is really simple: after selecting the working directory, you can
|
||||
* set up a configuration for scanning it. Then, you can get all its entries
|
||||
* (according to the configuration you issued), or have just some entries based
|
||||
* on a filter.
|
||||
*/
|
||||
|
||||
class ARXIN_EXPORT ArxinDirectoryParser : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(dirParsingOptions)
|
||||
public:
|
||||
struct DirectoryConfiguration {
|
||||
bool recursive;
|
||||
bool filesOnly;
|
||||
QString extension;
|
||||
bool trimextension;
|
||||
bool prependRelativePath;
|
||||
|
||||
QString dirName;
|
||||
bool dirOpen;
|
||||
QStringList dirContents;
|
||||
};
|
||||
|
||||
/**
|
||||
* \enum dirParsingOptions
|
||||
*
|
||||
* This enum contains all the flags that can be issued to resetConfiguration
|
||||
* to define ArxinDirectoryParser configuration.
|
||||
* @see ArxinDirectoryParser::resetConfiguration()
|
||||
*/
|
||||
enum dirParsingOptions {
|
||||
/** Scans directories recursively */
|
||||
Recursive,
|
||||
/** Adds files only to the entries */
|
||||
filesOnly,
|
||||
/** Trim the extension in the entries */
|
||||
trimExtension,
|
||||
/** Returns the full path instead of the name only in the entries */
|
||||
prependRelativePath,
|
||||
/** Default behaviour */
|
||||
defaultOptions
|
||||
};
|
||||
ArxinDirectoryParser(QObject *parent = 0);
|
||||
virtual ~ArxinDirectoryParser();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Loads a directory. This will be the working directory.
|
||||
* @see closeDirectory()
|
||||
* @param dir The path to the directory.
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool loadDirectory(const QString &dir);
|
||||
|
||||
/**
|
||||
* Closes the current working directory.
|
||||
* @see loadDirectory()
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
/**bool closeDirectory()**/
|
||||
|
||||
//bool checkConfiguration(int need = 0);
|
||||
|
||||
/**
|
||||
* Set up a new configuration for parsing directories. This is done by giving this
|
||||
* function some flags that can redefine some behaviours of the parser and an
|
||||
* extension, so that only files ending with .extension will be considered.
|
||||
* Call this function without arguments to restore it back to default behaviour.
|
||||
* @param parsingList The list of the Flags, blank for default
|
||||
* @param extension If defined, only files ending with .extension will be considered by the parser
|
||||
*/
|
||||
void resetConfiguration(QList<dirParsingOptions> parsingList =
|
||||
QList<dirParsingOptions>() << defaultOptions,
|
||||
const QString &extension = QString());
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list with all the directory entries. The result depends on the current
|
||||
* configuration of the parser.
|
||||
* @see resetConfiguration()
|
||||
* @returns A String List with all the entries
|
||||
*/
|
||||
QStringList getAllDirectoryEntries();
|
||||
|
||||
/**
|
||||
* Returns a list with all the directory entries, giving a possibility for a filter.
|
||||
* The result depends on the current configuration of the parser.
|
||||
* @see resetConfiguration()
|
||||
* @see getAllDirectoryEntries();
|
||||
* @param filter Only entries containing this word will be considered
|
||||
* @param nosubdirs Does not consider subdirectories (Default: true)
|
||||
* @returns A String List with all the filtered entries
|
||||
*/
|
||||
/**QStringList getFilteredDirectoryEntries(const QString &filter, bool nosubdirs = true);**/
|
||||
|
||||
private:
|
||||
QStringList parseDirectory(const QString &addpath = QString());
|
||||
|
||||
private:
|
||||
DirectoryConfiguration dirConf;
|
||||
};
|
||||
|
||||
#endif /*ARXINDIRECTORYPARSER_H_*/
|
@ -1,310 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXINFILEPARSER_H_
|
||||
#define ARXINFILEPARSER_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <QStringList>
|
||||
#include "arxin_macros.h"
|
||||
|
||||
/** \class ArxinFileParser ArxinFileParser.h
|
||||
* \brief General configuration files parser.
|
||||
*
|
||||
* This class aims to provide a easy to use frontend to parse most common
|
||||
* configuration files. It is buffered (so calling parsing functions is
|
||||
* really fast) and modular, and adding another kind of syntax is fairly
|
||||
* easy to do.
|
||||
* ArxinFileParser is easily extendable to read a variety of syntaxes.
|
||||
* Adding another line type it's so easy: add a type to LineType and
|
||||
* add the behaviour in the code at getOption and setOption.
|
||||
*
|
||||
* Arxin is easy: with just a pair of lines of code you can have everything
|
||||
* you need. Look at this example:
|
||||
*
|
||||
* \code
|
||||
* parser.openFile("/etc/rc.conf");
|
||||
* qDebug() << parser.getOption("DAEMONS", ParLine);
|
||||
* qDebug() << parser.getOption("gateway", IniLine);
|
||||
* parser.closeFile();
|
||||
* \endcode
|
||||
*
|
||||
* This shows in the terminal the value of DAEMONS and gateway in
|
||||
* rc.conf. It's just 4 lines of code! And you can parse and write almost
|
||||
* every file.
|
||||
*/
|
||||
|
||||
class ARXIN_EXPORT ArxinFileParser : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(LineType)
|
||||
Q_ENUMS(LineStatus)
|
||||
Q_ENUMS(SetBehaviour)
|
||||
Q_ENUMS(IntervalBehaviour)
|
||||
public:
|
||||
/**
|
||||
* \enum LineType
|
||||
*
|
||||
* This enum contains all available kind of line syntax Arxin is able to
|
||||
* parse.
|
||||
* @see ArxinFileParser::getOption()
|
||||
*/
|
||||
enum LineType {
|
||||
/** Lines of type KEY="values" */
|
||||
IniLine = 0,
|
||||
/** Lines of type KEY=(values) */
|
||||
ParLine = 1,
|
||||
/** Lines of type KEY=values */
|
||||
IniNoQuotesLine = 2,
|
||||
/** Lines of type KEY='values' */
|
||||
IniSingleQuotesLine = 4,
|
||||
/** Reserved, for errors */
|
||||
Error = 10
|
||||
};
|
||||
|
||||
/**
|
||||
* \enum LineStatus
|
||||
*
|
||||
* This enum defines if the line is commented or not
|
||||
* @see ArxinFileParser::getOption()
|
||||
*/
|
||||
enum LineStatus {
|
||||
/** Commented Line */
|
||||
Commented = 0,
|
||||
/** Uncommented Line */
|
||||
Uncommented = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* \enum SetBehaviour
|
||||
*
|
||||
* This enum defines the behaviour when setting an option
|
||||
* @see ArxinFileParser::setOption()
|
||||
*/
|
||||
enum SetBehaviour {
|
||||
/** Try to search through commented lines first */
|
||||
UncommentIfExists = 0,
|
||||
/** Do not delete, comment only */
|
||||
CommentOnDelete = 1
|
||||
};
|
||||
|
||||
/**
|
||||
* \enum IntervalBehaviour
|
||||
*
|
||||
* This enum defines the behaviour when searching into an interval
|
||||
* @see ArxinFileParser::getKeysInInterval()
|
||||
*/
|
||||
enum IntervalBehaviour {
|
||||
/** Searches through commented lines for defining interval extremes */
|
||||
SearchThroughCommented = 0,
|
||||
/** Includes also commented lines in the return list */
|
||||
IncludeCommentedLines = 1,
|
||||
/** Include the left extreme in the return list */
|
||||
IncludeLeftExtreme = 2,
|
||||
/** Include the right extreme in the return list */
|
||||
IncludeRightExtreme = 4,
|
||||
/** Include both extremes in the return list */
|
||||
IncludeExtremes = 8
|
||||
};
|
||||
|
||||
/**
|
||||
* \struct arxKey
|
||||
* In this structure is contained all the data about a key, including its value
|
||||
* @see ArxinFileParser::getKeysInInterval()
|
||||
*/
|
||||
struct ArxinKey {
|
||||
/** The key name */
|
||||
QString name;
|
||||
/** The key's value */
|
||||
QString value;
|
||||
/** Line status */
|
||||
LineStatus status;
|
||||
/** Type of key */
|
||||
LineType type;
|
||||
};
|
||||
typedef QList<ArxinKey> QArxinKeysList;//TODO: Change to QFlags
|
||||
|
||||
ArxinFileParser(QObject *parent = 0);
|
||||
virtual ~ArxinFileParser();
|
||||
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Opens a file. The file will be loaded and used for parsing in
|
||||
* other methods.
|
||||
* @see closeFile()
|
||||
* @param name The name of the file.
|
||||
* @param woc Determines if the file will be written upon closing (default: true)
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool openFile(const QString &name, bool woc = true);
|
||||
|
||||
/**
|
||||
* Close the current opened file.
|
||||
* @see openFile()
|
||||
*/
|
||||
void closeFile();
|
||||
|
||||
/**
|
||||
* Gets an option from the current file.
|
||||
* @see openFile()
|
||||
* @param key The key associated with this option.
|
||||
* @param typeline Defines what is the type of the line processed.
|
||||
* @param linestat Defines if the option is uncommented or not (default: Uncommented)
|
||||
* @returns The requested option, or an empty QString on failure.
|
||||
*/
|
||||
QString getOption(const QString &key, LineType typeline,
|
||||
LineStatus linestat = Uncommented);
|
||||
|
||||
QString getOption(const QString &key);//TODO: Apidox
|
||||
|
||||
/**
|
||||
* Sets an option in the current file. Note that this operation does not
|
||||
* edits the file itself, you have to call writeChangesToFile() to apply changes.
|
||||
* @see openFile()
|
||||
* @see writeChangesToFile()
|
||||
* @param key The key associated with this option.
|
||||
* @param value The value to write to the file.
|
||||
* @param typeline Defines what is the type of the line processed.
|
||||
* @param tryAdding Tells the parser if it should add the line if it does not exist.
|
||||
* If it is set to false and the requested key does not exists, it won't be added (default: true)
|
||||
* @param setbh Tells the parser if it should try to restore the option from a commented entry
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool setOption(const QString &key, const QString &value, LineType typeline,
|
||||
bool tryAdding = true, SetBehaviour setbh = UncommentIfExists);
|
||||
|
||||
/**
|
||||
* Removes an option in the current file. Note that this operation does not
|
||||
* edits the file itself, you have to call writeChangesToFile() to apply changes.
|
||||
* @see openFile()
|
||||
* @see writeChangesToFile()
|
||||
* @param key The key associated with this option.
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool deleteOption(const QString &key);
|
||||
|
||||
/**
|
||||
* Comments an option in the current file. Note that this operation does not
|
||||
* edits the file itself, you have to call writeChangesToFile() to apply changes.
|
||||
* @see openFile()
|
||||
* @see writeChangesToFile()
|
||||
* @param key The key associated with this option.
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool commentOption(const QString &key);
|
||||
|
||||
/**
|
||||
* Gets the type of an option, or an error if the format is not recognized
|
||||
* @see getOption()
|
||||
* @param key The key associated with this option.
|
||||
* @returns The type of the option on success, an error on failure
|
||||
*/
|
||||
LineType getOptionType(const QString &key);
|
||||
|
||||
|
||||
/**
|
||||
* Gets all the keys in a defined interval between two keys. This returns a list of
|
||||
* ArxinKeys you can use to get values from.
|
||||
* @see openFile()
|
||||
* @see getOption()
|
||||
* @param startingKey The key to start from
|
||||
* @param endingKey The key that ends the interval
|
||||
* @param behaviour A list of Miscellaneous options to refine the results.
|
||||
* @returns All the keys in the interval, or an empty list on failure.
|
||||
*/
|
||||
QArxinKeysList getKeysInInterval(const QString &startingKey, const QString &endingKey,
|
||||
QList<IntervalBehaviour> behaviour = QList<IntervalBehaviour>());
|
||||
|
||||
/**
|
||||
* Sets an option in the current file, inside the given interval. Note that this operation does not
|
||||
* edits the file itself, you have to call writeChangesToFile() to apply changes.
|
||||
* It is pretty much an equivalent of setOption(), but you can define where the key will be
|
||||
* inserted.
|
||||
* @see openFile()
|
||||
* @see writeChangesToFile()
|
||||
* @see setOption()
|
||||
* @param startingKey The key to start from
|
||||
* @param endingKey The key that ends the interval
|
||||
* @param key The key associated with this option.
|
||||
* @param value The value to write to the file.
|
||||
* @param typeline Defines what is the type of the line processed.
|
||||
* @param tryAdding Tells the parser if it should add the line if it does not exist.
|
||||
* If it is set to false and the requested key does not exists, it won't be added (default: true)
|
||||
* @param setbh Tells the parser if it should try to restore the option from a commented entry
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
/**bool setOptionInInterval(const QString &startingKey, const QString &endingKey, const QString &key,
|
||||
const QString &value, LineType typeline, bool tryAdding = true,
|
||||
SetBehaviour setbh = UncommentIfExists) {}//TODO: Implement this**/
|
||||
|
||||
/**
|
||||
* This function is called to actually save any changes to the opened file.
|
||||
* It is called upon closing if the file was opened with woc = true.
|
||||
* @see openFile()
|
||||
* @see closeFile()
|
||||
* @returns true on success, false on failure
|
||||
*/
|
||||
bool writeChangesToFile();
|
||||
|
||||
|
||||
/**
|
||||
* Tells if the current file is opened or not
|
||||
* @see openFile()
|
||||
* @see closeFile()
|
||||
* @returns true if the file is opened, false if it is not
|
||||
*/
|
||||
bool fileIsOpen();
|
||||
|
||||
/**
|
||||
* Tells if the current file is opened and has contents
|
||||
* @see openFile()
|
||||
* @see closeFile()
|
||||
* @returns true if the file is opened and has contents, false if not
|
||||
*/
|
||||
bool fileHasContents();
|
||||
|
||||
/**
|
||||
* Tells if the current file has unsaved modifications
|
||||
* @see openFile()
|
||||
* @see closeFile()
|
||||
* @see writeChangesToFile()
|
||||
* @returns true if the file has unsaved modifications, false if it has not
|
||||
*/
|
||||
bool fileIsModified();
|
||||
|
||||
/**
|
||||
* @param option the option to check
|
||||
* @returns true if the option exists
|
||||
*/
|
||||
bool optionExists(const QString &option);
|
||||
|
||||
/**
|
||||
* Sets the root prefix for file loading. You usually don't need to call this function,
|
||||
* it is useful just when chrooting
|
||||
*/
|
||||
static void setRootPrefix(const QString &prefix);
|
||||
|
||||
private:
|
||||
class Private;
|
||||
Private *d;
|
||||
};
|
||||
|
||||
#endif /*ARXINFILEPARSER_H_*/
|
@ -1,83 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXININTERFACE_H
|
||||
#define ARXININTERFACE_H
|
||||
|
||||
#include "arxin_macros.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
/** \class ArxinInterface ArxinInterface.h
|
||||
* \brief Interface for Arxin KPart.
|
||||
*
|
||||
* This class extends Arxin KPart functionalities. You can easily embed
|
||||
* Arxin in an application and control it through this interface.
|
||||
* Here is a small example:
|
||||
*
|
||||
* \code
|
||||
* KPluginFactory* factory = KPluginLoader("libarxin_part").factory();
|
||||
* KParts::ReadOnlyPart* part = factory ? ( factory->create<KParts::ReadOnlyPart>(this) ) : 0;
|
||||
*
|
||||
* ArxinInterface *iface = qobject_cast<ArxinInterface *>(part);
|
||||
* \endcode
|
||||
*
|
||||
* This creates an empty KPart of Arxin and creates an interface to it in iface.
|
||||
* You can now use the functions provided in the interface to load Plugins,
|
||||
* set paths and more.
|
||||
*/
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class ARXIN_EXPORT ArxinInterface
|
||||
{
|
||||
public:
|
||||
ArxinInterface(MainWindow *mW);
|
||||
ArxinInterface();
|
||||
virtual ~ArxinInterface();
|
||||
|
||||
/**
|
||||
* Sets the root path. This is the equivalent of ArxinFileParser::setRootPrefix()
|
||||
* @see ArxinFileParser::setRootPrefix()
|
||||
* @param path The new root path. It has to start with '/' and should have no trailing slash
|
||||
*/
|
||||
void setRootPath(const QString &path);
|
||||
|
||||
/**
|
||||
* Loads all the enabled plugins. This function needs to be explicitely called, otherwise
|
||||
* no plugins will get loaded. Remember to call setRootPath _ALWAYS_ before calling loadPlugins()
|
||||
* @see setRootPath()
|
||||
*/
|
||||
void loadPlugins();
|
||||
|
||||
/**
|
||||
* Sets mW as the new MainWindow Object for the KPart. Don't call this function unless you
|
||||
* know what you're doing.
|
||||
* @param mW a instantiated MainWindow object
|
||||
*/
|
||||
void setMainWindowObject(MainWindow *mW);
|
||||
|
||||
private:
|
||||
MainWindow *m_main;
|
||||
};
|
||||
|
||||
Q_DECLARE_INTERFACE(ArxinInterface, "org.kde.ArxinInterface")
|
||||
|
||||
#endif /*ARXININTERFACE_H*/
|
@ -1,92 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXINPROCESSPARSER_H_
|
||||
#define ARXINPROCESSPARSER_H_
|
||||
|
||||
#include <QProcess>
|
||||
#include "arxin_macros.h"
|
||||
|
||||
/** \class ArxinProcessParser ArxinProcessParser.h
|
||||
* \brief General process output parser.
|
||||
*
|
||||
* This class lets you get and parse output of a process easily.
|
||||
* It is a reimplementation of QProcess, and in fact inherits from it, and has a similar functionality.
|
||||
*
|
||||
* The main difference with QProcess is that it is self-sufficient when it comes
|
||||
* to parsing the output and returning it, so you can get all standard output and error
|
||||
* everytime you want, in addition to traditional QProcess calls.
|
||||
*/
|
||||
|
||||
class ARXIN_EXPORT ArxinProcessParser : public QProcess//TODO: Split out an ArxinPythonProcessParser...
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ArxinProcessParser(QObject *parent = 0);
|
||||
~ArxinProcessParser();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Loads a command. This command will be used upon next call of startProcess()
|
||||
* @see startProcess()
|
||||
* @param cmd The command of the process
|
||||
*/
|
||||
void loadProcess(const QString &cmd);
|
||||
|
||||
|
||||
/**
|
||||
* Returns all the output generated by the process on the stdout channel.
|
||||
* @see readAllStdErr()
|
||||
* @returns All stdout output
|
||||
*/
|
||||
QStringList readAllStdOut();
|
||||
|
||||
/**
|
||||
* Returns all the output generated by the process on the stderr channel.
|
||||
* @see readAllStdOut()
|
||||
* @returns All stderr output
|
||||
*/
|
||||
QStringList readAllStdErr();
|
||||
|
||||
/**
|
||||
* Starts the currently loaded process.
|
||||
* @see loadProcess()
|
||||
*/
|
||||
void startProcess();
|
||||
|
||||
/**
|
||||
* Waits until the process ends. This is a convenience slot wrapper around
|
||||
* QProcess::waitForFinished(). Please note that this may block your application.
|
||||
*/
|
||||
bool slotWaitForFinished() {
|
||||
return waitForFinished();
|
||||
}
|
||||
|
||||
private slots:
|
||||
void processEnded(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
|
||||
private:
|
||||
QString command;
|
||||
QByteArray procOut;
|
||||
QByteArray procErr;
|
||||
};
|
||||
|
||||
#endif /*ARXINPROCESSPARSER_H_*/
|
@ -1,52 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Lukas Appelhans *
|
||||
* l.appelhans@gmx.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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXINITEMDELEGATE_H
|
||||
#define ARXINITEMDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
#include "arxin_macros.h"
|
||||
|
||||
/**
|
||||
* \class ArxinItemDelegate arxinItemDelegate.h
|
||||
*
|
||||
* \brief Creates a custom item delegate for a QTreeWidget
|
||||
*
|
||||
* This class creates a generic ItemDelegate for ItemViews. An icon is displayed
|
||||
* left and right the description under the name.
|
||||
* For the icon, set the data for Qt::DecorationRole to a QIcon and for the description use Qt::UserRole.
|
||||
*/
|
||||
|
||||
class ARXIN_EXPORT ArxinItemDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ArxinItemDelegate(QAbstractItemView *parent);
|
||||
|
||||
/**
|
||||
* Our custom paint-method, reimplemented from QStyledItemDelegate
|
||||
*/
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,103 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Dario Freddi *
|
||||
* drf54321@yahoo.it *
|
||||
* *
|
||||
* 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. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ARXIN_MACROS_H
|
||||
#define ARXIN_MACROS_H
|
||||
|
||||
/** \file arxin_macros.h
|
||||
\brief Contains Macros used in Arxin
|
||||
|
||||
This contains some macros that help in exporting/importing symbols and plugins
|
||||
*/
|
||||
|
||||
#include <kdemacros.h>
|
||||
|
||||
/** \addtogroup ArxinMacros
|
||||
* Documentation for Arxin Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def ARXIN_EXPORT
|
||||
*
|
||||
* Reserved macro to export GCC visibility in libraries. Used only in core classes declarations.
|
||||
*/
|
||||
|
||||
#define ARXIN_EXPORT __attribute__ ((visibility("default")))
|
||||
|
||||
/**
|
||||
* @def ARXIN_PLUGIN_EXPORT
|
||||
*
|
||||
* The ARXIN_PLUGIN_EXPORT macro is a convenience wrapper around KDE's plugin
|
||||
* declaration. This definition is <b>needed</b> when you're exporting a plugin in Arxin.
|
||||
*
|
||||
* It is a good pratice to declare it in a separate file, to allow using the same source
|
||||
* files for generating a systemsettings plugin. The declaration is done through an identifier and
|
||||
* the name of the class you're exporting.
|
||||
*
|
||||
* So, supposing you're creating the plugin foo, and your class is named ArxinFoo. Let's see how the file
|
||||
* ArxinFooExport.cpp looks like:
|
||||
*
|
||||
* \code
|
||||
* #include "ArxinFoo.h"
|
||||
* #include "arxin_macros.h"
|
||||
* #include "src/ArxinAbstractSection.h"
|
||||
* #include "arxin_macros.h"
|
||||
*
|
||||
* #include <kdemacros.h>
|
||||
* #include <KPluginFactory>
|
||||
* #include <KPluginLoader>
|
||||
*
|
||||
* ARXIN_PLUGIN_EXPORT(ArxinFoo);
|
||||
*
|
||||
* \endcode
|
||||
*
|
||||
* And that's all, add the file ArxinFooExport to your targets and you're done.
|
||||
*
|
||||
* @param c The name of the class you're going to export.
|
||||
*
|
||||
* @see ArxinAbstractSection
|
||||
*/
|
||||
|
||||
#define ARXIN_PLUGIN_EXPORT( c ) \
|
||||
K_PLUGIN_FACTORY( ArxinFactory, registerPlugin< c >(); ) \
|
||||
K_EXPORT_PLUGIN( ArxinFactory("c") )
|
||||
|
||||
/**
|
||||
* @def ARXIN_PLUGIN_IMPORT
|
||||
*
|
||||
* Reserved macro to import a plugin into Arxin executable. It performs a qobject_cast on the given item
|
||||
* to the Arxin Plugin Interface.
|
||||
*/
|
||||
|
||||
#define ARXIN_PLUGIN_IMPORT( C ) qobject_cast<ArxinAbstractSection *>(C)
|
||||
|
||||
/**
|
||||
* @def ARXIN_SCRIPTED_PLUGIN_IMPORT
|
||||
*
|
||||
* Reserved macro to import a plugin into Arxin executable. It performs a qobject_cast on the given item
|
||||
* to the Arxin Plugin Interface.
|
||||
*/
|
||||
|
||||
#define ARXIN_SCRIPTED_PLUGIN_IMPORT( C ) qobject_cast<BaseScriptedPlugin *>(C)
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /*ARXIN_MACROS_H*/
|
@ -1,226 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
###########################################################################
|
||||
# Copyright (C) 2008 by Lukas Appelhans #
|
||||
# l.appelhans@gmx.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. #
|
||||
###########################################################################
|
||||
|
||||
import Arxin
|
||||
import sip
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtNetwork import *
|
||||
from PyKDE4.kdeui import *
|
||||
from ui_arxinDaemons import Ui_ArxinDaemons
|
||||
from ui_arxinAddDaemonsWidget import Ui_ArxinAddDaemonsWidget
|
||||
|
||||
class AddDaemonDialog(KDialog):
|
||||
def __init__(self, parent):
|
||||
KDialog.__init__(self, parent)
|
||||
self.ui = Ui_ArxinAddDaemonsWidget()
|
||||
widget = QWidget(self)
|
||||
self.ui.setupUi(widget)
|
||||
self.setMainWidget(widget)
|
||||
#self.ui.treeWidget.hideColumn(1)
|
||||
self.connect(self, SIGNAL("accepted()"), self.accepted)
|
||||
|
||||
def addDaemon(self, name, description):
|
||||
item = QTreeWidgetItem(self.ui.treeWidget, QStringList() << name << description)
|
||||
pass
|
||||
|
||||
def accepted(self):
|
||||
if self.ui.treeWidget.currentItem == None:
|
||||
return
|
||||
self.emit(SIGNAL("addDaemon"), self.ui.treeWidget.currentItem().text(0), self.ui.treeWidget.currentItem().text(1))
|
||||
|
||||
class Daemon(QTreeWidgetItem):
|
||||
def __init__(self, name, description, startInBackground, parent):
|
||||
QTreeWidget.__init__(self, parent)
|
||||
self.procParser = Arxin.processParser()
|
||||
self.setText(0, name)
|
||||
self.setText(1, description)
|
||||
|
||||
if (startInBackground == True):
|
||||
self.setCheckState(2, Qt.Checked)
|
||||
else:
|
||||
self.setCheckState(2, Qt.Unchecked)
|
||||
|
||||
def startDaemon(self):
|
||||
daemon = self.text(0)
|
||||
print "/etc/rc.d/" + daemon + " start"
|
||||
self.procParser.loadProcess(str("/etc/rc.d/" + daemon + " start"))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
output = self.procParser.readAllStdOut()
|
||||
print output[0]
|
||||
if output[0] == None or output[0].find("FAIL") != -1:#TODO: Use a KMessageBox, as well in stopDaemon
|
||||
print "error while starting " + daemon
|
||||
else:
|
||||
print daemon + " started successfully"
|
||||
|
||||
def stopDaemon(self):
|
||||
daemon = self.text(0)
|
||||
print "/etc/rc.d/" + daemon + " stop"
|
||||
self.procParser.loadProcess(str("/etc/rc.d/" + daemon + " stop"))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
output = self.procParser.readAllStdOut()
|
||||
if output[0] == None or output[0].find("FAIL") != -1:
|
||||
print "error while stopping " + daemon
|
||||
else:
|
||||
print daemon + " stopped successfully"
|
||||
|
||||
|
||||
class ArxinDaemons(QWidget, Ui_ArxinDaemons):
|
||||
def __init__(self, parent):
|
||||
QWidget.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
#self.treeWidget.hideColumn(1)
|
||||
self.addButton.setIcon(KIcon("list-add"))
|
||||
self.removeButton.setIcon(KIcon("list-remove"))
|
||||
self.procParser = Arxin.processParser()
|
||||
self.dirParser = Arxin.directoryParser()
|
||||
self.addDialog = AddDaemonDialog(self)
|
||||
self.checkRunning()
|
||||
self.connect(self.addDialog, SIGNAL("addDaemon"), self.addNewDaemon)
|
||||
self.connect(self.treeWidget, SIGNAL("currentItemChanged(QTreeWidgetItem *,QTreeWidgetItem *)"),
|
||||
self.selectionChanged)
|
||||
self.connect(self.startButton, SIGNAL("clicked()"), self.startDaemon)
|
||||
self.connect(self.stopButton, SIGNAL("clicked()"), self.stopDaemon)
|
||||
self.connect(self.addButton, SIGNAL("clicked()"), self.showAddDaemonDialog)
|
||||
self.connect(self.removeButton, SIGNAL("clicked()"), self.removeCurrentDaemon)
|
||||
|
||||
def parse(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
enabled = fileParser.getOption("DAEMONS", fileParser.ParLine).split(" ")
|
||||
#print fileParser.getOption("DAEMONS", fileParser.getOptionType("DAEMONS"))
|
||||
print enabled
|
||||
self.dirParser.loadDirectory("/etc/rc.d/")
|
||||
disabled = self.dirParser.getAllDirectoryEntries()
|
||||
for daemon in enabled:
|
||||
background = False
|
||||
if daemon.startswith("@") == True:
|
||||
background = True
|
||||
daemon = daemon[1:len(daemon)]
|
||||
if daemon in disabled:
|
||||
disabled.remove(daemon)
|
||||
self.addDaemon(daemon, self.description(daemon), background)
|
||||
|
||||
for daemon in disabled:
|
||||
self.addDialog.addDaemon(daemon, self.description(daemon))
|
||||
|
||||
fileParser.deleteLater()
|
||||
|
||||
|
||||
def save(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
line = QString()
|
||||
i = 0
|
||||
while self.treeWidget.topLevelItem(i) != None:
|
||||
item = self.treeWidget.topLevelItem(i)
|
||||
linePart = item.text(0)
|
||||
if item.checkState(2) == Qt.Checked:
|
||||
linePart.prepend("@")
|
||||
line.append(linePart + " ")
|
||||
i = i + 1
|
||||
|
||||
print line
|
||||
fileParser.setOption("DAEMONS", str(line), fileParser.ParLine)
|
||||
fileParser.writeChangesToFile()
|
||||
fileParser.deleteLater()
|
||||
|
||||
def addDaemon(self, name, description, background):
|
||||
if len(name) == 0:
|
||||
return
|
||||
print name
|
||||
item = Daemon(name, description, background, self.treeWidget)
|
||||
item.setFlags(item.flags() & ~Qt.ItemIsDropEnabled)
|
||||
|
||||
def addNewDaemon(self, name, description):
|
||||
if len(name) == 0:
|
||||
return
|
||||
print name
|
||||
item = Daemon(name, description, False, self.treeWidget)
|
||||
item.setFlags(item.flags() & ~Qt.ItemIsDropEnabled)
|
||||
|
||||
|
||||
def checkRunning(self):
|
||||
self.dirParser.loadDirectory("/var/run/daemons")
|
||||
self.running = self.dirParser.getAllDirectoryEntries()
|
||||
self.selectionChanged()
|
||||
|
||||
def selectionChanged(self):
|
||||
if self.treeWidget.currentItem() == None:
|
||||
return
|
||||
itemRunning = self.treeWidget.currentItem().text(0) in self.running
|
||||
self.startButton.setDisabled(itemRunning)
|
||||
self.stopButton.setEnabled(itemRunning)
|
||||
|
||||
def startDaemon(self):
|
||||
self.treeWidget.currentItem().startDaemon()
|
||||
self.checkRunning()
|
||||
|
||||
def stopDaemon(self):
|
||||
self.treeWidget.currentItem().stopDaemon()
|
||||
self.checkRunning()
|
||||
|
||||
def showAddDaemonDialog(self):
|
||||
self.addDialog.show()
|
||||
pass
|
||||
|
||||
def removeCurrentDaemon(self):
|
||||
if self.treeWidget.currentItem() == None:
|
||||
return
|
||||
self.addDialog.addDaemon(self.treeWidget.currentItem().text(0), self.treeWidget.currentItem().text(1))
|
||||
self.treeWidget.takeTopLevelItem(self.treeWidget.indexOfTopLevelItem(self.treeWidget.currentItem()))
|
||||
pass
|
||||
|
||||
def description(self, name):
|
||||
self.procParser.loadProcess(str("pacman -Qqo /etc/rc.d/" + name.strip('!')))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
package = self.procParser.readAllStdOut()
|
||||
print package
|
||||
info = [] #FIXME: Do some proper error-handling
|
||||
if ' ' in package:
|
||||
self.procParser.loadProcess(str("pacman -Si " + package[:package.index(' ')]))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
info = self.procParser.readAllStdOut()
|
||||
description = 'None'
|
||||
for line in info:
|
||||
if line.startswith('Description'):
|
||||
description = line[line.index(':')+2:]
|
||||
break
|
||||
print description
|
||||
return description
|
||||
|
||||
daemonsWidget = 0
|
||||
|
||||
def parseSection():
|
||||
global daemonsWidget
|
||||
daemonsWidget = ArxinDaemons(None)
|
||||
daemonsWidget.parse()
|
||||
Arxin.setWidget(daemonsWidget)
|
||||
|
||||
|
||||
def saveSection():
|
||||
print "Save daemons"
|
||||
global daemonsWidget
|
||||
daemonsWidget.save()
|
@ -1,214 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
###########################################################################
|
||||
# Copyright (C) 2008 by Lukas Appelhans #
|
||||
# l.appelhans@gmx.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. #
|
||||
###########################################################################
|
||||
|
||||
import Arxin
|
||||
import sip
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyKDE4.kdeui import *
|
||||
from PyKDE4.kdecore import *
|
||||
from ui_arxinHardware import Ui_ArxinHardware
|
||||
from ui_arxinAddModule import Ui_ArxinAddModuleWidget
|
||||
|
||||
class ArxinAddModuleDialog(KDialog):
|
||||
def __init__(self, parent):
|
||||
KDialog.__init__(self, parent)
|
||||
widget = QWidget(self)
|
||||
self.ui = Ui_ArxinAddModuleWidget()
|
||||
self.ui.setupUi(widget)
|
||||
self.ui.ktreewidgetsearchlinewidget.searchLine().addTreeWidget(self.ui.modulesTreeWidget)
|
||||
self.setMainWidget(widget)
|
||||
procParser = Arxin.processParser()
|
||||
procParser.loadProcess("modprobe -l")
|
||||
procParser.startProcess()
|
||||
procParser.slotWaitForFinished()
|
||||
modules = procParser.readAllStdOut()
|
||||
for mod in modules:
|
||||
if mod == None:
|
||||
continue
|
||||
item = QTreeWidgetItem(self.ui.modulesTreeWidget, QStringList() << mod.split("/")[-1].split(".")[0] << QString() << mod)
|
||||
procParser.loadProcess("modinfo -F description " + mod.split("/")[-1].split(".")[0])
|
||||
procParser.startProcess()
|
||||
procParser.slotWaitForFinished()
|
||||
desc = procParser.readAllStdOut()
|
||||
if desc[0] == None:
|
||||
continue
|
||||
desc = QString(desc[0]).trimmed()
|
||||
item.setText(1, desc)
|
||||
|
||||
def modulesToAdd(self):
|
||||
mod = {}
|
||||
for item in self.ui.modulesTreeWidget.selectedItems():
|
||||
mod[item.text(0)] = item.text(1)
|
||||
return mod
|
||||
|
||||
class ArxinHardware(QWidget, Ui_ArxinHardware):
|
||||
def __init__(self, parent):
|
||||
QWidget.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
self.addModuleDialog = None
|
||||
self.addModButton.setIcon(KIcon("list-add"))
|
||||
self.removeModButton.setIcon(KIcon("list-remove"))
|
||||
self.addModblackButton.setIcon(KIcon("list-add"))
|
||||
self.removeModblackButton.setIcon(KIcon("list-remove"))
|
||||
self.loadModButton.setIcon(KIcon("media-playback-start"))
|
||||
self.unloadModButton.setIcon(KIcon("media-playback-stop"))
|
||||
self.procParser = Arxin.processParser()
|
||||
|
||||
self.connect(self.addModButton, SIGNAL("clicked()"), self.showAddModuleDialog)
|
||||
self.connect(self.removeModButton, SIGNAL("clicked()"), self.removeModule)
|
||||
self.connect(self.addModblackButton, SIGNAL("clicked()"), self.showAddBlackModuleDialog)
|
||||
self.connect(self.removeModblackButton, SIGNAL("clicked()"), self.removeBlackModule)
|
||||
self.connect(self.loadModButton, SIGNAL("clicked()"), self.loadModule)
|
||||
self.connect(self.unloadModButton, SIGNAL("clicked()"), self.unloadModule)
|
||||
|
||||
def parse(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
if fileParser.getOption("MOD_AUTOLOAD", fileParser.getOptionType("MOD_AUTOLOAD")) == "yes":
|
||||
self.scanHardwareCheck.setChecked(1)
|
||||
|
||||
if fileParser.getOption("USELVM", fileParser.getOptionType("USELVM")) == "yes":
|
||||
self.scanLVMCheck.setChecked(True)
|
||||
|
||||
mods = QStringList()
|
||||
mods << QString(fileParser.getOption("MODULES", fileParser.ParLine)).split(" ")
|
||||
for mod in mods:
|
||||
item = None
|
||||
black = False
|
||||
if mod.startsWith("!") == True:
|
||||
black = True
|
||||
mod.remove(0, 1)
|
||||
if mod.isEmpty() == True:
|
||||
continue
|
||||
self.procParser.loadProcess(str("modinfo -F description " + mod))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
desc = self.procParser.readAllStdOut()
|
||||
if desc[0] == None:
|
||||
continue
|
||||
desc = QString(desc[0]).trimmed()
|
||||
self.addModule(mod, desc, black)
|
||||
|
||||
fileParser.deleteLater()
|
||||
|
||||
def save(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
#Save modules
|
||||
modules = []
|
||||
while self.modWidget.topLevelItem(0) != None:
|
||||
modules.append(str(self.modWidget.takeTopLevelItem(0).text(0)))
|
||||
|
||||
while self.modblackWidget.topLevelItem(0) != None:
|
||||
modules.append(str("!" + self.modblackWidget.takeTopLevelItem(0).text(0)))
|
||||
|
||||
fileParser.setOption("MODULES", " ".join(modules), fileParser.ParLine)
|
||||
|
||||
#MOD_AUTOLOAD
|
||||
if self.scanHardwareCheck.isChecked() == True:
|
||||
fileParser.setOption("MOD_AUTOLOAD", "yes", fileParser.IniLine)
|
||||
else:
|
||||
fileParser.setOption("MOD_AUTOLOAD", "no", fileParser.IniLine)
|
||||
|
||||
#USELVM
|
||||
if self.scanLVMCheck.isChecked() == True:
|
||||
fileParser.setOption("USELVM", "yes", fileParser.IniLine)
|
||||
else:
|
||||
fileParser.setOption("USELVM", "no", fileParser.IniLine)
|
||||
|
||||
fileParser.writeChangesToFile()
|
||||
fileParser.deleteLater()
|
||||
|
||||
def addModule(self, name, description, black):
|
||||
self.procParser.loadProcess(str("modprobe -n -v " + name))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
if len(self.procParser.readAllStdOut()) == 1:
|
||||
state = i18n("Loaded")
|
||||
else:
|
||||
state = i18n("Not loaded")
|
||||
item = QTreeWidgetItem(QStringList() << name << description << state)
|
||||
if black == True:
|
||||
self.modblackWidget.addTopLevelItem(item)
|
||||
else:
|
||||
self.modWidget.addTopLevelItem(item)
|
||||
|
||||
def showAddModuleDialog(self):
|
||||
if self.addModuleDialog == None:
|
||||
self.addModuleDialog = ArxinAddModuleDialog(self)
|
||||
self.addModuleDialog.exec_()
|
||||
if self.addModuleDialog.result() == 1: #QDialog::accepted
|
||||
for name, description in self.addModuleDialog.modulesToAdd().items():
|
||||
self.addModule(name, description, False)
|
||||
|
||||
def removeModule(self):
|
||||
for item in self.modWidget.selectedItems():
|
||||
self.modWidget.takeTopLevelItem(self.modWidget.indexOfTopLevelItem(item))
|
||||
|
||||
def showAddBlackModuleDialog(self):
|
||||
if self.addModuleDialog == None:
|
||||
self.addModuleDialog = ArxinAddModuleDialog(self)
|
||||
self.addModuleDialog.exec_()
|
||||
if self.addModuleDialog.result() == 1: #QDialog::accepted
|
||||
for name, description in self.addModuleDialog.modulesToAdd().items():
|
||||
self.addModule(name, description, True)
|
||||
|
||||
def removeBlackModule(self):
|
||||
for item in self.modblackWidget.selectedItems():
|
||||
self.modblackWidget.takeTopLevelItem(self.modblackWidget.indexOfTopLevelItem(item))
|
||||
|
||||
def loadModule(self):
|
||||
for item in self.modWidget.selectedItems():
|
||||
self.procParser.loadProcess("modprobe " + str(item.text(0)))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
out = self.procParser.readAllStdOut()
|
||||
if out[0] != None:
|
||||
KMessageBox.error(self, i18n("Arxin failed loading ") + item.text(0), "Loading Module")
|
||||
#FIXME: i18nstuff
|
||||
else:
|
||||
item.setText(2, i18n("Loaded"))
|
||||
|
||||
def unloadModule(self):
|
||||
for item in self.modWidget.selectedItems():
|
||||
self.procParser.loadProcess("modprobe -r " + str(item.text(0)))
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
out = self.procParser.readAllStdOut()
|
||||
if out[0] != None:
|
||||
KMessageBox.error(self, i18n("Arxin failed unloading ") + item.text(0), "Unloading Module")
|
||||
#FIXME: i18n
|
||||
else:
|
||||
item.setText(2, i18n("Not loaded"))
|
||||
|
||||
hardwareWidget = 0
|
||||
|
||||
def parseSection():
|
||||
global hardwareWidget
|
||||
hardwareWidget = ArxinHardware(None)
|
||||
hardwareWidget.parse()
|
||||
Arxin.setWidget(hardwareWidget)
|
||||
|
||||
|
||||
def saveSection():
|
||||
global hardwareWidget
|
||||
hardwareWidget.save()
|
@ -1,127 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
###########################################################################
|
||||
# Copyright (C) 2008 by Lukas Appelhans #
|
||||
# l.appelhans@gmx.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. #
|
||||
###########################################################################
|
||||
|
||||
import Arxin
|
||||
import sip
|
||||
from PyQt4.QtCore import *
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtNetwork import *
|
||||
from ui_arxinLocale import Ui_ArxinLocale
|
||||
|
||||
class ArxinLocale(QWidget, Ui_ArxinLocale):
|
||||
def __init__(self, parent):
|
||||
QWidget.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.procParser = Arxin.processParser()
|
||||
|
||||
self.dirParser = Arxin.directoryParser()
|
||||
|
||||
def parse(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
|
||||
self.procParser.loadProcess("locale -a")
|
||||
self.procParser.startProcess()
|
||||
self.procParser.slotWaitForFinished()
|
||||
|
||||
#LOCALE
|
||||
for loc in self.procParser.readAllStdOut():
|
||||
if (loc != None):
|
||||
self.localeCombo.addItem(loc);
|
||||
|
||||
self.localeCombo.setCurrentIndex(self.localeCombo.findText(fileParser.getOption("LOCALE", fileParser.getOptionType("LOCALE"))))
|
||||
|
||||
#Hardwareclock
|
||||
self.hardwareclockCombo.addItem("UTC")
|
||||
self.hardwareclockCombo.addItem("localtime")
|
||||
self.hardwareclockCombo.setCurrentIndex(self.hardwareclockCombo.findText(fileParser.getOption("HARDWARECLOCK",
|
||||
fileParser.getOptionType("HARDWARECLOCK"))))
|
||||
#Timezones
|
||||
self.dirParser.loadDirectory("/usr/share/zoneinfo")
|
||||
for zone in self.dirParser.getAllDirectoryEntries():
|
||||
self.timeCombo.addItem(zone)
|
||||
|
||||
self.timeCombo.setCurrentIndex(self.timeCombo.findText(fileParser.getOption("TIMEZONE", fileParser.getOptionType("TIMEZONE"))))
|
||||
|
||||
#Keymap
|
||||
self.dirParser.resetConfiguration([self.dirParser.Recursive, self.dirParser.filesOnly, self.dirParser.trimExtension], ".map.gz")
|
||||
self.dirParser.loadDirectory("/usr/share/kbd/keymaps")
|
||||
for key in self.dirParser.getAllDirectoryEntries():
|
||||
self.keymapCombo.addItem(key)
|
||||
self.keymapCombo.setCurrentIndex(self.keymapCombo.findText(fileParser.getOption("KEYMAP", fileParser.getOptionType("KEYMAP"))))
|
||||
self.dirParser.resetConfiguration()
|
||||
|
||||
#Consolefont
|
||||
self.dirParser.resetConfiguration([self.dirParser.Recursive, self.dirParser.filesOnly, self.dirParser.trimExtension], ".gz");
|
||||
self.dirParser.loadDirectory("/usr/share/kbd/consolefonts")
|
||||
for font in self.dirParser.getAllDirectoryEntries():
|
||||
self.consoleFont.addItem(font)
|
||||
self.consoleFont.setCurrentIndex(self.consoleFont.findText(fileParser.getOption("CONSOLEFONT",
|
||||
fileParser.getOptionType("CONSOLEFONT"))))
|
||||
self.dirParser.resetConfiguration()
|
||||
|
||||
#Consolemap
|
||||
self.dirParser.resetConfiguration([self.dirParser.Recursive, self.dirParser.filesOnly, self.dirParser.trimExtension], ".trans")
|
||||
self.dirParser.loadDirectory("/usr/share/kbd/consoletrans")
|
||||
for consolemap in self.dirParser.getAllDirectoryEntries():
|
||||
self.consoleMap.addItem(consolemap)
|
||||
self.consoleMap.setCurrentIndex(self.consoleMap.findText(fileParser.getOption("CONSOLEMAP", fileParser.getOptionType("CONSOLEMAP"))))
|
||||
self.dirParser.resetConfiguration()
|
||||
|
||||
#USECOLOR
|
||||
if fileParser.getOption("USECOLOR", fileParser.getOptionType("USECOLOR")) == "yes":
|
||||
self.colorCheck.setChecked(True)
|
||||
|
||||
fileParser.deleteLater()
|
||||
|
||||
|
||||
def save(self):
|
||||
fileParser = Arxin.fileParser()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
fileParser.closeFile()
|
||||
fileParser.openFile("/etc/rc.conf")
|
||||
fileParser.setOption("LOCALE", str(self.localeCombo.currentText()), fileParser.IniLine)
|
||||
fileParser.setOption("HARDWARECLOCK", str(self.hardwareclockCombo.currentText()), fileParser.IniLine)
|
||||
fileParser.setOption("TIMEZONE", str(self.timeCombo.currentText()), fileParser.IniLine)
|
||||
fileParser.setOption("KEYMAP", str(self.keymapCombo.currentText()), fileParser.IniLine)
|
||||
fileParser.setOption("CONSOLEFONT", str(self.consoleFont.currentText()), fileParser.IniLine)
|
||||
fileParser.setOption("CONSOLEMAP", str(self.consoleMap.currentText()), fileParser.IniLine)
|
||||
if self.colorCheck.isChecked() == True:
|
||||
fileParser.setOption("USECOLOR", "yes", fileParser.IniLine)
|
||||
else:
|
||||
fileParser.setOption("USECOLOR", "no", fileParser.IniLine)
|
||||
fileParser.writeChangesToFile()
|
||||
fileParser.deleteLater()
|
||||
|
||||
localeWidget = 0
|
||||
|
||||
def parseSection():
|
||||
global localeWidget
|
||||
localeWidget = ArxinLocale(None)
|
||||
localeWidget.parse()
|
||||
Arxin.setWidget(localeWidget)
|
||||
|
||||
|
||||
def saveSection():
|
||||
print "Save locale"
|
||||
global localeWidget
|
||||
localeWidget.save()
|
@ -1,32 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/arxinAddDaemonsWidget.ui'
|
||||
#
|
||||
# Created: Thu Dec 25 21:16:47 2008
|
||||
# by: PyQt4 UI code generator 4.4.4
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyKDE4.kdeui import KTreeWidgetSearchLineWidget
|
||||
|
||||
class Ui_ArxinAddDaemonsWidget(object):
|
||||
def setupUi(self, ArxinAddDaemonsWidget):
|
||||
ArxinAddDaemonsWidget.setObjectName("ArxinAddDaemonsWidget")
|
||||
ArxinAddDaemonsWidget.resize(400, 300)
|
||||
self.gridLayout = QtGui.QGridLayout(ArxinAddDaemonsWidget)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.searchLine = KTreeWidgetSearchLineWidget(ArxinAddDaemonsWidget)
|
||||
self.searchLine.setObjectName("searchLine")
|
||||
self.gridLayout.addWidget(self.searchLine, 0, 0, 1, 1)
|
||||
self.treeWidget = QtGui.QTreeWidget(ArxinAddDaemonsWidget)
|
||||
self.treeWidget.setObjectName("treeWidget")
|
||||
self.gridLayout.addWidget(self.treeWidget, 1, 0, 1, 1)
|
||||
|
||||
self.retranslateUi(ArxinAddDaemonsWidget)
|
||||
QtCore.QMetaObject.connectSlotsByName(ArxinAddDaemonsWidget)
|
||||
|
||||
def retranslateUi(self, ArxinAddDaemonsWidget):
|
||||
ArxinAddDaemonsWidget.setWindowTitle(QtGui.QApplication.translate("ArxinAddDaemonsWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("ArxinAddDaemonsWidget", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.treeWidget.headerItem().setText(1, QtGui.QApplication.translate("ArxinAddDaemonsWidget", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
@ -1,53 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/arxinAddModule.ui'
|
||||
#
|
||||
# Created: Thu May 8 17:32:25 2008
|
||||
# by: PyQt4 UI code generator 4.3.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyKDE4.kdeui import KTreeWidgetSearchLineWidget
|
||||
|
||||
class Ui_ArxinAddModuleWidget(object):
|
||||
def setupUi(self, ArxinAddModuleWidget):
|
||||
ArxinAddModuleWidget.setObjectName("ArxinAddModuleWidget")
|
||||
ArxinAddModuleWidget.resize(QtCore.QSize(QtCore.QRect(0,0,400,293).size()).expandedTo(ArxinAddModuleWidget.minimumSizeHint()))
|
||||
|
||||
self.gridlayout = QtGui.QGridLayout(ArxinAddModuleWidget)
|
||||
self.gridlayout.setObjectName("gridlayout")
|
||||
|
||||
self.hboxlayout = QtGui.QHBoxLayout()
|
||||
self.hboxlayout.setObjectName("hboxlayout")
|
||||
|
||||
self.ktreewidgetsearchlinewidget = KTreeWidgetSearchLineWidget(ArxinAddModuleWidget)
|
||||
self.ktreewidgetsearchlinewidget.setObjectName("ktreewidgetsearchlinewidget")
|
||||
self.hboxlayout.addWidget(self.ktreewidgetsearchlinewidget)
|
||||
|
||||
self.searchByComboBox = QtGui.QComboBox(ArxinAddModuleWidget)
|
||||
self.searchByComboBox.setObjectName("searchByComboBox")
|
||||
self.hboxlayout.addWidget(self.searchByComboBox)
|
||||
self.gridlayout.addLayout(self.hboxlayout,0,0,1,1)
|
||||
|
||||
self.modulesTreeWidget = QtGui.QTreeWidget(ArxinAddModuleWidget)
|
||||
self.modulesTreeWidget.setObjectName("modulesTreeWidget")
|
||||
self.gridlayout.addWidget(self.modulesTreeWidget,1,0,1,1)
|
||||
|
||||
self.retranslateUi(ArxinAddModuleWidget)
|
||||
QtCore.QMetaObject.connectSlotsByName(ArxinAddModuleWidget)
|
||||
|
||||
def retranslateUi(self, ArxinAddModuleWidget):
|
||||
ArxinAddModuleWidget.setWindowTitle(QtGui.QApplication.translate("ArxinAddModuleWidget", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.searchByComboBox.addItem(QtGui.QApplication.translate("ArxinAddModuleWidget", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.searchByComboBox.addItem(QtGui.QApplication.translate("ArxinAddModuleWidget", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.searchByComboBox.addItem(QtGui.QApplication.translate("ArxinAddModuleWidget", "Path", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modulesTreeWidget.headerItem().setText(0,QtGui.QApplication.translate("ArxinAddModuleWidget", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modulesTreeWidget.headerItem().setText(1,QtGui.QApplication.translate("ArxinAddModuleWidget", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modulesTreeWidget.headerItem().setText(2,QtGui.QApplication.translate("ArxinAddModuleWidget", "Path", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modulesTreeWidget.clear()
|
||||
|
||||
item = QtGui.QTreeWidgetItem(self.modulesTreeWidget)
|
||||
item.setText(0,QtGui.QApplication.translate("ArxinAddModuleWidget", "b44", None, QtGui.QApplication.UnicodeUTF8))
|
||||
item.setText(1,QtGui.QApplication.translate("ArxinAddModuleWidget", "Broadcom 44xx/47xx 10/100 PCI ethernet driver", None, QtGui.QApplication.UnicodeUTF8))
|
||||
item.setText(2,QtGui.QApplication.translate("ArxinAddModuleWidget", "kernel/drivers/net", None, QtGui.QApplication.UnicodeUTF8))
|
@ -1,71 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/arxinDaemons.ui'
|
||||
#
|
||||
# Created: Thu Dec 25 20:38:30 2008
|
||||
# by: PyQt4 UI code generator 4.4.4
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
class Ui_ArxinDaemons(object):
|
||||
def setupUi(self, ArxinDaemons):
|
||||
ArxinDaemons.setObjectName("ArxinDaemons")
|
||||
ArxinDaemons.resize(601, 363)
|
||||
self.gridLayout = QtGui.QGridLayout(ArxinDaemons)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.treeWidget = QtGui.QTreeWidget(ArxinDaemons)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth())
|
||||
self.treeWidget.setSizePolicy(sizePolicy)
|
||||
self.treeWidget.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.treeWidget.setDragDropMode(QtGui.QAbstractItemView.InternalMove)
|
||||
self.treeWidget.setRootIsDecorated(False)
|
||||
self.treeWidget.setItemsExpandable(False)
|
||||
self.treeWidget.setAnimated(True)
|
||||
self.treeWidget.setExpandsOnDoubleClick(False)
|
||||
self.treeWidget.setColumnCount(3)
|
||||
self.treeWidget.setObjectName("treeWidget")
|
||||
self.gridLayout.addWidget(self.treeWidget, 0, 0, 3, 1)
|
||||
self.hboxlayout = QtGui.QHBoxLayout()
|
||||
self.hboxlayout.setObjectName("hboxlayout")
|
||||
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.hboxlayout.addItem(spacerItem)
|
||||
self.startButton = QtGui.QPushButton(ArxinDaemons)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/Icons/icons/dialog-ok-apply.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.startButton.setIcon(icon)
|
||||
self.startButton.setObjectName("startButton")
|
||||
self.hboxlayout.addWidget(self.startButton)
|
||||
self.stopButton = QtGui.QPushButton(ArxinDaemons)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(":/Icons/icons/edit-delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.stopButton.setIcon(icon1)
|
||||
self.stopButton.setObjectName("stopButton")
|
||||
self.hboxlayout.addWidget(self.stopButton)
|
||||
self.gridLayout.addLayout(self.hboxlayout, 3, 0, 1, 1)
|
||||
self.addButton = QtGui.QPushButton(ArxinDaemons)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.gridLayout.addWidget(self.addButton, 0, 1, 1, 1)
|
||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.gridLayout.addItem(spacerItem1, 2, 1, 1, 1)
|
||||
self.removeButton = QtGui.QPushButton(ArxinDaemons)
|
||||
self.removeButton.setObjectName("removeButton")
|
||||
self.gridLayout.addWidget(self.removeButton, 1, 1, 1, 1)
|
||||
|
||||
self.retranslateUi(ArxinDaemons)
|
||||
QtCore.QMetaObject.connectSlotsByName(ArxinDaemons)
|
||||
|
||||
def retranslateUi(self, ArxinDaemons):
|
||||
ArxinDaemons.setWindowTitle(QtGui.QApplication.translate("ArxinDaemons", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("ArxinDaemons", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.treeWidget.headerItem().setText(1, QtGui.QApplication.translate("ArxinDaemons", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.treeWidget.headerItem().setText(2, QtGui.QApplication.translate("ArxinDaemons", "Start in Background", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.startButton.setText(QtGui.QApplication.translate("ArxinDaemons", "Start", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.stopButton.setText(QtGui.QApplication.translate("ArxinDaemons", "Stop", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.addButton.setText(QtGui.QApplication.translate("ArxinDaemons", "Add...", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.removeButton.setText(QtGui.QApplication.translate("ArxinDaemons", "Remove", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
@ -1,113 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/arxinHardware.ui'
|
||||
#
|
||||
# Created: Wed May 14 15:48:40 2008
|
||||
# by: PyQt4 UI code generator 4.3.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
class Ui_ArxinHardware(object):
|
||||
def setupUi(self, ArxinHardware):
|
||||
ArxinHardware.setObjectName("ArxinHardware")
|
||||
ArxinHardware.resize(QtCore.QSize(QtCore.QRect(0,0,624,456).size()).expandedTo(ArxinHardware.minimumSizeHint()))
|
||||
|
||||
self.gridlayout = QtGui.QGridLayout(ArxinHardware)
|
||||
self.gridlayout.setObjectName("gridlayout")
|
||||
|
||||
self.scanHardwareCheck = QtGui.QCheckBox(ArxinHardware)
|
||||
self.scanHardwareCheck.setObjectName("scanHardwareCheck")
|
||||
self.gridlayout.addWidget(self.scanHardwareCheck,0,0,1,2)
|
||||
|
||||
self.scanLVMCheck = QtGui.QCheckBox(ArxinHardware)
|
||||
self.scanLVMCheck.setObjectName("scanLVMCheck")
|
||||
self.gridlayout.addWidget(self.scanLVMCheck,1,0,1,2)
|
||||
|
||||
self.groupBox_3 = QtGui.QGroupBox(ArxinHardware)
|
||||
self.groupBox_3.setObjectName("groupBox_3")
|
||||
|
||||
self.gridlayout1 = QtGui.QGridLayout(self.groupBox_3)
|
||||
self.gridlayout1.setObjectName("gridlayout1")
|
||||
|
||||
self.modWidget = QtGui.QTreeWidget(self.groupBox_3)
|
||||
self.modWidget.setObjectName("modWidget")
|
||||
self.gridlayout1.addWidget(self.modWidget,0,0,8,4)
|
||||
|
||||
self.addModButton = QtGui.QPushButton(self.groupBox_3)
|
||||
self.addModButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
|
||||
self.addModButton.setObjectName("addModButton")
|
||||
self.gridlayout1.addWidget(self.addModButton,0,4,1,1)
|
||||
|
||||
self.removeModButton = QtGui.QPushButton(self.groupBox_3)
|
||||
self.removeModButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
|
||||
self.removeModButton.setObjectName("removeModButton")
|
||||
self.gridlayout1.addWidget(self.removeModButton,1,4,1,1)
|
||||
|
||||
self.loadModButton = QtGui.QPushButton(self.groupBox_3)
|
||||
self.loadModButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
self.loadModButton.setObjectName("loadModButton")
|
||||
self.gridlayout1.addWidget(self.loadModButton,2,4,1,1)
|
||||
|
||||
self.unloadModButton = QtGui.QPushButton(self.groupBox_3)
|
||||
self.unloadModButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
self.unloadModButton.setObjectName("unloadModButton")
|
||||
self.gridlayout1.addWidget(self.unloadModButton,3,4,1,1)
|
||||
self.gridlayout.addWidget(self.groupBox_3,2,0,1,2)
|
||||
|
||||
self.groupBox_4 = QtGui.QGroupBox(ArxinHardware)
|
||||
self.groupBox_4.setObjectName("groupBox_4")
|
||||
|
||||
self.gridlayout2 = QtGui.QGridLayout(self.groupBox_4)
|
||||
self.gridlayout2.setObjectName("gridlayout2")
|
||||
|
||||
self.modblackWidget = QtGui.QTreeWidget(self.groupBox_4)
|
||||
self.modblackWidget.setObjectName("modblackWidget")
|
||||
self.gridlayout2.addWidget(self.modblackWidget,7,0,3,1)
|
||||
|
||||
self.removeModblackButton = QtGui.QPushButton(self.groupBox_4)
|
||||
self.removeModblackButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
|
||||
self.removeModblackButton.setObjectName("removeModblackButton")
|
||||
self.gridlayout2.addWidget(self.removeModblackButton,8,2,1,1)
|
||||
|
||||
self.addModblackButton = QtGui.QPushButton(self.groupBox_4)
|
||||
self.addModblackButton.setMaximumSize(QtCore.QSize(90,16777215))
|
||||
|
||||
self.addModblackButton.setObjectName("addModblackButton")
|
||||
self.gridlayout2.addWidget(self.addModblackButton,7,2,1,1)
|
||||
self.gridlayout.addWidget(self.groupBox_4,3,0,1,2)
|
||||
|
||||
self.retranslateUi(ArxinHardware)
|
||||
QtCore.QMetaObject.connectSlotsByName(ArxinHardware)
|
||||
ArxinHardware.setTabOrder(self.scanHardwareCheck,self.scanLVMCheck)
|
||||
ArxinHardware.setTabOrder(self.scanLVMCheck,self.modWidget)
|
||||
ArxinHardware.setTabOrder(self.modWidget,self.addModButton)
|
||||
ArxinHardware.setTabOrder(self.addModButton,self.removeModButton)
|
||||
ArxinHardware.setTabOrder(self.removeModButton,self.loadModButton)
|
||||
ArxinHardware.setTabOrder(self.loadModButton,self.unloadModButton)
|
||||
ArxinHardware.setTabOrder(self.unloadModButton,self.modblackWidget)
|
||||
ArxinHardware.setTabOrder(self.modblackWidget,self.addModblackButton)
|
||||
ArxinHardware.setTabOrder(self.addModblackButton,self.removeModblackButton)
|
||||
|
||||
def retranslateUi(self, ArxinHardware):
|
||||
ArxinHardware.setWindowTitle(QtGui.QApplication.translate("ArxinHardware", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.scanHardwareCheck.setText(QtGui.QApplication.translate("ArxinHardware", "Scan hardware and load required modules at bootup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.scanLVMCheck.setText(QtGui.QApplication.translate("ArxinHardware", "Scan for LVM volume groups at startup", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox_3.setTitle(QtGui.QApplication.translate("ArxinHardware", "Modules", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modWidget.headerItem().setText(0,QtGui.QApplication.translate("ArxinHardware", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modWidget.headerItem().setText(1,QtGui.QApplication.translate("ArxinHardware", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modWidget.headerItem().setText(2,QtGui.QApplication.translate("ArxinHardware", "Status", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.addModButton.setText(QtGui.QApplication.translate("ArxinHardware", "Add...", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.removeModButton.setText(QtGui.QApplication.translate("ArxinHardware", "Remove", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.loadModButton.setText(QtGui.QApplication.translate("ArxinHardware", "Load", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.unloadModButton.setText(QtGui.QApplication.translate("ArxinHardware", "Unload", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox_4.setTitle(QtGui.QApplication.translate("ArxinHardware", "Modules blacklist", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modblackWidget.headerItem().setText(0,QtGui.QApplication.translate("ArxinHardware", "Name", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.modblackWidget.headerItem().setText(1,QtGui.QApplication.translate("ArxinHardware", "Description", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.removeModblackButton.setText(QtGui.QApplication.translate("ArxinHardware", "Remove", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.addModblackButton.setText(QtGui.QApplication.translate("ArxinHardware", "Add...", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
@ -1,102 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'ui/arxinLocale.ui'
|
||||
#
|
||||
# Created: Wed May 7 05:36:27 2008
|
||||
# by: PyQt4 UI code generator 4.3.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
class Ui_ArxinLocale(object):
|
||||
def setupUi(self, ArxinLocale):
|
||||
ArxinLocale.setObjectName("ArxinLocale")
|
||||
ArxinLocale.resize(QtCore.QSize(QtCore.QRect(0,0,568,345).size()).expandedTo(ArxinLocale.minimumSizeHint()))
|
||||
|
||||
self.gridlayout = QtGui.QGridLayout(ArxinLocale)
|
||||
self.gridlayout.setObjectName("gridlayout")
|
||||
|
||||
self.groupBox_2 = QtGui.QGroupBox(ArxinLocale)
|
||||
self.groupBox_2.setObjectName("groupBox_2")
|
||||
|
||||
self.gridlayout1 = QtGui.QGridLayout(self.groupBox_2)
|
||||
self.gridlayout1.setObjectName("gridlayout1")
|
||||
|
||||
self.label_12 = QtGui.QLabel(self.groupBox_2)
|
||||
self.label_12.setObjectName("label_12")
|
||||
self.gridlayout1.addWidget(self.label_12,0,0,1,1)
|
||||
|
||||
self.keymapCombo = QtGui.QComboBox(self.groupBox_2)
|
||||
self.keymapCombo.setObjectName("keymapCombo")
|
||||
self.gridlayout1.addWidget(self.keymapCombo,0,1,1,1)
|
||||
|
||||
self.label_9 = QtGui.QLabel(self.groupBox_2)
|
||||
self.label_9.setObjectName("label_9")
|
||||
self.gridlayout1.addWidget(self.label_9,1,0,1,1)
|
||||
|
||||
self.consoleFont = QtGui.QComboBox(self.groupBox_2)
|
||||
self.consoleFont.setObjectName("consoleFont")
|
||||
self.gridlayout1.addWidget(self.consoleFont,1,1,1,1)
|
||||
|
||||
self.label_6 = QtGui.QLabel(self.groupBox_2)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.gridlayout1.addWidget(self.label_6,2,0,1,1)
|
||||
|
||||
self.consoleMap = QtGui.QComboBox(self.groupBox_2)
|
||||
self.consoleMap.setObjectName("consoleMap")
|
||||
self.gridlayout1.addWidget(self.consoleMap,2,1,1,1)
|
||||
|
||||
self.colorCheck = QtGui.QCheckBox(self.groupBox_2)
|
||||
self.colorCheck.setEnabled(True)
|
||||
self.colorCheck.setChecked(False)
|
||||
self.colorCheck.setObjectName("colorCheck")
|
||||
self.gridlayout1.addWidget(self.colorCheck,3,0,1,2)
|
||||
self.gridlayout.addWidget(self.groupBox_2,3,0,1,4)
|
||||
|
||||
self.label = QtGui.QLabel(ArxinLocale)
|
||||
self.label.setObjectName("label")
|
||||
self.gridlayout.addWidget(self.label,0,0,1,1)
|
||||
|
||||
self.localeCombo = QtGui.QComboBox(ArxinLocale)
|
||||
self.localeCombo.setObjectName("localeCombo")
|
||||
self.gridlayout.addWidget(self.localeCombo,0,2,1,1)
|
||||
|
||||
self.groupBox = QtGui.QGroupBox(ArxinLocale)
|
||||
self.groupBox.setObjectName("groupBox")
|
||||
|
||||
self.gridlayout2 = QtGui.QGridLayout(self.groupBox)
|
||||
self.gridlayout2.setObjectName("gridlayout2")
|
||||
|
||||
self.label_4 = QtGui.QLabel(self.groupBox)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridlayout2.addWidget(self.label_4,0,0,1,1)
|
||||
|
||||
self.hardwareclockCombo = QtGui.QComboBox(self.groupBox)
|
||||
self.hardwareclockCombo.setObjectName("hardwareclockCombo")
|
||||
self.gridlayout2.addWidget(self.hardwareclockCombo,0,1,1,1)
|
||||
|
||||
self.label_5 = QtGui.QLabel(self.groupBox)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridlayout2.addWidget(self.label_5,1,0,1,1)
|
||||
|
||||
self.timeCombo = QtGui.QComboBox(self.groupBox)
|
||||
self.timeCombo.setObjectName("timeCombo")
|
||||
self.gridlayout2.addWidget(self.timeCombo,1,1,1,1)
|
||||
self.gridlayout.addWidget(self.groupBox,2,0,1,4)
|
||||
|
||||
self.retranslateUi(ArxinLocale)
|
||||
QtCore.QMetaObject.connectSlotsByName(ArxinLocale)
|
||||
|
||||
def retranslateUi(self, ArxinLocale):
|
||||
ArxinLocale.setWindowTitle(QtGui.QApplication.translate("ArxinLocale", "Form", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox_2.setTitle(QtGui.QApplication.translate("ArxinLocale", "Console", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_12.setText(QtGui.QApplication.translate("ArxinLocale", "Keymap:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_9.setText(QtGui.QApplication.translate("ArxinLocale", "Console Font:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_6.setText(QtGui.QApplication.translate("ArxinLocale", "Console Map:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.colorCheck.setText(QtGui.QApplication.translate("ArxinLocale", "Use colors in startup messages", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label.setText(QtGui.QApplication.translate("ArxinLocale", "Locale:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.groupBox.setTitle(QtGui.QApplication.translate("ArxinLocale", "Time", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_4.setText(QtGui.QApplication.translate("ArxinLocale", "Hardware Clock:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
self.label_5.setText(QtGui.QApplication.translate("ArxinLocale", "Time Zone:", None, QtGui.QApplication.UnicodeUTF8))
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB |
@ -1,12 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Icon=arxin
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=SystemSettingsCategory
|
||||
X-KDE-System-Settings-Parent-Category=system
|
||||
X-KDE-System-Settings-Category=arxin
|
||||
|
||||
Name=Arxin - ArchLinux Configurator
|
||||
Name[it]=Arxin - Configuratore di ArchLinux
|
||||
|
||||
Comment=Arxin - ArchLinux Configurator
|
||||
Comment[it]=Arxin - Configuratore di ArchLinux
|
@ -1,17 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Exec=kcmshell4 arxinMkinit
|
||||
Icon=arxin32
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=KCModule
|
||||
X-KDE-Library=kcm_arxinMkinit
|
||||
X-KDE-ModuleType=Library
|
||||
X-KDE-SubstituteUID=false
|
||||
X-KDE-HasReadOnlyMode=true
|
||||
X-KDE-RootOnly=true
|
||||
X-KDE-ParentApp=kcontrol
|
||||
X-KDE-System-Settings-Parent-Category=arxin
|
||||
Categories=Qt;KDE;X-KDE-settings-computer-administration;Settings;
|
||||
|
||||
Name=Arxin Mkinitcpio
|
||||
Comment=ArchLinux Ramdisk (mkinitcpio) Configurator
|
||||
Categories=Qt;KDE;
|
@ -1,22 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KPluginInfo
|
||||
Icon=preferences-desktop-daemons
|
||||
Name=Daemons
|
||||
Comment=Configure daemons
|
||||
|
||||
ServiceTypes=Arxin/ScriptedPlugin
|
||||
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
|
||||
X-KDE-Arxin-framework=1
|
||||
X-KDE-Arxin-script-name=arxinDaemons.py
|
||||
|
||||
X-KDE-PluginInfo-Author=Lukas Appelhans
|
||||
X-KDE-PluginInfo-Email=l.appelhans@gmx.de
|
||||
X-KDE-PluginInfo-Version=1.0
|
||||
X-KDE-PluginInfo-Category=Service
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
X-KDE-PluginInfo-Name=Arxin_Daemons
|
@ -1,22 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KPluginInfo
|
||||
Icon=computer
|
||||
Name=Hardware
|
||||
Comment=Configure your Hardware
|
||||
|
||||
ServiceTypes=Arxin/ScriptedPlugin
|
||||
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
|
||||
X-KDE-Arxin-framework=1
|
||||
X-KDE-Arxin-script-name=arxinHardware.py
|
||||
|
||||
X-KDE-PluginInfo-Author=Lukas Appelhans
|
||||
X-KDE-PluginInfo-Email=l.appelhans@gmx.de
|
||||
X-KDE-PluginInfo-Version=1.0
|
||||
X-KDE-PluginInfo-Category=Service
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
X-KDE-PluginInfo-Name=Arxin_Hardware
|
@ -1,22 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KPluginInfo
|
||||
Icon=preferences-desktop-locale
|
||||
Name=Locale
|
||||
Comment=Configure locales
|
||||
|
||||
ServiceTypes=Arxin/ScriptedPlugin
|
||||
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
|
||||
X-KDE-Arxin-framework=1
|
||||
X-KDE-Arxin-script-name=arxinLocale.py
|
||||
|
||||
X-KDE-PluginInfo-Author=Lukas Appelhans
|
||||
X-KDE-PluginInfo-Email=l.appelhans@gmx.de
|
||||
X-KDE-PluginInfo-Version=1.0
|
||||
X-KDE-PluginInfo-Category=Service
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-KDE-Library=arxinScriptedBasePlugin
|
||||
X-KDE-PluginInfo-Name=Arxin_Locale
|
@ -1,25 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KPluginInfo
|
||||
Icon=media-flash
|
||||
Name=Ramdisk
|
||||
Comment=Configure the ramdisk
|
||||
|
||||
|
||||
ServiceTypes=Arxin/Plugin
|
||||
|
||||
X-KDE-Library=arxinMkinitcpioPlugin
|
||||
|
||||
X-KDE-Arxin-framework=1
|
||||
|
||||
X-KDE-PluginInfo-Author=Dario Freddi
|
||||
X-KDE-PluginInfo-Email=drf54321@gmail.com
|
||||
X-KDE-PluginInfo-Version=1.0
|
||||
X-KDE-PluginInfo-Category=Service
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-KDE-Library=arxinMkinitcpioPlugin
|
||||
X-KDE-PluginInfo-Name=arxinMkinitcpioPlugin
|
||||
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
Name=Arxin Part
|
||||
MimeType=application;
|
||||
X-KDE-ServiceTypes=System/,KParts/ReadOnlyPart
|
||||
X-KDE-Library=libarxin_part
|
||||
Icon=arxin
|
@ -1,9 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=ServiceType
|
||||
X-KDE-ServiceType=Arxin/Plugin
|
||||
Name=Arxin Plugin
|
||||
|
||||
# Version of the framework this plugin is compatible with.
|
||||
# Current version: 1
|
||||
[PropertyDef::X-KDE-Arxin-framework-version]
|
||||
Type=int
|
@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=ServiceType
|
||||
X-KDE-ServiceType=Arxin/ScriptedPlugin
|
||||
Name=Arxin Plugin
|
||||
|
||||
# Version of the framework this plugin is compatible with.
|
||||
# Current version: 1
|
||||
[PropertyDef::X-KDE-Arxin-framework-version]
|
||||
Type=int
|
||||
|
||||
# Where is our script? :D
|
||||
[PropertyDef::X-KDE-Arxin-script-name]
|
||||
Type=QString
|
@ -24,12 +24,16 @@ makedepends=('cmake')
|
||||
replaces=('arxin-svn')
|
||||
conflicts=('arxin-svn')
|
||||
groups=()
|
||||
source=()
|
||||
source=("http://chakra-project.org/sources/${pkgname}/${pkgname}-${pkgver}-${arch}.tar.gz")
|
||||
options=('!splithdr')
|
||||
|
||||
groups=('kde' 'kde-complete' 'kde-uninstall' 'kde-tools')
|
||||
|
||||
install=tools-arxin.install
|
||||
md5sums=('66d38e892797f4b22310e1830c476265') # arxin-20100210-i686.tar.gz
|
||||
[ "$CARCH" = "x86_64" ] && md5sums[0]='894e950f41d1d447538d237490c372fa' # arxin-20100210-x86_64.tar.gz
|
||||
|
||||
|
||||
install=arxin.install
|
||||
|
||||
#
|
||||
# build function
|
@ -7,25 +7,25 @@
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
|
||||
#
|
||||
# package info
|
||||
#
|
||||
pkgname=akabeicore
|
||||
pkgver=20100524
|
||||
pkgname=tribe-partitionmanager
|
||||
pkgver=20100606
|
||||
pkgrel=1
|
||||
pkgdesc="Akabei’s core library"
|
||||
pkgdesc="Tribe's partitionmanager"
|
||||
url="http://git.chakra-project.org/chakra/"
|
||||
license="GPL"
|
||||
arch=('i686' 'x86_64')
|
||||
depends=('sqlite3' 'qt' 'libarchive')
|
||||
makedepends=('cmake')
|
||||
options=('!splithdr' 'splitdbg')
|
||||
depends=('kdebase-workspace' 'parted>=2.2' 'e2fsprogs' 'libatasmart')
|
||||
replaces=('kdemod-tribe-partitionmanager')
|
||||
makedepends=('cmake' 'automoc4' 'pkgconfig')
|
||||
conflicts=('kdemod-tribe-partitionmanager' 'chakra-libpartitionmanager')
|
||||
groups=('chakra-uninstall')
|
||||
|
||||
groups=('kde-uninstall')
|
||||
_gitroot="git://gitorious.org/chakra/tribe-partitionmanager.git"
|
||||
_gitname="tribe-partitionmanager"
|
||||
|
||||
_gitroot="git://git.chakra-project.org/akabei/akabeicore.git"
|
||||
_gitname="akabeicore"
|
||||
|
||||
#
|
||||
# build function
|
||||
@ -36,10 +36,10 @@ build()
|
||||
msg "Connecting to GIT server...."
|
||||
|
||||
if [ -d $_gitname ] ; then
|
||||
cd $_gitname && git pull
|
||||
cd $_gitname && git pull origin
|
||||
msg "The local files are updated."
|
||||
else
|
||||
git clone $_gitroot
|
||||
git clone $_gitroot
|
||||
fi
|
||||
msg "GIT checkout done or server timeout"
|
||||
msg "Starting make..."
|
82
tools-pkg-tribe/PKGBUILD
Normal file
82
tools-pkg-tribe/PKGBUILD
Normal file
@ -0,0 +1,82 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
|
||||
#
|
||||
# package info
|
||||
#
|
||||
pkgname=tribe
|
||||
pkgver=20100606
|
||||
_sver=20100404
|
||||
pkgrel=1
|
||||
pkgdesc="Tribe - Chakra LiveCD Installer"
|
||||
url="http://git.chakra-project.org/chakra/"
|
||||
license="GPL"
|
||||
arch=('i686' 'x86_64')
|
||||
depends=('kdelibs' 'kdeedu-marble>=4.4.2' 'squashfs-tools' 'arxin' "tribe-partitionmanager>=20100606")
|
||||
makedepends=('cmake' 'kdelibs' 'kdeedu-marble>=4.4.2' 'kdebase-workspace')
|
||||
provides=('tribe')
|
||||
replaces=('kdemod-tribe-svn' 'kdemod-tribe')
|
||||
conflicts=('chakra-tribe' 'tribe-svn' 'kdemod-partitionmanager' 'kdemod-tribe' 'kdemod-tribe-debug' 'kdemod-tribe-partitionmanager')
|
||||
options=('!splithdr' 'splitdbg')
|
||||
source=("http://chakra-project.org/sources/tribe/tribe-screenshots-${_sver}.tar.gz")
|
||||
md5sums=('9939bbb9994cf78f9ec4101ab6fa1209') # tribe-screenshots-20100404.tar.gz
|
||||
|
||||
groups=('kde-uninstall')
|
||||
install=tools-tribe.install
|
||||
|
||||
_gitroot="git://gitorious.org/chakra/tribe.git"
|
||||
_gitname="tribe"
|
||||
|
||||
#
|
||||
# build function
|
||||
#
|
||||
build()
|
||||
{
|
||||
cd "${srcdir}"
|
||||
msg "Connecting to GIT server...."
|
||||
|
||||
if [ -d $_gitname ] ; then
|
||||
cd $_gitname && git pull origin newbase
|
||||
msg "The local files are updated."
|
||||
else
|
||||
git clone $_gitroot
|
||||
cd $_gitname && git checkout newbase
|
||||
fi
|
||||
msg "GIT checkout done or server timeout"
|
||||
|
||||
msg "Starting make..."
|
||||
|
||||
rm -rf "${srcdir}/$_gitname-build"
|
||||
|
||||
cp -r "${srcdir}/$_gitname" "${srcdir}/$_gitname-build"
|
||||
cd "${srcdir}/$_gitname-build/"
|
||||
|
||||
msg "replace screenshots"
|
||||
cp -vr "${srcdir}/tribe-screenshots-${_sver}/images/" "${srcdir}/$_gitname-build/ui"
|
||||
|
||||
# add pkgver to tribe
|
||||
sed -i -e "s~source build/from git~Build: ${pkgver}-${pkgrel} (Chakra-Distro)~g" config-tribe.h.cmake
|
||||
cmake . -DCMAKE_INSTALL_PREFIX=${_installprefix} \
|
||||
-DCMAKE_BUILD_TYPE=${_build_type} \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed' || return 1
|
||||
|
||||
msg "Starting make..."
|
||||
make || return 1
|
||||
|
||||
msg "Make successful, installing..."
|
||||
make DESTDIR=$startdir/pkg install || return 1
|
||||
|
||||
# remove nasty files
|
||||
find $startdir/pkg/ -name ".git" -type d -exec rm -fr {} +
|
||||
|
||||
# remove release announcement
|
||||
rm $startdir/pkg/usr/share/tribe/config/release_notes.txt
|
||||
}
|
67
tools-pkg-tribe/tools-tribe.install
Normal file
67
tools-pkg-tribe/tools-tribe.install
Normal file
@ -0,0 +1,67 @@
|
||||
post_install() {
|
||||
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||
|
||||
. /etc/chakra/updates.conf
|
||||
|
||||
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||
/usr/bin/chakra-update-icons
|
||||
fi
|
||||
|
||||
else
|
||||
echo " > WARNING"
|
||||
echo " The package kde-common seems not to be installed,"
|
||||
echo " this can possibly break the installation. Just install it"
|
||||
echo " manually after this installation/update, run the following"
|
||||
echo " commands and restart KDE afterwards:"
|
||||
echo " sudo chakra-config-updater"
|
||||
echo " kbuildsycoca4"
|
||||
echo " "
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||
|
||||
. /etc/chakra/updates.conf
|
||||
|
||||
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||
/usr/bin/chakra-update-icons
|
||||
fi
|
||||
|
||||
else
|
||||
echo " > WARNING"
|
||||
echo " The package kde-common seems not to be installed,"
|
||||
echo " this can possibly break the installation. Just install it"
|
||||
echo " manually after this installation/update, run the following"
|
||||
echo " commands and restart KDE afterwards:"
|
||||
echo " sudo chakra-config-updater"
|
||||
echo " kbuildsycoca4"
|
||||
echo " "
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if [ -e "/etc/chakra/updates.conf" ] ; then
|
||||
|
||||
. /etc/chakra/updates.conf
|
||||
|
||||
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
||||
/usr/bin/chakra-update-icons
|
||||
fi
|
||||
|
||||
else
|
||||
echo " > WARNING"
|
||||
echo " The package kde-common seems not to be installed,"
|
||||
echo " this can possibly break the installation. Just install it"
|
||||
echo " manually after this installation/update, run the following"
|
||||
echo " commands and restart KDE afterwards:"
|
||||
echo " sudo chakra-config-updater"
|
||||
echo " kbuildsycoca4"
|
||||
echo " "
|
||||
fi
|
||||
}
|
||||
|
||||
op=$1
|
||||
shift
|
||||
|
||||
$op $*
|
Loading…
Reference in New Issue
Block a user