Browse Source

Removed HAL dependant code.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/256/head
Michele Calgaro 5 months ago
parent
commit
f9f7aee79e
  1. 4
      CMakeLists.txt
  2. 30
      ConfigureChecks.cmake
  3. 9
      config.h.cmake
  4. 11
      doc/khelpcenter/faq/misc.docbook
  5. 13
      doc/khelpcenter/userguide/removable-disks.docbook
  6. 6
      kdesktop/lock/lockprocess.cpp
  7. 3
      kicker/kicker/ui/CMakeLists.txt
  8. 122
      kicker/kicker/ui/k_new_mnu.cpp
  9. 15
      kicker/kicker/ui/k_new_mnu.h
  10. 5
      ksmserver/CMakeLists.txt
  11. 6
      ksmserver/Makefile.am
  12. 128
      ksmserver/shutdowndlg.cpp
  13. 14
      ksmserver/shutdowndlg.h
  14. 9
      r14-xdg-update
  15. 4
      tdeioslave/media/Makefile.am
  16. 176
      tdeioslave/media/configure.in.in
  17. 8
      tdeioslave/media/contrib/README
  18. 5
      tdeioslave/media/libmediacommon/mediamanagersettings.kcfg
  19. 9
      tdeioslave/media/mediaimpl.cpp
  20. 12
      tdeioslave/media/mediamanager/CMakeLists.txt
  21. 17
      tdeioslave/media/mediamanager/Makefile.am
  22. 1
      tdeioslave/media/mediamanager/fstabbackend.cpp
  23. 2000
      tdeioslave/media/mediamanager/halbackend.cpp
  24. 233
      tdeioslave/media/mediamanager/halbackend.h
  25. 100
      tdeioslave/media/mediamanager/mediamanager.cpp
  26. 3
      tdeioslave/media/mediamanager/mediamanager.h
  27. 18
      tdeioslave/media/tdecmodule/managermodule.cpp
  28. 20
      tdeioslave/media/tdecmodule/managermoduleview.ui

4
CMakeLists.txt

@ -117,7 +117,6 @@ option( WITH_XINERAMA "Enable xinerama extension support" ${WITH_ALL_OPTIONS} )
option( WITH_ARTS "Enable aRts support" ${WITH_ALL_OPTIONS} )
option( WITH_I8K "Enable Dell laptop support (ksysguard)" ${WITH_ALL_OPTIONS} )
option( WITH_SENSORS "Enable lm_sensors support (ksysguard)" ${WITH_ALL_OPTIONS} )
option( WITH_HAL "Enable HAL support" OFF )
option( WITH_TDEHWLIB "Enable TDE hardware library support" ${WITH_ALL_OPTIONS} )
option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} )
option( WITH_ELFICON "Enable ELF embedded metadata support" ${WITH_ALL_OPTIONS} )
@ -148,8 +147,7 @@ option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden"
# WITH_ARTS affects libkonq khotkeys
# WITH_I8K affects ksysguard
# WITH_SENSORS affects ksysguard
# WITH_HAL affects tdeioslaves(media) ksmserver kicker
# WITH_TDEHWLIB affects tdeioslaves(media), replaces WITH_HAL on systems without HAL
# WITH_TDEHWLIB affects tdeioslaves(media)
# WITH_LIBRAW1394 affects kcontrol(view1394)
# WITH_PAM affects tdm kdesktop kcheckpass
# WITH_SHADOW affects tdm kcheckpass

30
ConfigureChecks.cmake

@ -121,15 +121,6 @@ if( NOT HAVE_CRYPT )
endif( NOT HAVE_CRYPT )
# hal (ksmserver, tdeioslaves)
if( WITH_HAL )
pkg_search_module( HAL hal )
if( NOT HAL_FOUND )
tde_message_fatal( "hal is required, but was not found on your system" )
endif( )
endif( )
# tdehwlib (drkonqi, kcontrol, kicker, ksmserver, tdeioslaves, tdm)
if( WITH_TDEHWLIB )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
@ -458,27 +449,6 @@ if( BUILD_KDESKTOP )
endif( )
# dbus-tqt (ksmserver, kicker, tdeioslaves(media))
if( WITH_HAL AND (BUILD_KSMSERVER OR BUILD_KICKER OR BUILD_TDEIOSLAVES) )
# check for dbus-tqt
# dbus-tqt need Qt flags
pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS})
set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} )
check_cxx_source_compiles("
#include <tqt.h>
#include <dbus/connection.h>
int main(int, char**) { return 0; } "
HAVE_DBUS_QT3_07 )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
if( NOT HAVE_DBUS_QT3_07 )
tde_message_fatal( "dbus-tqt is required, but was not found on your system" )
endif( )
endif( )
# check for krb5
if( WITH_KRB5 )
pkg_search_module( KRB5 krb5 )

9
config.h.cmake

@ -64,18 +64,9 @@
// drkonqi, tdeioslave
#cmakedefine HAVE_SYS_TYPES_H 1
// tdeioslave/media
#cmakedefine WITH_HAL 1
#ifdef WITH_HAL
#define COMPILE_HALBACKEND
#define COMPILE_LINUXCDPOLLING
#endif
// tdeioslave/media
#cmakedefine WITH_TDEHWLIB 1
#ifdef WITH_TDEHWLIB
// forcibly deactivate HAL support and substitute TDE hardware library support
#undef COMPILE_HALBACKEND
#define COMPILE_TDEHARDWAREBACKEND
#endif

