diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 17 | ||||
-rw-r--r-- | src/Makefile.am~ | 17 | ||||
-rw-r--r-- | src/Makefile.in | 906 | ||||
-rw-r--r-- | src/app.cpp | 233 | ||||
-rw-r--r-- | src/app.cpp~ | 212 | ||||
-rw-r--r-- | src/app.h | 54 | ||||
-rw-r--r-- | src/app.h~ | 34 | ||||
-rw-r--r-- | src/app.lsm | 16 | ||||
-rw-r--r-- | src/app.protocol | 18 | ||||
-rw-r--r-- | src/app.protocol~ | 18 | ||||
-rw-r--r-- | src/appimpl.cpp | 699 | ||||
-rw-r--r-- | src/appimpl.cpp~ | 700 | ||||
-rw-r--r-- | src/appimpl.h | 107 | ||||
-rw-r--r-- | src/appimpl.h~ | 107 | ||||
-rw-r--r-- | src/appinfo.protocol | 18 | ||||
-rw-r--r-- | src/appinfo.protocol~ | 18 | ||||
-rw-r--r-- | src/icons/Makefile.am | 5 | ||||
-rw-r--r-- | src/icons/Makefile.am~ | 5 | ||||
-rw-r--r-- | src/icons/Makefile.in | 578 | ||||
-rw-r--r-- | src/icons/binaryfolder.png~ | bin | 0 -> 8199 bytes | |||
-rw-r--r-- | src/icons/cachefolder.png~ | bin | 0 -> 8690 bytes | |||
-rw-r--r-- | src/icons/configfolder.png~ | bin | 0 -> 4897 bytes | |||
-rw-r--r-- | src/icons/hi64-action-binaryfolder.png | bin | 0 -> 9287 bytes | |||
-rw-r--r-- | src/icons/hi64-action-cachefolder.png | bin | 0 -> 8630 bytes | |||
-rw-r--r-- | src/icons/hi64-action-configfolder.png | bin | 0 -> 8715 bytes | |||
-rw-r--r-- | src/icons/hi64-action-tmpfolder.png | bin | 0 -> 8641 bytes |
26 files changed, 3762 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..3cc2fa3 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,17 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO + +SUBDIRS = icons + +kde_module_LTLIBRARIES = kio_app.la + +kio_app_la_SOURCES = app.cpp appimpl.cpp +kio_app_la_LIBADD = -lkio +kio_app_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) + +protocol_DATA = app.protocol appinfo.protocol +protocoldir = $(kde_servicesdir) + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kio_app.pot diff --git a/src/Makefile.am~ b/src/Makefile.am~ new file mode 100644 index 0000000..c6e895c --- /dev/null +++ b/src/Makefile.am~ @@ -0,0 +1,17 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO + +SUBDIRS = icons + +kde_module_LTLIBRARIES = kio_app.la + +kio_app_la_SOURCES = app.cpp appimpl.cpp +kio_app_la_LIBADD = -lkio +kio_app_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) + +protocol_DATA = app.protocol +protocoldir = $(kde_servicesdir) + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kio_app.pot diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..2c2327f --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,906 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# KDE tags expanded automatically by am_edit - $Revision: 483858 $ +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(kde_moduledir)" \ + "$(DESTDIR)$(protocoldir)" +kde_moduleLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(kde_module_LTLIBRARIES) +kio_app_la_DEPENDENCIES = +am_kio_app_la_OBJECTS = app.lo appimpl.lo +#>- kio_app_la_OBJECTS = $(am_kio_app_la_OBJECTS) +#>+ 4 +kio_app_la_final_OBJECTS = kio_app_la.all_cpp.lo +kio_app_la_nofinal_OBJECTS = app.lo appimpl.lo +@KDE_USE_FINAL_FALSE@kio_app_la_OBJECTS = $(kio_app_la_nofinal_OBJECTS) +@KDE_USE_FINAL_TRUE@kio_app_la_OBJECTS = $(kio_app_la_final_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/admin/depcomp +am__depfiles_maybe = depfiles +#>- CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +#>- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +#>+ 2 +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) +#>- LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ +#>- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ +#>- $(AM_CXXFLAGS) $(CXXFLAGS) +#>+ 3 +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) +CXXLD = $(CXX) +#>- CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +#>- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +#>+ 2 +CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(KDE_CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(kio_app_la_SOURCES) +DIST_SOURCES = $(kio_app_la_SOURCES) +#>- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ +#>- html-recursive info-recursive install-data-recursive \ +#>- install-exec-recursive install-info-recursive \ +#>- install-recursive installcheck-recursive installdirs-recursive \ +#>- pdf-recursive ps-recursive uninstall-info-recursive \ +#>- uninstall-recursive +#>+ 6 +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive nmcheck-recursive bcheck-recursive +protocolDATA_INSTALL = $(INSTALL_DATA) +DATA = $(protocol_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +#>+ 1 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +ARTSCCONFIG = @ARTSCCONFIG@ +AUTOCONF = @AUTOCONF@ +AUTODIRS = @AUTODIRS@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONF_FILES = @CONF_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCOPIDL = @DCOPIDL@ +DCOPIDL2CPP = @DCOPIDL2CPP@ +DCOPIDLNG = @DCOPIDLNG@ +DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@ +KCONFIG_COMPILER = @KCONFIG_COMPILER@ +KDECONFIG = @KDECONFIG@ +KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@ +KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@ +KDE_INCLUDES = @KDE_INCLUDES@ +KDE_LDFLAGS = @KDE_LDFLAGS@ +KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@ +KDE_MT_LIBS = @KDE_MT_LIBS@ +KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@ +KDE_PLUGIN = @KDE_PLUGIN@ +KDE_RPATH = @KDE_RPATH@ +KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@ +KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@ +KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@ +KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@ +KDE_USE_FPIE = @KDE_USE_FPIE@ +KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@ +KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@ +KDE_USE_PIE = @KDE_USE_PIE@ +KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@ +LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@ +LIBCOMPAT = @LIBCOMPAT@ +LIBCRYPT = @LIBCRYPT@ +LIBDL = @LIBDL@ +LIBJPEG = @LIBJPEG@ +LIBOBJS = @LIBOBJS@ +LIBPNG = @LIBPNG@ +LIBPTHREAD = @LIBPTHREAD@ +LIBRESOLV = @LIBRESOLV@ +LIBS = @LIBS@ +LIBSM = @LIBSM@ +LIBSOCKET = @LIBSOCKET@ +LIBTOOL = @LIBTOOL@ +LIBUCB = @LIBUCB@ +LIBUTIL = @LIBUTIL@ +LIBZ = @LIBZ@ +LIB_KAB = @LIB_KAB@ +LIB_KABC = @LIB_KABC@ +LIB_KDECORE = @LIB_KDECORE@ +LIB_KDED = @LIB_KDED@ +LIB_KDEPIM = @LIB_KDEPIM@ +LIB_KDEPRINT = @LIB_KDEPRINT@ +LIB_KDEUI = @LIB_KDEUI@ +LIB_KDNSSD = @LIB_KDNSSD@ +LIB_KFILE = @LIB_KFILE@ +LIB_KFM = @LIB_KFM@ +LIB_KHTML = @LIB_KHTML@ +LIB_KIMPROXY = @LIB_KIMPROXY@ +LIB_KIO = @LIB_KIO@ +LIB_KJS = @LIB_KJS@ +LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +LIB_KPARTS = @LIB_KPARTS@ +LIB_KSPELL = @LIB_KSPELL@ +LIB_KSYCOCA = @LIB_KSYCOCA@ +LIB_KUNITTEST = @LIB_KUNITTEST@ +LIB_KUTILS = @LIB_KUTILS@ +LIB_POLL = @LIB_POLL@ +LIB_QPE = @LIB_QPE@ +LIB_QT = @LIB_QT@ +LIB_SMB = @LIB_SMB@ +LIB_X11 = @LIB_X11@ +LIB_XEXT = @LIB_XEXT@ +LIB_XRENDER = @LIB_XRENDER@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ +MCOPIDL = @MCOPIDL@ +MEINPROC = @MEINPROC@ +MOC = @MOC@ +MSGFMT = @MSGFMT@ +NOOPT_CFLAGS = @NOOPT_CFLAGS@ +NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +QTE_NORTTI = @QTE_NORTTI@ +QT_INCLUDES = @QT_INCLUDES@ +QT_LDFLAGS = @QT_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TOPSUBDIRS = @TOPSUBDIRS@ +UIC = @UIC@ +UIC_TR = @UIC_TR@ +USER_INCLUDES = @USER_INCLUDES@ +USER_LDFLAGS = @USER_LDFLAGS@ +USE_EXCEPTIONS = @USE_EXCEPTIONS@ +USE_RTTI = @USE_RTTI@ +USE_THREADS = @USE_THREADS@ +VERSION = @VERSION@ +WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ +XGETTEXT = @XGETTEXT@ +XMKMF = @XMKMF@ +XMLLINT = @XMLLINT@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_INCLUDES = @X_INCLUDES@ +X_LDFLAGS = @X_LDFLAGS@ +X_PRE_LIBS = @X_PRE_LIBS@ +X_RPATH = @X_RPATH@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +all_includes = @all_includes@ +all_libraries = @all_libraries@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +include_ARTS_FALSE = @include_ARTS_FALSE@ +include_ARTS_TRUE = @include_ARTS_TRUE@ +include_x11_FALSE = @include_x11_FALSE@ +include_x11_TRUE = @include_x11_TRUE@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kde_appsdir = @kde_appsdir@ +kde_bindir = @kde_bindir@ +kde_confdir = @kde_confdir@ +kde_datadir = @kde_datadir@ +kde_htmldir = @kde_htmldir@ +kde_icondir = @kde_icondir@ +kde_includes = @kde_includes@ +kde_kcfgdir = @kde_kcfgdir@ +kde_libraries = @kde_libraries@ +kde_libs_htmldir = @kde_libs_htmldir@ +kde_libs_prefix = @kde_libs_prefix@ +kde_locale = @kde_locale@ +kde_mimedir = @kde_mimedir@ +kde_moduledir = @kde_moduledir@ +kde_qtver = @kde_qtver@ +kde_servicesdir = @kde_servicesdir@ +kde_servicetypesdir = @kde_servicetypesdir@ +kde_sounddir = @kde_sounddir@ +kde_styledir = @kde_styledir@ +kde_templatesdir = @kde_templatesdir@ +kde_wallpaperdir = @kde_wallpaperdir@ +kde_widgetdir = @kde_widgetdir@ +kdeinitdir = @kdeinitdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +qt_includes = @qt_includes@ +qt_libraries = @qt_libraries@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ +x_includes = @x_includes@ +x_libraries = @x_libraries@ +xdg_appsdir = @xdg_appsdir@ +xdg_directorydir = @xdg_directorydir@ +xdg_menudir = @xdg_menudir@ +INCLUDES = $(all_includes) +#>- METASOURCES = AUTO +SUBDIRS = icons +kde_module_LTLIBRARIES = kio_app.la +kio_app_la_SOURCES = app.cpp appimpl.cpp +kio_app_la_LIBADD = -lkio +kio_app_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) +protocol_DATA = app.protocol appinfo.protocol +protocoldir = $(kde_servicesdir) +#>- all: all-recursive +#>+ 1 +all: docs-am all-recursive + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +#>- @for dep in $?; do \ +#>- case '$(am__configure_deps)' in \ +#>- *$$dep*) \ +#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +#>- && exit 0; \ +#>- exit 1;; \ +#>- esac; \ +#>- done; \ +#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ +#>- cd $(top_srcdir) && \ +#>- $(AUTOMAKE) --gnu src/Makefile +#>+ 12 + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile + cd $(top_srcdir) && perl admin/am_edit src/Makefile.in +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-kde_moduleLTLIBRARIES: $(kde_module_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(kde_moduledir)" || $(mkdir_p) "$(DESTDIR)$(kde_moduledir)" + @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(kde_moduledir)/$$f'"; \ + $(LIBTOOL) --mode=install $(kde_moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(kde_moduledir)/$$f"; \ + else :; fi; \ + done + +uninstall-kde_moduleLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(kde_moduledir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(kde_moduledir)/$$p"; \ + done + +clean-kde_moduleLTLIBRARIES: + -test -z "$(kde_module_LTLIBRARIES)" || rm -f $(kde_module_LTLIBRARIES) + @list='$(kde_module_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +#>- kio_app.la: $(kio_app_la_OBJECTS) $(kio_app_la_DEPENDENCIES) +#>+ 2 +@KDE_USE_CLOSURE_TRUE@kio_app.la: kio_app.la.closure $(kio_app_la_OBJECTS) $(kio_app_la_DEPENDENCIES) +@KDE_USE_CLOSURE_FALSE@kio_app.la: $(kio_app_la_OBJECTS) $(kio_app_la_DEPENDENCIES) + $(CXXLINK) -rpath $(kde_moduledir) $(kio_app_la_LDFLAGS) $(kio_app_la_OBJECTS) $(kio_app_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appimpl.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-protocolDATA: $(protocol_DATA) + @$(NORMAL_INSTALL) + test -z "$(protocoldir)" || $(mkdir_p) "$(DESTDIR)$(protocoldir)" + @list='$(protocol_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(protocolDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(protocoldir)/$$f'"; \ + $(protocolDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(protocoldir)/$$f"; \ + done + +uninstall-protocolDATA: + @$(NORMAL_UNINSTALL) + @list='$(protocol_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(protocoldir)/$$f'"; \ + rm -f "$(DESTDIR)$(protocoldir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(kde_moduledir)" "$(DESTDIR)$(protocoldir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +#>- clean: clean-recursive +#>+ 1 +clean: kde-rpo-clean clean-recursive + +#>- clean-am: clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \ +#>- mostlyclean-am +#>+ 2 +clean-am: clean-metasources clean-closures clean-bcheck clean-final clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +#>- install-data-am: install-kde_moduleLTLIBRARIES install-protocolDATA +#>+ 1 +install-data-am: install-protocolDATA + +#>- install-exec-am: +#>+ 1 +install-exec-am: install-kde_moduleLTLIBRARIES + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am uninstall-kde_moduleLTLIBRARIES \ + uninstall-protocolDATA + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-kde_moduleLTLIBRARIES clean-libtool \ + clean-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-kde_moduleLTLIBRARIES install-man \ + install-protocolDATA install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am \ + uninstall-kde_moduleLTLIBRARIES uninstall-protocolDATA + + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kio_app.pot +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +#>+ 8 +kio_app.la.closure: $(kio_app_la_OBJECTS) $(kio_app_la_DEPENDENCIES) + @echo "int main() {return 0;}" > kio_app_la_closure.cpp + @$(LTCXXCOMPILE) -c kio_app_la_closure.cpp + $(CXXLINK) kio_app_la_closure.lo $(kio_app_la_LDFLAGS) $(kio_app_la_OBJECTS) $(kio_app_la_LIBADD) $(LIBS) + @rm -f kio_app_la_closure.* kio_app.la.closure + @echo "timestamp" > kio_app.la.closure + + +#>+ 3 +appimpl.moc: $(srcdir)/appimpl.h + $(MOC) $(srcdir)/appimpl.h -o appimpl.moc + +#>+ 2 +mocs: appimpl.moc + +#>+ 3 +clean-metasources: + -rm -f appimpl.moc + +#>+ 2 +KDE_DIST=app.h appinfo.protocol app.protocol Makefile.in appimpl.h app.lsm Makefile.am + +#>+ 3 +clean-closures: + -rm -f kio_app.la.closure + +#>+ 2 +docs-am: + +#>+ 15 +force-reedit: + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile + cd $(top_srcdir) && perl admin/am_edit src/Makefile.in + + +#>+ 21 +clean-bcheck: + rm -f *.bchecktest.cc *.bchecktest.cc.class a.out + +bcheck: bcheck-recursive + +bcheck-am: + @for i in ; do \ + if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \ + echo "int main() {return 0;}" > $$i.bchecktest.cc ; \ + echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \ + echo "$$i"; \ + if ! $(CXXCOMPILE) --dump-class-hierarchy -c $$i.bchecktest.cc; then \ + rm -f $$i.bchecktest.cc; exit 1; \ + fi ; \ + echo "" >> $$i.bchecktest.cc.class; \ + perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \ + rm -f a.out; \ + fi ; \ + done + + +#>+ 11 +kio_app_la.all_cpp.cpp: $(srcdir)/Makefile.in $(srcdir)/app.cpp $(srcdir)/appimpl.cpp appimpl.moc + @echo 'creating kio_app_la.all_cpp.cpp ...'; \ + rm -f kio_app_la.all_cpp.files kio_app_la.all_cpp.final; \ + echo "#define KDE_USE_FINAL 1" >> kio_app_la.all_cpp.final; \ + for file in app.cpp appimpl.cpp ; do \ + echo "#include \"$$file\"" >> kio_app_la.all_cpp.files; \ + test ! -f $(srcdir)/$$file || egrep '^#pragma +implementation' $(srcdir)/$$file >> kio_app_la.all_cpp.final; \ + done; \ + cat kio_app_la.all_cpp.final kio_app_la.all_cpp.files > kio_app_la.all_cpp.cpp; \ + rm -f kio_app_la.all_cpp.final kio_app_la.all_cpp.files + +#>+ 3 +clean-final: + -rm -f kio_app_la.all_cpp.cpp + +#>+ 3 +final: + $(MAKE) kio_app_la_OBJECTS="$(kio_app_la_final_OBJECTS)" all-am + +#>+ 3 +final-install: + $(MAKE) kio_app_la_OBJECTS="$(kio_app_la_final_OBJECTS)" install-am + +#>+ 3 +no-final: + $(MAKE) kio_app_la_OBJECTS="$(kio_app_la_nofinal_OBJECTS)" all-am + +#>+ 3 +no-final-install: + $(MAKE) kio_app_la_OBJECTS="$(kio_app_la_nofinal_OBJECTS)" install-am + +#>+ 3 +kde-rpo-clean: + -rm -f *.rpo + +#>+ 5 +nmcheck: +appimpl.o: appimpl.moc +nmcheck-am: nmcheck +appimpl.lo: appimpl.moc diff --git a/src/app.cpp b/src/app.cpp new file mode 100644 index 0000000..93902e7 --- /dev/null +++ b/src/app.cpp @@ -0,0 +1,233 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/time.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + + +#include <qcstring.h> +#include <qsocket.h> +#include <qdatetime.h> +#include <qbitarray.h> + +#include <stdlib.h> +#include <math.h> +#include <unistd.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <netdb.h> + +#include <kapplication.h> +#include <kdebug.h> +#include <kmessagebox.h> +#include <kinstance.h> +#include <kglobal.h> +#include <kstandarddirs.h> +#include <klocale.h> +#include <kurl.h> +#include <ksock.h> + +#include "app.h" + +using namespace KIO; + +extern "C" +{ + int kdemain(int argc, char **argv) + { + KInstance instance( "kio_app" ); + + kdDebug(7101) << "*** Starting kio_app " << endl; + + if (argc != 4) { + kdDebug(7101) << "Usage: kio_app protocol domain-socket1 domain-socket2" << endl; + exit(-1); + } + + kio_appProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + kdDebug(7101) << "*** kio_app Done" << endl; + return 0; + } +} + + +kio_appProtocol::kio_appProtocol(const QCString &pool_socket, const QCString &app_socket) + : SlaveBase("kio_app", pool_socket, app_socket) +{ + kdDebug() << "kio_appProtocol::kio_appProtocol()" << endl; +} + + +kio_appProtocol::~kio_appProtocol() +{ + kdDebug() << "kio_appProtocol::~kio_appProtocol()" << endl; +} + + +void kio_appProtocol::stat(const KURL &url) +{ + kdDebug() << "kio_appProtocol::stat: " << url << endl; + + QString path = url.path(); + if ( path.isEmpty() || path == "/" ) + { + kdDebug() << "kio_appProtocol::stat: " << "creating top level entry" << endl; + // The root is "virtual" - it's not a single physical directory + KIO::UDSEntry entry; + m_impl.createTopLevelEntry( entry ); + statEntry( entry ); + finished(); + return; + } + + QString name; + bool ok = m_impl.parseURL(url, name, path); + + if ( !ok ) + { + kdDebug() << "kio_appProtocol::stat: " << "can't parse url" << endl; + error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + + if( path.isEmpty() ) + { + kdDebug() << "kio_appProtocol::stat4: " << "url empty after parsing" << endl; + + KIO::UDSEntry entry; + + if ( m_impl.statByName(name, entry) ) + { + statEntry(entry); + finished(); + } + else + { + error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); + } + } + else + { + kdDebug() << "kio_appProtocol::stat4: " << "url not empty after parsing: statting" << endl; + SlaveBase::stat(url); + } +} + +void kio_appProtocol::listDir(const KURL &url) +{ + kdDebug() << "kio_appProtocol::listDir: " << url << endl; + + if ( url.path().length() <= 1 ) + { + kdDebug() << "kio_appProtocol::listDir: " << "url empty: listing root" << endl; + listRoot(); + return; + } + + QString name, path; + bool ok = m_impl.parseURL(url, name, path); + + if ( !ok ) + { + error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + kdDebug() << "kio_appProtocol::listDir: " << "url is " << url << ": doing a listDir" << endl; + kdDebug() << "kio_appProtocol::listDir: " << "name is " << name << ": doing a listDir" << endl; + kdDebug() << "kio_appProtocol::listDir: " << "path is " << path << ": doing a listDir" << endl; + // We've been given something like app:/appname + listAppContents(name); +} + +void kio_appProtocol::listRoot() +{ + KIO::UDSEntry entry; + + KIO::UDSEntryList system_entries; + bool ok = m_impl.listRoot(system_entries); + + if (!ok) + { + error( m_impl.lastErrorCode(), m_impl.lastErrorMessage() ); + return; + } + + totalSize(system_entries.count()+1); + + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + + KIO::UDSEntryListIterator it = system_entries.begin(); + KIO::UDSEntryListIterator end = system_entries.end(); + + for(; it!=end; ++it) + { + listEntry(*it, false); + } + + entry.clear(); + listEntry(entry, true); + + finished(); +} + + +void kio_appProtocol::listAppContents(const QString &name) +{ + KIO::UDSEntry entry; + + KIO::UDSEntryList app_entries; + bool ok = m_impl.listAppContents(name, app_entries); + + if (!ok) + { + error( m_impl.lastErrorCode(), m_impl.lastErrorMessage() ); + return; + } + + totalSize(app_entries.count()+1); + + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + + KIO::UDSEntryListIterator it = app_entries.begin(); + KIO::UDSEntryListIterator end = app_entries.end(); + + for(; it!=end; ++it) + { + listEntry(*it, false); + } + + entry.clear(); + listEntry(entry, true); + + finished(); + +} diff --git a/src/app.cpp~ b/src/app.cpp~ new file mode 100644 index 0000000..feb0f03 --- /dev/null +++ b/src/app.cpp~ @@ -0,0 +1,212 @@ +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/time.h> +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + + +#include <qcstring.h> +#include <qsocket.h> +#include <qdatetime.h> +#include <qbitarray.h> + +#include <stdlib.h> +#include <math.h> +#include <unistd.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <netdb.h> + +#include <kapplication.h> +#include <kdebug.h> +#include <kmessagebox.h> +#include <kinstance.h> +#include <kglobal.h> +#include <kstandarddirs.h> +#include <klocale.h> +#include <kurl.h> +#include <ksock.h> + +#include "app.h" + +using namespace KIO; + +extern "C" +{ + int kdemain(int argc, char **argv) + { + KInstance instance( "kio_app" ); + + kdDebug(7101) << "*** Starting kio_app " << endl; + + if (argc != 4) { + kdDebug(7101) << "Usage: kio_app protocol domain-socket1 domain-socket2" << endl; + exit(-1); + } + + kio_appProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + kdDebug(7101) << "*** kio_app Done" << endl; + return 0; + } +} + + +kio_appProtocol::kio_appProtocol(const QCString &pool_socket, const QCString &app_socket) + : SlaveBase("kio_app", pool_socket, app_socket) +{ + kdDebug() << "kio_appProtocol::kio_appProtocol()" << endl; +} + + +kio_appProtocol::~kio_appProtocol() +{ + kdDebug() << "kio_appProtocol::~kio_appProtocol()" << endl; +} + + +void kio_appProtocol::stat(const KURL &url) +{ + kdDebug() << "kio_appProtocol::stat: " << url << endl; + + QString path = url.path(); + if ( path.isEmpty() || path == "/" ) + { + kdDebug() << "kio_appProtocol::stat: " << "creating top level entry" << endl; + // The root is "virtual" - it's not a single physical directory + KIO::UDSEntry entry; + m_impl.createTopLevelEntry( entry ); + statEntry( entry ); + finished(); + return; + } + + QString name; + bool ok = m_impl.parseURL(url, name, path); + + if ( !ok ) + { + kdDebug() << "kio_appProtocol::stat: " << "can't parse url" << endl; + error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + + if( path.isEmpty() ) + { + kdDebug() << "kio_appProtocol::stat4: " << "url empty after parsing" << endl; + + KIO::UDSEntry entry; + + if ( m_impl.statByName(name, entry) ) + { + statEntry(entry); + finished(); + } + else + { + error(KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); + } + } + else + { + kdDebug() << "kio_appProtocol::stat4: " << "url not empty after parsing: statting" << endl; + SlaveBase::stat(url); + } +} + +void kio_appProtocol::listDir(const KURL &url) +{ + kdDebug() << "kio_appProtocol::listDir: " << url << endl; + + if ( url.path().length() <= 1 ) + { + kdDebug() << "kio_appProtocol::listDir: " << "url empty: listing root" << endl; + listRoot(); + return; + } + + QString name, path; + bool ok = m_impl.parseURL(url, name, path); + + if ( !ok ) + { + error(KIO::ERR_MALFORMED_URL, url.prettyURL()); + return; + } + + kdDebug() << "kio_appProtocol::listDir: " << "url is " << url << ": doing a listDir" << endl; + kdDebug() << "kio_appProtocol::listDir: " << "name is " << name << ": doing a listDir" << endl; + kdDebug() << "kio_appProtocol::listDir: " << "path is " << path << ": doing a listDir" << endl; + // We've been given something like app:/appname + listAppContents(name); +} + +void kio_appProtocol::listRoot() +{ + KIO::UDSEntry entry; + + KIO::UDSEntryList system_entries; + bool ok = m_impl.listRoot(system_entries); + + if (!ok) + { + error( m_impl.lastErrorCode(), m_impl.lastErrorMessage() ); + return; + } + + totalSize(system_entries.count()+1); + + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + + KIO::UDSEntryListIterator it = system_entries.begin(); + KIO::UDSEntryListIterator end = system_entries.end(); + + for(; it!=end; ++it) + { + listEntry(*it, false); + } + + entry.clear(); + listEntry(entry, true); + + finished(); +} + + +void kio_appProtocol::listAppContents(const QString &name) +{ + KIO::UDSEntry entry; + + KIO::UDSEntryList app_entries; + bool ok = m_impl.listAppContents(name, app_entries); + + if (!ok) + { + error( m_impl.lastErrorCode(), m_impl.lastErrorMessage() ); + return; + } + + totalSize(app_entries.count()+1); + + m_impl.createTopLevelEntry(entry); + listEntry(entry, false); + + KIO::UDSEntryListIterator it = app_entries.begin(); + KIO::UDSEntryListIterator end = app_entries.end(); + + for(; it!=end; ++it) + { + listEntry(*it, false); + } + + entry.clear(); + listEntry(entry, true); + + finished(); + +} diff --git a/src/app.h b/src/app.h new file mode 100644 index 0000000..24a5154 --- /dev/null +++ b/src/app.h @@ -0,0 +1,54 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef _app_H_ +#define _app_H_ + +#include <qstring.h> +#include <qcstring.h> + +#include <stdio.h> + +#include <kio/tcpslavebase.h> + +#include <kurl.h> +#include <kio/global.h> +#include <kio/slavebase.h> + +#include "appimpl.h" + +class QCString; + +class kio_appProtocol : public KIO::SlaveBase +{ +public: + kio_appProtocol(const QCString &pool_socket, const QCString &app_socket); + virtual ~kio_appProtocol(); + virtual void listDir(const KURL & url); + virtual void stat(const KURL & url); + +private: + void listRoot(); + void listAppContents(const QString &name); + AppImpl m_impl; +}; + +#endif diff --git a/src/app.h~ b/src/app.h~ new file mode 100644 index 0000000..8854374 --- /dev/null +++ b/src/app.h~ @@ -0,0 +1,34 @@ + +#ifndef _app_H_ +#define _app_H_ + +#include <qstring.h> +#include <qcstring.h> + +#include <stdio.h> + +#include <kio/tcpslavebase.h> + +#include <kurl.h> +#include <kio/global.h> +#include <kio/slavebase.h> + +#include "appimpl.h" + +class QCString; + +class kio_appProtocol : public KIO::SlaveBase +{ +public: + kio_appProtocol(const QCString &pool_socket, const QCString &app_socket); + virtual ~kio_appProtocol(); + virtual void listDir(const KURL & url); + virtual void stat(const KURL & url); + +private: + void listRoot(); + void listAppContents(const QString &name); + AppImpl m_impl; +}; + +#endif diff --git a/src/app.lsm b/src/app.lsm new file mode 100644 index 0000000..bcd92d8 --- /dev/null +++ b/src/app.lsm @@ -0,0 +1,16 @@ +Begin3 +Title: app -- Some description +Version: 0.1 +Entered-date: +Description: +Keywords: KDE Qt +Author: Robert Hogan <[email protected]> +Maintained-by: Robert Hogan <[email protected]> +Home-page: +Alternate-site: +Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils + xxxxxx app-0.1.tar.gz + xxx app-0.1.lsm +Platform: Linux. Needs KDE +Copying-policy: GPL +End diff --git a/src/app.protocol b/src/app.protocol new file mode 100644 index 0000000..836f41a --- /dev/null +++ b/src/app.protocol @@ -0,0 +1,18 @@ +[Protocol] +exec=kio_app +protocol=app +input=none +output=filesystem +listing=Type,Name,Size,Date,AccessDate,Access,Owner,Group,Link +reading=true +writing=true +makedir=true +deleting=true +linking=true +moving=true +Icon=system +maxInstances=4 +#TODO DocPath=kioslave/file.html +Class=:local +deleteRecursive=true +fileNameUsedForCopying=Name diff --git a/src/app.protocol~ b/src/app.protocol~ new file mode 100644 index 0000000..91f70ff --- /dev/null +++ b/src/app.protocol~ @@ -0,0 +1,18 @@ +[Protocol] +exec=kio_app +protocol=app +input=none +output=filesystem +listing=Type,Name,Size,Date,AccessDate,Access,Owner,Group,Link +reading=true +writing=true +makedir=true +deleting=false +linking=true +moving=true +Icon=system +maxInstances=4 +#TODO DocPath=kioslave/file.html +Class=:local +deleteRecursive=true +fileNameUsedForCopying=Name diff --git a/src/appimpl.cpp b/src/appimpl.cpp new file mode 100644 index 0000000..6c29f75 --- /dev/null +++ b/src/appimpl.cpp @@ -0,0 +1,699 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +/* This file is part of the KDE project + Copyright (c) 2004 Kevin Ottens <ervin ipsquad net> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + 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. +*/ + +#include "appimpl.h" + +#include <kdebug.h> +#include <kglobalsettings.h> +#include <kstandarddirs.h> +#include <kdesktopfile.h> +#include <klocale.h> +#include <kiconloader.h> +#include <kservice.h> +#include <kservicegroup.h> + +#include <qapplication.h> +#include <qeventloop.h> +#include <qdir.h> + +#include <sys/stat.h> + + +AppImpl::AppImpl() : QObject() +{ +} + +bool AppImpl::listRoot(QValueList<KIO::UDSEntry> &list) +{ + + + kdDebug() << "AppImpl::listRoot" << endl; + + + QStringList dirList = QStringList::split(":",getenv("PATH")); + kdDebug() << dirList << endl; + QStringList names_found; +// QStringList dirList; +// dirList << "/usr/local/bin/"; +// dirList << "/usr/bin/"; +// dirList << "/usr/sbin/"; +// dirList << "/bin/"; + + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + KIO::UDSEntry entry; + + QStringList::ConstIterator filename = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; filename!=endf; ++filename) + { + if (!names_found.contains(*filename)) + { + entry.clear(); + createEntry(entry, /**dirpath,*/ *filename); + if ( !entry.isEmpty() ) + { + list.append(entry); + names_found.append(*filename); + } + } + } + } + + kdDebug() << "AppImpl::listRoot" << endl; + + return true; +} + +bool AppImpl::parseURL(const KURL &url, QString &name, QString &path) const +{ + QString url_path = url.path(); + + int i = url_path.find('/', 1); + if (i > 0) + { + name = url_path.mid(1, i-1); + path = url_path.mid(i+1); + } + else + { + name = url_path.mid(1); + path = QString::null; + } + + return name != QString::null; +} + +bool AppImpl::realURL(const QString &name, const QString &path, + KURL &url) const +{ + url = findBaseURL(name); + if (!url.isValid()) + { + return false; + } + + url.addPath(path); + return true; +} + +bool AppImpl::statByName(const QString &filename, KIO::UDSEntry& entry) +{ + + + kdDebug() << "AppImpl::statByName" << endl; + + QStringList dirList; + dirList << "/usr/local/bin/"; + dirList << "/usr/bin/"; + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + + QStringList::ConstIterator name = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; name!=endf; ++name) + { + if (*name==filename) + { + createEntry(entry, /**dirpath,*/ *name); + return true; + } + } + } + + return false; +} + +KURL AppImpl::findBaseURL(const QString &filename) const +{ + kdDebug() << "AppImpl::findBaseURL" << endl; + + QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + + KIO::UDSEntry entry; + + QStringList::ConstIterator name = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; name!=endf; ++name) + { + if (*name==filename+".desktop") + { + KDesktopFile desktop(*dirpath+filename+".desktop", true); + if ( desktop.readURL().isEmpty() ) + { + KURL url; + url.setPath( desktop.readPath() ); + return url; + } + + return desktop.readURL(); + } + } + } + + return KURL(); +} + + +static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, + const QString &s = QString::null) +{ + KIO::UDSAtom atom; + atom.m_uds = ID; + atom.m_long = l; + atom.m_str = s; + entry.append(atom); +} + + +void AppImpl::createTopLevelEntry(KIO::UDSEntry &entry) const +{ + entry.clear(); + addAtom(entry, KIO::UDS_NAME, 0, "."); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_ACCESS, 0555); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/system_directory"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, "system"); +} + +void AppImpl::createEntry(KIO::UDSEntry &entry, +// const QString &directory, + const QString &file) +{ + + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, file); + + QString new_filename = file; + new_filename.truncate(file.length()-8); + addAtom(entry, KIO::UDS_URL, 0, "app:/"+new_filename); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + KService::Ptr service = KService::serviceByDesktopName( new_filename ); + if (service && service->isValid()) + addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon()); + else + addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary"); + +} + +void AppImpl::createExeEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname, + const QStringList &fullname) +{ + + + for ( QStringList::ConstIterator it = fullname.begin(); it != fullname.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + +/* QStringList dirList = KGlobal::instance()->dirs()->resourceDirs("apps"); + kdDebug() << dirList << endl; + QStringList desktop = getFullLocation(dirList,shortname+".desktop", + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + false,true); + kdDebug() << desktop << endl;*/ + KService::Ptr service = KService::serviceByDesktopName( shortname ); + +// if (!desktop.isEmpty()){ + if (service && service->isValid()) { + +// for ( QStringList::Iterator dit = desktop.begin(); dit != desktop.end(); ++dit ) +// { +// if ((*dit).isEmpty()) +// continue; +// entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(service->name())); + addAtom(entry, KIO::UDS_URL, 0, locate("apps", service->desktopEntryPath())); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon()); +// createFileEntry(entry, service->name(), url.url(1)+service->desktopEntryName(), +// "application/x-desktop", service->icon(), locate("apps", +// service->desktopEntryPath()) ); + + if ( !entry.isEmpty() ) + list.append(entry); +// } + return; + } + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary"); + if ( !entry.isEmpty() ) + list.append(entry); + } + +} + +void AppImpl::createManPageEntry(KIO::UDSEntry &entry, + const QString &shortname) +{ + + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Manual for %1").arg(shortname)); + +/* QString new_filename = file; + new_filename.truncate(file.length()-8);*/ + addAtom(entry, KIO::UDS_URL, 0, "man:/"+shortname); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop"); + + QString icon = "man"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); +} + +void AppImpl::createHomeDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname) +{ + + QStringList homedir; + homedir << QString("%1/").arg(getenv("HOME")); + + QString dirname = "."+shortname; + QStringList fullname = getFullLocation(homedir,dirname, + QDir::FilterSpec(QDir::Hidden | QDir::Dirs | QDir::Readable), + true, false); + + for ( QStringList::Iterator it = fullname.begin(); it != fullname.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("User Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "cachefolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::createKDEDataDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname) +{ + + QStringList dirList = KGlobal::instance()->dirs()->resourceDirs("data"); + + QStringList KDEDataDir = getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Dirs | QDir::Readable), false, false); + if (KDEDataDir.isEmpty()) + return; + + + for ( QStringList::Iterator it = KDEDataDir.begin(); it != KDEDataDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "binaryfolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } + +} + +void AppImpl::createStandardDataDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/usr/share/"; + dirList << "/usr/local/share/"; + + QStringList StandardDataDir = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, false); + + if (StandardDataDir.isEmpty()) + return; + + for ( QStringList::Iterator it = StandardDataDir.begin(); it != StandardDataDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "binaryfolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + + +void AppImpl::createKDEConfigEntry(KIO::UDSEntry &entry, + const QString &shortname) +{ + + entry.clear(); + + QString KDEDataDir = locate("config", shortname+"rc"); + kdDebug() << "KDEDataDir: " << KDEDataDir << endl; + + if (KDEDataDir.isEmpty()) + return; + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File (%1)").arg(KDEDataDir)); + addAtom(entry, KIO::UDS_URL, 0, KDEDataDir); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + + QString icon = "configure"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); +} + +void AppImpl::createStandardConfigEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/etc/"; + dirList << "/usr/local/etc/"; + dirList << "/usr/etc/"; + + QStringList StandardConfigFile = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, false); + + if (StandardConfigFile.isEmpty()) + return; + + for ( QStringList::Iterator it = StandardConfigFile.begin(); it != StandardConfigFile.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + bool isFolder = false; + QFileInfo fi(*it); + if (fi.isDir()) + isFolder = true; + + kdDebug() << "createStandardConfigEntry: " << *it << endl; + + addAtom(entry, KIO::UDS_URL, 0, *it); + + QString icon; + if (isFolder){ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config Data(%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + icon = "configfolder"; + }else{ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File(%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + icon = "configure"; + } + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::createTmpDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/tmp/"; + + QStringList TmpDir = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, true); + + if (TmpDir.isEmpty()) + return; + + for ( QStringList::Iterator it = TmpDir.begin(); it != TmpDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + bool isFolder = false; + QFileInfo fi(*it); + if (fi.isDir()) + isFolder = true; + + kdDebug() << "createTmpDirEntry: " << *it << endl; + + addAtom(entry, KIO::UDS_URL, 0, *it); + + QString icon; + if (isFolder){ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + icon = "tmpfolder"; + }else{ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp File (%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + icon = "eraser"; + } + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list) +{ + if (list.size()>0) + { + job->kill(true); + m_lastListingEmpty = false; + qApp->eventLoop()->exitLoop(); + } +} + +void AppImpl::slotResult(KIO::Job *) +{ + qApp->eventLoop()->exitLoop(); +} + +bool AppImpl::listAppContents(const QString &name, QValueList<KIO::UDSEntry> &list) +{ + + + kdDebug() << "AppImpl::listAppEntries" << endl; + KIO::UDSEntry entry; + + //Create entry for binary file + entry.clear(); + createExeEntry(list,entry,name,getAppAddress(name)); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for man page + entry.clear(); + createManPageEntry(entry,name); + if ( !entry.isEmpty() ) + list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createHomeDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createKDEDataDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createStandardDataDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createKDEConfigEntry(entry,name); + if ( !entry.isEmpty() ) + list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createStandardConfigEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createTmpDirEntry(list,entry,name); + + return true; +} + +QStringList AppImpl::getAppAddress(const QString &name) +{ + + QStringList dirList; + dirList << "/usr/local/bin/"; + dirList << "/usr/bin/"; + + return getFullLocation(dirList,name, QDir::FilterSpec(QDir::Files | QDir::Readable),false, false); + +} + + +QStringList AppImpl::getFullLocation(const QStringList &dirList, const QString &name, + const QDir::FilterSpec &filter, bool beginswith, bool recursive) +{ + + QStringList finds; + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( filter ); + + QStringList::ConstIterator filename = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; filename!=endf; ++filename) + { + + if ((recursive) && ((*filename != "..")&&(*filename != "."))){ + QFileInfo fi(*dirpath+*filename); + if (fi.isDir()){ + QStringList recurfinds; + recurfinds = getFullLocation(QStringList(*dirpath+*filename+"/"), + name, filter, beginswith, recursive); + if (!recurfinds.isEmpty()){ + for ( QStringList::Iterator it = recurfinds.begin(); + it != recurfinds.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + finds << (*it); + } + } + } + } + + if ((name == *filename) || + ((beginswith) && (*filename).startsWith(name))) + { + finds << *dirpath+*filename; + } + } + } + return finds; +} + +#include "appimpl.moc" diff --git a/src/appimpl.cpp~ b/src/appimpl.cpp~ new file mode 100644 index 0000000..b7f7f3f --- /dev/null +++ b/src/appimpl.cpp~ @@ -0,0 +1,700 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +/* This file is part of the KDE project + Copyright (c) 2004 Kevin Ottens <ervin ipsquad net> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + 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. +*/ + +#include "appimpl.h" + +#include <kdebug.h> +#include <kglobalsettings.h> +#include <kstandarddirs.h> +#include <kdesktopfile.h> +#include <klocale.h> +#include <kiconloader.h> +#include <kservice.h> +#include <kservicegroup.h> + +#include <qapplication.h> +#include <qeventloop.h> +#include <qdir.h> + +#include <sys/stat.h> + + +AppImpl::AppImpl() : QObject() +{ +} + +bool AppImpl::listRoot(QValueList<KIO::UDSEntry> &list) +{ + + + kdDebug() << "AppImpl::listRoot" << endl; + + + QStringList dirList = QStringList::split(":",getenv("PATH")); + kdDebug() << dirList << endl; + QStringList names_found; +// QStringList dirList; +// dirList << "/usr/local/bin/"; +// dirList << "/usr/bin/"; +// dirList << "/usr/sbin/"; +// dirList << "/bin/"; + + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + KIO::UDSEntry entry; + + QStringList::ConstIterator filename = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; filename!=endf; ++filename) + { + if (!names_found.contains(*filename)) + { + entry.clear(); + createEntry(entry, /**dirpath,*/ *filename); + if ( !entry.isEmpty() ) + { + list.append(entry); + names_found.append(*filename); + } + } + } + } + + kdDebug() << "AppImpl::listRoot" << endl; + + return true; +} + +bool AppImpl::parseURL(const KURL &url, QString &name, QString &path) const +{ + QString url_path = url.path(); + + int i = url_path.find('/', 1); + if (i > 0) + { + name = url_path.mid(1, i-1); + path = url_path.mid(i+1); + } + else + { + name = url_path.mid(1); + path = QString::null; + } + + return name != QString::null; +} + +bool AppImpl::realURL(const QString &name, const QString &path, + KURL &url) const +{ + url = findBaseURL(name); + if (!url.isValid()) + { + return false; + } + + url.addPath(path); + return true; +} + +bool AppImpl::statByName(const QString &filename, KIO::UDSEntry& entry) +{ + + + kdDebug() << "AppImpl::statByName" << endl; + + QStringList dirList; + dirList << "/usr/local/bin/"; + dirList << "/usr/bin/"; + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + + QStringList::ConstIterator name = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; name!=endf; ++name) + { + if (*name==filename) + { + createEntry(entry, /**dirpath,*/ *name); + return true; + } + } + } + + return false; +} + +KURL AppImpl::findBaseURL(const QString &filename) const +{ + kdDebug() << "AppImpl::findBaseURL" << endl; + + QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries"); + + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( QDir::Files | QDir::Readable ); + + + KIO::UDSEntry entry; + + QStringList::ConstIterator name = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; name!=endf; ++name) + { + if (*name==filename+".desktop") + { + KDesktopFile desktop(*dirpath+filename+".desktop", true); + if ( desktop.readURL().isEmpty() ) + { + KURL url; + url.setPath( desktop.readPath() ); + return url; + } + + return desktop.readURL(); + } + } + } + + return KURL(); +} + + +static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, + const QString &s = QString::null) +{ + KIO::UDSAtom atom; + atom.m_uds = ID; + atom.m_long = l; + atom.m_str = s; + entry.append(atom); +} + + +void AppImpl::createTopLevelEntry(KIO::UDSEntry &entry) const +{ + entry.clear(); + addAtom(entry, KIO::UDS_NAME, 0, "."); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_ACCESS, 0555); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/system_directory"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, "system"); +} + +void AppImpl::createEntry(KIO::UDSEntry &entry, +// const QString &directory, + const QString &file) +{ + kdDebug() << "AppImpl::createEntry" << endl; + + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, file); + + QString new_filename = file; + new_filename.truncate(file.length()-8); + addAtom(entry, KIO::UDS_URL, 0, "app:/"+new_filename); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + KService::Ptr service = KService::serviceByDesktopName( new_filename ); + if (service && service->isValid()) + addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon()); + else + addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary"); + +} + +void AppImpl::createExeEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname, + const QStringList &fullname) +{ + + + for ( QStringList::ConstIterator it = fullname.begin(); it != fullname.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + +/* QStringList dirList = KGlobal::instance()->dirs()->resourceDirs("apps"); + kdDebug() << dirList << endl; + QStringList desktop = getFullLocation(dirList,shortname+".desktop", + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + false,true); + kdDebug() << desktop << endl;*/ + KService::Ptr service = KService::serviceByDesktopName( shortname ); + +// if (!desktop.isEmpty()){ + if (service && service->isValid()) { + +// for ( QStringList::Iterator dit = desktop.begin(); dit != desktop.end(); ++dit ) +// { +// if ((*dit).isEmpty()) +// continue; +// entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(service->name())); + addAtom(entry, KIO::UDS_URL, 0, locate("apps", service->desktopEntryPath())); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, service->icon()); +// createFileEntry(entry, service->name(), url.url(1)+service->desktopEntryName(), +// "application/x-desktop", service->icon(), locate("apps", +// service->desktopEntryPath()) ); + + if ( !entry.isEmpty() ) + list.append(entry); +// } + return; + } + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Application (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application"); + addAtom(entry, KIO::UDS_ICON_NAME, 0, "binary"); + if ( !entry.isEmpty() ) + list.append(entry); + } + +} + +void AppImpl::createManPageEntry(KIO::UDSEntry &entry, + const QString &shortname) +{ + + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Manual for %1").arg(shortname)); + +/* QString new_filename = file; + new_filename.truncate(file.length()-8);*/ + addAtom(entry, KIO::UDS_URL, 0, "man:/"+shortname); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "application/x-desktop"); + + QString icon = "man"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); +} + +void AppImpl::createHomeDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname) +{ + + QStringList homedir; + homedir << QString("%1/").arg(getenv("HOME")); + + QString dirname = "."+shortname; + QStringList fullname = getFullLocation(homedir,dirname, + QDir::FilterSpec(QDir::Hidden | QDir::Dirs | QDir::Readable), + true, false); + + for ( QStringList::Iterator it = fullname.begin(); it != fullname.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("User Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "cachefolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::createKDEDataDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname) +{ + + QStringList dirList = KGlobal::instance()->dirs()->resourceDirs("data"); + + QStringList KDEDataDir = getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Dirs | QDir::Readable), false, false); + if (KDEDataDir.isEmpty()) + return; + + + for ( QStringList::Iterator it = KDEDataDir.begin(); it != KDEDataDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "binaryfolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } + +} + +void AppImpl::createStandardDataDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/usr/share/"; + dirList << "/usr/local/share/"; + + QStringList StandardDataDir = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, false); + + if (StandardDataDir.isEmpty()) + return; + + for ( QStringList::Iterator it = StandardDataDir.begin(); it != StandardDataDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + addAtom(entry, KIO::UDS_NAME, 0, i18n("App Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_URL, 0, *it); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + + QString icon = "binaryfolder"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + + +void AppImpl::createKDEConfigEntry(KIO::UDSEntry &entry, + const QString &shortname) +{ + + entry.clear(); + + QString KDEDataDir = locate("config", shortname+"rc"); + kdDebug() << "KDEDataDir: " << KDEDataDir << endl; + + if (KDEDataDir.isEmpty()) + return; + + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File (%1)").arg(KDEDataDir)); + addAtom(entry, KIO::UDS_URL, 0, KDEDataDir); + + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + + QString icon = "configure"; + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); +} + +void AppImpl::createStandardConfigEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/etc/"; + dirList << "/usr/local/etc/"; + dirList << "/usr/etc/"; + + QStringList StandardConfigFile = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, false); + + if (StandardConfigFile.isEmpty()) + return; + + for ( QStringList::Iterator it = StandardConfigFile.begin(); it != StandardConfigFile.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + bool isFolder = false; + QFileInfo fi(*it); + if (fi.isDir()) + isFolder = true; + + kdDebug() << "createStandardConfigEntry: " << *it << endl; + + addAtom(entry, KIO::UDS_URL, 0, *it); + + QString icon; + if (isFolder){ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config Data(%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + icon = "configfolder"; + }else{ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Config File(%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + icon = "configure"; + } + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::createTmpDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname) +{ + + + QStringList dirList; + dirList << "/tmp/"; + + QStringList TmpDir = + getFullLocation(dirList,shortname, + QDir::FilterSpec(QDir::Files | QDir::Dirs | QDir::Readable), + true, true); + + if (TmpDir.isEmpty()) + return; + + for ( QStringList::Iterator it = TmpDir.begin(); it != TmpDir.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + entry.clear(); + + bool isFolder = false; + QFileInfo fi(*it); + if (fi.isDir()) + isFolder = true; + + kdDebug() << "createTmpDirEntry: " << *it << endl; + + addAtom(entry, KIO::UDS_URL, 0, *it); + + QString icon; + if (isFolder){ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp Data (%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); + icon = "tmpfolder"; + }else{ + addAtom(entry, KIO::UDS_NAME, 0, i18n("Tmp File (%1)").arg(*it)); + addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, KIO::UDS_MIME_TYPE, 0, "text/plain"); + icon = "eraser"; + } + addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); + if ( !entry.isEmpty() ) + list.append(entry); + } +} + +void AppImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list) +{ + if (list.size()>0) + { + job->kill(true); + m_lastListingEmpty = false; + qApp->eventLoop()->exitLoop(); + } +} + +void AppImpl::slotResult(KIO::Job *) +{ + qApp->eventLoop()->exitLoop(); +} + +bool AppImpl::listAppContents(const QString &name, QValueList<KIO::UDSEntry> &list) +{ + + + kdDebug() << "AppImpl::listAppEntries" << endl; + KIO::UDSEntry entry; + + //Create entry for binary file + entry.clear(); + createExeEntry(list,entry,name,getAppAddress(name)); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for man page + entry.clear(); + createManPageEntry(entry,name); + if ( !entry.isEmpty() ) + list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createHomeDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createKDEDataDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createStandardDataDirEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createKDEConfigEntry(entry,name); + if ( !entry.isEmpty() ) + list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createStandardConfigEntry(list,entry,name); +// if ( !entry.isEmpty() ) +// list.append(entry); + + //Create entry for apps folder in home dir + entry.clear(); + createTmpDirEntry(list,entry,name); + + return true; +} + +QStringList AppImpl::getAppAddress(const QString &name) +{ + + QStringList dirList; + dirList << "/usr/local/bin/"; + dirList << "/usr/bin/"; + + return getFullLocation(dirList,name, QDir::FilterSpec(QDir::Files | QDir::Readable),false, false); + +} + + +QStringList AppImpl::getFullLocation(const QStringList &dirList, const QString &name, + const QDir::FilterSpec &filter, bool beginswith, bool recursive) +{ + + QStringList finds; + QStringList::ConstIterator dirpath = dirList.begin(); + QStringList::ConstIterator end = dirList.end(); + for(; dirpath!=end; ++dirpath) + { + QDir dir = *dirpath; + if (!dir.exists()) continue; + + QStringList filenames + = dir.entryList( filter ); + + QStringList::ConstIterator filename = filenames.begin(); + QStringList::ConstIterator endf = filenames.end(); + + for(; filename!=endf; ++filename) + { + + if ((recursive) && ((*filename != "..")&&(*filename != "."))){ + QFileInfo fi(*dirpath+*filename); + if (fi.isDir()){ + QStringList recurfinds; + recurfinds = getFullLocation(QStringList(*dirpath+*filename+"/"), + name, filter, beginswith, recursive); + if (!recurfinds.isEmpty()){ + for ( QStringList::Iterator it = recurfinds.begin(); + it != recurfinds.end(); ++it ) + { + if ((*it).isEmpty()) + continue; + finds << (*it); + } + } + } + } + + if ((name == *filename) || + ((beginswith) && (*filename).startsWith(name))) + { + finds << *dirpath+*filename; + } + } + } + return finds; +} + +#include "appimpl.moc" diff --git a/src/appimpl.h b/src/appimpl.h new file mode 100644 index 0000000..e590dce --- /dev/null +++ b/src/appimpl.h @@ -0,0 +1,107 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +/* This file is part of the KDE project + Copyright (c) 2004 Kevin Ottens <ervin ipsquad net> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + 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. +*/ + +#ifndef APPIMPL_H +#define APPIMPL_H + +#include <kio/global.h> +#include <kio/job.h> +#include <kurl.h> +#include <dcopobject.h> + +#include <qobject.h> +#include <qstring.h> +#include <qdir.h> + +class AppImpl : public QObject +{ +Q_OBJECT +public: + AppImpl(); + + void createTopLevelEntry(KIO::UDSEntry& entry) const; + bool statByName(const QString &filename, KIO::UDSEntry& entry); + + bool listRoot(QValueList<KIO::UDSEntry> &list); + + bool parseURL(const KURL &url, QString &name, QString &path) const; + bool realURL(const QString &name, const QString &path, KURL &url) const; + + int lastErrorCode() const { return m_lastErrorCode; } + QString lastErrorMessage() const { return m_lastErrorMessage; } + bool listAppContents(const QString &name, QValueList<KIO::UDSEntry> &list); + +private slots: + KURL findBaseURL(const QString &filename) const; + void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list); + void slotResult(KIO::Job *job); + void createManPageEntry(KIO::UDSEntry &entry, + const QString &shortname); + void createExeEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname, + const QStringList &fullname); + void createHomeDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname); + void createKDEDataDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname); + void createKDEConfigEntry(KIO::UDSEntry &entry, + const QString &shortname); + void createStandardConfigEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + void createStandardDataDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + void createTmpDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + + QStringList getAppAddress(const QString &name); + QStringList getFullLocation(const QStringList & dirList, const QString &name, + const QDir::FilterSpec &filter, bool beginswith, bool recursive); +private: + void createEntry(KIO::UDSEntry& entry, /*const QString &directory,*/ + const QString &file); + + bool m_lastListingEmpty; + + /// Last error code stored in class to simplify API. + /// Note that this means almost no method can be const. + int m_lastErrorCode; + QString m_lastErrorMessage; +}; + +#endif diff --git a/src/appimpl.h~ b/src/appimpl.h~ new file mode 100644 index 0000000..51f7a48 --- /dev/null +++ b/src/appimpl.h~ @@ -0,0 +1,107 @@ +/*************************************************************************** + * $Id: tork.cpp,v 1.160 2007/12/30 12:58:22 hoganrobert Exp $ + * Copyright (C) 2006 by Robert Hogan * + * [email protected] * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +/* This file is part of the KDE project + Copyright (c) 2004 Kevin Ottens <ervin ipsquad net> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + 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. +*/ + +#ifndef APPIMPL_H +#define APPIMPL_H + +#include <kio/global.h> +#include <kio/job.h> +#include <kurl.h> +#include <dcopobject.h> + +#include <qobject.h> +#include <qstring.h> +#include <qdir.h> + +class AppImpl : public QObject +{ +Q_OBJECT +public: + AppImpl(); + + void createTopLevelEntry(KIO::UDSEntry& entry) const; + bool statByName(const QString &filename, KIO::UDSEntry& entry); + + bool listRoot(QValueList<KIO::UDSEntry> &list); + + bool parseURL(const KURL &url, QString &name, QString &path) const; + bool realURL(const QString &name, const QString &path, KURL &url) const; + + int lastErrorCode() const { return m_lastErrorCode; } + QString lastErrorMessage() const { return m_lastErrorMessage; } + bool listAppContents(const QString &name, QValueList<KIO::UDSEntry> &list); + +private slots: + KURL findBaseURL(const QString &filename) const; + void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list); + void slotResult(KIO::Job *job); + void createManPageEntry(KIO::UDSEntry &entry, + const QString &shortname); + void createExeEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname, + const QStringList &fullname); + void createHomeDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname); + void createKDEDataDirEntry(QValueList<KIO::UDSEntry> &list,KIO::UDSEntry &entry, + const QString &shortname); + void createKDEConfigEntry(KIO::UDSEntry &entry, + const QString &shortname); + void createStandardConfigEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + void createStandardDataDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + void createTmpDirEntry(QValueList<KIO::UDSEntry> &list, KIO::UDSEntry &entry, + const QString &shortname); + + QStringList getAppAddress(const QString &name); + QStringList getFullLocation(const QStringList & dirList, const QString &name, + const QDir::FilterSpec &filter, bool beginswith, bool recursive); +private: + void createEntry(KIO::UDSEntry& entry, const QString &directory, + const QString &file); + + bool m_lastListingEmpty; + + /// Last error code stored in class to simplify API. + /// Note that this means almost no method can be const. + int m_lastErrorCode; + QString m_lastErrorMessage; +}; + +#endif diff --git a/src/appinfo.protocol b/src/appinfo.protocol new file mode 100644 index 0000000..1831d85 --- /dev/null +++ b/src/appinfo.protocol @@ -0,0 +1,18 @@ +[Protocol] +exec=kio_app +protocol=appinfo +input=none +output=filesystem +listing=Type,Name,Size,Date,AccessDate,Access,Owner,Group,Link +reading=true +writing=true +makedir=true +deleting=true +linking=true +moving=true +Icon=system +maxInstances=4 +#TODO DocPath=kioslave/file.html +Class=:local +deleteRecursive=true +fileNameUsedForCopying=Name diff --git a/src/appinfo.protocol~ b/src/appinfo.protocol~ new file mode 100644 index 0000000..7e2020c --- /dev/null +++ b/src/appinfo.protocol~ @@ -0,0 +1,18 @@ +[Protocol] +exec=kio_app +protocol=appinfo +input=none +output=filesystem +listing=Type,Name,Size,Date,AccessDate,Access,Owner,Group,Link +reading=true +writing=true +makedir=true +deleting=true +linking=true +moving=true +Icon=exec +maxInstances=4 +#TODO DocPath=kioslave/file.html +Class=:local +deleteRecursive=true +fileNameUsedForCopying=Name diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am new file mode 100644 index 0000000..3e94fa4 --- /dev/null +++ b/src/icons/Makefile.am @@ -0,0 +1,5 @@ +KDE_ICON = AUTO + +appinfo_ICON = AUTO +appinfodir = $(kde_datadir)/appinfo/icons + diff --git a/src/icons/Makefile.am~ b/src/icons/Makefile.am~ new file mode 100644 index 0000000..3e94fa4 --- /dev/null +++ b/src/icons/Makefile.am~ @@ -0,0 +1,5 @@ +KDE_ICON = AUTO + +appinfo_ICON = AUTO +appinfodir = $(kde_datadir)/appinfo/icons + diff --git a/src/icons/Makefile.in b/src/icons/Makefile.in new file mode 100644 index 0000000..371b4fb --- /dev/null +++ b/src/icons/Makefile.in @@ -0,0 +1,578 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# KDE tags expanded automatically by am_edit - $Revision: 483858 $ +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/icons +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +#>+ 1 +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +ARTSCCONFIG = @ARTSCCONFIG@ +AUTOCONF = @AUTOCONF@ +AUTODIRS = @AUTODIRS@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONF_FILES = @CONF_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DCOPIDL = @DCOPIDL@ +DCOPIDL2CPP = @DCOPIDL2CPP@ +DCOPIDLNG = @DCOPIDLNG@ +DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_PERMISSIVE_FLAG = @ENABLE_PERMISSIVE_FLAG@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FRAMEWORK_COREAUDIO = @FRAMEWORK_COREAUDIO@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +HAVE_GCC_VISIBILITY = @HAVE_GCC_VISIBILITY@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KCFG_DEPENDENCIES = @KCFG_DEPENDENCIES@ +KCONFIG_COMPILER = @KCONFIG_COMPILER@ +KDECONFIG = @KDECONFIG@ +KDE_CHECK_PLUGIN = @KDE_CHECK_PLUGIN@ +KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@ +KDE_INCLUDES = @KDE_INCLUDES@ +KDE_LDFLAGS = @KDE_LDFLAGS@ +KDE_MT_LDFLAGS = @KDE_MT_LDFLAGS@ +KDE_MT_LIBS = @KDE_MT_LIBS@ +KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@ +KDE_PLUGIN = @KDE_PLUGIN@ +KDE_RPATH = @KDE_RPATH@ +KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@ +KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@ +KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@ +KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@ +KDE_USE_FPIE = @KDE_USE_FPIE@ +KDE_USE_NMCHECK_FALSE = @KDE_USE_NMCHECK_FALSE@ +KDE_USE_NMCHECK_TRUE = @KDE_USE_NMCHECK_TRUE@ +KDE_USE_PIE = @KDE_USE_PIE@ +KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_AS_NEEDED = @LDFLAGS_AS_NEEDED@ +LDFLAGS_NEW_DTAGS = @LDFLAGS_NEW_DTAGS@ +LIBCOMPAT = @LIBCOMPAT@ +LIBCRYPT = @LIBCRYPT@ +LIBDL = @LIBDL@ +LIBJPEG = @LIBJPEG@ +LIBOBJS = @LIBOBJS@ +LIBPNG = @LIBPNG@ +LIBPTHREAD = @LIBPTHREAD@ +LIBRESOLV = @LIBRESOLV@ +LIBS = @LIBS@ +LIBSM = @LIBSM@ +LIBSOCKET = @LIBSOCKET@ +LIBTOOL = @LIBTOOL@ +LIBUCB = @LIBUCB@ +LIBUTIL = @LIBUTIL@ +LIBZ = @LIBZ@ +LIB_KAB = @LIB_KAB@ +LIB_KABC = @LIB_KABC@ +LIB_KDECORE = @LIB_KDECORE@ +LIB_KDED = @LIB_KDED@ +LIB_KDEPIM = @LIB_KDEPIM@ +LIB_KDEPRINT = @LIB_KDEPRINT@ +LIB_KDEUI = @LIB_KDEUI@ +LIB_KDNSSD = @LIB_KDNSSD@ +LIB_KFILE = @LIB_KFILE@ +LIB_KFM = @LIB_KFM@ +LIB_KHTML = @LIB_KHTML@ +LIB_KIMPROXY = @LIB_KIMPROXY@ +LIB_KIO = @LIB_KIO@ +LIB_KJS = @LIB_KJS@ +LIB_KNEWSTUFF = @LIB_KNEWSTUFF@ +LIB_KPARTS = @LIB_KPARTS@ +LIB_KSPELL = @LIB_KSPELL@ +LIB_KSYCOCA = @LIB_KSYCOCA@ +LIB_KUNITTEST = @LIB_KUNITTEST@ +LIB_KUTILS = @LIB_KUTILS@ +LIB_POLL = @LIB_POLL@ +LIB_QPE = @LIB_QPE@ +LIB_QT = @LIB_QT@ +LIB_SMB = @LIB_SMB@ +LIB_X11 = @LIB_X11@ +LIB_XEXT = @LIB_XEXT@ +LIB_XRENDER = @LIB_XRENDER@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MAKEKDEWIDGETS = @MAKEKDEWIDGETS@ +MCOPIDL = @MCOPIDL@ +MEINPROC = @MEINPROC@ +MOC = @MOC@ +MSGFMT = @MSGFMT@ +NOOPT_CFLAGS = @NOOPT_CFLAGS@ +NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +QTE_NORTTI = @QTE_NORTTI@ +QT_INCLUDES = @QT_INCLUDES@ +QT_LDFLAGS = @QT_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TOPSUBDIRS = @TOPSUBDIRS@ +UIC = @UIC@ +UIC_TR = @UIC_TR@ +USER_INCLUDES = @USER_INCLUDES@ +USER_LDFLAGS = @USER_LDFLAGS@ +USE_EXCEPTIONS = @USE_EXCEPTIONS@ +USE_RTTI = @USE_RTTI@ +USE_THREADS = @USE_THREADS@ +VERSION = @VERSION@ +WOVERLOADED_VIRTUAL = @WOVERLOADED_VIRTUAL@ +XGETTEXT = @XGETTEXT@ +XMKMF = @XMKMF@ +XMLLINT = @XMLLINT@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_INCLUDES = @X_INCLUDES@ +X_LDFLAGS = @X_LDFLAGS@ +X_PRE_LIBS = @X_PRE_LIBS@ +X_RPATH = @X_RPATH@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +all_includes = @all_includes@ +all_libraries = @all_libraries@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +include_ARTS_FALSE = @include_ARTS_FALSE@ +include_ARTS_TRUE = @include_ARTS_TRUE@ +include_x11_FALSE = @include_x11_FALSE@ +include_x11_TRUE = @include_x11_TRUE@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kde_appsdir = @kde_appsdir@ +kde_bindir = @kde_bindir@ +kde_confdir = @kde_confdir@ +kde_datadir = @kde_datadir@ +kde_htmldir = @kde_htmldir@ +kde_icondir = @kde_icondir@ +kde_includes = @kde_includes@ +kde_kcfgdir = @kde_kcfgdir@ +kde_libraries = @kde_libraries@ +kde_libs_htmldir = @kde_libs_htmldir@ +kde_libs_prefix = @kde_libs_prefix@ +kde_locale = @kde_locale@ +kde_mimedir = @kde_mimedir@ +kde_moduledir = @kde_moduledir@ +kde_qtver = @kde_qtver@ +kde_servicesdir = @kde_servicesdir@ +kde_servicetypesdir = @kde_servicetypesdir@ +kde_sounddir = @kde_sounddir@ +kde_styledir = @kde_styledir@ +kde_templatesdir = @kde_templatesdir@ +kde_wallpaperdir = @kde_wallpaperdir@ +kde_widgetdir = @kde_widgetdir@ +kdeinitdir = @kdeinitdir@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +qt_includes = @qt_includes@ +qt_libraries = @qt_libraries@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +unsermake_enable_pch_FALSE = @unsermake_enable_pch_FALSE@ +unsermake_enable_pch_TRUE = @unsermake_enable_pch_TRUE@ +x_includes = @x_includes@ +x_libraries = @x_libraries@ +xdg_appsdir = @xdg_appsdir@ +xdg_directorydir = @xdg_directorydir@ +xdg_menudir = @xdg_menudir@ +KDE_ICON = AUTO +appinfo_ICON = AUTO +appinfodir = $(kde_datadir)/appinfo/icons +#>- all: all-am +#>+ 1 +all: docs-am all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +#>- @for dep in $?; do \ +#>- case '$(am__configure_deps)' in \ +#>- *$$dep*) \ +#>- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ +#>- && exit 0; \ +#>- exit 1;; \ +#>- esac; \ +#>- done; \ +#>- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/icons/Makefile'; \ +#>- cd $(top_srcdir) && \ +#>- $(AUTOMAKE) --gnu src/icons/Makefile +#>+ 12 + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/icons/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/icons/Makefile + cd $(top_srcdir) && perl admin/am_edit src/icons/Makefile.in +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +#>- clean: clean-am +#>+ 1 +clean: kde-rpo-clean clean-am + +#>- clean-am: clean-generic clean-libtool mostlyclean-am +#>+ 1 +clean-am: clean-bcheck clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +#>- install-data-am: +#>+ 1 +install-data-am: install-kde-icons + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +#>- uninstall-am: uninstall-info-am +#>+ 1 +uninstall-am: uninstall-kde-icons uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +#>+ 2 +KDE_DIST=hi64-action-cachefolder.png hi64-action-binaryfolder.png hi64-action-configfolder.png Makefile.am Makefile.in hi64-action-tmpfolder.png + +#>+ 2 +docs-am: + +#>+ 22 +install-kde-icons: + $(mkinstalldirs) $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions + $(INSTALL_DATA) $(srcdir)/hi64-action-binaryfolder.png $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/binaryfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-tmpfolder.png $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/tmpfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-configfolder.png $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/configfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-cachefolder.png $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/cachefolder.png + $(mkinstalldirs) $(DESTDIR)$(appinfodir)/hicolor/64x64/actions + $(INSTALL_DATA) $(srcdir)/hi64-action-binaryfolder.png $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/binaryfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-tmpfolder.png $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/tmpfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-configfolder.png $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/configfolder.png + $(INSTALL_DATA) $(srcdir)/hi64-action-cachefolder.png $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/cachefolder.png + +uninstall-kde-icons: + -rm -f $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/binaryfolder.png + -rm -f $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/tmpfolder.png + -rm -f $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/configfolder.png + -rm -f $(DESTDIR)$(kde_icondir)/hicolor/64x64/actions/cachefolder.png + -rm -f $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/binaryfolder.png + -rm -f $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/tmpfolder.png + -rm -f $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/configfolder.png + -rm -f $(DESTDIR)$(appinfodir)/hicolor/64x64/actions/cachefolder.png + +#>+ 15 +force-reedit: + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/icons/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/icons/Makefile + cd $(top_srcdir) && perl admin/am_edit src/icons/Makefile.in + + +#>+ 21 +clean-bcheck: + rm -f *.bchecktest.cc *.bchecktest.cc.class a.out + +bcheck: bcheck-am + +bcheck-am: + @for i in ; do \ + if test $(srcdir)/$$i -nt $$i.bchecktest.cc; then \ + echo "int main() {return 0;}" > $$i.bchecktest.cc ; \ + echo "#include \"$$i\"" >> $$i.bchecktest.cc ; \ + echo "$$i"; \ + if ! $(CXX) $(DEFS) -I. -I$(srcdir) -I$(top_builddir) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(KDE_CXXFLAGS) --dump-class-hierarchy -c $$i.bchecktest.cc; then \ + rm -f $$i.bchecktest.cc; exit 1; \ + fi ; \ + echo "" >> $$i.bchecktest.cc.class; \ + perl $(top_srcdir)/admin/bcheck.pl $$i.bchecktest.cc.class || { rm -f $$i.bchecktest.cc; exit 1; }; \ + rm -f a.out; \ + fi ; \ + done + + +#>+ 3 +final: + $(MAKE) all-am + +#>+ 3 +final-install: + $(MAKE) install-am + +#>+ 3 +no-final: + $(MAKE) all-am + +#>+ 3 +no-final-install: + $(MAKE) install-am + +#>+ 3 +kde-rpo-clean: + -rm -f *.rpo + +#>+ 3 +nmcheck: +nmcheck-am: nmcheck diff --git a/src/icons/binaryfolder.png~ b/src/icons/binaryfolder.png~ Binary files differnew file mode 100644 index 0000000..9634875 --- /dev/null +++ b/src/icons/binaryfolder.png~ diff --git a/src/icons/cachefolder.png~ b/src/icons/cachefolder.png~ Binary files differnew file mode 100644 index 0000000..bf08426 --- /dev/null +++ b/src/icons/cachefolder.png~ diff --git a/src/icons/configfolder.png~ b/src/icons/configfolder.png~ Binary files differnew file mode 100644 index 0000000..dfc3a6a --- /dev/null +++ b/src/icons/configfolder.png~ diff --git a/src/icons/hi64-action-binaryfolder.png b/src/icons/hi64-action-binaryfolder.png Binary files differnew file mode 100644 index 0000000..cd02b16 --- /dev/null +++ b/src/icons/hi64-action-binaryfolder.png diff --git a/src/icons/hi64-action-cachefolder.png b/src/icons/hi64-action-cachefolder.png Binary files differnew file mode 100644 index 0000000..950ba08 --- /dev/null +++ b/src/icons/hi64-action-cachefolder.png diff --git a/src/icons/hi64-action-configfolder.png b/src/icons/hi64-action-configfolder.png Binary files differnew file mode 100644 index 0000000..e47ed4b --- /dev/null +++ b/src/icons/hi64-action-configfolder.png diff --git a/src/icons/hi64-action-tmpfolder.png b/src/icons/hi64-action-tmpfolder.png Binary files differnew file mode 100644 index 0000000..20c3057 --- /dev/null +++ b/src/icons/hi64-action-tmpfolder.png |