summaryrefslogtreecommitdiffstats
path: root/ksplashml/kcmksplash
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /ksplashml/kcmksplash
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksplashml/kcmksplash')
-rw-r--r--ksplashml/kcmksplash/Makefile.am18
-rw-r--r--ksplashml/kcmksplash/installer.cpp484
-rw-r--r--ksplashml/kcmksplash/installer.h87
-rw-r--r--ksplashml/kcmksplash/ksplashthememgr.desktop216
-rw-r--r--ksplashml/kcmksplash/main.cpp105
-rw-r--r--ksplashml/kcmksplash/pics/Makefile.am1
-rw-r--r--ksplashml/kcmksplash/pics/hi128-app-ksplash.pngbin0 -> 15013 bytes
-rw-r--r--ksplashml/kcmksplash/pics/hi16-app-ksplash.pngbin0 -> 1027 bytes
-rw-r--r--ksplashml/kcmksplash/pics/hi22-app-ksplash.pngbin0 -> 1475 bytes
-rw-r--r--ksplashml/kcmksplash/pics/hi32-app-ksplash.pngbin0 -> 2423 bytes
-rw-r--r--ksplashml/kcmksplash/pics/hi48-app-ksplash.pngbin0 -> 4168 bytes
-rw-r--r--ksplashml/kcmksplash/pics/hi64-app-ksplash.pngbin0 -> 6103 bytes
12 files changed, 911 insertions, 0 deletions
diff --git a/ksplashml/kcmksplash/Makefile.am b/ksplashml/kcmksplash/Makefile.am
new file mode 100644
index 000000000..d2ebe6cdd
--- /dev/null
+++ b/ksplashml/kcmksplash/Makefile.am
@@ -0,0 +1,18 @@
+# Makefile.am for kdebase/ksplashml/kcmksplash
+SUBDIRS=pics
+
+INCLUDES = $(all_includes)
+METASOURCES = AUTO
+
+kde_module_LTLIBRARIES = kcm_ksplashthemes.la
+
+kcm_ksplashthemes_la_SOURCES = installer.cpp main.cpp
+noinst_HEADERS = installer.h
+
+kcm_ksplashthemes_la_LIBADD = $(LIB_KIO)
+kcm_ksplashthemes_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+
+xdg_apps_DATA = ksplashthememgr.desktop
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/ksplashthemes.pot
diff --git a/ksplashml/kcmksplash/installer.cpp b/ksplashml/kcmksplash/installer.cpp
new file mode 100644
index 000000000..a2850ecfa
--- /dev/null
+++ b/ksplashml/kcmksplash/installer.cpp
@@ -0,0 +1,484 @@
+/***************************************************************************
+ * Copyright Ravikiran Rajagopal 2003 *
+ * ravi@ee.eng.ohio-state.edu *
+ * Copyright (c) 1998 Stefan Taferner <taferner@kde.org> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License (version 2) as *
+ * published by the Free Software Foundation. *
+ * *
+ ***************************************************************************/
+
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <qdir.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qtextedit.h>
+
+#include "installer.h"
+
+#include <kdebug.h>
+#include <kfiledialog.h>
+#include <kglobalsettings.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kprocess.h>
+#include <kpushbutton.h>
+#include <kstandarddirs.h>
+#include <ktar.h>
+#include <ktrader.h>
+#include <kurldrag.h>
+#include <kio/netaccess.h>
+
+ThemeListBox::ThemeListBox(QWidget *parent)
+ : KListBox(parent)
+{
+ setAcceptDrops(true);
+ connect(this, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint &)),
+ this, SLOT(slotMouseButtonPressed(int, QListBoxItem *, const QPoint &)));
+}
+
+void ThemeListBox::dragEnterEvent(QDragEnterEvent* event)
+{
+ event->accept((event->source() != this) && KURLDrag::canDecode(event));
+}
+
+void ThemeListBox::dropEvent(QDropEvent* event)
+{
+ KURL::List urls;
+ if (KURLDrag::decode(event, urls))
+ {
+ emit filesDropped(urls);
+ }
+}
+
+void ThemeListBox::slotMouseButtonPressed(int button, QListBoxItem *item, const QPoint &p)
+{
+ if ((button & LeftButton) == 0) return;
+ mOldPos = p;
+ mDragFile = QString::null;
+ int cur = index(item);
+ if (cur >= 0)
+ mDragFile = text2path[text(cur)];
+}
+
+void ThemeListBox::mouseMoveEvent(QMouseEvent *e)
+{
+ if (((e->state() & LeftButton) != 0) && !mDragFile.isEmpty())
+ {
+ int delay = KGlobalSettings::dndEventDelay();
+ QPoint newPos = e->globalPos();
+ if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
+ newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
+ {
+ KURL url;
+ url.setPath(mDragFile);
+ KURL::List urls;
+ urls.append(url);
+ KURLDrag *d = new KURLDrag(urls, this);
+ d->dragCopy();
+ }
+ }
+ KListBox::mouseMoveEvent(e);
+}
+
+//-----------------------------------------------------------------------------
+SplashInstaller::SplashInstaller (QWidget *aParent, const char *aName, bool aInit)
+ : QWidget(aParent, aName), mGui(!aInit)
+{
+ KGlobal::dirs()->addResourceType("ksplashthemes", KStandardDirs::kde_default("data") + "ksplash/Themes");
+
+ if (!mGui)
+ return;
+
+ QHBoxLayout* hbox = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+
+ QVBoxLayout* leftbox = new QVBoxLayout( hbox, KDialog::spacingHint() );
+ hbox->setStretchFactor( leftbox, 1 );
+
+ mThemesList = new ThemeListBox(this);
+ mThemesList->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
+ connect(mThemesList, SIGNAL(highlighted(int)), SLOT(slotSetTheme(int)));
+ connect(mThemesList, SIGNAL(filesDropped(const KURL::List&)), SLOT(slotFilesDropped(const KURL::List&)));
+ leftbox->addWidget(mThemesList);
+
+ mBtnAdd = new KPushButton( i18n("Add..."), this );
+ leftbox->addWidget( mBtnAdd );
+ connect(mBtnAdd, SIGNAL(clicked()), SLOT(slotAdd()));
+
+ mBtnRemove = new KPushButton( i18n("Remove"), this );
+ leftbox->addWidget( mBtnRemove );
+ connect(mBtnRemove, SIGNAL(clicked()), SLOT(slotRemove()));
+
+ mBtnTest = new KPushButton( i18n("Test"), this );
+ leftbox->addWidget( mBtnTest );
+ connect(mBtnTest, SIGNAL(clicked()), SLOT(slotTest()));
+
+ QVBoxLayout* rightbox = new QVBoxLayout( hbox, KDialog::spacingHint() );
+ hbox->setStretchFactor( rightbox, 3 );
+
+ mPreview = new QLabel(this);
+ mPreview->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ mPreview->setMinimumSize(QSize(320,240));
+ mPreview->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
+ rightbox->addWidget(mPreview);
+ rightbox->setStretchFactor( mPreview, 3 );
+
+ mText = new QTextEdit(this);
+ mText->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred );
+ mText->setMinimumSize(mText->sizeHint());
+ mText->setReadOnly(true);
+ rightbox->addWidget(mText);
+ rightbox->setStretchFactor( mText, 1 );
+
+ readThemesList();
+ load();
+}
+
+
+//-----------------------------------------------------------------------------
+SplashInstaller::~SplashInstaller()
+{
+}
+
+int SplashInstaller::addTheme(const QString &path, const QString &name)
+{
+ //kdDebug() << "SplashInstaller::addTheme: " << path << " " << name << endl;
+ QString tmp(i18n( name.utf8() ));
+ int i = mThemesList->count();
+ while((i > 0) && (mThemesList->text(i-1) > tmp))
+ i--;
+ if ((i > 0) && (mThemesList->text(i-1) == tmp))
+ return i-1;
+ mThemesList->insertItem(tmp, i);
+ mThemesList->text2path.insert( tmp, path+"/"+name );
+ return i;
+}
+
+// Copy theme package into themes directory
+void SplashInstaller::addNewTheme(const KURL &srcURL)
+{
+ QString dir = KGlobal::dirs()->saveLocation("ksplashthemes");
+ KURL url;
+ QString filename = srcURL.fileName();
+ int i = filename.findRev('.');
+ // Convert extension to lower case.
+ if (i >= 0)
+ filename = filename.left(i)+filename.mid(i).lower();
+ url.setPath(locateLocal("tmp",filename));
+
+ // Remove file from temporary directory if it aleady exists - usually the result of a failed install.
+ if ( KIO::NetAccess::exists( url, true, 0 ) )
+ KIO::NetAccess::del( url, 0 );
+
+ bool rc = KIO::NetAccess::copy(srcURL, url, 0);
+ if (!rc)
+ {
+ kdWarning() << "Failed to copy theme " << srcURL.fileName()
+ << " into temporary directory " << url.path() << endl;
+ return;
+ }
+
+ // Extract into theme directory: we may have multiple themes in one tarball!
+ KTar tarFile(url.path());
+ if (!tarFile.open(IO_ReadOnly))
+ {
+ kdDebug() << "Unable to open archive: " << url.path() << endl;
+ return;
+ }
+ KArchiveDirectory const *ad = tarFile.directory();
+ // Find first directory entry.
+ QStringList entries = ad->entries();
+ QString themeName( entries.first() );
+#if 0
+ // The isDirectory() call always returns false; why?
+ for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
+ {
+ if ( ad->entry( *it )->isDirectory() )
+ {
+ themeName = *it;
+ break;
+ }
+ }
+#endif
+ // TODO: Make sure we put the entries into a subdirectory if the tarball does not.
+ // TODO: Warn the user if we overwrite something.
+ ad->copyTo(locateLocal("ksplashthemes","/"));
+ tarFile.close();
+ KIO::NetAccess::del( url, 0 );
+
+ // TODO: Update only the entries from this installation.
+ readThemesList();
+ mThemesList->setCurrentItem(findTheme(themeName));
+ mThemesList->setSelected(mThemesList->currentItem(), true);
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::readThemesList()
+{
+ mThemesList->clear();
+
+ // Read local themes
+ QStringList entryList = KGlobal::dirs()->resourceDirs("ksplashthemes");
+ //kdDebug() << "readThemesList: " << entryList << endl;
+ QDir dir;
+ QStringList subdirs;
+ QStringList::ConstIterator name;
+ for(name = entryList.begin(); name != entryList.end(); name++)
+ {
+ dir = *name;
+ if (!dir.exists())
+ continue;
+ subdirs = dir.entryList( QDir::Dirs );
+ // kdDebug() << "readThemesList: " << subdirs << endl;
+ // TODO: Make sure it contains a *.rc file.
+ for (QStringList::Iterator l = subdirs.begin(); l != subdirs.end(); l++ )
+ if ( !(*l).startsWith(QString(".")) )
+ {
+ mThemesList->blockSignals( true ); // Don't activate any theme until all themes are loaded.
+ addTheme(dir.path(),*l);
+ mThemesList->blockSignals( false );
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::defaults()
+{
+ load( true );
+}
+
+void SplashInstaller::load()
+{
+ load( false );
+}
+
+void SplashInstaller::load( bool useDefaults )
+{
+ KConfig cnf("ksplashrc");
+ cnf.setReadDefaults( useDefaults );
+ cnf.setGroup("KSplash");
+ QString curTheme = cnf.readEntry("Theme","Default");
+ mThemesList->setCurrentItem(findTheme(curTheme));
+ emit changed( useDefaults );
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::save()
+{
+ KConfig cnf("ksplashrc");
+ cnf.setGroup("KSplash");
+ int cur = mThemesList->currentItem();
+ if (cur < 0)
+ return;
+ QString path = mThemesList->text(cur);
+ if ( mThemesList->text2path.contains( path ) )
+ path = mThemesList->text2path[path];
+ cur = path.findRev('/');
+ cnf.writeEntry("Theme", path.mid(cur+1) );
+ cnf.sync();
+ emit changed( false );
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::slotRemove()
+{
+ int cur = mThemesList->currentItem();
+ if (cur < 0)
+ return;
+
+ bool rc = false;
+ QString themeName = mThemesList->text(cur);
+ QString themeDir = mThemesList->text2path[themeName];
+ if (!themeDir.isEmpty())
+ {
+ KURL url;
+ url.setPath(themeDir);
+ if (KMessageBox::warningContinueCancel(this,i18n("Delete folder %1 and its contents?").arg(themeDir),"",KGuiItem(i18n("&Delete"),"editdelete"))==KMessageBox::Continue)
+ rc = KIO::NetAccess::del(url,this);
+ else
+ return;
+ }
+ if (!rc)
+ {
+ KMessageBox::sorry(this, i18n("Failed to remove theme '%1'").arg(themeName));
+ return;
+ }
+ //mThemesList->removeItem(cur);
+ readThemesList();
+ cur = ((unsigned int)cur >= mThemesList->count())?mThemesList->count()-1:cur;
+ mThemesList->setCurrentItem(cur);
+}
+
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::slotSetTheme(int id)
+{
+ bool enabled;
+ QString path(QString::null);
+ QString infoTxt;
+
+ if (id < 0)
+ {
+ mPreview->setText(QString::null);
+ mText->setText(QString::null);
+ enabled = false;
+ }
+ else
+ {
+ QString error = i18n("(Could not load theme)");
+ path = mThemesList->text(id);
+ if ( mThemesList->text2path.contains( path ) )
+ path = mThemesList->text2path[path];
+ enabled = false;
+ KURL url;
+ QString themeName;
+ if (!path.isEmpty())
+ {
+ // Make sure the correct plugin is installed.
+ int i = path.findRev('/');
+ if (i >= 0)
+ themeName = path.mid(i+1);
+ url.setPath( path + "/Theme.rc" );
+ if (!KIO::NetAccess::exists(url, true, 0))
+ {
+ url.setPath( path + "/Theme.RC" );
+ if (!KIO::NetAccess::exists(url, true, 0))
+ {
+ url.setPath( path + "/theme.rc" );
+ if (!KIO::NetAccess::exists(url, true, 0))
+ url.setPath( path + "/" + themeName + ".rc" );
+ }
+ }
+ if (KIO::NetAccess::exists(url, true, 0))
+ {
+ KConfig cnf(url.path());
+ cnf.setGroup( QString("KSplash Theme: %1").arg(themeName) );
+
+ // Get theme information.
+ infoTxt = "<qt>";
+ if ( cnf.hasKey( "Name" ) )
+ infoTxt += i18n( "<b>Name:</b> %1<br>" ).arg( cnf.readEntry( "Name", i18n( "Unknown" ) ) );
+ if ( cnf.hasKey( "Description" ) )
+ infoTxt += i18n( "<b>Description:</b> %1<br>" ).arg( cnf.readEntry( "Description", i18n( "Unknown" ) ) );
+ if ( cnf.hasKey( "Version" ) )
+ infoTxt += i18n( "<b>Version:</b> %1<br>" ).arg( cnf.readEntry( "Version", i18n( "Unknown" ) ) );
+ if ( cnf.hasKey( "Author" ) )
+ infoTxt += i18n( "<b>Author:</b> %1<br>" ).arg( cnf.readEntry( "Author", i18n( "Unknown" ) ) );
+ if ( cnf.hasKey( "Homepage" ) )
+ infoTxt += i18n( "<b>Homepage:</b> %1<br>" ).arg( cnf.readEntry( "Homepage", i18n( "Unknown" ) ) );
+ infoTxt += "</qt>";
+
+ QString pluginName( cnf.readEntry( "Engine", "Default" ) ); // Perhaps no default is better?
+ if ((KTrader::self()->query("KSplash/Plugin", QString("[X-KSplash-PluginName] == '%1'").arg(pluginName))).isEmpty())
+ {
+ enabled = false;
+ error = i18n("This theme requires the plugin %1 which is not installed.").arg(pluginName);
+ }
+ else
+ enabled = true; // Hooray, there is at least one plugin which can handle this theme.
+ }
+ else
+ {
+ error = i18n("Could not load theme configuration file.");
+ }
+ }
+ mBtnTest->setEnabled(enabled && themeName != "None" );
+ mText->setText(infoTxt);
+ if (!enabled)
+ {
+ url.setPath( path + "/" + "Preview.png" );
+ if (KIO::NetAccess::exists(url, true, 0))
+ mPreview->setPixmap(QPixmap(url.path()));
+ else
+ mPreview->setText(i18n("(Could not load theme)"));
+ KMessageBox::sorry(this, error);
+ }
+ else
+ {
+ url.setPath( path + "/" + "Preview.png" );
+ if (KIO::NetAccess::exists(url, true, 0))
+ mPreview->setPixmap(QPixmap(url.path()));
+ else
+ mPreview->setText(i18n("No preview available."));
+ emit changed(true);
+ }
+ }
+ mBtnRemove->setEnabled( !path.isEmpty() && QFileInfo(path).isWritable());
+}
+
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::slotAdd()
+{
+ static QString path;
+ if (path.isEmpty()) path = QDir::homeDirPath();
+
+ KFileDialog dlg(path, "*.tgz *.tar.gz *.tar.bz2|" + i18n( "KSplash Theme Files" ), 0, 0, true);
+ dlg.setCaption(i18n("Add Theme"));
+ if (!dlg.exec())
+ return;
+
+ path = dlg.baseURL().url();
+ addNewTheme(dlg.selectedURL());
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::slotFilesDropped(const KURL::List &urls)
+{
+ for(KURL::List::ConstIterator it = urls.begin();
+ it != urls.end();
+ ++it)
+ addNewTheme(*it);
+}
+
+//-----------------------------------------------------------------------------
+int SplashInstaller::findTheme( const QString &theme )
+{
+ // theme is untranslated, but the listbox contains translated items
+ QString tmp(i18n( theme.utf8() ));
+ int id = mThemesList->count()-1;
+
+ while (id >= 0)
+ {
+ if (mThemesList->text(id) == tmp)
+ return id;
+ id--;
+ }
+
+ return 0;
+}
+
+//-----------------------------------------------------------------------------
+void SplashInstaller::slotTest()
+{
+ int i = mThemesList->currentItem();
+ if (i < 0)
+ return;
+ QString themeName = mThemesList->text2path[mThemesList->text(i)];
+ int r = themeName.findRev('/');
+ if (r >= 0)
+ themeName = themeName.mid(r+1);
+
+ // special handling for none and simple splashscreens
+ if( themeName == "None" )
+ return;
+ if( themeName == "Simple" )
+ {
+ KProcess proc;
+ proc << "ksplashsimple" << "--test";
+ if (!proc.start(KProcess::Block))
+ KMessageBox::error(this,i18n("Unable to start ksplashsimple."));
+ return;
+ }
+ KProcess proc;
+ proc << "ksplash" << "--test" << "--theme" << themeName;
+ if (!proc.start(KProcess::Block))
+ KMessageBox::error(this,i18n("Unable to start ksplash."));
+}
+
+//-----------------------------------------------------------------------------
+#include "installer.moc"
diff --git a/ksplashml/kcmksplash/installer.h b/ksplashml/kcmksplash/installer.h
new file mode 100644
index 000000000..43e37d0fc
--- /dev/null
+++ b/ksplashml/kcmksplash/installer.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * Copyright Ravikiran Rajagopal 2003 *
+ * ravi@ee.eng.ohio-state.edu *
+ * Copyright (c) 1998 Stefan Taferner <taferner@kde.org> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License (version 2) as *
+ * published by the Free Software Foundation. *
+ * *
+ ***************************************************************************/
+#ifndef SPLASHINSTALLER_H
+#define SPLASHINSTALLER_H
+
+#include <qmap.h>
+#include <qpoint.h>
+
+#include <klistbox.h>
+#include <kurl.h>
+
+class QLabel;
+class QTextEdit;
+class QPushButton;
+class ThemeListBox;
+
+class SplashInstaller : public QWidget
+{
+ Q_OBJECT
+public:
+ SplashInstaller(QWidget *parent=0, const char *aName=0, bool aInit=FALSE);
+ ~SplashInstaller();
+
+ virtual void load();
+ virtual void load( bool useDefaults );
+ virtual void save();
+ virtual void defaults();
+
+signals:
+ void changed( bool state );
+
+protected slots:
+ virtual void slotAdd();
+ virtual void slotRemove();
+ virtual void slotTest();
+ virtual void slotSetTheme(int);
+ void slotFilesDropped(const KURL::List &urls);
+
+protected:
+ /** Scan Themes directory for available theme packages */
+ virtual void readThemesList();
+ /** add a theme to the list, returns the list index */
+ int addTheme(const QString &path, const QString &name);
+ void addNewTheme(const KURL &srcURL);
+ int findTheme( const QString &theme );
+
+private:
+ bool mGui;
+ ThemeListBox *mThemesList;
+ QPushButton *mBtnAdd, *mBtnRemove, *mBtnTest;
+ QTextEdit *mText;
+ QLabel *mPreview;
+};
+
+class ThemeListBox: public KListBox
+{
+ Q_OBJECT
+public:
+ ThemeListBox(QWidget *parent);
+ QMap<QString, QString> text2path;
+
+signals:
+ void filesDropped(const KURL::List &urls);
+
+protected:
+ void dragEnterEvent(QDragEnterEvent* event);
+ void dropEvent(QDropEvent* event);
+ void mouseMoveEvent(QMouseEvent *e);
+
+protected slots:
+ void slotMouseButtonPressed(int button, QListBoxItem *item, const QPoint &p);
+
+private:
+ QString mDragFile;
+ QPoint mOldPos;
+
+};
+
+#endif
diff --git a/ksplashml/kcmksplash/ksplashthememgr.desktop b/ksplashml/kcmksplash/ksplashthememgr.desktop
new file mode 100644
index 000000000..293e3b1a4
--- /dev/null
+++ b/ksplashml/kcmksplash/ksplashthememgr.desktop
@@ -0,0 +1,216 @@
+[Desktop Entry]
+Icon=ksplash
+Exec=kcmshell ksplashthememgr
+DocPath=ksplashml/themes.html
+
+X-KDE-ModuleType=Library
+X-KDE-Library=ksplashthemes
+X-KDE-FactoryName=ksplashthemes
+X-KDE-ParentApp=kcontrol
+
+Name=Splash Screen
+Name[af]=Spat Skerm
+Name[ar]=شاشة بادئة
+Name[az]=Açılış Rəsmi
+Name[be]=Застаўка загрузкі
+Name[bg]=Начален екран
+Name[bn]=স্প্ল্যাশ স্ক্রীণ
+Name[br]=Skramm-degemer
+Name[ca]=Pantalla d'inici
+Name[cs]=Úvodní obrazovka
+Name[csb]=Ekran na przëwitanié
+Name[cy]=Sgrîn Croeso
+Name[da]=Splashskærm
+Name[de]=Startbildschirm
+Name[el]=Αρχική οθόνη
+Name[eo]=Salutŝildo
+Name[es]=Pantalla anunciadora
+Name[et]=Käivitusekraan
+Name[eu]=Splash pantaila
+Name[fa]=رنگ‌پاشی پرده
+Name[fi]=Aloitusruutu
+Name[fr]=Écran de démarrage
+Name[fy]=Begjinskerm
+Name[ga]=Splancscáileán
+Name[gl]=Pantalla de Benvida
+Name[he]=מצג פתיחה
+Name[hi]=स्प्लैश स्क्रीन
+Name[hr]=Pozdravni zaslon
+Name[hu]=Nyitókép-témák
+Name[is]=Upphafsskjár
+Name[it]=Schermata d'avvio
+Name[ja]=スプラッシュスクリーン
+Name[kk]=Бастау экраны
+Name[km]=អេក្រង់​ស្វាគមន៍
+Name[ko]=시작 화면
+Name[lo]=จอเริ่มการทำงาน
+Name[lt]=Pasveikinimo ekranas
+Name[lv]=Šļaksta Ekrāns
+Name[mk]=Поздравен екран
+Name[mn]=Эхлэл дэлгэц
+Name[ms]=Splash Screen
+Name[nb]=Velkomstbilde
+Name[nds]=Startschirm
+Name[ne]=स्प्लयास पर्दा
+Name[nl]=Opstartscherm
+Name[nn]=Velkomstbilete
+Name[pa]=ਸਵਾਗਤੀ ਸਕਰੀਨ
+Name[pl]=Ekran powitalny
+Name[pt]=Ecrã Inicial
+Name[pt_BR]=Tela de Apresentação
+Name[ro]=Imagine de pornire
+Name[ru]=Заставка
+Name[rw]=Gukwiza Mugaragaza
+Name[se]=Álgošearbma
+Name[sk]=Úvodná obrazovka
+Name[sl]=Uvodni zaslon
+Name[sr]=Сплеш екран
+Name[sr@Latn]=Spleš ekran
+Name[sv]=Startskärm
+Name[ta]=தோன்றும் திரை
+Name[tg]=Пардаи оғоз
+Name[th]=หน้าจอเริ่มการทำงาน
+Name[tr]=Açılış ekranı
+Name[tt]=Kürsätmä Täräzä
+Name[uk]=Екран заставки
+Name[uz]=Splesh oynasi
+Name[uz@cyrillic]=Сплэш ойнаси
+Name[ven]=U kwasha tshikirini
+Name[vi]=Màn hình Chào mừng
+Name[wa]=Waitroûle d' enondaedje
+Name[zh_CN]=飞溅屏幕
+Name[zh_TW]=啟動畫面
+Name[zu]=Isikrini Sokuphahlaza
+Type=Application
+Comment=Manager for Splash Screen Themes
+Comment[af]=Bestuurder vir Spat Skerm Temas
+Comment[ar]=مدير سمات الشاشات الافتتاحية
+Comment[az]=Açılış Rəsmi Örtükləri İdarəçisi
+Comment[be]=Кіраўнік заставак загрузкі
+Comment[bg]=Настройване на началния екран
+Comment[bn]=স্প্ল্যাশ স্ক্রীণ থীম ম্যানেজার
+Comment[br]=Merour evit gwiskadoù ar skramm degemer
+Comment[bs]=Upravitelj temama splash screen-a
+Comment[ca]=Gestor per als temes de la pantalla d'inici
+Comment[cs]=Správce motivů úvodních obrazovek
+Comment[csb]=Menedżer témów ekranu na przëwitanié
+Comment[cy]=Rheolydd Themau Sgriniau Croeso
+Comment[da]=Håndtering for opstartskærme-temaer
+Comment[de]=Verwaltung für Startbildschirmdesigns
+Comment[el]=Διαχειριστής για θέματα αρχικής οθόνης
+Comment[eo]=Administrilo por la salutŝildo
+Comment[es]=Gestor de los temas de la pantalla anunciadora
+Comment[et]=Käivitusekraani teemade haldur
+Comment[eu]=Splash pantailako gaien kudeatzailea
+Comment[fa]=مدیر چهره‌های رنگ‌پاشی پرده
+Comment[fi]=Hallintaohjelma aloitusruuduille
+Comment[fr]=Gestionnaire de thèmes d'écran de démarrage
+Comment[fy]=Temabehear foar begjinskerm
+Comment[gl]=Xestor dos Temas para a Pantalla de Benvida
+Comment[he]=מנהל ערכות נושא למצג הפתיחה
+Comment[hi]=स्प्लैश स्क्रीन प्रसंगों के लिए प्रबंधक
+Comment[hr]=Upravitelj tema pozdravnih zaslona
+Comment[hu]=A nyitókép témájának beállítása
+Comment[is]=Stjórna þemum upphafsskjáa
+Comment[it]=Gestore dei temi della schermata di avvio
+Comment[ja]=スプラッシュスクリーンのテーマを管理
+Comment[kk]=Бастау бейнеперде нақыштарының менеджері
+Comment[km]=កម្មវិធី​គ្រប់គ្រង​ស្បែក​អេក្រង់​ស្វាគមន៍
+Comment[ko]=시작 화면 테마 관리자
+Comment[lt]=Pasveikinimo ekrano temų tvarkyklė
+Comment[lv]=Šļakstekrānu tēmu menedžeris
+Comment[mk]=Менаџер на теми за поздравни екрани
+Comment[mn]=Ажлын тавцанын эхлэл дэлгэцийн хэлбэр удирдагч
+Comment[ms]=Pengurus untuk Tema Splash Screen
+Comment[mt]=Manager għat-temi tal-Isplash Screen
+Comment[nb]=Behandler for velkomstbilder
+Comment[nds]=Startschirmmuster instellen
+Comment[ne]=स्प्लयास पर्दा विषयवस्तुका लागि प्रबन्धक
+Comment[nl]=Themabeheer voor opstartschermen
+Comment[nn]=Handsamar for velkomstbilete
+Comment[pa]=ਸਵਾਗਤੀ ਪਰਦਾ ਸਰੂਪ ਲਈ ਮੈਨੇਜਰ
+Comment[pl]=Menedżer motywów ekranu powitalnego
+Comment[pt]=Gestor de Temas do Ecrã Inicial
+Comment[pt_BR]=Gerenciador de Temas para a Tela de Apresentação
+Comment[ro]=Manager pentru tematicile imaginii de pornire a KDE
+Comment[ru]=Менеджер тем экрана-заставки
+Comment[rw]=Umuyobozi wo Gukwiza Insanganyamatsiko za Mugaragaza
+Comment[se]=Álgošearbmafáttáid gieđahalli
+Comment[sk]=Správca tém úvodnej obrazovky
+Comment[sl]=Upravitelj tem uvodnih zaslonov
+Comment[sr]=Менаџер тема сплеш екрана
+Comment[sr@Latn]=Menadžer tema spleš ekrana
+Comment[sv]=Hanterare för startskärmsteman
+Comment[ta]=தோன்றும் திரை தலைப்புகளுக்கு மேலாளர்
+Comment[tg]=Мудири услубҳои пардаи оғоз
+Comment[th]=เครื่องมือจัดการชุดตกแต่งของหน้าจอเริ่มการทำงาน
+Comment[tr]=Açılış Ekran Teması Yöneticisi
+Comment[tt]=Alsürät Tärzäse öçen Tışlaw İdäräçe
+Comment[uk]=Менеджер тем екранів заставки
+Comment[uz]=Splesh oynasi uchun mavzularni moslash
+Comment[uz@cyrillic]=Сплэш ойнаси учун мавзуларни мослаш
+Comment[vi]=Trình quản lý các Sắc thái của Màn hình Chào mừng
+Comment[wa]=Manaedjeu po les tinmes del waitroûle d' enondaedje
+Comment[zh_CN]=飞溅屏幕主题管理器
+Comment[zh_TW]=啟動畫面佈景管理程式
+Keywords=splash screen,splash theme,startup
+Keywords[ar]=الشاشة الافتتاحية، سمات الشاشة الافتتاحية، بدء التشغيل
+Keywords[az]=splash screen,splash theme,startup,açılış,örtük
+Keywords[be]=Застаўка,Загрузка,Запуск,Тэма загрузкі,splash screen,splash theme,startup
+Keywords[bg]=стартиране, начален, екран, splash screen, splash theme, startup
+Keywords[bs]=splash screen,splash theme,startup,pokretanje,splash
+Keywords[ca]=pantalla d'inici,tema d'inici,iniciació
+Keywords[cs]=úvodní obrazovka,splash
+Keywords[csb]=ekran na przëwitanié,téma ekranu,rozpòczãce,sztart
+Keywords[cy]=sgrîn croeso,thema croeso,ymgychwyn
+Keywords[da]=opstartsskærm,opstartstema,opstart
+Keywords[de]=startbildschirm
+Keywords[el]=αρχική οθόνη,θέμα αρχικής οθόνης,ξεκίνημα
+Keywords[eo]=Kcm_salutŝildo,Salutŝildo,Saluto
+Keywords[es]=pantalla de inicio,tema de inicio,inicio
+Keywords[et]=käivitusekraan,käivutusteema,käivitamine
+Keywords[eu]=splash pantaila,splash gaia,abioa
+Keywords[fa]=رنگ‌پاشی پرده، چهرۀ رنگ‌پاشی، راه‌اندازی
+Keywords[fi]=aloitusruutu,aloitusruututeema,käynnistys
+Keywords[fr]=écran de démarrage,thème de démarrage,démarrage,splash screen
+Keywords[fy]=opstartscherm,begjinskerm,splash screen
+Keywords[ga]=splancscáileán,splancthéama,tosú,tosach
+Keywords[gl]=pantalla de benvida,tema de benvida,comezo
+Keywords[he]=מצג פתיחה,ערכת נושא למצג פתיחה,הפעלה,splash screen,splash theme,startup
+Keywords[hi]=स्प्लैश स्क्रीन,स्प्लैश प्रसंग,प्रारंभ में
+Keywords[hr]=splash screen,splash theme,startup,zaslon,pozdravna tema,pokretanje,početni zaslon
+Keywords[hu]=nyitókép,indítási téma,indulás
+Keywords[it]=schermata di avvio,splash screen,tema schermata di avvio,avvio
+Keywords[ja]=スプラッシュスクリーン,スプラッシュテーマ,起動
+Keywords[km]=អេក្រង់​ស្វាគមន៍,ស្បែក​ពេល​ចាប់ផ្ដើម,ចាប់ផ្ដើម
+Keywords[lt]=splash screen,splash theme,startup,pasveikinimo ekranas,pasveikinimo tema
+Keywords[lv]=šļakstekrāns,šļakstekrāna tēma,palaišanās
+Keywords[mk]=splash screen,splash theme,startup,поздравен екран,поздравна тема
+Keywords[mn]=эхлэл дэлгэц,эхлэлийн хэлбэр,эхлэл
+Keywords[nb]=oppstart,oppstartsbilde,oppstartstema,velkomstbilde,velkomsttema
+Keywords[nds]=splash,starten,Startschirm,Muster,theme
+Keywords[ne]=स्प्लयास पर्दा, स्प्लयास विषयवस्तु, सुरुआत
+Keywords[nl]=opstartscherm,splash screen
+Keywords[nn]=oppstart,velkomstbilete,velkomsttema,oppstartstema
+Keywords[pa]=ਸ਼ੁਰੂਆਤੀ ਸਕਰੀਨ, ਸ਼ੁਰੂਆਤੀ ਸੂਰਪ,ਸ਼ੁਰੂਆਤ
+Keywords[pl]=ekran powitalny,motyw ekranu powitalnego,rozpoczęcie,start
+Keywords[pt]=ecrã inicial,tema do ecrã inicial,arranque
+Keywords[pt_BR]=tela de apresentação, tema da tela de apresentação,inicialização
+Keywords[ro]=imagine,tematică,întîmpinare,pornire
+Keywords[rw]=gukwiza mugaragaza,gukwiza insanganyamatsiko,gutangira
+Keywords[sk]=úvodná obrazovka,téma,spustenie,splash
+Keywords[sl]=uvodni zaslon,uvodna tema,zagon
+Keywords[sr]=splash screen,splash theme,startup,сплеш екран, сплеш тема,покретање,стартни екран
+Keywords[sr@Latn]=splash screen,splash theme,startup,spleš ekran, spleš tema,pokretanje,startni ekran
+Keywords[sv]=startskärm,starttema,start
+Keywords[ta]=தோன்றும் திரை,தோன்றும் தலைப்பு,துவக்கம்
+Keywords[th]=หน้าจอเริ่มการทำงาน,ชุดตกแต่ง splash,เริ่มทำงาน
+Keywords[tr]=açılış ekranı, açılış teması, başlangıç
+Keywords[uk]=екран заставки,тема заставки,запуск,старт
+Keywords[uz]=splesh oynasi,splesh mavzusi,ishga tushish
+Keywords[uz@cyrillic]=сплэш ойнаси,сплэш мавзуси,ишга тушиш
+Keywords[vi]=màn hình chào mừng,sắc thái chào mừng,khởi động
+Keywords[wa]=waitroûle d' enondaedje,tinme d' enondaedje,enonde tot seu
+Keywords[zh_CN]=splash screen,splash theme,startup,飞溅屏幕,飞溅主题,启动
+Keywords[zh_TW]=splash screen,splash theme,startup,啟動
+Categories=Qt;KDE;X-KDE-settings-looknfeel;
diff --git a/ksplashml/kcmksplash/main.cpp b/ksplashml/kcmksplash/main.cpp
new file mode 100644
index 000000000..d48923a28
--- /dev/null
+++ b/ksplashml/kcmksplash/main.cpp
@@ -0,0 +1,105 @@
+/***************************************************************************
+ * Copyright Ravikiran Rajagopal 2003 *
+ * ravi@ee.eng.ohio-state.edu *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License (version 2) as *
+ * published by the Free Software Foundation. *
+ * *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <qlayout.h>
+#include <qtabwidget.h>
+
+#include <kaboutdata.h>
+#include <kcmodule.h>
+#include <kdebug.h>
+#include <kgenericfactory.h>
+#include <kstandarddirs.h>
+
+#include "installer.h"
+
+class KSplashThemeMgr : public KCModule
+{
+public:
+ KSplashThemeMgr( QWidget *parent, const char *name, const QStringList &/*unused*/);
+ ~KSplashThemeMgr();
+
+ QString quickHelp() const;
+
+ virtual void init();
+ virtual void save();
+ virtual void load();
+ virtual void defaults();
+
+private:
+ SplashInstaller *mInstaller;
+};
+
+typedef KGenericFactory< KSplashThemeMgr, QWidget > KSplashThemeMgrFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_ksplashthemes, KSplashThemeMgrFactory("ksplashthemes") )
+
+// -----------------------------------------------------------------------------------------
+
+KSplashThemeMgr::KSplashThemeMgr( QWidget *parent, const char *name, const QStringList &)
+ : KCModule( KSplashThemeMgrFactory::instance(), parent, name ), mInstaller(new SplashInstaller(this))
+{
+ init();
+
+#if 0
+ QHBoxLayout *box = new QHBoxLayout(this);
+ QTabWidget *tab = new QTabWidget(this); // There will be more tabs in the future.
+ box->addWidget(tab);
+ tab->addTab( mInstaller, i18n("&Theme Installer") );
+#else
+ QHBoxLayout *box = new QHBoxLayout(this, 0, 0);
+ box->addWidget(mInstaller);
+#endif
+ connect( mInstaller, SIGNAL(changed(bool)), SIGNAL(changed(bool)) );
+ KAboutData *about = new KAboutData( "kcmksplash"
+ ,I18N_NOOP("KDE splash screen theme manager")
+ ,"0.1"
+ ,0
+ ,KAboutData::License_GPL
+ ,I18N_NOOP("(c) 2003 KDE developers") );
+ about->addAuthor("Ravikiran Rajagopal", 0, "ravi@ee.eng.ohio-state.edu");
+ about->addCredit("Brian Ledbetter", I18N_NOOP("Original KSplash/ML author"), "brian@shadowcom.net");
+ about->addCredit(I18N_NOOP("KDE Theme Manager authors" ), I18N_NOOP("Original installer code") );
+ // Once string freeze is over, replace second argument with "Icon"
+ about->addCredit("Hans Karlsson", 0, "karlsson.h@home.se" );
+ setAboutData(about);
+}
+
+KSplashThemeMgr::~KSplashThemeMgr()
+{
+ // Do not delete the installer as it is now owned by the tab widget.
+}
+
+QString KSplashThemeMgr::quickHelp() const
+{
+ return i18n("<h1>Splash Screen Theme Manager </h1> Install and view splash screen themes.");
+}
+
+void KSplashThemeMgr::init()
+{
+ KGlobal::dirs()->addResourceType("ksplashthemes", KStandardDirs::kde_default("data") + "ksplash/Themes");
+}
+
+void KSplashThemeMgr::save()
+{
+ mInstaller->save();
+}
+
+void KSplashThemeMgr::load()
+{
+ mInstaller->load();
+}
+
+void KSplashThemeMgr::defaults()
+{
+ mInstaller->defaults();
+}
diff --git a/ksplashml/kcmksplash/pics/Makefile.am b/ksplashml/kcmksplash/pics/Makefile.am
new file mode 100644
index 000000000..a4b97f06a
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/Makefile.am
@@ -0,0 +1 @@
+KDE_ICON=AUTO
diff --git a/ksplashml/kcmksplash/pics/hi128-app-ksplash.png b/ksplashml/kcmksplash/pics/hi128-app-ksplash.png
new file mode 100644
index 000000000..fe0be47ae
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi128-app-ksplash.png
Binary files differ
diff --git a/ksplashml/kcmksplash/pics/hi16-app-ksplash.png b/ksplashml/kcmksplash/pics/hi16-app-ksplash.png
new file mode 100644
index 000000000..cf1cbf3d1
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi16-app-ksplash.png
Binary files differ
diff --git a/ksplashml/kcmksplash/pics/hi22-app-ksplash.png b/ksplashml/kcmksplash/pics/hi22-app-ksplash.png
new file mode 100644
index 000000000..66e74b5a0
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi22-app-ksplash.png
Binary files differ
diff --git a/ksplashml/kcmksplash/pics/hi32-app-ksplash.png b/ksplashml/kcmksplash/pics/hi32-app-ksplash.png
new file mode 100644
index 000000000..353385a08
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi32-app-ksplash.png
Binary files differ
diff --git a/ksplashml/kcmksplash/pics/hi48-app-ksplash.png b/ksplashml/kcmksplash/pics/hi48-app-ksplash.png
new file mode 100644
index 000000000..441a75713
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi48-app-ksplash.png
Binary files differ
diff --git a/ksplashml/kcmksplash/pics/hi64-app-ksplash.png b/ksplashml/kcmksplash/pics/hi64-app-ksplash.png
new file mode 100644
index 000000000..444b6b927
--- /dev/null
+++ b/ksplashml/kcmksplash/pics/hi64-app-ksplash.png
Binary files differ