11
doc/khelpcenter/faq/misc.docbook

@ -228,16 +228,5 @@ if you want to read without subscribing.</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>How do the developers propose to transition away from HAL (hardware abstraction layer)?</para>
</question>
<answer>
<para>The Trinity team developed a new native hardware support layer that is under testing.
That new system will be enabled by default in a future release, but is available now
in the development sources.</para>
</answer>
</qandaentry>
</qandaset>
</chapter>

13
doc/khelpcenter/userguide/removable-disks.docbook

@ -19,10 +19,7 @@ it, and much more.</para>
<para>The use of a device is controlled by the operating
system and it is important your operating system has tools for managing
these devices. &tde; can also auto mount devices, working with
<acronym>HAL</acronym> (Hardware Abstraction Layer). Your distribution
should have set up <acronym>HAL</acronym> automatically; if not,
consult the documentation provided by your distribution.</para>
these devices. &tde; can also auto mount devices.</para>
<para>There are several ways to find the list of media devices: use
whichever one suits you best:</para>
@ -89,14 +86,6 @@ configured. To find out if they are running on your system check the
<command>udevd</command>. &tde; does not provide any of these
components. You must check with you distribution.</para>
<itemizedlist>
<title>Related Information</title>
<listitem><para><ulink url="http://wiki.kde.org/tiki-index.php?page=DBUS">HOWTO: setting up D-BUS and HAL with TDE's media ioslave
edit</ulink> (A community maintained HOWTO on the &tde; wiki)</para></listitem>
<listitem><para><ulink url="http://www.freedesktop.org/wiki/Software/dbus">The DBus page</ulink></para></listitem>
<listitem><para><ulink url="http://www.freedesktop.org/wiki/Software/hal"></ulink>HAL - Hardware Abstraction Layer</para></listitem>
</itemizedlist>
</sect2>
<sect2 id="mounting-removable-disks">

6
kdesktop/lock/lockprocess.cpp

@ -2458,13 +2458,7 @@ static int run_vkbd = -1;
void LockProcess::showVkbd()
{
if( run_vkbd == - 1 ) {
#ifdef WITH_HAL
int status = system( "hal-find-by-property --key system.formfactor.subtype --string tabletpc" );
// status = 0; // enable for testing
run_vkbd = ( WIFEXITED( status ) && WEXITSTATUS( status ) == 0 && !TDEStandardDirs::findExe( "xvkbd" ).isEmpty()) ? 1 : 0;
#else // WITH_HAL
run_vkbd = (!TDEStandardDirs::findExe( "xvkbd" ).isEmpty());
#endif // WITH_HAL
}
if( run_vkbd ) {
mVkbdWindows.clear();

3
kicker/kicker/ui/CMakeLists.txt

@ -20,7 +20,6 @@ include_directories(
${CMAKE_SOURCE_DIR}/kicker/kicker/buttons
${CMAKE_SOURCE_DIR}/tdmlib
${CMAKE_SOURCE_DIR}/libkonq
${DBUS_TQT_INCLUDE_DIRS}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
@ -56,5 +55,5 @@ set( ${target}_SRCS
tde_add_library( ${target} STATIC_PIC AUTOMOC
SOURCES ${${target}_SRCS}
DEPENDENCIES kicker_core-static
LINK dmctl-static kickoffsearch_interfaces-shared ${TDEHW_LIBRARIES} ${DBUS_TQT_LIBRARIES} ${HAL_LIBRARIES}
LINK dmctl-static kickoffsearch_interfaces-shared ${TDEHW_LIBRARIES}
)

122
kicker/kicker/ui/k_new_mnu.cpp

@ -116,16 +116,6 @@
#include "config.h"
#ifdef COMPILE_HALBACKEND
#ifndef NO_QT3_DBUS_SUPPORT
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/connection.h>
#endif // NO_QT3_DBUS_SUPPORT
#include <hal/libhal.h>
#endif // COMPILE_HALBACKEND
#ifdef __NetBSD__
#define statfs statvfs
#endif
@ -447,38 +437,6 @@ KMenu::KMenu()
search_tab_top_left.load( locate("data", "kicker/pics/search-tab-top-left.png" ) );
search_tab_top_right.load( locate("data", "kicker/pics/search-tab-top-right.png" ) );
search_tab_top_center.load( locate("data", "kicker/pics/search-tab-top-center.png" ) );
#ifdef COMPILE_HALBACKEND
m_halCtx = NULL;
m_halCtx = libhal_ctx_new();
DBusError error;
dbus_error_init(&error);
m_dbusConn = dbus_connection_open_private(DBUS_SYSTEM_BUS, &error);
if (!m_dbusConn) {
dbus_error_free(&error);
libhal_ctx_free(m_halCtx);
m_halCtx = NULL;
} else {
dbus_bus_register(m_dbusConn, &error);
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
libhal_ctx_free(m_halCtx);
m_dbusConn = NULL;
m_halCtx = NULL;
} else {
libhal_ctx_set_dbus_connection(m_halCtx, m_dbusConn);
if (!libhal_ctx_init(m_halCtx, &error)) {
if (dbus_error_is_set(&error)) {
dbus_error_free(&error);
}
libhal_ctx_free(m_halCtx);
m_dbusConn = NULL;
m_halCtx = NULL;
}
}
}
#endif
}
void KMenu::setupUi()
@ -501,15 +459,6 @@ KMenu::~KMenu()
clearSubmenus();
delete m_filterData;
#ifdef COMPILE_HALBACKEND
if (m_halCtx) {
DBusError error;
dbus_error_init(&error);
libhal_ctx_shutdown(m_halCtx, &error);
libhal_ctx_free(m_halCtx);
}
#endif
}
bool KMenu::eventFilter ( TQObject * receiver, TQEvent* e)
@ -1378,10 +1327,7 @@ void KMenu::insertStaticExitItems()
}
bool maysd = false;
#if defined(COMPILE_HALBACKEND)
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true;
#elif defined(WITH_TDEHWLIB)
#if defined(WITH_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if( rootDevice ) {
maysd = rootDevice->canPowerOff();
@ -3794,27 +3740,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
bool standby = false;
bool suspend_disk = false;
bool hybrid_suspend = false;
#if defined(COMPILE_HALBACKEND)
suspend_ram = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend",
NULL);
standby = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_standby",
NULL);
suspend_disk = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_hibernate",
NULL);
hybrid_suspend = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend_hybrid",
NULL);
#elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
#if defined(WITH_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
suspend_ram = rootDevice->canSuspend();
@ -3886,49 +3812,7 @@ void KMenu::slotSuspend(int id)
DCOPRef("kdesktop", "KScreensaverIface").call("lock()");
}
#if defined(COMPILE_HALBACKEND)
DBusMessage* msg = NULL;
if (m_dbusConn) {
// No Freeze support in HAL
if (id == SuspendType::Standby) {
msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"Standby");
} else if (id == SuspendType::Suspend) {
msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"Suspend");
int wakeup=0;
dbus_message_append_args(msg, DBUS_TYPE_INT32, &wakeup, DBUS_TYPE_INVALID);
} else if (id == SuspendType::Hibernate) {
msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"Hibernate");
} else if (id == SuspendType::HybridSuspend) {
msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"SuspendHybrid");
int wakeup=0;
dbus_message_append_args(msg, DBUS_TYPE_INT32, &wakeup, DBUS_TYPE_INVALID);
} else {
return;
}
if(dbus_connection_send(m_dbusConn, msg, NULL)) {
error = false;
}
dbus_message_unref(msg);
}
#elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
#if defined(WITH_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
if (id == SuspendType::Freeze) {

15
kicker/kicker/ui/k_new_mnu.h

@ -45,16 +45,6 @@
#include <config.h>
#ifdef COMPILE_HALBACKEND
#ifndef NO_QT3_DBUS_SUPPORT
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/connection.h>
#endif // NO_QT3_DBUS_SUPPORT
#include <hal/libhal.h>
#endif // COMPILE_HALBACKEND
class KickerClientMenu;
class KickoffTabBar;
class KBookmarkMenu;
@ -347,11 +337,6 @@ private:
void fillOverflowCategory();
TQString insertBreaks(const TQString& text, TQFontMetrics fm, int width, TQString leadInsert = TQString::null);
#ifdef COMPILE_HALBACKEND
LibHalContext* m_halCtx;
DBusConnection *m_dbusConn;
#endif
};
#endif

