Add new "Unified" splash screen

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253671 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 75ab9920ac
commit a382b3ab31

@ -98,7 +98,7 @@ void KSMServer::restoreSession( TQString sessionName )
showFancyLogin = KConfigGroup(KGlobal::config(), "Login").readBoolEntry("showFancyLogin", true);
KConfig ksplashcfg( "ksplashrc", true );
ksplashcfg.setGroup( "KSplash" );
if ( ksplashcfg.readEntry( "Theme", "Default" ) != TQString("None") )
if ( ksplashcfg.readEntry( "Theme", "Default" ) != TQString("Unified") )
showFancyLogin = false;
if( state != Idle )

@ -11,5 +11,6 @@
add_subdirectory( blue-bend )
add_subdirectory( default )
add_subdirectory( unified )
add_subdirectory( none )
add_subdirectory( simple )

@ -0,0 +1,14 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
install( FILES
Theme.rc
DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/Unified )

@ -0,0 +1,16 @@
# Unified KSplash/ML Theme
[KSplash Theme: Unified]
Name = Trinity Unified Splash Screen
Description = Unified system startup screen
Version = 1.0
Author = Timothy Pearson <kb9vqf@pearsoncomputing.net>
# Theme behaviour settings.
Engine = Unified
# Show progress bar?
Always Show Progress = false
# Status text colour
Label Foreground = #FFFFFF

@ -10,6 +10,7 @@
#################################################
add_subdirectory( default )
add_subdirectory( unified )
add_subdirectory( standard )
add_subdirectory( redmond )
add_subdirectory( simple )

@ -62,6 +62,7 @@ public slots:
virtual void slotUpdateProgress( int ) {}
virtual void slotUpdateSteps( int ) {}
virtual void slotSetText( const TQString& ) {}
virtual void slotSetTextIndex( const int ) {}
virtual void slotSetPixmap( const TQString& ) {} // use DesktopIcon() to load this.
protected:

