Hello community,
here is the log from the commit of package kiosktool for openSUSE:Factory
checked in at Thu Apr 1 18:14:45 CEST 2010.
--------
--- KDE/kiosktool/kiosktool.changes 2009-12-27 08:45:36.000000000 +0100
+++ /mounts/work_src_done/STABLE/kiosktool/kiosktool.changes 2010-03-11 23:57:38.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Mar 11 22:47:31 UTC 2010 - llunak@novell.com
+
+- make the KDE4 version actually somewhat useful (bnc#568154)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
glibc.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kiosktool.spec ++++++
--- /var/tmp/diff_new_pack.gqpaWj/_old 2010-04-01 18:14:32.000000000 +0200
+++ /var/tmp/diff_new_pack.gqpaWj/_new 2010-04-01 18:14:32.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package kiosktool (Version 1.99.svn958038)
+# spec file for package kiosktool (Version 1.99.svn1102156)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,11 +23,10 @@
License: GPLv2+
Group: System/Management
Summary: Kiosk Admin Tool
-Version: 1.99.svn958038
-Release: 2
+Version: 1.99.svn1102156
+Release: 1
# $SVNROOT/trunk/extragear/sysadmin/kiosktool
Source0: sysadmin.tar.bz2
-Patch1: glibc.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
Provides: kde4-kiosktool = 4.2.1.svn942192
@@ -45,10 +44,9 @@
%prep
%setup -q -n sysadmin
-%patch1
%build
- %cmake_kde4 -d build
+ %cmake_kde4 -d build -- -DKDE_DEFAULT_HOME=.kde4
%make_jobs
%install
++++++ sysadmin.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/CMakeLists.txt new/sysadmin/CMakeLists.txt
--- old/sysadmin/CMakeLists.txt 2008-02-26 08:35:50.000000000 +0100
+++ new/sysadmin/CMakeLists.txt 2009-04-18 14:42:44.000000000 +0200
@@ -6,9 +6,21 @@
include (MacroLibrary)
include(MacroOptionalAddSubdirectory)
-add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${extragear-sysadmin_SOURCE_DIR}/partitionmanager/cmake/modules/)
+
+add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT_STRICT_ITERATORS)
include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
if(NOT WIN32)
macro_optional_add_subdirectory(kiosktool)
+
+ find_package(LIBPARTED)
+ FIND_PACKAGE(PkgConfig REQUIRED)
+ PKG_CHECK_MODULES(UUID uuid)
+ PKG_CHECK_MODULES(BLKID blkid)
+
+ if (LIBPARTED_FOUND AND UUID_FOUND AND BLKID_FOUND)
+ macro_optional_add_subdirectory(partitionmanager)
+ endif(LIBPARTED_FOUND AND UUID_FOUND AND BLKID_FOUND)
macro_optional_add_subdirectory(doc)
+
endif(NOT WIN32)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/doc/CMakeLists.txt new/sysadmin/doc/CMakeLists.txt
--- old/sysadmin/doc/CMakeLists.txt 2008-02-13 18:04:09.000000000 +0100
+++ new/sysadmin/doc/CMakeLists.txt 2009-04-18 14:42:44.000000000 +0200
@@ -1 +1,6 @@
add_subdirectory(kiosktool)
+
+
+if (LIBPARTED_FOUND AND UUID_FOUND AND BLKID_FOUND)
+ add_subdirectory(partitionmanager)
+endif (LIBPARTED_FOUND AND UUID_FOUND AND BLKID_FOUND)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/CMakeLists.txt new/sysadmin/kiosktool/CMakeLists.txt
--- old/sysadmin/kiosktool/CMakeLists.txt 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/CMakeLists.txt 2010-03-11 17:06:29.000000000 +0100
@@ -8,6 +8,8 @@
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} )
+set (KDE_DEFAULT_HOME ".kde${_KDE_DEFAULT_HOME_POSTFIX}" CACHE STRING "The default KDE home directory" )
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
set ( kiosktool_SRCS
component.cpp
@@ -50,7 +52,6 @@
set ( kconfigraweditor_SRCS
kconfigraweditortest.cpp
- kconfigraweditor.cpp
)
kde4_add_executable(kconfigraweditortest ${kconfigraweditor_SRCS})
target_link_libraries(kconfigraweditortest ${KDE4_KDECORE_LIBS})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/config.h.cmake new/sysadmin/kiosktool/config.h.cmake
--- old/sysadmin/kiosktool/config.h.cmake 1970-01-01 01:00:00.000000000 +0100
+++ new/sysadmin/kiosktool/config.h.cmake 2010-03-10 19:49:30.000000000 +0100
@@ -0,0 +1 @@
+#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/data/general.kiosk new/sysadmin/kiosktool/data/general.kiosk
--- old/sysadmin/kiosktool/data/general.kiosk 2009-03-02 00:26:49.000000000 +0100
+++ new/sysadmin/kiosktool/data/general.kiosk 2010-03-11 22:16:33.000000000 +0100
@@ -89,5 +89,3 @@
Group=General
Name=KDE Widget Style
Description=Set the system wide widget style to the following style.
-DefaultValue=motif
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/data/themes.kiosk new/sysadmin/kiosktool/data/themes.kiosk
--- old/sysadmin/kiosktool/data/themes.kiosk 2009-03-02 00:26:49.000000000 +0100
+++ new/sysadmin/kiosktool/data/themes.kiosk 2010-03-11 22:16:33.000000000 +0100
@@ -34,5 +34,3 @@
Group=General
Name=Default KDE Widget Style
Description=Set the system wide widget style to the following style.
-DefaultValue=motif
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kconfigraweditor.cpp new/sysadmin/kiosktool/kconfigraweditor.cpp
--- old/sysadmin/kiosktool/kconfigraweditor.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kconfigraweditor.cpp 2010-03-11 22:20:45.000000000 +0100
@@ -1,8 +1,17 @@
#include "kconfigraweditor.h"
+#include
+
#include <QFile>
#include <QTextStream>
+#include
+#include
+
+#ifndef KCONFIGRAWEDITORTEST
+#include "kioskrun.h"
+#endif
+
KConfigRawEditor::KConfigEntryData::KConfigEntryData( const QString &_value, DataType _type )
{
value = _value;
@@ -99,7 +108,13 @@
bool KConfigRawEditor::save()
{
+#ifdef KCONFIGRAWEDITORTEST
QFile configFile( m_configFile );
+#else
+ QString localFile = ::KStandardDirs::locateLocal("tmp", "kiosktoolconfigfile_"+KRandom::randomString(5));
+ ::unlink(QFile::encodeName(localFile));
+ QFile configFile( localFile );
+#endif
if( configFile.open( QIODevice::WriteOnly ) )
{
@@ -149,6 +164,13 @@
else
return false;
+ configFile.close();
+#ifndef KCONFIGRAWEDITORTEST
+ // install the file to the right location with the right owner
+ if( !KioskRun::self()->install( localFile, m_configFile ))
+ return false;
+#endif
+
return true;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kconfigraweditortest.cpp new/sysadmin/kiosktool/kconfigraweditortest.cpp
--- old/sysadmin/kiosktool/kconfigraweditortest.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kconfigraweditortest.cpp 2010-03-11 17:06:29.000000000 +0100
@@ -16,7 +16,8 @@
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA.
*/
- #include "kconfigraweditor.h"
+ #define KCONFIGRAWEDITORTEST
+ #include "kconfigraweditor.cpp"
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kioskgui.cpp new/sysadmin/kiosktool/kioskgui.cpp
--- old/sysadmin/kiosktool/kioskgui.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kioskgui.cpp 2010-03-11 18:13:35.000000000 +0100
@@ -17,6 +17,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA.
*/
+
+#include
+
#include "kioskgui.h"
#include <QDir>
@@ -67,7 +70,7 @@
: KXmlGuiWindow(), m_profileSelectionPage(0),
m_componentSelectionPage(0), m_componentPage(0), m_profileAssignPage(0),
m_profilePropsPage(0), m_data(0),
- m_profile(0), m_componentData(0),m_page(0)
+ m_profile(0), m_componentData(0),m_page(PAGE_PROFILE_SELECTION)
{
m_run = new KioskRun(this);
m_view = new MainView(this);
@@ -94,7 +97,7 @@
m_profile = config.readEntry("CurrentProfile", "default");
m_component = config.readEntry("CurrentComponent");
- selectPage(PAGE_PROFILE_SELECTION, true);
+ selectPage(PAGE_PROFILE_SELECTION);
QTimer::singleShot(0, this, SLOT(slotCheckEtcSkel()));
@@ -107,7 +110,7 @@
void KioskGui::slotCheckEtcSkel()
{
- QString etcSkel = "/etc/skel/.kde";
+ QString etcSkel = "/etc/skel/" KDE_DEFAULT_HOME;
KioskSync skelDir;
skelDir.addDir(etcSkel, KUrl());
QStringList skelFiles = skelDir.listFiles();
@@ -180,17 +183,17 @@
void KioskGui::slotAddProfile()
{
- selectPage(PAGE_PROFILE_NEW, true);
+ selectPage(PAGE_PROFILE_NEW);
}
void KioskGui::slotProfileProperties()
{
- selectPage(PAGE_PROFILE_PROPS, true);
+ selectPage(PAGE_PROFILE_PROPS);
}
void KioskGui::slotProfileSetup()
{
- selectPage(PAGE_COMPONENT_SELECTION, true);
+ selectPage(PAGE_COMPONENT_SELECTION);
}
void KioskGui::slotDeleteProfile(QTreeWidgetItem *item)
@@ -221,16 +224,51 @@
void KioskGui::slotManageUsers()
{
- selectPage(PAGE_PROFILE_ASSIGN, true);
+ selectPage(PAGE_PROFILE_ASSIGN);
}
-void KioskGui::selectPage(int page, bool save)
+void KioskGui::selectPage(Page page)
{
- if (save && !savePage( m_page ))
- return;
+ if( m_page == PAGE_COMPONENT_SELECTION )
+ {
+ m_component = m_componentSelectionPage->currentComponent();
+ m_componentData = m_data->m_componentData[m_component];
+ if (!m_componentData)
+ return;
+ }
+ if( m_page == PAGE_PROFILE_SELECTION && m_profileSelectionPage )
+ {
+ m_profile = m_profileSelectionPage->listProfile->currentItem() ?
+ m_profileSelectionPage->listProfile->currentItem()->text(0) : QString();
+
+ KConfigGroup config( KGlobal::config(), "General");
+ config.writeEntry("CurrentProfile", m_profile);
+ config.sync();
+
+ QString description;
+ QString installDir;
+ QString installUser;
+
+ KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser);
+
+ QStringList kdeDirs;
+ kdeDirs << installDir;
+ m_run->setKdeDirs(kdeDirs);
+ m_run->setUser(installUser);
+ }
+ if( m_page == PAGE_PROFILE_NEW )
+ {
+ m_profile = m_profilePropsPage->profile();
+ }
+ if( m_page == PAGE_PROFILE_PROPS )
+ {
+ m_profile = m_profilePropsPage->profile();
+ }
+
m_page = page;
- if (( page == PAGE_PROFILE_SELECTION) && !m_profileSelectionPage)
+
+ if (( m_page == PAGE_PROFILE_SELECTION) && !m_profileSelectionPage)
{
m_profileSelectionPage = new ProfileSelectionPageUI(m_view->widgetStack);
connect(m_profileSelectionPage->buttonDelete, SIGNAL(clicked()),
@@ -247,7 +285,7 @@
m_pageMapping[PAGE_PROFILE_SELECTION] = m_view->widgetStack->insertWidget(PAGE_PROFILE_SELECTION,m_profileSelectionPage);
m_profileSelectionPage->listProfile->setFocus();
}
- else if ((page == PAGE_COMPONENT_SELECTION) && !m_componentSelectionPage)
+ else if ((m_page == PAGE_COMPONENT_SELECTION) && !m_componentSelectionPage)
{
m_data = new KioskData;
if (!m_data->load())
@@ -256,13 +294,13 @@
}
m_componentSelectionPage = new ComponentSelectionPage(m_data, m_view->widgetStack);
- connect(m_componentSelectionPage, SIGNAL(componentActivated()), this, SLOT(slotCompenentSelection()));
+ connect(m_componentSelectionPage, SIGNAL(componentActivated()), this, SLOT(slotComponentSelection()));
m_componentSelectionPage->setCurrentComponent(m_component);
m_pageMapping[PAGE_COMPONENT_SELECTION] = m_view->widgetStack->insertWidget(PAGE_COMPONENT_SELECTION, m_componentSelectionPage);
m_componentSelectionPage->listComponent->setFocus();
}
- else if (page == PAGE_PROFILE_NEW)
+ else if (m_page == PAGE_PROFILE_NEW)
{
delete m_profilePropsPage;
m_profilePropsPage = new ProfilePropsPage(m_view->widgetStack, QString() );
@@ -270,7 +308,7 @@
m_pageMapping[PAGE_PROFILE_NEW] = m_view->widgetStack->insertWidget(PAGE_PROFILE_NEW,m_profilePropsPage->widget());
m_profilePropsPage->setFocus();
}
- else if (page == PAGE_PROFILE_PROPS)
+ else if (m_page == PAGE_PROFILE_PROPS)
{
delete m_profilePropsPage;
m_profilePropsPage = new ProfilePropsPage(m_view->widgetStack, m_profile);
@@ -278,14 +316,14 @@
m_pageMapping[PAGE_PROFILE_PROPS] = m_view->widgetStack->insertWidget(PAGE_PROFILE_PROPS,m_profilePropsPage->widget());
m_profilePropsPage->setFocus();
}
- else if ((page == PAGE_PROFILE_ASSIGN) && !m_profileAssignPage)
+ else if ((m_page == PAGE_PROFILE_ASSIGN) && !m_profileAssignPage)
{
m_profileAssignPage = new UserManagementPage(m_view->widgetStack);
m_pageMapping[PAGE_PROFILE_ASSIGN] = m_view->widgetStack->insertWidget(PAGE_PROFILE_ASSIGN,m_profileAssignPage->widget());
m_profileAssignPage->setFocus();
}
- else if (page == PAGE_COMPONENT)
+ else if (m_page == PAGE_COMPONENT)
{
delete m_componentPage;
@@ -306,37 +344,37 @@
m_componentPage->setFocus();
}
- if( page == PAGE_PROFILE_SELECTION )
+ if( m_page == PAGE_PROFILE_SELECTION )
{
setSubCaption(i18n("Main Menu"));
setMainCaption(i18n("Main Menu"));
}
- if( page == PAGE_PROFILE_NEW )
+ if( m_page == PAGE_PROFILE_NEW )
{
setSubCaption(i18n("Add New Profile"));
setMainCaption(i18n("Add New Profile"));
}
- if( page == PAGE_PROFILE_PROPS )
+ if( m_page == PAGE_PROFILE_PROPS )
{
setSubCaption(i18n("Profile Properties"));
setMainCaption(i18n("Profile Properties"));
}
- if( page == PAGE_COMPONENT_SELECTION )
+ if( m_page == PAGE_COMPONENT_SELECTION )
{
setSubCaption(i18n("Setup Profile \"%1\"",m_profile));
setMainCaption(i18n("Setup Profile"));
}
- if( page == PAGE_COMPONENT )
+ if( m_page == PAGE_COMPONENT )
{
setSubCaption(m_componentPage->subCaption());
}
- if( page == PAGE_PROFILE_ASSIGN )
+ if( m_page == PAGE_PROFILE_ASSIGN )
{
setSubCaption(i18n("Assign Profiles"));
}
- m_view->widgetStack->setCurrentIndex(m_pageMapping[page]);
- loadPage(page);
+ m_view->widgetStack->setCurrentIndex(m_pageMapping[m_page]);
+ loadPage(m_page);
updateButtons();
}
@@ -420,7 +458,7 @@
m_profileSelectionPage->listProfile->setCurrentItem(m_profileSelectionPage->listProfile->topLevelItem(0));
}
-void KioskGui::loadPage(int page)
+void KioskGui::loadPage(Page page)
{
if( page == PAGE_PROFILE_SELECTION )
{
@@ -444,35 +482,10 @@
}
}
-bool KioskGui::savePage(int page)
+bool KioskGui::savePage(Page page)
{
- if( page == PAGE_PROFILE_SELECTION )
- {
- m_profile = m_profileSelectionPage->listProfile->currentItem() ?
- m_profileSelectionPage->listProfile->currentItem()->text(0) : QString();
-
- KConfigGroup config( KGlobal::config(), "General");
- config.writeEntry("CurrentProfile", m_profile);
- config.sync();
-
- QString description;
- QString installDir;
- QString installUser;
-
- KioskRun::self()->getProfileInfo(m_profile, description, installDir, installUser);
-
- QStringList kdeDirs;
- kdeDirs << installDir;
- m_run->setKdeDirs(kdeDirs);
- m_run->setUser(installUser);
- }
if( page == PAGE_COMPONENT_SELECTION)
{
- m_component = m_componentSelectionPage->currentComponent();
- m_componentData = m_data->m_componentData[m_component];
- if (!m_componentData)
- return false;
-
return m_componentSelectionPage->save();
}
if( page == PAGE_COMPONENT )
@@ -484,7 +497,6 @@
{
if (m_profilePropsPage)
{
- m_profile = m_profilePropsPage->profile();
return m_profilePropsPage->save();
}
}
@@ -492,7 +504,6 @@
{
if (m_profilePropsPage)
{
- m_profile = m_profilePropsPage->profile();
return m_profilePropsPage->save();
}
}
@@ -506,19 +517,25 @@
void KioskGui::finishedPage(bool save)
{
+ if( save )
+ {
+ if( !savePage( m_page ))
+ return;
+ }
if (m_page == PAGE_PROFILE_NEW)
- selectPage(PAGE_PROFILE_SELECTION, save);
+ selectPage(PAGE_PROFILE_SELECTION);
else if (m_page == PAGE_PROFILE_PROPS)
- selectPage(PAGE_PROFILE_SELECTION, save);
+ selectPage(PAGE_PROFILE_SELECTION);
else if (m_page == PAGE_PROFILE_ASSIGN)
- selectPage(PAGE_PROFILE_SELECTION, save);
- else if (m_page == PAGE_COMPONENT_SELECTION && !save)
+ selectPage(PAGE_PROFILE_SELECTION);
+ else if (m_page == PAGE_COMPONENT_SELECTION)
{
- m_componentSelectionPage->discard();
- selectPage(m_page - 1, save);
+ if( !save )
+ m_componentSelectionPage->discard();
+ selectPage(PAGE_PROFILE_SELECTION);
}
- else if (m_page > 1)
- selectPage(m_page - 1, save);
+ else if (m_page == PAGE_COMPONENT)
+ selectPage(PAGE_COMPONENT_SELECTION);
}
void KioskGui::discardPage()
@@ -526,9 +543,9 @@
finishedPage(false);
}
-void KioskGui::slotCompenentSelection()
+void KioskGui::slotComponentSelection()
{
- selectPage(PAGE_COMPONENT, true);
+ selectPage(PAGE_COMPONENT);
}
void KioskGui::slotConfig()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kioskgui.h new/sysadmin/kiosktool/kioskgui.h
--- old/sysadmin/kiosktool/kioskgui.h 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kioskgui.h 2010-03-11 18:13:35.000000000 +0100
@@ -59,7 +59,7 @@
{
Q_OBJECT
public:
- enum { PAGE_PROFILE_SELECTION = 1,
+ enum Page { PAGE_PROFILE_SELECTION = 1,
PAGE_COMPONENT_SELECTION = 2,
PAGE_COMPONENT = 3,
PAGE_PROFILE_NEW = 4,
@@ -74,9 +74,9 @@
void saveProperties(KConfigGroup &config);
void readProperties(const KConfigGroup &config);
- void selectPage(int page, bool save);
- void loadPage(int page);
- bool savePage(int page);
+ void selectPage(Page page);
+ void loadPage(Page page);
+ bool savePage(Page page);
void loadProfiles();
@@ -90,7 +90,7 @@
void slotProfileSetup();
void slotManageUsers();
void slotConfig();
- void slotCompenentSelection();
+ void slotComponentSelection();
void uploadAllProfiles();
void uploadCurrentProfile();
@@ -121,8 +121,8 @@
ComponentData * m_componentData;
KAction *m_uploadAction;
KToggleAction *m_backgroundAction;
- QMap m_pageMapping;
- int m_page;
+ QMap m_pageMapping;
+ Page m_page;
};
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kioskrun.cpp new/sysadmin/kiosktool/kioskrun.cpp
--- old/sysadmin/kiosktool/kioskrun.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kioskrun.cpp 2010-03-11 23:46:04.000000000 +0100
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA.
*/
+#include
+
#include "kioskrun.h"
@@ -25,6 +27,7 @@
#include
#include
#include
+#include
#include <QDir>
#include <QFile>
@@ -53,6 +56,7 @@
#include "kconfigraweditor.h"
#include
+#include
#include
#include
@@ -63,8 +67,8 @@
KioskRun *KioskRun::s_self = 0;
-KioskRun::KioskRun( QObject* parent )
- : QObject(parent), m_instance(0), m_localKdercConfig(0)
+KioskRun::KioskRun( QWidget* parent )
+ : QObject(parent), m_instance(0), m_localKdercConfig(0), m_mainWidget( parent )
{
m_noRestrictions = false;
m_forceSycocaUpdate = false;
@@ -163,6 +167,7 @@
Q_ASSERT(dir.startsWith(m_homeDir));
KIO::DeleteJob *deleteJob = KIO::del( KUrl(dir) );
+ deleteJob->ui()->setWindow( m_mainWidget );
deleteJob->exec();
}
@@ -170,8 +175,8 @@
KioskRun::applyEnvironment(KProcess *p)
{
p->setEnv(QLatin1String("HOME"), m_homeDir);
- p->setEnv(QLatin1String("KDEHOME"), QString(m_homeDir + "/.kde") );
- p->setEnv(QLatin1String("KDEROOTHOME"), QString( m_homeDir + "/.kde"));
+ p->setEnv(QLatin1String("KDEHOME"), QString(m_homeDir + "/" KDE_DEFAULT_HOME) );
+ p->setEnv(QLatin1String("KDEROOTHOME"), QString( m_homeDir + "/" KDE_DEFAULT_HOME));
p->setEnv(QLatin1String("KDEDIRS"), m_kdeDirs.join(":"));
p->setEnv(QLatin1String("XDG_DATA_HOME"), QString( m_homeDir + "/.local/share"));
p->setEnv(QLatin1String("XDG_DATA_DIRS"), m_xdgDataDirs.join(":"));
@@ -257,7 +262,7 @@
QString newSocketDir = ::KStandardDirs::locateLocal("socket", "kioskdir");
SetEnv home("HOME", m_homeDir);
- QString kdeHome = m_homeDir+"/.kde";
+ QString kdeHome = m_homeDir+"/" KDE_DEFAULT_HOME;
SetEnv kdehome("KDEHOME", kdeHome);
SetEnv kderoothome("KDEROOTHOME", kdeHome);
SetEnv kdedirs("KDEDIRS", m_kdeDirs.join(":"));
@@ -284,7 +289,7 @@
::mkdir(QFile::encodeName(newSocketDir), 0700);
::symlink(QFile::encodeName(newSocketDir), QFile::encodeName(socketDir));
- m_configDir = QString("%1/.kde/share/config/").arg(m_homeDir);
+ m_configDir = QString("%1/" KDE_DEFAULT_HOME "/share/config/").arg(m_homeDir);
m_instance = new KComponentData("kioskrun");
(void) m_instance->dirs(); // Create KStandardDirs obj
@@ -727,7 +732,7 @@
char hostname[256];
hostname[0] = 0;
gethostname(hostname, 255);
- QString cacheDir = QString("%1/.kde/cache-%2").arg(m_homeDir).arg(hostname);
+ QString cacheDir = QString("%1/" KDE_DEFAULT_HOME "/cache-%2").arg(m_homeDir).arg(hostname);
deleteDir(cacheDir);
KStandardDirs::makeDir(cacheDir);
@@ -875,10 +880,12 @@
}
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KIO::SimpleJob *mkdirJob = KIO::mkdir(dest, 0755 );
+ mkdirJob->ui()->setWindow( m_mainWidget );
if (mkdirJob->exec() == true)
return true;
@@ -890,12 +897,14 @@
KioskRun::createRemoteDirRecursive(const KUrl &dest, bool ask)
{
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KUrl parent = parent.upUrl();
KIO::StatJob *parentExistsJob = KIO::stat( parent, KIO::HideProgressInfo );
+ parentExistsJob->ui()->setWindow( m_mainWidget );
if ( parentExistsJob->exec() == true )
{
return createRemoteDir(dest);
@@ -928,10 +937,12 @@
KioskRun::createRemoteDir(const KUrl &dest)
{
KIO::StatJob *existsJob = KIO::stat( dest, KIO::HideProgressInfo );
+ existsJob->ui()->setWindow( m_mainWidget );
if ( existsJob->exec() == true )
return true;
KIO::SimpleJob *mkdirJob = KIO::mkdir(dest, 0755 );
+ mkdirJob->ui()->setWindow( m_mainWidget );
if (mkdirJob->exec() == true)
return true;
@@ -956,10 +967,11 @@
KUrl src;
src.setPath(file);
- KIO::CopyJob *result = KIO::copy(src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ KIO::FileCopyJob *result = KIO::file_copy(src, dest, 0644, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if (result->exec() == true)
{
- ::unlink(QFile::encodeName(file));
+ ::unlink(QFile::encodeName(file));
return true;
}
@@ -973,6 +985,7 @@
KUrl src;
src.setPath(file);
KIO::CopyJob *result = KIO::copy(src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if ( result->exec() )
return true;
return false;
@@ -992,6 +1005,7 @@
dest.setPath(destination);
KIO::DeleteJob *delJob = KIO::del(dest,KIO::HideProgressInfo );
+ delJob->ui()->setWindow( m_mainWidget );
return delJob->exec();
}
@@ -1020,6 +1034,7 @@
if (!createRemoteDirRecursive(dest.upUrl(), false))
return false;
KIO::CopyJob *moveJob = KIO::move( src, dest, KIO::Overwrite|KIO::HideProgressInfo );
+ moveJob->ui()->setWindow( m_mainWidget );
if ( !moveJob->exec() )
{
return false;
@@ -1089,6 +1104,7 @@
if (QFile::exists(settingsUrl.path()))
{
KIO::CopyJob *result = KIO::copy(settingsUrl, localCopyUrl, KIO::Overwrite|KIO::HideProgressInfo );
+ result->ui()->setWindow( m_mainWidget );
if( result->exec() == false )
return 0;
}
@@ -1194,7 +1210,9 @@
newProfileGroup.writeEntry("Description", description);
newProfileGroup.writeEntry("InstallUser", installUser);
newProfileGroup.sync();
+ m_user = installUser;
bool result = install(localProfileInfo, saveProfileInfo);
+ m_user = QString();
if (!result)
return false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kioskrun.h new/sysadmin/kiosktool/kioskrun.h
--- old/sysadmin/kiosktool/kioskrun.h 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/kioskrun.h 2010-03-11 23:04:40.000000000 +0100
@@ -170,7 +170,7 @@
bool uploadRemote(const QString &file, const KUrl &dest);
protected:
- KioskRun( QObject* parent = 0 );
+ KioskRun( QWidget* parent = 0 );
~KioskRun();
bool setupRuntimeEnv();
@@ -205,6 +205,7 @@
QString m_kderc;
QString m_localKderc;
KConfig *m_localKdercConfig;
+ QWidget* m_mainWidget;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/kiosktool.desktop new/sysadmin/kiosktool/kiosktool.desktop
--- old/sysadmin/kiosktool/kiosktool.desktop 2009-04-13 22:09:06.000000000 +0200
+++ new/sysadmin/kiosktool/kiosktool.desktop 2010-02-24 12:42:08.000000000 +0100
@@ -9,11 +9,15 @@
Name[ar]=أداة الإدارة Kiosk
Name[be]=Утыліта адміністравання Kiosk
Name[bg]=Администриране на Киоск
+Name[ca]=Eina d'administració del Kiosk
+Name[ca@valencia]=Eina d'administració del Kiosk
Name[cs]=Administrační nástroj Kiosk
Name[csb]=Nôrzãdze sprôwnika Kiosk
Name[da]=Kiosk administrationsværktøj
Name[de]=Kiosk-Administration (Werkzeug)
Name[el]=Εργαλείο διαχείρισης Kiosk
+Name[en_GB]=Kiosk Admin Tool
+Name[eo]=Kiosk Administrilo
Name[es]=Herramienta de administración de Kiosk
Name[et]=Kioski haldur
Name[fr]=Outil d'administration Kiosk
@@ -22,6 +26,9 @@
Name[gu]=કિઓસ્ક એડમિન સાધન
Name[hi]=कियॉस्क एडमिन औजार
Name[hne]=कियास्क एडमिन औजार
+Name[hr]=Administracijski alat Kiosk
+Name[hu]=Kiosk Admin Eszköz
+Name[it]=Strumento di amministrazione Kiosk
Name[ja]=Kiosk 管理者用ツール
Name[km]=ឧបករណ៍ Admin របស់ Kiosk
Name[ko]=Kiosk 관리자 도구
@@ -29,6 +36,8 @@
Name[lt]=Kiosk administravimo įrankis
Name[lv]=Kiosk administrēšanas rīks
Name[ml]=കിയോസ്കിന്റെ ഭരണാധികാരത്തിനുള്ള ഉപകരണം
+Name[ms]=Alatan Pentadbir Kiosk
+Name[nb]=Kiosk administrasjonsverktøy
Name[nds]=Pleegwarktüüch för den Kioskbedrief
Name[nl]=Kiosk-administratiehulpmiddel
Name[nn]=Kiosk administreringsverktøy
@@ -38,6 +47,11 @@
Name[pt_BR]=Ferramenta de administração Kiosk
Name[ro]=Instrument de administrare Kiosk
Name[ru]=Программа администрирования Kiosk
+Name[sk]=Kiosk administrátorský nástroj
+Name[sr]=Киоск, администраторска алатка
+Name[sr@ijekavian]=Киоск, администраторска алатка
+Name[sr@ijekavianlatin]=Kiosk, administratorska alatka
+Name[sr@latin]=Kiosk, administratorska alatka
Name[sv]=Kiosk-administreringsverktyg
Name[tg]=Мудири киоск
Name[th]=เครื่องมือบริหารระบบ Kiosk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/main.cpp new/sysadmin/kiosktool/main.cpp
--- old/sysadmin/kiosktool/main.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/main.cpp 2010-03-10 11:46:23.000000000 +0100
@@ -29,7 +29,7 @@
bool kde_kiosk_exception = false;
#ifndef KDERC
-#define KDERC "/etc/kderc"
+#define KDERC "/etc/kde4rc"
#endif
int main(int argc, char *argv[])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/userManagement.cpp new/sysadmin/kiosktool/userManagement.cpp
--- old/sysadmin/kiosktool/userManagement.cpp 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/userManagement.cpp 2010-03-11 22:23:42.000000000 +0100
@@ -38,9 +38,6 @@
#include "kioskrun.h"
-
-#define AVAILABLE_SINCE "KDE 3.2.3"
-
UserManagementPage::UserManagementPage(QWidget* parent)
: UserManagementUI(parent), m_widget(this)
{
@@ -57,32 +54,12 @@
connect(listGroups, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateButtons()));
connect(listUsers, SIGNAL(itemSelectionChanged()), this, SLOT(slotUpdateButtons()));
-
- static bool firstTime = true;
-
- if (firstTime)
- {
- firstTime = false;
- QTimer::singleShot(0, this, SLOT(slotShowNotice()));
- }
}
UserManagementPage::~UserManagementPage()
{
}
-void UserManagementPage::slotShowNotice()
-{
- KMessageBox::information(this,
- i18n("<qt>The profiles that you define here are automatically applied when the "
- "user logs in to %1 or newer.<p>"
- "If you want to use these profiles in combination with older versions you need "
- "to manually set the $KDEDIRS environment variable from the <b>startkde</b> "
- "script by adding the following line:<br><br>"
- "<i>export KDEDIRS=$(kiosktool-kdedirs)</i><br><br>",QString(AVAILABLE_SINCE)),
- i18n("Attention"), "user-profiles");
-}
-
void UserManagementPage::load()
{
listGroups->clear();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sysadmin/kiosktool/userManagement.h new/sysadmin/kiosktool/userManagement.h
--- old/sysadmin/kiosktool/userManagement.h 2009-04-16 22:04:31.000000000 +0200
+++ new/sysadmin/kiosktool/userManagement.h 2010-03-11 22:23:42.000000000 +0100
@@ -78,7 +78,6 @@
void slotDeleteUser();
void slotUpdateButtons();
- void slotShowNotice();
private:
UserManagementUI *w;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org