5
ksmserver/CMakeLists.txt

@ -25,13 +25,10 @@ include_directories(
${CMAKE_SOURCE_DIR}/tdmlib
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${DBUS_TQT_INCLUDE_DIRS}
${HAL_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${DBUS_TQT_LIBRARY_DIRS}
)
@ -50,5 +47,5 @@ tde_add_tdeinit_executable( ksmserver AUTOMOC
main.cpp server.cpp shutdowndlg.cpp startupdlg.cpp
legacy.cpp startup.cpp shutdown.cpp client.cpp
KSMServerInterface.skel server.skel timed.ui
LINK dmctl-static tdeui-shared tdersync-shared ${TDEHW_LIBRARIES} ${HAL_LIBRARIES} ${DBUS_TQT_LIBRARIES}
LINK dmctl-static tdeui-shared tdersync-shared ${TDEHW_LIBRARIES}
)

6
ksmserver/Makefile.am

@ -17,7 +17,7 @@
SUBDIRS = .
INCLUDES= -I$(top_srcdir)/tdmlib $(all_includes) $(HAL_INCS) $(DBUS_INCS)
INCLUDES= -I$(top_srcdir)/tdmlib $(all_includes)
bin_PROGRAMS =
lib_LTLIBRARIES =
@ -31,7 +31,7 @@ ksmserver_la_SOURCES = main.cpp server.cpp shutdowndlg.cpp \
KSMServerInterface.skel server.skel timed.ui
ksmserver_la_LDFLAGS = $(all_libraries) -avoid-version -module
ksmserver_la_LIBADD = ../tdmlib/libdmctl.la $(LIB_TDEUI) $(HAL_LIBS) $(DBUS_LIBS)
ksmserver_la_LIBADD = ../tdmlib/libdmctl.la $(LIB_TDEUI)
picsdir = $(kde_datadir)/ksmserver/pics
pics_DATA = shutdownkonq.png
@ -44,7 +44,7 @@ updatedir = $(kde_datadir)/tdeconf_update
EXTRA_PROGRAMS = testsh
testsh_SOURCES = test.cpp timed.ui
testsh_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
testsh_LDADD = $(LIB_TDEUI) shutdowndlg.lo ../tdmlib/libdmctl.la $(HAL_LIBS) $(DBUS_LIBS)
testsh_LDADD = $(LIB_TDEUI) shutdowndlg.lo ../tdmlib/libdmctl.la
messages:
$(XGETTEXT) *.cpp -o $(podir)/ksmserver.pot

128
ksmserver/shutdowndlg.cpp

@ -797,10 +797,6 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout()));
}
#ifdef COMPILE_HALBACKEND
m_halCtx = NULL;
#endif
if ((maysd) || (mayrb)) {
// respect lock on resume & disable suspend/hibernate settings
@ -815,70 +811,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
bool canHibernate = false;
bool canHybridSuspend = false;
#if defined(COMPILE_HALBACKEND)
// Query HAL for suspend/resume support
m_halCtx = libhal_ctx_new();
DBusError error;
dbus_error_init(&error);
m_dbusConn = dbus_connection_open_private(DBUS_SYSTEM_BUS, &error);
if (!m_dbusConn)
{
dbus_error_free(&error);
libhal_ctx_free(m_halCtx);
m_halCtx = NULL;
}
else
{
dbus_bus_register(m_dbusConn, &error);
if (dbus_error_is_set(&error))
{
dbus_error_free(&error);
libhal_ctx_free(m_halCtx);
m_dbusConn = NULL;
m_halCtx = NULL;
}
else
{
libhal_ctx_set_dbus_connection(m_halCtx, m_dbusConn);
if (!libhal_ctx_init(m_halCtx, &error))
{
if (dbus_error_is_set(&error))
dbus_error_free(&error);
libhal_ctx_free(m_halCtx);
m_dbusConn = NULL;
m_halCtx = NULL;
}
}
}
if (m_halCtx)
{
if (libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend",
NULL))
{
canSuspend = true;
}
if (libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_hibernate",
NULL))
{
canHibernate = true;
}
if (libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend_hybrid",
NULL))
{
canHybridSuspend = true;
}
}
#elif defined(WITH_TDEHWLIB) // COMPILE_HALBACKEND
#if defined(WITH_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) {
canFreeze = rootDevice->canFreeze();
@ -892,7 +825,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
canHibernate = false;
canHybridSuspend = false;
}
#endif // COMPILE_HALBACKEND
#endif
if(doUbuntuLogout) {
// Ubuntu style logout window
@ -1175,15 +1108,6 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
KSMShutdownDlg::~KSMShutdownDlg()
{
#ifdef COMPILE_HALBACKEND
if (m_halCtx)
{
DBusError error;
dbus_error_init(&error);
libhal_ctx_shutdown(m_halCtx, &error);
libhal_ctx_free(m_halCtx);
}
#endif
}
@ -1220,46 +1144,13 @@ void KSMShutdownDlg::slotHalt()
void KSMShutdownDlg::slotSuspend()
{
#ifndef COMPILE_HALBACKEND
*m_selection = SuspendType::Suspend;
#else
if (m_dbusConn)
{
DBusMessage *msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"Suspend");
int wakeup=0;
dbus_message_append_args(msg, DBUS_TYPE_INT32, &wakeup, DBUS_TYPE_INVALID);
dbus_connection_send(m_dbusConn, msg, NULL);
dbus_message_unref(msg);
}
#endif
reject(); // continue on resume
}
void KSMShutdownDlg::slotHibernate()
{
#ifndef COMPILE_HALBACKEND
*m_selection = SuspendType::Hibernate;
#else
if (m_dbusConn)
{
DBusMessage *msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"Hibernate");
dbus_connection_send(m_dbusConn, msg, NULL);
dbus_message_unref(msg);
}
#endif
reject(); // continue on resume
}
@ -1271,22 +1162,7 @@ void KSMShutdownDlg::slotFreeze()
void KSMShutdownDlg::slotHybridSuspend()
{
#ifndef COMPILE_HALBACKEND
*m_selection = SuspendType::HybridSuspend;
#else
if (m_dbusConn)
{
DBusMessage *msg = dbus_message_new_method_call(
"org.freedesktop.Hal",
"/org/freedesktop/Hal/devices/computer",
"org.freedesktop.Hal.Device.SystemPowerManagement",
"SuspendHybrid");
dbus_connection_send(m_dbusConn, msg, NULL);
dbus_message_unref(msg);
}
#endif
reject(); // continue on resume
}