@ -0,0 +1,45 @@
#################################################
#
# (C) 2010-2011 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
#${CMAKE_CURRENT_SOURCE_DIR}
#${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/ksplashml/themeengine
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
)
##### other data ################################
install( FILES ksplashunified.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
##### ksplashunified (module) ###################
tde_add_kpart( ksplashunified AUTOMOC
SOURCES main.cpp
LINK themeunified-static ksplashthemes-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### themeunified (static) #####################
tde_add_library( themeunified STATIC_PIC AUTOMOC
SOURCES themeunified.cpp
LINK ksplashthemes-shared
)

@ -0,0 +1,17 @@
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. $(all_includes)
noinst_LTLIBRARIES = libthemedefault.la
libthemedefault_la_SOURCES = themelegacy.cpp
libthemedefault_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
libthemedefault_la_LIBADD = $(LIB_KDEUI) ../libksplashthemes.la
kde_module_LTLIBRARIES = ksplashdefault.la
ksplashdefault_la_SOURCES = main.cpp
ksplashdefault_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(KDE_PLUGIN) -module
ksplashdefault_la_LIBADD = $(LIB_KDEUI) ../libksplashthemes.la libthemedefault.la
METASOURCES = AUTO
servicesdir = $(kde_servicesdir)
services_DATA = ksplashdefault.desktop

@ -0,0 +1,78 @@
[Desktop Entry]
Type=Service
Comment=KSplash Plugin
Comment[af]=KSplash Inprop module
Comment[ar]=ملحق للشاشة الافتتاحية
Comment[az]=KSplash Əlavəsi
Comment[be]=Утулка KSplash
Comment[bg]=Приставка KSplash
Comment[bn]=কে-স্প্ল্যাশ প্লাগ-ইন
Comment[br]=Lugent KSplash
Comment[bs]=KSplash dodatak
Comment[ca]=Connector per a KSplash
Comment[cs]=Modul aplikaci KSplash
Comment[csb]=Plugins KSplash
Comment[cy]=Ategyn KCroeso
Comment[da]=KSplash-plugin
Comment[de]=KSplash-Plugin
Comment[el]=Πρόσθετο KSplash
Comment[eo]=Ksalutŝilda kromaĵo
Comment[es]=Complemento KSplash
Comment[et]=KSplashi plugin
Comment[eu]=KSplash plugina
Comment[fa]=وصلۀ KSplash
Comment[fi]=KSplash-liitännäinen
Comment[fr]=Modules de KSplash
Comment[fy]=KSplash-plugin
Comment[ga]=Breiseán KSplash
Comment[gl]=Plugin de KSplash
Comment[he]=תוסף KSplash
Comment[hi]=के-स्प्लैश प्लगइन
Comment[hr]=KSplash dodatak
Comment[hu]=KSplash bővítőmodul
Comment[is]=KSplash íforrit
Comment[it]=Plugin KSplash
Comment[ja]=KSplash プラグイン
Comment[ka]=KSplash პლაგინი
Comment[kk]=KSplash модулі
Comment[km]=កម្មវិធី​ជំនួយ​ខាង​ក្នុង​របស់ KSplash
Comment[lt]=KSplash įskiepis
Comment[lv]=KSplash spraudnis
Comment[mk]=Приклучок за KSplash
Comment[ms]=Plugin KSplash
Comment[mt]=Plugin ta' KSplash
Comment[nb]=Programtillegg Ksplash
Comment[ne]=के स्प्लयास प्लगइन
Comment[nl]=KSplash-plugin
Comment[nn]=KSplash-programtillegg
Comment[pa]=ਕੇ-ਸਪਲੇਸ ਪਲੱਗਇਨ
Comment[pl]=Wtyczka KSplash
Comment[pt]='Plugin' do KSplash
Comment[pt_BR]=Plug-in do KSplash
Comment[ro]=Modul KSplash
Comment[ru]=Модуль KSplash
Comment[rw]=Icomeka rya K-Gukwiza
Comment[se]=KSplash-lassemoduvla
Comment[sk]=Modul KSplash
Comment[sl]=Vstavek KSplash
Comment[sr]=KSplash прикључак
Comment[sr@Latn]=KSplash priključak
Comment[sv]=Insticksprogram för startskärm
Comment[ta]=Kஸ்ப்ளாஷ் செருகு பொருள்
Comment[tg]=Мутассалкунандаи KSplash
Comment[th]=ปลั๊กอิน KSplash
Comment[tr]=KSplash Eklentisi
Comment[tt]=KSplash atlı Östämä
Comment[uk]=Втулок KSplash
Comment[uz]=KSplash plagini
Comment[uz@cyrillic]=KSplash плагини
Comment[vi]=Trình bổ sung Chào mừng KDE
Comment[wa]=Tchôke-divins KSplash (waitroûle d' enondaedje)
Comment[zh_CN]=KSplash 插件
Comment[zh_TW]=KSplash 外掛程式
Name=KSplashUnified
ServiceTypes=KSplash/Plugin
X-KDE-Library=ksplashunified
X-KSplash-Default=true
X-KSplash-PluginName=Unified
X-KSplash-ObjectName=ThemeUnified

@ -0,0 +1,17 @@
/***************************************************************************
* Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> *
* 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. (The original KSplash/ML *
* codebase (upto version 0.95.3) is BSD-licensed.) *
* *
***************************************************************************/
#include <kgenericfactory.h>
#include "themeunified.h"
K_EXPORT_COMPONENT_FACTORY( ksplashunified, KGenericFactory<ThemeUnified>( "ksplash" ) )

@ -0,0 +1,118 @@
/***************************************************************************
* Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> *
* Copyright Ravikiran Rajagopal 2003 <ravi@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. (The original KSplash/ML *
* codebase (upto version 0.95.3) is BSD-licensed.) *
* *
***************************************************************************/
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kglobalsettings.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kprogress.h>
#include <tqcheckbox.h>
#include <tqdesktopwidget.h>
#include <tqlabel.h>
#include <tqpainter.h>
#include <tqpixmap.h>
#include <tqwidget.h>
#include <tqtimer.h>
#include <tqcursor.h>
#include "objkstheme.h"
#include "themeengine.h"
#include "themeunified.h"
#include "themeunified.moc"
UnifiedConfig::UnifiedConfig( TQWidget *parent, KConfig *config )
:ThemeEngineConfig( parent, config )
{
mConfig->setGroup( TQString("KSplash Theme: Default") );
TQVBox *hbox = new TQVBox( this );
mAlwaysShow = new TQCheckBox( i18n("Always show progress bar"), hbox );
mAlwaysShow->setChecked( mConfig->readBoolEntry("Always Show Progress",true) );
}
void UnifiedConfig::save()
{
kdDebug() << "UnifiedConfig::save()" << endl;
mConfig->setGroup( TQString("KSplash Theme: Default") );
mConfig->writeEntry( "Always Show Progress", mAlwaysShow->isChecked() );
mConfig->sync();
}
ThemeUnified::ThemeUnified( TQWidget *parent, const char *name, const TQStringList &args )
:ThemeEngine( parent, name, args )
{
mState = 0;
_readSettings();
_initUi();
}
ThemeUnified::~ThemeUnified()
{
if (mSysModalDialog) {
KSMModalDialog* temp = mSysModalDialog;
mSysModalDialog = NULL;
temp->closeSMDialog();
}
}
void ThemeUnified::_initUi()
{
resize(10,10);
mSysModalDialog = new KSMModalDialog(this);
mSysModalDialog->setStatusMessage(i18n("Trinity is starting up").append("..."));
mSysModalDialog->show();
mSysModalDialog->setActiveWindow();
const TQRect rect = kapp->desktop()->screenGeometry( mTheme->xineramaScreen() );
// Center the dialog
TQSize sh = tqsizeHint();
TQRect rect1 = KGlobalSettings::desktopGeometry(TQCursor::pos());
move(rect1.x() + (rect1.width() - sh.width())/2, rect1.y() + (rect1.height() - sh.height())/2);
}
// Attempt to find overrides elsewhere?
void ThemeUnified::_readSettings()
{
if( !mTheme )
return;
KConfig *cfg = mTheme->themeConfig();
if( !cfg )
return;
cfg->setGroup( TQString("KSplash Theme: %1").arg(mTheme->theme()) );
TQColor df(Qt::white);
mLabelForeground = cfg->readColorEntry( "Label Foreground", &df );
}
/*
* ThemeUnified::slotUpdateState(): IF in Default mode, THEN adjust the bar
* pixmap label. Whee, phun!
*
* A similar method exists in the old KSplash.
*/
void ThemeUnified::slotUpdateState()
{
if( mState > 8 )
mState = 8;
// mBarLabel->setPixmap( updateBarPixmap( mState ) );
mState++;
}

@ -0,0 +1,101 @@
/***************************************************************************
* Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> *
* 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. (The original KSplash/ML *
* codebase (upto version 0.95.3) is BSD-licensed.) *
* *
***************************************************************************/
#ifndef __THEMEUNIFIED_H__
#define __THEMEUNIFIED_H__
#include <kprogress.h>
#include <tqlabel.h>
#include <tqwidget.h>
#include <kdialog.h>
#include "themeengine.h"
class TQPixmap;
class TQTimer;
class TQCheckBox;
class UnifiedConfig: public ThemeEngineConfig
{
Q_OBJECT
public:
UnifiedConfig( TQWidget *, KConfig * );
void save();
protected:
TQCheckBox *mAlwaysShow;
};
/**
* @short Traditional Trinity splash screen.
*/
class ObjKsTheme;
class KDE_EXPORT ThemeUnified : public ThemeEngine
{
Q_OBJECT
public:
ThemeUnified( TQWidget *, const char *, const TQStringList& );
virtual ~ThemeUnified();
inline const UnifiedConfig *config( TQWidget *p, KConfig *c )
{
return new UnifiedConfig( p, c );
};
static TQStringList names()
{
TQStringList Names;
Names << "Unified";
return( Names );
}
public slots:
inline void slotSetText( const TQString& s )
{
close();
if (mSysModalDialog) mSysModalDialog->setStatusMessage(TQString(s).append("..."));
}
inline void slotSetTextIndex( const int i )
{
if (i == 3) {
if (mSysModalDialog) {
KSMModalDialog* temp = mSysModalDialog;
mSysModalDialog = NULL;
temp->closeSMDialog();
}
}
}
inline void slotUpdateSteps( int s )
{
}
inline void slotUpdateProgress( int i )
{
}
private slots:
void slotUpdateState();
private:
void _initUi();
void _readSettings();
// Configurable Options
TQColor mLabelForeground;
// Internals.
KSMModalDialog* mSysModalDialog;
int mState;
};
#endif

@ -110,6 +110,7 @@ void KSplash::prepareIconList()
mCurrentAction = mActionList.first();
slotSetText( mCurrentAction->ItemText );
slotSetTextIndex( mActionList.find(mCurrentAction) );
slotSetPixmap( mCurrentAction->ItemPixmap );
emit progressChanged( mStep );
@ -148,6 +149,7 @@ void KSplash::nextIcon()
if( mCurrentAction )
{
slotSetText( mCurrentAction->ItemText );
slotSetTextIndex( mActionList.find(mCurrentAction) );
slotSetPixmap( mCurrentAction->ItemPixmap );
emit progressChanged( ++mStep );
}
@ -396,6 +398,12 @@ void KSplash::slotSetText( const TQString& s )
mThemeEngine->slotSetText( s );
}
void KSplash::slotSetTextIndex( const int i )
{
if( mThemeEngine )
mThemeEngine->slotSetTextIndex( i );
}
void KSplash::slotSetPixmap( const TQString& px )
{
if( mThemeEngine )

@ -90,6 +90,7 @@ private slots:
void slotReadProperties( KConfig * );
void slotSetText( const TQString& );
void slotSetTextIndex( const int );
void slotSetPixmap( const TQString& );
void loadTheme( const TQString& );

Loading…
Cancel
Save