diff options
Diffstat (limited to 'ksplashml/kcmksplash')
-rw-r--r-- | ksplashml/kcmksplash/CMakeLists.txt | 38 | ||||
-rw-r--r-- | ksplashml/kcmksplash/Makefile.am | 18 | ||||
-rw-r--r-- | ksplashml/kcmksplash/installer.cpp | 484 | ||||
-rw-r--r-- | ksplashml/kcmksplash/installer.h | 87 | ||||
-rw-r--r-- | ksplashml/kcmksplash/ksplashthememgr.desktop | 216 | ||||
-rw-r--r-- | ksplashml/kcmksplash/main.cpp | 105 | ||||
-rw-r--r-- | ksplashml/kcmksplash/pics/CMakeLists.txt | 12 | ||||
-rw-r--r-- | ksplashml/kcmksplash/pics/Makefile.am | 1 | ||||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi128-app-ksplash.png | bin | 0 -> 15013 bytes | |||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi16-app-ksplash.png | bin | 0 -> 1027 bytes | |||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi22-app-ksplash.png | bin | 0 -> 1475 bytes | |||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi32-app-ksplash.png | bin | 0 -> 2423 bytes | |||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi48-app-ksplash.png | bin | 0 -> 4168 bytes | |||
-rw-r--r-- | ksplashml/kcmksplash/pics/hi64-app-ksplash.png | bin | 0 -> 6103 bytes |
14 files changed, 961 insertions, 0 deletions
diff --git a/ksplashml/kcmksplash/CMakeLists.txt b/ksplashml/kcmksplash/CMakeLists.txt new file mode 100644 index 000000000..864346089 --- /dev/null +++ b/ksplashml/kcmksplash/CMakeLists.txt @@ -0,0 +1,38 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( pics ) + + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES ksplashthememgr.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) + + +##### kcm_ksplashthemes (module) ################ + +tde_add_kpart( kcm_ksplashthemes AUTOMOC + SOURCES installer.cpp main.cpp + LINK tdeio-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/ksplashml/kcmksplash/Makefile.am b/ksplashml/kcmksplash/Makefile.am new file mode 100644 index 000000000..47c269a92 --- /dev/null +++ b/ksplashml/kcmksplash/Makefile.am @@ -0,0 +1,18 @@ +# Makefile.am for tdebase/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_TDEIO) +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..7ee681907 --- /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 <tqdir.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtextedit.h> + +#include "installer.h" + +#include <kdebug.h> +#include <tdefiledialog.h> +#include <tdeglobalsettings.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <kprocess.h> +#include <kpushbutton.h> +#include <kstandarddirs.h> +#include <ktar.h> +#include <ktrader.h> +#include <kurldrag.h> +#include <tdeio/netaccess.h> + +ThemeListBox::ThemeListBox(TQWidget *parent) + : TDEListBox(parent) +{ + setAcceptDrops(true); + connect(this, TQT_SIGNAL(mouseButtonPressed(int, TQListBoxItem *, const TQPoint &)), + this, TQT_SLOT(slotMouseButtonPressed(int, TQListBoxItem *, const TQPoint &))); +} + +void ThemeListBox::dragEnterEvent(TQDragEnterEvent* event) +{ + event->accept((event->source() != this) && KURLDrag::canDecode(event)); +} + +void ThemeListBox::dropEvent(TQDropEvent* event) +{ + KURL::List urls; + if (KURLDrag::decode(event, urls)) + { + emit filesDropped(urls); + } +} + +void ThemeListBox::slotMouseButtonPressed(int button, TQListBoxItem *item, const TQPoint &p) +{ + if ((button & Qt::LeftButton) == 0) return; + mOldPos = p; + mDragFile = TQString::null; + int cur = index(item); + if (cur >= 0) + mDragFile = text2path[text(cur)]; +} + +void ThemeListBox::mouseMoveEvent(TQMouseEvent *e) +{ + if (((e->state() & Qt::LeftButton) != 0) && !mDragFile.isEmpty()) + { + int delay = TDEGlobalSettings::dndEventDelay(); + TQPoint 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(); + } + } + TDEListBox::mouseMoveEvent(e); +} + +//----------------------------------------------------------------------------- +SplashInstaller::SplashInstaller (TQWidget *aParent, const char *aName, bool aInit) + : TQWidget(aParent, aName), mGui(!aInit) +{ + TDEGlobal::dirs()->addResourceType("ksplashthemes", TDEStandardDirs::kde_default("data") + "ksplash/Themes"); + + if (!mGui) + return; + + TQHBoxLayout* hbox = new TQHBoxLayout( this, 0, KDialog::spacingHint() ); + + TQVBoxLayout* leftbox = new TQVBoxLayout( hbox, KDialog::spacingHint() ); + hbox->setStretchFactor( leftbox, 1 ); + + mThemesList = new ThemeListBox(this); + mThemesList->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding ); + connect(mThemesList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotSetTheme(int))); + connect(mThemesList, TQT_SIGNAL(filesDropped(const KURL::List&)), TQT_SLOT(slotFilesDropped(const KURL::List&))); + leftbox->addWidget(mThemesList); + + mBtnAdd = new KPushButton( i18n("Add..."), this ); + leftbox->addWidget( mBtnAdd ); + connect(mBtnAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd())); + + mBtnRemove = new KPushButton( i18n("Remove"), this ); + leftbox->addWidget( mBtnRemove ); + connect(mBtnRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove())); + + mBtnTest = new KPushButton( i18n("Test"), this ); + leftbox->addWidget( mBtnTest ); + connect(mBtnTest, TQT_SIGNAL(clicked()), TQT_SLOT(slotTest())); + + TQVBoxLayout* rightbox = new TQVBoxLayout( hbox, KDialog::spacingHint() ); + hbox->setStretchFactor( rightbox, 3 ); + + mPreview = new TQLabel(this); + mPreview->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); + mPreview->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); + mPreview->setMinimumSize(TQSize(320,240)); + mPreview->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); + rightbox->addWidget(mPreview); + rightbox->setStretchFactor( mPreview, 3 ); + + mText = new TQTextEdit(this); + mText->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ); + mText->setMinimumSize(mText->sizeHint()); + mText->setReadOnly(true); + rightbox->addWidget(mText); + rightbox->setStretchFactor( mText, 1 ); + + readThemesList(); + load(); +} + + +//----------------------------------------------------------------------------- +SplashInstaller::~SplashInstaller() +{ +} + +int SplashInstaller::addTheme(const TQString &path, const TQString &name) +{ + //kdDebug() << "SplashInstaller::addTheme: " << path << " " << name << endl; + TQString 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) +{ + TQString dir = TDEGlobal::dirs()->saveLocation("ksplashthemes"); + KURL url; + TQString 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 ( TDEIO::NetAccess::exists( url, true, 0 ) ) + TDEIO::NetAccess::del( url, 0 ); + + bool rc = TDEIO::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. + TQStringList entries = ad->entries(); + TQString themeName( entries.first() ); +#if 0 + // The isDirectory() call always returns false; why? + for ( TQStringList::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(); + TDEIO::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 + TQStringList entryList = TDEGlobal::dirs()->resourceDirs("ksplashthemes"); + //kdDebug() << "readThemesList: " << entryList << endl; + TQDir dir; + TQStringList subdirs; + TQStringList::ConstIterator name; + for(name = entryList.begin(); name != entryList.end(); name++) + { + dir = *name; + if (!dir.exists()) + continue; + subdirs = dir.entryList( TQDir::Dirs ); + // kdDebug() << "readThemesList: " << subdirs << endl; + // TODO: Make sure it contains a *.rc file. + for (TQStringList::Iterator l = subdirs.begin(); l != subdirs.end(); l++ ) + if ( !(*l).startsWith(TQString(".")) ) + { + 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 ) +{ + TDEConfig cnf("ksplashrc"); + cnf.setReadDefaults( useDefaults ); + cnf.setGroup("KSplash"); + TQString curTheme = cnf.readEntry("Theme","Default"); + mThemesList->setCurrentItem(findTheme(curTheme)); + emit changed( useDefaults ); +} + +//----------------------------------------------------------------------------- +void SplashInstaller::save() +{ + TDEConfig cnf("ksplashrc"); + cnf.setGroup("KSplash"); + int cur = mThemesList->currentItem(); + if (cur < 0) + return; + TQString 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; + TQString themeName = mThemesList->text(cur); + TQString 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"),"edit-delete"))==KMessageBox::Continue) + rc = TDEIO::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; + TQString path(TQString::null); + TQString infoTxt; + + if (id < 0) + { + mPreview->setText(TQString::null); + mText->setText(TQString::null); + enabled = false; + } + else + { + TQString error = i18n("(Could not load theme)"); + path = mThemesList->text(id); + if ( mThemesList->text2path.contains( path ) ) + path = mThemesList->text2path[path]; + enabled = false; + KURL url; + TQString 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 (!TDEIO::NetAccess::exists(url, true, 0)) + { + url.setPath( path + "/Theme.RC" ); + if (!TDEIO::NetAccess::exists(url, true, 0)) + { + url.setPath( path + "/theme.rc" ); + if (!TDEIO::NetAccess::exists(url, true, 0)) + url.setPath( path + "/" + themeName + ".rc" ); + } + } + if (TDEIO::NetAccess::exists(url, true, 0)) + { + TDEConfig cnf(url.path()); + cnf.setGroup( TQString("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>"; + + TQString pluginName( cnf.readEntry( "Engine", "Default" ) ); // Perhaps no default is better? + if ((TDETrader::self()->query("KSplash/Plugin", TQString("[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 (TDEIO::NetAccess::exists(url, true, 0)) + mPreview->setPixmap(TQPixmap(url.path())); + else + mPreview->setText(i18n("(Could not load theme)")); + KMessageBox::sorry(this, error); + } + else + { + url.setPath( path + "/" + "Preview.png" ); + if (TDEIO::NetAccess::exists(url, true, 0)) + mPreview->setPixmap(TQPixmap(url.path())); + else + mPreview->setText(i18n("No preview available.")); + emit changed(true); + } + } + mBtnRemove->setEnabled( !path.isEmpty() && TQFileInfo(path).isWritable()); +} + + +//----------------------------------------------------------------------------- +void SplashInstaller::slotAdd() +{ + static TQString path; + if (path.isEmpty()) path = TQDir::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 TQString &theme ) +{ + // theme is untranslated, but the listbox contains translated items + TQString 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; + TQString 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" ) + { + TDEProcess proc; + proc << "ksplashsimple" << "--test"; + if (!proc.start(TDEProcess::Block)) + KMessageBox::error(this,i18n("Unable to start ksplashsimple.")); + return; + } + TDEProcess proc; + proc << "ksplash" << "--test" << "--theme" << themeName; + if (!proc.start(TDEProcess::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..7a46e368b --- /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 <tqmap.h> +#include <tqpoint.h> + +#include <tdelistbox.h> +#include <kurl.h> + +class TQLabel; +class TQTextEdit; +class TQPushButton; +class ThemeListBox; + +class SplashInstaller : public TQWidget +{ + Q_OBJECT +public: + SplashInstaller(TQWidget *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 TQString &path, const TQString &name); + void addNewTheme(const KURL &srcURL); + int findTheme( const TQString &theme ); + +private: + bool mGui; + ThemeListBox *mThemesList; + TQPushButton *mBtnAdd, *mBtnRemove, *mBtnTest; + TQTextEdit *mText; + TQLabel *mPreview; +}; + +class ThemeListBox: public TDEListBox +{ + Q_OBJECT +public: + ThemeListBox(TQWidget *parent); + TQMap<TQString, TQString> text2path; + +signals: + void filesDropped(const KURL::List &urls); + +protected: + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + void mouseMoveEvent(TQMouseEvent *e); + +protected slots: + void slotMouseButtonPressed(int button, TQListBoxItem *item, const TQPoint &p); + +private: + TQString mDragFile; + TQPoint mOldPos; + +}; + +#endif diff --git a/ksplashml/kcmksplash/ksplashthememgr.desktop b/ksplashml/kcmksplash/ksplashthememgr.desktop new file mode 100644 index 000000000..3707838d0 --- /dev/null +++ b/ksplashml/kcmksplash/ksplashthememgr.desktop @@ -0,0 +1,216 @@ +[Desktop Entry] +Icon=ksplash +Exec=tdecmshell ksplashthememgr +X-DocPath=ksplashml/index.html + +X-TDE-ModuleType=Library +X-TDE-Library=ksplashthemes +X-TDE-FactoryName=ksplashthemes +X-TDE-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 TDE +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;TDE;X-TDE-settings-looknfeel; diff --git a/ksplashml/kcmksplash/main.cpp b/ksplashml/kcmksplash/main.cpp new file mode 100644 index 000000000..f0b5d1f52 --- /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 <tqlayout.h> +#include <tqtabwidget.h> + +#include <tdeaboutdata.h> +#include <tdecmodule.h> +#include <kdebug.h> +#include <kgenericfactory.h> +#include <kstandarddirs.h> + +#include "installer.h" + +class KSplashThemeMgr : public TDECModule +{ +public: + KSplashThemeMgr( TQWidget *parent, const char *name, const TQStringList &/*unused*/); + ~KSplashThemeMgr(); + + TQString quickHelp() const; + + virtual void init(); + virtual void save(); + virtual void load(); + virtual void defaults(); + +private: + SplashInstaller *mInstaller; +}; + +typedef KGenericFactory< KSplashThemeMgr, TQWidget > KSplashThemeMgrFactory; +K_EXPORT_COMPONENT_FACTORY( kcm_ksplashthemes, KSplashThemeMgrFactory("ksplashthemes") ) + +// ----------------------------------------------------------------------------------------- + +KSplashThemeMgr::KSplashThemeMgr( TQWidget *parent, const char *name, const TQStringList &) + : TDECModule( KSplashThemeMgrFactory::instance(), parent, name ), mInstaller(new SplashInstaller(this)) +{ + init(); + +#if 0 + TQHBoxLayout *box = new TQHBoxLayout(this); + TQTabWidget *tab = new TQTabWidget(this); // There will be more tabs in the future. + box->addWidget(tab); + tab->addTab( mInstaller, i18n("&Theme Installer") ); +#else + TQHBoxLayout *box = new TQHBoxLayout(this, 0, 0); + box->addWidget(mInstaller); +#endif + connect( mInstaller, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) ); + TDEAboutData *about = new TDEAboutData( "kcmksplash" + ,I18N_NOOP("TDE splash screen theme manager") + ,"0.1" + ,0 + ,TDEAboutData::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("TDE 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. +} + +TQString KSplashThemeMgr::quickHelp() const +{ + return i18n("<h1>Splash Screen Theme Manager </h1> Install and view splash screen themes."); +} + +void KSplashThemeMgr::init() +{ + TDEGlobal::dirs()->addResourceType("ksplashthemes", TDEStandardDirs::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/CMakeLists.txt b/ksplashml/kcmksplash/pics/CMakeLists.txt new file mode 100644 index 000000000..189a3a200 --- /dev/null +++ b/ksplashml/kcmksplash/pics/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_install_icons() 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 Binary files differnew file mode 100644 index 000000000..fe0be47ae --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi128-app-ksplash.png diff --git a/ksplashml/kcmksplash/pics/hi16-app-ksplash.png b/ksplashml/kcmksplash/pics/hi16-app-ksplash.png Binary files differnew file mode 100644 index 000000000..cf1cbf3d1 --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi16-app-ksplash.png diff --git a/ksplashml/kcmksplash/pics/hi22-app-ksplash.png b/ksplashml/kcmksplash/pics/hi22-app-ksplash.png Binary files differnew file mode 100644 index 000000000..66e74b5a0 --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi22-app-ksplash.png diff --git a/ksplashml/kcmksplash/pics/hi32-app-ksplash.png b/ksplashml/kcmksplash/pics/hi32-app-ksplash.png Binary files differnew file mode 100644 index 000000000..353385a08 --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi32-app-ksplash.png diff --git a/ksplashml/kcmksplash/pics/hi48-app-ksplash.png b/ksplashml/kcmksplash/pics/hi48-app-ksplash.png Binary files differnew file mode 100644 index 000000000..441a75713 --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi48-app-ksplash.png diff --git a/ksplashml/kcmksplash/pics/hi64-app-ksplash.png b/ksplashml/kcmksplash/pics/hi64-app-ksplash.png Binary files differnew file mode 100644 index 000000000..444b6b927 --- /dev/null +++ b/ksplashml/kcmksplash/pics/hi64-app-ksplash.png |