14
ksmserver/shutdowndlg.h

@ -34,16 +34,6 @@ class TDEAction;
#include <config.h>
#ifdef COMPILE_HALBACKEND
#ifndef NO_QT3_DBUS_SUPPORT
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/connection.h>
#endif // NO_QT3_DBUS_SUPPORT
#include <hal/libhal.h>
#endif // COMPILE_HALBACKEND
namespace SuspendType {
enum SuspendType {
NotSpecified = 0,
@ -159,10 +149,6 @@ private:
TQString m_bootOption;
TQPopupMenu *targets;
TQStringList rebootOptions;
#ifdef COMPILE_HALBACKEND
LibHalContext* m_halCtx;
DBusConnection *m_dbusConn;
#endif
bool m_lockOnResume;
int* m_selection;
};

9
r14-xdg-update

@ -3,7 +3,7 @@
# A script to perform R14.0.0 XDG compliance updates.
SCRIPT_NAME="$(basename -- "$0")"
SCRIPT_VERSION=202103280
SCRIPT_VERSION=202202130
# This script should be needed to run only once, but corner cases
# and file/directory permissions could cause incomplete updates.
@ -824,15 +824,14 @@ if [ "$R14_VERSION" -lt "201401070" ]; then
mv $PROFILE_DIR/share/apps/kstyle $PROFILE_DIR/share/apps/tdestyle 2>/dev/null
fi
fi
if [ "$R14_VERSION" -lt "201309150" ]; then
# Copy the following two rc files rather than move because the older versions are needed for HAL systems.
if [ "$R14_VERSION" -lt "202202130" ]; then
if [ ! -f $PROFILE_DIR/share/config/tdenetworkmanagerrc ] && [ -f $PROFILE_DIR/share/config/knetworkmanagerrc ]; then
Log " knetworkmanager->tdenetworkmanager"
cp -a $PROFILE_DIR/share/config/knetworkmanagerrc $PROFILE_DIR/share/config/tdenetworkmanagerrc 2>/dev/null
mv $PROFILE_DIR/share/config/knetworkmanagerrc $PROFILE_DIR/share/config/tdenetworkmanagerrc 2>/dev/null
fi
if [ ! -f $PROFILE_DIR/share/config/tdepowersaverc ] && [ -f $PROFILE_DIR/share/config/kpowersaverc ]; then
Log " kpowersave->tdepowersave"
cp -a $PROFILE_DIR/share/config/kpowersaverc $PROFILE_DIR/share/config/tdepowersaverc 2>/dev/null
mv $PROFILE_DIR/share/config/kpowersaverc $PROFILE_DIR/share/config/tdepowersaverc 2>/dev/null
fi
fi
if [ "$R14_VERSION" -lt "201401050" ]; then

4
tdeioslave/media/Makefile.am

@ -1,7 +1,3 @@
if include_media_halbackend
PROPSDLGPLUGINDIR = propsdlgplugin
endif
SUBDIRS = libmediacommon . mediamanager medianotifier mounthelper \
tdefile-plugin tdecmodule mimetypes services $(PROPSDLGPLUGINDIR)

176
tdeioslave/media/configure.in.in

@ -6,179 +6,3 @@ AC_CHECK_HEADER(linux/cdrom.h,
LINUXCDPOLLING=yes
AC_SUBST(LINUXCDPOLLING)
])
AC_ARG_WITH(hal,AC_HELP_STRING([--with-hal],[Enable HAL support [default=check]]),[hal_test="$withval"],[hal_test="yes"])
if test "x$hal_test" = "xyes" ; then
########### Check for the HAL
AC_MSG_CHECKING(for the HAL)
hal_inc=NOTFOUND
hal_lib=NOTFOUND
hal=NOTFOUND
search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/hal /usr/local/include /usr/local/include/hal"
AC_FIND_FILE(libhal.h libhal-storage.h, $search_incs, hal_incdir)
if test -r $hal_incdir/libhal.h && test -r $hal_incdir/libhal-storage.h && grep LibHalVolume $hal_incdir/libhal-storage.h > /dev/null 2>&1; then
HAL_INCS="-I$hal_incdir"
hal_inc=FOUND
fi
search_libs="$kde_libraries $kde_extra_libs /usr/lib$tdelibsuff /usr/local/lib$tdelibsuff"
AC_FIND_FILE(libhal.so libhal-storage.so, $search_libs, hal_libdir)
if test -r $hal_libdir/libhal.so && test -r $hal_libdir/libhal-storage.so ; then
HAL_LIBS="-L$hal_libdir -lhal -lhal-storage"
hal_lib=FOUND
fi
if test "$hal_inc" != FOUND || test "$hal_lib" != FOUND; then
KDE_PKG_CHECK_MODULES( HAL, hal > 0.5, [ HAL_INCS=$HAL_CFLAGS; hal_inc=FOUND; hal_lib=FOUND; ] , AC_MSG_RESULT(Nothing found on PKG_CONFIG_PATH) )
fi
if test "$hal_inc" = FOUND && test "$hal_lib" = FOUND ; then
AC_MSG_RESULT(headers $HAL_INCS libraries $HAL_LIBS)
hal=FOUND
else
AC_MSG_RESULT(searched but not found)
fi
AC_SUBST(HAL_INCS)
AC_SUBST(HAL_LIBS)
########### Check for DBus
AC_MSG_CHECKING(for DBus)
dbus_inc=NOTFOUND
dbus_lib=NOTFOUND
dbus=NOTFOUND
search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)
search_incs_arch_deps="$kde_includes $kde_extra_includes /usr/lib$tdelibsuff/dbus-1.0/include /usr/local/lib$tdelibsuff/dbus-1.0/include"
AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)
if test -r $dbus_incdir/dbus/dbus.h && test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h ; then
DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
dbus_inc=FOUND
fi
search_libs="$kde_libraries $kde_extra_libs /usr/lib$tdelibsuff /usr/local/lib$tdelibsuff"
AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)
if test -r $dbus_libdir/libdbus-1.so ; then
DBUS_LIBS="-L$dbus_libdir -ldbus-1"
dbus_lib=FOUND
fi
if test $dbus_inc != FOUND || test $dbus_lib != FOUND ; then
KDE_PKG_CHECK_MODULES( DBUS, "dbus-1", [ DBUS_INCS=$DBUS_CFLAGS; dbus_inc=FOUND; dbus_lib=FOUND; ] , AC_MSG_RESULT( Nothing found on PKG_CONFIG_PATH ) )
fi
dbus_bus_var=`pkg-config --variable=system_bus_default_address dbus-1 2>/dev/null`
if test -z "$dbus_bus_var"; then
dbus_bus_var="unix:path=/var/run/dbus/system_bus_socket"
fi
AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS, "$dbus_bus_var", [Define the unix domain path for dbus system bus])
if test $dbus_inc = FOUND && test $dbus_lib = FOUND ; then
AC_MSG_RESULT(headers $DBUS_INCS libraries $DBUS_LIBS)
dbus=FOUND
else
AC_MSG_RESULT(searched but not found)
fi
AC_SUBST(DBUS_INCS)
AC_SUBST(DBUS_LIBS)
########### Check for DBus-Qt3 bindings
AC_MSG_CHECKING(for DBus-Qt3 bindings)
dbusqt_inc=NOTFOUND
dbusqt_lib=NOTFOUND
dbusqt=NOTFOUND
search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
if test -r $dbusqt_incdir/dbus/connection.h ; then
have_qt_patch=0
grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
> /dev/null 2>&1 && have_qt_patch=1
if test $have_qt_patch = 1 ; then
DBUSTQT_INCS="-I$dbusqt_incdir"
dbusqt_inc=FOUND
fi
fi
search_libs="$kde_libraries $kde_extra_libs /usr/lib$tdelibsuff /usr/local/lib$tdelibsuff"
AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
DBUSTQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
dbusqt_lib=FOUND
fi
if test $dbusqt_inc != FOUND || test $dbusqt_lib != FOUND ; then
search_incs="`pkg-config --cflags dbus-1 |sed 's/-I//g'`"
AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
if test -r $dbusqt_incdir/dbus/connection.h ; then
have_qt_patch=0
grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
> /dev/null 2>&1 && have_qt_patch=1
if test $have_qt_patch = 1 ; then
DBUSTQT_INCS="-I$dbusqt_incdir"
dbusqt_inc=FOUND
fi
fi
search_libs="`pkg-config --libs dbus-1 --libs-only-L | sed 's/-L//g'`"
AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
DBUSTQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
dbusqt_lib=FOUND
fi
fi
if test $dbusqt_inc = FOUND && test $dbusqt_lib = FOUND ; then
AC_MSG_RESULT(headers $dbusqt_incdir libraries $dbusqt_libdir)
dbusqt=FOUND
else
AC_MSG_RESULT(searched but not found)
fi
AC_SUBST(DBUSTQT_INCS)
AC_SUBST(DBUSTQT_LIBS)
fi
########### Check if media HAL backend sould be compiled
AC_MSG_CHECKING(if the HAL backend for media:/ should be compiled)
HALBACKEND=no
if test "x$hal" = "xFOUND" && test "x$dbus" = "xFOUND" && test "x$dbusqt" = "xFOUND" ; then
AC_DEFINE_UNQUOTED([COMPILE_HALBACKEND],1, [media HAL backend compilation])
HALBACKEND=yes
AC_SUBST(HALBACKEND)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(include_media_linuxcdpolling, test "$LINUXCDPOLLING" = "yes")
AM_CONDITIONAL(include_media_halbackend, test "$HALBACKEND" = yes)
AC_CHECK_FUNCS(statvfs)

