From a4a54d1ee3c220a7e698c96a11500a4eba22800a Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Mon, 6 Jan 2014 01:59:59 +0100 Subject: Rename kdeeject -> tdeeject --- CMakeLists.txt | 4 +- kdeeject/CMakeLists.txt | 12 ----- kdeeject/Makefile.am | 1 - kdeeject/kdeeject | 63 ---------------------- kdesktop/init/Templates/CDROM-Device.desktop | 2 +- kdesktop/init/Templates/CDWRITER-Device.desktop | 2 +- kdesktop/init/Templates/DVDROM-Device.desktop | 2 +- kdesktop/init/Templates/ZIP-Device.desktop | 2 +- tdeeject/CMakeLists.txt | 12 +++++ tdeeject/Makefile.am | 1 + tdeeject/tdeeject | 63 ++++++++++++++++++++++ .../media/mounthelper/tdeio_media_mounthelper.cpp | 6 +-- 12 files changed, 85 insertions(+), 85 deletions(-) delete mode 100644 kdeeject/CMakeLists.txt delete mode 100644 kdeeject/Makefile.am delete mode 100755 kdeeject/kdeeject create mode 100644 tdeeject/CMakeLists.txt create mode 100644 tdeeject/Makefile.am create mode 100755 tdeeject/tdeeject diff --git a/CMakeLists.txt b/CMakeLists.txt index 57cf4a860..d7504dc58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,7 @@ option( BUILD_TDEPRINT "Build tdeprint" ${BUILD_ALL} ) option( BUILD_KPERSONALIZER "Build kpersonalizer" ${BUILD_ALL} ) option( BUILD_TDEPASSWD "Build tdepasswd" ${BUILD_ALL} ) option( BUILD_KTIP "Build ktip" ${BUILD_ALL} ) -option( BUILD_KDEEJECT "Build kdeeject" ${BUILD_ALL} ) +option( BUILD_TDEEJECT "Build tdeeject" ${BUILD_ALL} ) option( BUILD_KDIALOG "Build kdialog" ${BUILD_ALL} ) option( BUILD_KREADCONFIG "Build kreadconfig" ${BUILD_ALL} ) option( BUILD_TDESU "Build tdesu" ${BUILD_ALL} ) @@ -240,7 +240,7 @@ tde_conditional_add_subdirectory( BUILD_TDEPRINT tdeprint ) tde_conditional_add_subdirectory( BUILD_KPERSONALIZER kpersonalizer ) tde_conditional_add_subdirectory( BUILD_TDEPASSWD tdepasswd ) tde_conditional_add_subdirectory( BUILD_KTIP ktip ) -tde_conditional_add_subdirectory( BUILD_KDEEJECT kdeeject ) +tde_conditional_add_subdirectory( BUILD_TDEEJECT tdeeject ) tde_conditional_add_subdirectory( BUILD_KDIALOG kdialog ) tde_conditional_add_subdirectory( BUILD_KREADCONFIG kreadconfig ) tde_conditional_add_subdirectory( BUILD_TDESU tdesu ) diff --git a/kdeeject/CMakeLists.txt b/kdeeject/CMakeLists.txt deleted file mode 100644 index 08f4ce9a3..000000000 --- a/kdeeject/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( PROGRAMS kdeeject DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kdeeject/Makefile.am b/kdeeject/Makefile.am deleted file mode 100644 index 9c4e42c8d..000000000 --- a/kdeeject/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -bin_SCRIPTS = kdeeject diff --git a/kdeeject/kdeeject b/kdeeject/kdeeject deleted file mode 100755 index b97ab5df6..000000000 --- a/kdeeject/kdeeject +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# Script used by kdesktop to eject a removable media (CDROM/Tape/SCSI/Floppy) -# Relies on the 'eject' program, 'cdcontrol' on *BSD -# -# Copyright GPL v2 by David Faure -# -quiet=0 -if test "$1" = "-q"; then - quiet=1 - shift -fi - -if test "$1" = "--help"; then - echo "Usage: $0 where name is a device or a mountpoint." - exit 0 -fi - -if test -z "$1"; then - for dev in /dev/cdrom /dev/dvd /dev/dvdram /dev/cdrecorder; do - if test -e $dev; then - lp=`readlink $dev` - if test -n "$lp"; then - device=/dev/$lp - else - device=$dev - fi - break - fi - done -else - device=$1 -fi - -udi=`dcop kded mediamanager properties $device 2>/dev/null | head -n 1 ` -if test -n "$udi"; then - dcop kded mediamanager unmount "$udi" >/dev/null 2>&1 -fi - -# Checking for stuff in the PATH is ugly with sh. -# I guess this is the reason for making this a kde app... -OS=`uname -s` -case "$OS" in - OpenBSD) - cdio -f $device eject #>/dev/null 2>&1 - ;; - *BSD) - dev=`echo $device | sed -E -e 's#/dev/##' -e 's/([0-9])./\1/'` - cdcontrol -f $dev eject #>/dev/null 2>&1 - ;; - *) - # Warning, it has to be either eject 2.0.x or >=2.1.5 - # Otherwise it doesn't work as expected (it requires a - # fstab entry for no reason). - eject -v $device #>/dev/null 2>&1 - ;; -esac -if test $? -eq 0; then - #dcop kdesktop default refreshIcons - exit 0 -elif test $quiet -eq 0; then - kdialog --title "KDE Eject" --error "Eject $device failed!" -fi -exit 1 diff --git a/kdesktop/init/Templates/CDROM-Device.desktop b/kdesktop/init/Templates/CDROM-Device.desktop index edb19d8a1..b4201f447 100644 --- a/kdesktop/init/Templates/CDROM-Device.desktop +++ b/kdesktop/init/Templates/CDROM-Device.desktop @@ -89,4 +89,4 @@ Name[xh]=Khuphela ngaphandle Name[zh_CN]=弹出 Name[zh_TW]=退出 Name[zu]=Khipha -Exec=kdeeject %v +Exec=tdeeject %v diff --git a/kdesktop/init/Templates/CDWRITER-Device.desktop b/kdesktop/init/Templates/CDWRITER-Device.desktop index 13758ef9d..77c5d0774 100644 --- a/kdesktop/init/Templates/CDWRITER-Device.desktop +++ b/kdesktop/init/Templates/CDWRITER-Device.desktop @@ -89,4 +89,4 @@ Name[xh]=Khuphela ngaphandle Name[zh_CN]=弹出 Name[zh_TW]=退出 Name[zu]=Khipha -Exec=kdeeject %v +Exec=tdeeject %v diff --git a/kdesktop/init/Templates/DVDROM-Device.desktop b/kdesktop/init/Templates/DVDROM-Device.desktop index 005c19945..d4f272c43 100644 --- a/kdesktop/init/Templates/DVDROM-Device.desktop +++ b/kdesktop/init/Templates/DVDROM-Device.desktop @@ -89,4 +89,4 @@ Name[xh]=Khuphela ngaphandle Name[zh_CN]=弹出 Name[zh_TW]=退出 Name[zu]=Khipha -Exec=kdeeject %v +Exec=tdeeject %v diff --git a/kdesktop/init/Templates/ZIP-Device.desktop b/kdesktop/init/Templates/ZIP-Device.desktop index a93bb71c3..bec34fe73 100644 --- a/kdesktop/init/Templates/ZIP-Device.desktop +++ b/kdesktop/init/Templates/ZIP-Device.desktop @@ -89,4 +89,4 @@ Name[xh]=Khuphela ngaphandle Name[zh_CN]=弹出 Name[zh_TW]=退出 Name[zu]=Khipha -Exec=kdeeject %v +Exec=tdeeject %v diff --git a/tdeeject/CMakeLists.txt b/tdeeject/CMakeLists.txt new file mode 100644 index 000000000..dc57412ec --- /dev/null +++ b/tdeeject/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 +# +################################################# + +install( PROGRAMS tdeeject DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/tdeeject/Makefile.am b/tdeeject/Makefile.am new file mode 100644 index 000000000..dd6d3982d --- /dev/null +++ b/tdeeject/Makefile.am @@ -0,0 +1 @@ +bin_SCRIPTS = tdeeject diff --git a/tdeeject/tdeeject b/tdeeject/tdeeject new file mode 100755 index 000000000..7adb15570 --- /dev/null +++ b/tdeeject/tdeeject @@ -0,0 +1,63 @@ +#!/bin/sh +# Script used by kdesktop to eject a removable media (CDROM/Tape/SCSI/Floppy) +# Relies on the 'eject' program, 'cdcontrol' on *BSD +# +# Copyright GPL v2 by David Faure +# +quiet=0 +if test "$1" = "-q"; then + quiet=1 + shift +fi + +if test "$1" = "--help"; then + echo "Usage: $0 where name is a device or a mountpoint." + exit 0 +fi + +if test -z "$1"; then + for dev in /dev/cdrom /dev/dvd /dev/dvdram /dev/cdrecorder; do + if test -e $dev; then + lp=`readlink $dev` + if test -n "$lp"; then + device=/dev/$lp + else + device=$dev + fi + break + fi + done +else + device=$1 +fi + +udi=`dcop kded mediamanager properties $device 2>/dev/null | head -n 1 ` +if test -n "$udi"; then + dcop kded mediamanager unmount "$udi" >/dev/null 2>&1 +fi + +# Checking for stuff in the PATH is ugly with sh. +# I guess this is the reason for making this a TDE app... +OS=`uname -s` +case "$OS" in + OpenBSD) + cdio -f $device eject #>/dev/null 2>&1 + ;; + *BSD) + dev=`echo $device | sed -E -e 's#/dev/##' -e 's/([0-9])./\1/'` + cdcontrol -f $dev eject #>/dev/null 2>&1 + ;; + *) + # Warning, it has to be either eject 2.0.x or >=2.1.5 + # Otherwise it doesn't work as expected (it requires a + # fstab entry for no reason). + eject -v $device #>/dev/null 2>&1 + ;; +esac +if test $? -eq 0; then + #dcop kdesktop default refreshIcons + exit 0 +elif test $quiet -eq 0; then + kdialog --title "TDE Eject" --error "Eject $device failed!" +fi +exit 1 diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index b07705373..5357bc68d 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -198,9 +198,9 @@ void MountHelper::invokeEject(const TQString &device, bool quiet) } } - // Then fall back to kdeeject if needed + // Then fall back to tdeeject if needed TDEProcess *proc = new TDEProcess(TQT_TQOBJECT(this)); - *proc << "kdeeject"; + *proc << "tdeeject"; if (quiet) { *proc << "-q"; @@ -271,7 +271,7 @@ static TDECmdLineOptions options[] = { "d", I18N_NOOP("Decrypt given URL"), 0 }, { "u", I18N_NOOP("Unmount given URL"), 0 }, { "m", I18N_NOOP("Mount given URL (default)"), 0 }, - { "e", I18N_NOOP("Eject given URL via kdeeject"), 0}, + { "e", I18N_NOOP("Eject given URL via tdeeject"), 0}, { "s", I18N_NOOP("Unmount and Eject given URL (necessary for some USB devices)"), 0}, {"!+URL", I18N_NOOP("media:/ URL to mount/unmount/eject/remove"), 0 }, TDECmdLineLastOption -- cgit v1.2.1