diff options
40 files changed, 363 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e0caad5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,77 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( krename ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( ${PROJECT_NAME} ) +tde_conditional_add_subdirectory( BUILD_DOC doc ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..7733a2a --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,45 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + if( NOT UNIX ) + tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" ) + endif( NOT UNIX ) + set( __KDE_HAVE_GCC_VISIBILITY 1 ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") +endif( WITH_GCC_VISIBILITY ) + + +##### gettext + +if( BUILD_TRANSLATIONS ) + include( FindGettext ) + if( GETTEXT_FOUND ) + set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE} + CACHE FILEPATH "path to msgfmt executable" ) + endif( GETTEXT_FOUND ) + + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt is required but was not found on your system." ) + endif( NOT MSGFMT_EXECUTABLE ) +endif( BUILD_TRANSLATIONS ) + diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..6d0aa9f --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories( ) diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt new file mode 100644 index 0000000..6e55658 --- /dev/null +++ b/doc/en/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory( HTML ) diff --git a/doc/en/HTML/CMakeLists.txt b/doc/en/HTML/CMakeLists.txt new file mode 100644 index 0000000..efd0958 --- /dev/null +++ b/doc/en/HTML/CMakeLists.txt @@ -0,0 +1,4 @@ +install( + FILES index.html + DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME} +) diff --git a/doc/en/HTML/index.html b/doc/en/HTML/index.html index dac77b7..93d62dc 100644 --- a/doc/en/HTML/index.html +++ b/doc/en/HTML/index.html @@ -43,7 +43,7 @@ <div> <p><h3>Introduction</h3></p> <p> - KRename is a batch renamer or a mass renamer, how it is called by a few people, for KDE. A batch renamer takes a list of files and renames them all at once using a given set of expressions. KRename has lot's of features which makes the renaming easier. + KRename is a batch renamer or a mass renamer, how it is called by a few people, for TDE. A batch renamer takes a list of files and renames them all at once using a given set of expressions. KRename has lot's of features which makes the renaming easier. </p> <p> First of all there is the powerful GUI with two GUI modes: One mode (called wizard-mode) is for first time KRename users witch only want to do simple tasks and the other mode (called tabbedmode) shows the full power of KRename and allows you to do allmost everything with your filenames. But there is much more than only the GUI. KRename supports all of the great KDE technologies, like TDEIO-Slaves, which allow to rename files almost everywhere (on ftp:// servers, over fish:// or on smb:// shares), DCOP, giving you easy scripting access to KRename, and the powerful KDE file plugins. Thanks to the file plugins of KDE, KRename can access information, such as the interpret of a mp3 or ogg file or the creation date of a jpeg image. diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt new file mode 100644 index 0000000..8512250 --- /dev/null +++ b/doc/man/CMakeLists.txt @@ -0,0 +1,5 @@ +INSTALL( + FILES ${PROJECT_NAME}.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 + COMPONENT doc +) diff --git a/doc/man/krename.1 b/doc/man/krename.1 new file mode 100644 index 0000000..e8f0072 --- /dev/null +++ b/doc/man/krename.1 @@ -0,0 +1,87 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. +.TH QT: "1" "September 2005" "Qt: 3.3.5" "User Commands" +.SH NAME +Qt: \- manual page for Qt: 3.3.5 +.SH SYNOPSIS +.B krename +[\fIQt-options\fR] [\fITDE-options\fR] [\fIfile\fR] +.SH DESCRIPTION +KRename is a batch file renamer which can rename a +list of files based on a set of expressions. +.PP +If you like KRename you may want to support it. +Testing, bug fixes and feature request are as welcome +as financial support (everybody needs money ;) +See help files for details. +.SS "Generic options:" +.TP +\fB\-\-help\fR +Show help about options +.TP +\fB\-\-help\-qt\fR +Show Qt specific options +.TP +\fB\-\-help\-tde\fR +Show TDE specific options +.TP +\fB\-\-help\-all\fR +Show all options +.TP +\fB\-\-author\fR +Show author information +.TP +\fB\-v\fR, \fB\-\-version\fR +Show version information +.TP +\fB\-\-license\fR +Show license information +.TP +\fB\-\-\fR +End of options +.SS "Arguments:" +.TP +file +file will be added to the list of files for renaming +.SH OPTIONS +.TP +\fB\-r\fR +[dir] +add directory recursively +.TP +\fB\-\-template\fR + +set a template +.TP +\fB\-\-extension\fR + +set a template for the file extension +.TP +\fB\-\-use\-plugin\fR + +enable a plugin for use +.TP +\fB\-\-copy\fR +[dir] +copy files to directory +.TP +\fB\-\-move\fR +[dir] +move files to directory +.TP +\fB\-\-profile\fR +[profile] +load the profile named [profile] on startup +.TP +\fB\-\-start\fR +start renaming immediately +.TP +\fB\-\-nopreview\fR +create no realtime preview +.PP +KDE: 3.4.2 +KRename: 3.0.8 +.SH "SEE ALSO" +The full documentation for +.B Qt: +is maintained as a Texinfo manual. If the +.B info +and +.B Qt: +programs are properly installed at your site, the command +.IP +.B info Qt: +.PP +should give you access to the complete manual. diff --git a/krename/CMakeLists.txt b/krename/CMakeLists.txt new file mode 100644 index 0000000..35b015b --- /dev/null +++ b/krename/CMakeLists.txt @@ -0,0 +1,92 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### krename (executable) + +tde_add_executable( ${PROJECT_NAME} AUTOMOC + + SOURCES + guimodeselector.cpp + firststartdlg.cpp + tabs.cpp + krenameimpl.cpp + numberdialog.cpp + coorddialog.cpp + commandplugin.cpp + helpdialog.cpp + pictureplugin.cpp + mydirplugin.cpp + datetime.cpp + permission.cpp + fileplugin.cpp + undodialog.cpp + myinputdialog.cpp + kmylistview.cpp + wizard.cpp + replacedialog.cpp + pluginloader.cpp + plugin.cpp + kmylistbox.cpp + kmyhistorycombo.cpp + fileoperation.cpp + confdialog.cpp + batchrenamer.cpp + ProgressDialog.cpp + main.cpp + krecursivelister.cpp + dsdirselectdialog.cpp + krenamedcop.skel + dateplugin.cpp + encodingplugin.cpp + profiledlg.cpp + threadedlister.cpp + translitplugin.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( ${PROJECT_NAME} ) + + +##### other data + +install( + FILES ${PROJECT_NAME}.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} +) + +install( + FILES + krenameservicemenu.desktop + krename_dir.desktop + + DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus +) + +install( + FILES + logo.png + krename_system_default_tabbed.xml + krename_system_default_wizard.xml + + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) diff --git a/krename/ProgressDialog.cpp b/krename/ProgressDialog.cpp index bbcc980..d7b4eed 100644 --- a/krename/ProgressDialog.cpp +++ b/krename/ProgressDialog.cpp @@ -350,3 +350,5 @@ void ProgressDialog::slotTimer() { kapp->processEvents( 0 ); } + +#include "ProgressDialog.moc" diff --git a/krename/commandplugin.cpp b/krename/commandplugin.cpp index d12d4bb..9f8d6a1 100644 --- a/krename/commandplugin.cpp +++ b/krename/commandplugin.cpp @@ -189,3 +189,4 @@ const TQPixmap CommandPlugin::getIcon() const return kapp->iconLoader()->loadIcon( "konsole", TDEIcon::Small ); } +#include "commandplugin.moc" diff --git a/krename/confdialog.cpp b/krename/confdialog.cpp index 25a235a..07a7794 100644 --- a/krename/confdialog.cpp +++ b/krename/confdialog.cpp @@ -107,3 +107,4 @@ void ConfDialog::defaults() spinSize->setValue( 80 ); } +#include "confdialog.moc" diff --git a/krename/coorddialog.cpp b/krename/coorddialog.cpp index 959c969..818fd55 100644 --- a/krename/coorddialog.cpp +++ b/krename/coorddialog.cpp @@ -140,3 +140,5 @@ TQString CoordDialog::coords() m_inversion = checkInvert->isChecked(); return m_command; } + +#include "coorddialog.moc" diff --git a/krename/dateplugin.cpp b/krename/dateplugin.cpp index 31522d2..e41cce5 100644 --- a/krename/dateplugin.cpp +++ b/krename/dateplugin.cpp @@ -151,3 +151,5 @@ void DatePlugin::addHelp( HelpDialogData* data ) data->add( getName(), &list, getIcon() ); } + +#include "dateplugin.moc" diff --git a/krename/datetime.cpp b/krename/datetime.cpp index 457503f..46f8aa3 100644 --- a/krename/datetime.cpp +++ b/krename/datetime.cpp @@ -234,5 +234,5 @@ void MyDatePlugin::changeDT() kDate->setDate( TQDate::currentDate() ); } - +#include "datetime.moc" diff --git a/krename/encodingplugin.cpp b/krename/encodingplugin.cpp index 3d12fb3..4c3018a 100644 --- a/krename/encodingplugin.cpp +++ b/krename/encodingplugin.cpp @@ -142,3 +142,5 @@ void EncodingPlugin::setLocale( KComboBox* combo ) break; } } + +#include "encodingplugin.moc" diff --git a/krename/fileoperation.cpp b/krename/fileoperation.cpp index ffe8065..18d2813 100644 --- a/krename/fileoperation.cpp +++ b/krename/fileoperation.cpp @@ -110,3 +110,4 @@ void FileOperation::slotResult( TDEIO::Job * job ) kapp->eventLoop()->exitLoop(); } +#include "fileoperation.moc" diff --git a/krename/fileplugin.cpp b/krename/fileplugin.cpp index 4ed83b9..683fa9f 100644 --- a/krename/fileplugin.cpp +++ b/krename/fileplugin.cpp @@ -211,3 +211,5 @@ void FilePlugin::clearCache() { cache.clear(); } + +#include "fileplugin.moc" diff --git a/krename/firststartdlg.cpp b/krename/firststartdlg.cpp index e500c7f..eda5b31 100644 --- a/krename/firststartdlg.cpp +++ b/krename/firststartdlg.cpp @@ -31,3 +31,4 @@ FirstStartDlg::~FirstStartDlg() { } +#include "firststartdlg.moc" diff --git a/krename/helpdialog.cpp b/krename/helpdialog.cpp index 9a0d444..64a4809 100644 --- a/krename/helpdialog.cpp +++ b/krename/helpdialog.cpp @@ -149,3 +149,4 @@ void HelpDialog::updateHeadline() comboHeadline->insertItem( ic[it.key()], it.key() ); } +#include "helpdialog.moc" diff --git a/krename/kmyhistorycombo.cpp b/krename/kmyhistorycombo.cpp index 32724fb..1f7f112 100644 --- a/krename/kmyhistorycombo.cpp +++ b/krename/kmyhistorycombo.cpp @@ -165,3 +165,5 @@ void KMyHistoryCombo::slotInsertKRenameCommand( int id ) if( !t.isEmpty() ) this->lineEdit()->insert( t ); } + +#include "kmyhistorycombo.moc" diff --git a/krename/kmylistbox.cpp b/krename/kmylistbox.cpp index ca8e408..77bf6a7 100644 --- a/krename/kmylistbox.cpp +++ b/krename/kmylistbox.cpp @@ -837,3 +837,4 @@ TQString KMyListBoxItem::text() const bool KMyListBoxItem::m_preview = false; bool KMyListBoxItem::m_name = false; +#include "kmylistbox.moc" diff --git a/krename/kmylistview.cpp b/krename/kmylistview.cpp index ce683d2..bb4f972 100644 --- a/krename/kmylistview.cpp +++ b/krename/kmylistview.cpp @@ -175,3 +175,4 @@ void KMyListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, _cg.setColor( TQColorGroup::Text, c ); } +#include "kmylistview.moc" diff --git a/krename/krenameimpl.cpp b/krename/krenameimpl.cpp index bf41490..d9aa3ed 100644 --- a/krename/krenameimpl.cpp +++ b/krename/krenameimpl.cpp @@ -1834,3 +1834,5 @@ void KRenameImpl::slotEasy4() { getHelpDialogString( comboCustomExtension->lineEdit() ); } + +#include "krenameimpl.moc" diff --git a/krename/mydirplugin.cpp b/krename/mydirplugin.cpp index eaa3723..fd877ef 100644 --- a/krename/mydirplugin.cpp +++ b/krename/mydirplugin.cpp @@ -167,3 +167,4 @@ void MyDirPlugin::chooseDir() outputdir->setText( s ); } +#include "mydirplugin.moc" diff --git a/krename/myinputdialog.cpp b/krename/myinputdialog.cpp index 83a4833..8c9a272 100644 --- a/krename/myinputdialog.cpp +++ b/krename/myinputdialog.cpp @@ -107,3 +107,4 @@ void MyInputDialog::slotFilename() text->setText( m_oldfilename ); } +#include "myinputdialog.moc" diff --git a/krename/numberdialog.cpp b/krename/numberdialog.cpp index aa54a75..661e713 100644 --- a/krename/numberdialog.cpp +++ b/krename/numberdialog.cpp @@ -169,3 +169,5 @@ void NumberDialog::sort() } } } + +#include "numberdialog.moc" diff --git a/krename/permission.cpp b/krename/permission.cpp index e7ef157..c56900d 100644 --- a/krename/permission.cpp +++ b/krename/permission.cpp @@ -326,4 +326,4 @@ const TQPixmap MyPermPlugin::getIcon() const return kapp->iconLoader()->loadIcon( "clanbomber", TDEIcon::Small ); } - +#include "permission.moc" diff --git a/krename/pictureplugin.cpp b/krename/pictureplugin.cpp index 14ea5af..79906ae 100644 --- a/krename/pictureplugin.cpp +++ b/krename/pictureplugin.cpp @@ -95,4 +95,4 @@ TQString PicturePlugin::processFile( BatchRenamer* b, int i, TQString token, int return ret; } - +#include "pictureplugin.moc" diff --git a/krename/plugin.cpp b/krename/plugin.cpp index 10bca7d..8dade82 100644 --- a/krename/plugin.cpp +++ b/krename/plugin.cpp @@ -60,3 +60,5 @@ void Plugin::clearCache() { // do nothing... } + +#include "plugin.moc" diff --git a/krename/pluginloader.cpp b/krename/pluginloader.cpp index a6c8fd7..234763e 100644 --- a/krename/pluginloader.cpp +++ b/krename/pluginloader.cpp @@ -177,3 +177,5 @@ void PluginLoader::loadFilePlugins() m_file = true; } + +#include "pluginloader.moc" diff --git a/krename/replacedialog.cpp b/krename/replacedialog.cpp index 1f7796a..85db862 100644 --- a/krename/replacedialog.cpp +++ b/krename/replacedialog.cpp @@ -255,3 +255,5 @@ void ReplaceDialog::slotEdit() enableControls(); } + +#include "replacedialog.moc" diff --git a/krename/tabs.cpp b/krename/tabs.cpp index 79fb5cd..2cfbf3d 100644 --- a/krename/tabs.cpp +++ b/krename/tabs.cpp @@ -118,3 +118,5 @@ void tabs::keyPressEvent( TQKeyEvent *e ) else e->ignore(); } + +#include "tabs.moc" diff --git a/krename/translitplugin.cpp b/krename/translitplugin.cpp index a199e6b..ce11013 100644 --- a/krename/translitplugin.cpp +++ b/krename/translitplugin.cpp @@ -10,7 +10,7 @@ // // #include "translitplugin.h" -#include "translitplugin.moc" + const TQString TranslitPlugin::m_strUtf8[] = {"а","б","в","г","д","е","ё","ж","з","и", "й","к","л","м","н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ","ъ","ы","ь", @@ -104,3 +104,5 @@ TranslitPlugin::TranslitPlugin() { m_mapFromUTF8[src] = dst; } } + +#include "translitplugin.moc" diff --git a/krename/undodialog.cpp b/krename/undodialog.cpp index 43b52af..7930407 100644 --- a/krename/undodialog.cpp +++ b/krename/undodialog.cpp @@ -131,6 +131,6 @@ void UndoDialog::setUndoScript( const TQString & filename ) scriptname->setURL( filename ); } - +#include "undodialog.moc" diff --git a/krename/wizard.cpp b/krename/wizard.cpp index cca96fc..9796de4 100644 --- a/krename/wizard.cpp +++ b/krename/wizard.cpp @@ -104,3 +104,4 @@ void wizard::accept() /** do nothing */ } +#include "wizard.moc" diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..f5a2e1b --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1 @@ +tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} ) diff --git a/po/zh_CN.GB2312.po b/po/zh_CN.po index f93d81b..f93d81b 100644 --- a/po/zh_CN.GB2312.po +++ b/po/zh_CN.po diff --git a/po/zh_TW.Big5.po b/po/zh_TW.po index aa9dab4..aa9dab4 100644 --- a/po/zh_TW.Big5.po +++ b/po/zh_TW.po |