8
tdeioslave/media/contrib/README

@ -1,11 +1,5 @@
Those scripts are an example on how to allow media:/ to use
hotplugging events if you don't use HAL. They're targeting
"Linux 2.6 + hotplug + udev" platforms, but we can surely make
something equivalent for Linux 2.4, FreeBSD...
They are just examples, the packagers will surely develop their
own version (I'm currently using them on Debian Sid, Linux 2.6.9
though).
hotplugging events.
1) mediamanager_usbstorage.dev
This file only needs to be copied to /etc/dev.d/default

5
tdeioslave/media/libmediacommon/mediamanagersettings.kcfg

@ -4,11 +4,6 @@
<kcfg>
<kcfgfile name="mediamanagerrc"/>
<group name="Global">
<entry name="HalBackendEnabled" type="Bool">
<label>Enable HAL backend</label>
<whatsthis>When HAL (Hardware Abstraction Layer) support is enabled, TDE will use it to gather information on the storage media available in your system.</whatsthis>
<default>true</default>
</entry>
<entry name="TdeHardwareBackendEnabled" type="Bool">
<label>Enable TDE hardware library backend</label>
<whatsthis>When TDE hardware library support is enabled, TDE will use it to gather information on the storage media available in your system.</whatsthis>

9
tdeioslave/media/mediaimpl.cpp

@ -230,15 +230,6 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return false;
}
#ifdef COMPILE_HALBACKEND
if ( medium.isEncrypted() && medium.clearDeviceUdi().isEmpty() )
{
m_lastErrorCode = TDEIO::ERR_COULD_NOT_MOUNT;
m_lastErrorMessage = i18n("The drive is encrypted.");
return false;
}
#endif // COMPILE_HALBACKEND
if ( medium.needMounting() )
{
m_lastErrorCode = 0;

12
tdeioslave/media/mediamanager/CMakeLists.txt

@ -16,13 +16,10 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${HAL_INCLUDE_DIRS}
${DBUS_TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${DBUS_TQT_LIBRARY_DIRS}
)
@ -45,11 +42,6 @@ tde_create_translated_desktop(
set( target kded_mediamanager )
if( WITH_HAL )
set( HAL_MEDIA_BACKEND halbackend.cpp linuxcdpolling.cpp )
set( HAL_MEDIA_LIBRARIES ${HAL_LIBRARIES} -lhal-storage ${DBUS_TQT_LIBRARIES} )
endif( )
if( WITH_TDEHWLIB )
set( TDEHWBACKEND tdehardwarebackend.cpp )
endif( WITH_TDEHWLIB )
@ -60,7 +52,7 @@ tde_add_kpart( ${target} AUTOMOC
backendbase.cpp fstabbackend.cpp removablebackend.cpp
unlockdialog.ui dialog.cpp
mediadirnotify.cpp mediadirnotify.skel
${HAL_MEDIA_BACKEND} ${TDEHWBACKEND}
LINK mediacommon-static tdeinit_kded-shared ${TDEHW_LIBRARIES} ${HAL_MEDIA_LIBRARIES}
${TDEHWBACKEND}
LINK mediacommon-static tdeinit_kded-shared ${TDEHW_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)

17
tdeioslave/media/mediamanager/Makefile.am

@ -1,18 +1,7 @@
kde_module_LTLIBRARIES = kded_mediamanager.la
if include_media_halbackend
HALBACKEND_INCS = $(HAL_INCS) $(DBUS_INCS) $(DBUSTQT_INCS)
endif
METASOURCES = AUTO
INCLUDES = -I$(srcdir)/../libmediacommon -I../libmediacommon $(HALBACKEND_INCS) $(all_includes)
if include_media_halbackend
HALBACKEND_LIB = libhalbackend.la
libhalbackend_la_SOURCES = halbackend.cpp
libhalbackend_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
libhalbackend_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS) $(DBUSTQT_LIBS)
endif
INCLUDES = -I$(srcdir)/../libmediacommon -I../libmediacommon $(all_includes)
if include_media_linuxcdpolling
LINUXCDPOLLING_LIB = liblinuxcdpolling.la
@ -20,11 +9,11 @@ liblinuxcdpolling_la_SOURCES = linuxcdpolling.cpp
liblinuxcdpolling_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
endif
noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB) $(HALBACKEND_LIB)
noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB)
kded_mediamanager_la_SOURCES = mediamanager.cpp mediamanager.skel medialist.cpp backendbase.cpp fstabbackend.cpp removablebackend.cpp mediadirnotify.cpp mediadirnotify.skel
kded_mediamanager_la_LDFLAGS = $(all_libraries) -module -avoid-version
kded_mediamanager_la_LIBADD = $(LIB_TDESYCOCA) ../libmediacommon/libmediacommon.la $(HALBACKEND_LIB) $(LINUXCDPOLLING_LIB)
kded_mediamanager_la_LIBADD = $(LIB_TDESYCOCA) ../libmediacommon/libmediacommon.la $(LINUXCDPOLLING_LIB)
servicesdir = $(kde_servicesdir)/kded

1
tdeioslave/media/mediamanager/fstabbackend.cpp

@ -160,7 +160,6 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly)
|| mount->mountPoint().find("/sys") == 0
// We might want to display only network shares
// since HAL doesn't handle them
|| ( networkSharesOnly
&& mount->mountType().find( "smb" ) == -1
&& mount->mountType().find( "cifs" ) == -1

2000
tdeioslave/media/mediamanager/halbackend.cpp

File diff suppressed because it is too large Load Diff

233
tdeioslave/media/mediamanager/halbackend.h

@ -1,233 +0,0 @@
/* This file is part of the KDE Project
Copyright (c) 2004-2005 Jérôme Lodewyck <jerome dot lodewyck at normalesup dot org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/**
* This is a media:/ backend for the freedesktop Hardware Abstraction Layer
* Usage : create an instance of HALBackend, then call InitHal(). A false
* result from the later function means that something went wrong and that
* the backend shall not be used.
*
* @author Jérôme Lodewyck <jerome dot lodewyck at normalesup dot org>
* @short media:/ backend for the HAL
*/
#ifndef _HALBACKEND_H_
#define _HALBACKEND_H_
#include "backendbase.h"
#include <tqobject.h>
#include <tqstringlist.h>
#include <tqstring.h>
#include <tqregexp.h>
#include <config.h>
/* We acknowledge the the dbus API is unstable */
#define DBUS_API_SUBJECT_TO_CHANGE
/* DBus-Qt bindings */
#include <dbus/connection.h>
/* HAL libraries */
#include <libhal.h>
#include <libhal-storage.h>
namespace TDEIO {
class Job;
}
class HALBackend : public TQObject, public BackendBase
{
Q_OBJECT
public:
/**
* Constructor
*/
HALBackend(MediaList &list, TQObject* parent);
/**
* Destructor
*/
~HALBackend();
/**
* Perform HAL initialization.
*
* @return true if succeded. If not, rely on some other backend
*/
bool InitHal();
/**
* List all devices and append them to the media device list (called only once, at startup).
*
* @return true if succeded, false otherwise
*/
bool ListDevices();
TQStringList mountoptions(const TQString &id);
bool setMountoptions(const TQString &id, const TQStringList &options);
TQStringVariantMap mount(const TQString &id);
TQStringVariantMap mount(const Medium *medium);
TQStringVariantMap unmount(const TQString &id);
TQStringVariantMap unlock(const TQString &id, const TQString &password);
TQStringVariantMap lock(const TQString &id);
private:
/**
* Append a device in the media list. This function will check if the device
* is worth listing.
*
* @param udi Universal Device Id
* @param allowNotification Indicates if this event will be notified to the user
*/
void AddDevice(const char* udi, bool allowNotification=true);
/**
* Remove a device from the device list
*
* @param udi Universal Device Id
*/
void RemoveDevice(const char* udi);
/**
* A device has changed, update it
*
* @param udi Universal Device Id
*/
void ModifyDevice(const char *udi, const char* key);
/**
* HAL informed that a special action has occured
* (e.g. device unplugged without unmounting)
*
* @param udi Universal Device Id
*/
void DeviceCondition(const char *udi, const char *condition);
/**
* Integrate the DBus connection within qt main loop
*/
void MainLoopIntegration(DBusConnection *dbusConnection);
/* Set media properties */
private:
/**
* Reset properties for the given medium
*/
void ResetProperties(const char* MediumUdi, bool allowNotification=false);
/**
* Find the medium that is concerned with device udi
*/
const char* findMediumUdiFromUdi(const char* udi);
void setVolumeProperties(Medium* medium);
bool setFloppyProperties(Medium* medium);
void setFloppyMountState( Medium* medium );
bool setFstabProperties(Medium* medium);
void setCameraProperties(Medium* medium);
TQString generateName(const TQString &devNode);
static TQString isInFstab(const Medium *medium);
static TQString listUsingProcesses(const Medium *medium);
static TQString killUsingProcesses(const Medium *medium);
private slots:
void slotResult(TDEIO::Job *job);
/* Hal call-backs -- from gvm*/
public:
/** Invoked when a device is added to the Global Device List.
*
* @param ctx LibHal context
* @param udi Universal Device Id
*/
static void hal_device_added(LibHalContext *ctx, const char *udi);
/** Invoked when a device is removed from the Global Device List.
*
* @param ctx LibHal context
* @param udi Universal Device Id
*/
static void hal_device_removed(LibHalContext *ctx, const char *udi);
/** Invoked when a property of a device in the Global Device List is
* changed, and we have we have subscribed to changes for that device.
*
* @param ctx LibHal context
* @param udi Univerisal Device Id
* @param key Key of property
*/
static void hal_device_property_modified(LibHalContext *ctx, const char *udi, const char *key,
dbus_bool_t is_removed, dbus_bool_t is_added);
/** Type for callback when a non-continuos condition occurs on a device
*
* @param udi Univerisal Device Id
* @param condition_name Name of the condition
* @param message D-BUS message with variable parameters depending on condition
*/
static void hal_device_condition(LibHalContext *ctx, const char *udi,
const char *condition_name,
const char* message
);
TQStringList getHALmountoptions(TQString udi);
/* HAL and DBus structures */
private:
/**
* The HAL context connecting the whole application to the HAL
*/
LibHalContext* m_halContext;
/**
* libhal-storage HAL policy, e.g. for icon names
*/
LibHalStoragePolicy* m_halStoragePolicy;
/**
* The DBus-Qt bindings connection for mainloop integration
*/
DBusQt::Connection* m_dBusQtConnection;
/**
* Object for the kded module
*/
TQObject* m_parent;
DBusConnection *dbus_connection;
/**
* Data structure for fstab mount/unmount jobs
*/
struct mount_job_data {
// [in] Medium, which is being mounted/unmounted by the job
const Medium* medium;
// [in,out] Should be set to true when the job completes
bool completed;
// [out] TDEIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
TQString errorMessage;
};
TQMap<TDEIO::Job *, struct mount_job_data*> mount_jobs;
};
#endif /* _HALBACKEND_H_ */

100
tdeioslave/media/mediamanager/mediamanager.cpp

@ -36,10 +36,6 @@
#include "tdehardwarebackend.h"
#endif // COMPILE_TDEHARDWAREBACKEND
#ifdef COMPILE_HALBACKEND
#include "halbackend.h"
#endif //COMPILE_HALBACKEND
#ifdef COMPILE_LINUXCDPOLLING
#include "linuxcdpolling.h"
#endif //COMPILE_LINUXCDPOLLING
@ -80,33 +76,9 @@ void MediaManager::loadBackends()
}
mp_removableBackend = 0L;
m_halbackend = 0L;
m_tdebackend = 0L;
m_fstabbackend = 0L;
#ifdef COMPILE_HALBACKEND
if ( MediaManagerSettings::self()->halBackendEnabled() )
{
m_mediaList.blockSignals(false);
m_halbackend = new HALBackend(m_mediaList, this);
if (m_halbackend->InitHal())
{
m_backends.append( m_halbackend );
m_fstabbackend = new FstabBackend(m_mediaList, true);
m_backends.append( m_fstabbackend );
// No need to load something else...
m_mediaList.blockSignals(false);
return;
}
else
{
delete m_halbackend;
m_halbackend = 0;
m_mediaList.blockSignals(true);
}
}
#endif // COMPILE_HALBACKEND
#ifdef COMPILE_TDEHARDWAREBACKEND
if ( MediaManagerSettings::self()->tdeHardwareBackendEnabled() )
{
@ -216,36 +188,24 @@ TQStringList MediaManager::properties(const TQString &name)
TQStringList MediaManager::mountoptions(const TQString &name)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
return TQStringList();
return m_halbackend->mountoptions(name);
#else // COMPILE_HALBACKEND
#ifdef COMPILE_TDEHARDWAREBACKEND
if (!m_tdebackend)
return TQStringList();
return m_tdebackend->mountoptions(name);
#else // COMPILE_TDEHARDWAREBACKEND
#ifdef COMPILE_TDEHARDWAREBACKEND
if (!m_tdebackend)
return TQStringList();
#endif // COMPILE_TDEHARDWAREBACKEND
#endif // COMPILE_HALBACKEND
return m_tdebackend->mountoptions(name);